mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +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;
|
||||
std::map<std::pair<uint32, uint16>,EQStream *>::iterator stream_itr;
|
||||
EQStream* currStream = NULL;
|
||||
int num;
|
||||
int length;
|
||||
unsigned char buffer[2048];
|
||||
|
||||
@ -606,14 +606,16 @@ void Mob::RogueBackstab(Mob* other, bool min_damage, int ReuseTime)
|
||||
if(IsClient()){
|
||||
const ItemInst *wpn = nullptr;
|
||||
wpn = CastToClient()->GetInv().GetItem(SLOT_PRIMARY);
|
||||
primaryweapondamage = GetWeaponDamage(other, wpn);
|
||||
backstab_dmg = wpn->GetItem()->BackstabDmg;
|
||||
for(int i = 0; i < MAX_AUGMENT_SLOTS; ++i)
|
||||
{
|
||||
ItemInst *aug = wpn->GetAugment(i);
|
||||
if(aug)
|
||||
if(wpn) {
|
||||
primaryweapondamage = GetWeaponDamage(other, wpn);
|
||||
backstab_dmg = wpn->GetItem()->BackstabDmg;
|
||||
for(int i = 0; i < MAX_AUGMENT_SLOTS; ++i)
|
||||
{
|
||||
backstab_dmg += aug->GetItem()->BackstabDmg;
|
||||
ItemInst *aug = wpn->GetAugment(i);
|
||||
if(aug)
|
||||
{
|
||||
backstab_dmg += aug->GetItem()->BackstabDmg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user