mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 01:37:05 +00:00
[6885] In dungeons even fighting creatures are supposed to put nearby players in combat. 3rd party scripting libraries might have to be updated
This commit is contained in:
parent
2e08a63da7
commit
a3a57a5390
3 changed files with 15 additions and 7 deletions
|
|
@ -70,7 +70,7 @@ inline void PlayerCreatureRelocationWorker(Player* pl, Creature* c)
|
|||
pl->UpdateVisibilityOf(c);
|
||||
|
||||
// Creature AI reaction
|
||||
if(!c->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
|
||||
if(!c->hasUnitState(UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
|
||||
{
|
||||
if( c->AI() && c->AI()->IsVisible(pl) && !c->IsInEvadeMode() )
|
||||
c->AI()->MoveInLineOfSight(pl);
|
||||
|
|
@ -79,13 +79,13 @@ inline void PlayerCreatureRelocationWorker(Player* pl, Creature* c)
|
|||
|
||||
inline void CreatureCreatureRelocationWorker(Creature* c1, Creature* c2)
|
||||
{
|
||||
if(!c1->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
|
||||
if(!c1->hasUnitState(UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
|
||||
{
|
||||
if( c1->AI() && c1->AI()->IsVisible(c2) && !c1->IsInEvadeMode() )
|
||||
c1->AI()->MoveInLineOfSight(c2);
|
||||
}
|
||||
|
||||
if(!c2->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
|
||||
if(!c2->hasUnitState(UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
|
||||
{
|
||||
if( c2->AI() && c2->AI()->IsVisible(c1) && !c2->IsInEvadeMode() )
|
||||
c2->AI()->MoveInLineOfSight(c1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue