From 3dee2ddf3ba8cf22c62bd1b4c4a5a343e3839baf Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 24 Aug 2020 23:37:06 -0400 Subject: [PATCH] Core/Player: Prevent changing equipment while charmed. Port From (https://github.com/TrinityCore/TrinityCore/commit/fc12e47cb8e3f4c1097b41e94a92151776818717) --- Source/Game/Entities/Player/Player.Items.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Game/Entities/Player/Player.Items.cs b/Source/Game/Entities/Player/Player.Items.cs index b2d17330a..7f7d32d3e 100644 --- a/Source/Game/Entities/Player/Player.Items.cs +++ b/Source/Game/Entities/Player/Player.Items.cs @@ -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