mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-27 22:16:11 +00:00
fix(Core/Player): Prevent player gaining client control when charmed (#24539)
Co-authored-by: ariel- <ariel-@users.noreply.github.com> Co-authored-by: Treeston <treeston.mmoc@gmail.com>
This commit is contained in:
@@ -11125,6 +11125,8 @@ void Unit::SetCharm(Unit* charm, bool apply)
|
||||
}
|
||||
else
|
||||
{
|
||||
charm->ClearUnitState(UNIT_STATE_CHARMED);
|
||||
|
||||
if (IsPlayer())
|
||||
{
|
||||
if (!RemoveGuidValue(UNIT_FIELD_CHARM, charm->GetGUID()))
|
||||
@@ -18798,6 +18800,8 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
|
||||
else if (IsPlayer())
|
||||
RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
|
||||
|
||||
AddUnitState(UNIT_STATE_CHARMED);
|
||||
|
||||
if (Creature* creature = ToCreature())
|
||||
creature->RefreshSwimmingFlag();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user