Skip to content

Commit e5bee26

Browse files
committed
Core/Movement: Fixed players being able to control their characters after teleporting to a different map while feared or confused
1 parent 588a308 commit e5bee26

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/server/game/Entities/Player/Player.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22512,7 +22512,7 @@ void Player::SendInitialPacketsAfterAddToMap()
2251222512
// same auras state lost at far teleport, send it one more time in this case also
2251322513
static const AuraType auratypes[] =
2251422514
{
22515-
SPELL_AURA_MOD_FEAR, SPELL_AURA_TRANSFORM, SPELL_AURA_WATER_WALK,
22515+
SPELL_AURA_TRANSFORM, SPELL_AURA_WATER_WALK,
2251622516
SPELL_AURA_FEATHER_FALL, SPELL_AURA_HOVER, SPELL_AURA_SAFE_FALL,
2251722517
SPELL_AURA_FLY, SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED, SPELL_AURA_NONE
2251822518
};
@@ -22568,6 +22568,9 @@ void Player::SendInitialPacketsAfterAddToMap()
2256822568
SendDirectMessage(&setCompoundState);
2256922569
}
2257022570

22571+
if (HasUnitState(UNIT_STATE_FLEEING | UNIT_STATE_CONFUSED) || HasAuraType(SPELL_AURA_MOD_CONFUSE) || HasAuraType(SPELL_AURA_MOD_FEAR))
22572+
SetClientControl(this, false);
22573+
2257122574
SendEnchantmentDurations(); // must be after add to map
2257222575
SendItemDurations(); // must be after add to map
2257322576
SendQuestGiverStatusMultiple();

0 commit comments

Comments
 (0)