Core/Player: Prevent changing equipment while charmed.

Port From (https://github.com/TrinityCore/TrinityCore/commit/fc12e47cb8e3f4c1097b41e94a92151776818717)
This commit is contained in:
hondacrx
2020-08-24 23:37:06 -04:00
parent 18d7144ca6
commit 3dee2ddf3b
@@ -5172,6 +5172,9 @@ namespace Game.Entities
if (HasUnitState(UnitState.Stunned))
return InventoryResult.GenericStunned;
if (IsCharmed())
return InventoryResult.CantDoThatRightNow; // @todo is this the correct error?
// do not allow equipping gear except weapons, offhands, projectiles, relics in
// - combat
// - in-progress arenas
@@ -5405,6 +5408,9 @@ namespace Game.Entities
if (pItem.m_lootGenerated)
return InventoryResult.LootGone;
if (IsCharmed())
return InventoryResult.CantDoThatRightNow; // @todo is this the correct error?
// do not allow unequipping gear except weapons, offhands, projectiles, relics in
// - combat
// - in-progress arenas