Merge pull request #401 from noudess/master

Check to make sure we're a client before a CastToClient().
This commit is contained in:
Alex 2015-04-30 16:59:39 -07:00
commit 3846dc2bbc

View File

@ -983,9 +983,11 @@ int Mob::GetWeaponDamage(Mob *against, const ItemInst *weapon_item, uint32 *hate
}
else{
bool MagicGloves=false;
ItemInst *gloves=CastToClient()->GetInv().GetItem(MainHands);
if (gloves != nullptr) {
MagicGloves = gloves->GetItem()->Magic;
if (IsClient()) {
ItemInst *gloves=CastToClient()->GetInv().GetItem(MainHands);
if (gloves != nullptr) {
MagicGloves = gloves->GetItem()->Magic;
}
}
if((GetClass() == MONK || GetClass() == BEASTLORD)) {