mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-08 10:02:26 +00:00
potential crash issue involving backstab & missing primary weapons resolved.
This commit is contained in:
parent
1ebf88abbb
commit
88eb0dcdfc
@ -145,7 +145,6 @@ void EQStreamFactory::ReaderLoop()
|
|||||||
{
|
{
|
||||||
fd_set readset;
|
fd_set readset;
|
||||||
std::map<std::pair<uint32, uint16>,EQStream *>::iterator stream_itr;
|
std::map<std::pair<uint32, uint16>,EQStream *>::iterator stream_itr;
|
||||||
EQStream* currStream = NULL;
|
|
||||||
int num;
|
int num;
|
||||||
int length;
|
int length;
|
||||||
unsigned char buffer[2048];
|
unsigned char buffer[2048];
|
||||||
|
|||||||
@ -606,6 +606,7 @@ void Mob::RogueBackstab(Mob* other, bool min_damage, int ReuseTime)
|
|||||||
if(IsClient()){
|
if(IsClient()){
|
||||||
const ItemInst *wpn = nullptr;
|
const ItemInst *wpn = nullptr;
|
||||||
wpn = CastToClient()->GetInv().GetItem(SLOT_PRIMARY);
|
wpn = CastToClient()->GetInv().GetItem(SLOT_PRIMARY);
|
||||||
|
if(wpn) {
|
||||||
primaryweapondamage = GetWeaponDamage(other, wpn);
|
primaryweapondamage = GetWeaponDamage(other, wpn);
|
||||||
backstab_dmg = wpn->GetItem()->BackstabDmg;
|
backstab_dmg = wpn->GetItem()->BackstabDmg;
|
||||||
for(int i = 0; i < MAX_AUGMENT_SLOTS; ++i)
|
for(int i = 0; i < MAX_AUGMENT_SLOTS; ++i)
|
||||||
@ -617,6 +618,7 @@ void Mob::RogueBackstab(Mob* other, bool min_damage, int ReuseTime)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
primaryweapondamage = (GetLevel()/7)+1; // fallback incase it's a npc without a weapon, 2 dmg at 10, 10 dmg at 65
|
primaryweapondamage = (GetLevel()/7)+1; // fallback incase it's a npc without a weapon, 2 dmg at 10, 10 dmg at 65
|
||||||
backstab_dmg = primaryweapondamage;
|
backstab_dmg = primaryweapondamage;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user