Fix exploit that Titan's Grip allow to use with it staff/polearm

--HG--
branch : trunk
This commit is contained in:
Kudlaty
2009-11-01 03:51:09 +01:00
parent 85d7084e85
commit 425597d522
2 changed files with 10 additions and 2 deletions
+9 -1
View File
@@ -1854,7 +1854,15 @@ class MANGOS_DLL_SPEC Player : public Unit
void SetCanParry(bool value);
bool CanBlock() const { return m_canBlock; }
void SetCanBlock(bool value);
bool CanTitanGrip() const { return m_canTitanGrip ; }
bool CanTitanGrip() const
{
Item *mainItem = GetItemByPos( INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND );
if (mainItem && ( mainItem->GetProto()->SubClass == ITEM_SUBCLASS_WEAPON_POLEARM || mainItem->GetProto()->SubClass == ITEM_SUBCLASS_WEAPON_STAFF ))
return false;
return m_canTitanGrip ;
}
void SetCanTitanGrip(bool value) { m_canTitanGrip = value; }
bool CanTameExoticPets() const { return isGameMaster() || HasAuraType(SPELL_AURA_ALLOW_TAME_PET_TYPE); }