mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[10053] Use UNIT_STAT_CONTROLED for mark unit state under direct player control.
* This allow prevent move home/to caster at apply * Also replace AI and reset movegens at control time * Also stop combat and clear threat/hostile list at lost control for prevent combat with freindly units.
This commit is contained in:
parent
e427ce80cc
commit
b4b45333d8
9 changed files with 60 additions and 32 deletions
|
|
@ -2236,7 +2236,7 @@ Creature* Player::GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask)
|
|||
return NULL;
|
||||
|
||||
// not in interactive state
|
||||
if (hasUnitState(UNIT_STAT_CAN_NOT_REACT))
|
||||
if (hasUnitState(UNIT_STAT_CAN_NOT_REACT_OR_LOST_CONTROL))
|
||||
return NULL;
|
||||
|
||||
// exist (we need look pets also for some interaction (quest/etc)
|
||||
|
|
@ -2290,7 +2290,7 @@ GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid guid, uint32 gameo
|
|||
return NULL;
|
||||
|
||||
// not in interactive state
|
||||
if (hasUnitState(UNIT_STAT_CAN_NOT_REACT))
|
||||
if (hasUnitState(UNIT_STAT_CAN_NOT_REACT_OR_LOST_CONTROL))
|
||||
return NULL;
|
||||
|
||||
if (GameObject *go = GetMap()->GetGameObject(guid))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue