mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[8261] Skip not in world targets in same way as not existed targets.
This solve some crash possabilites after GetMap patch.
This commit is contained in:
parent
38326edb12
commit
8720687bdb
2 changed files with 8 additions and 8 deletions
|
|
@ -43,7 +43,7 @@ template<class T>
|
|||
void
|
||||
TargetedMovementGenerator<T>::_setTargetLocation(T &owner)
|
||||
{
|
||||
if( !i_target.isValid() || !&owner )
|
||||
if (!i_target.isValid() || !i_target->IsInWorld())
|
||||
return;
|
||||
|
||||
if (owner.hasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED))
|
||||
|
|
@ -126,10 +126,10 @@ template<class T>
|
|||
bool
|
||||
TargetedMovementGenerator<T>::Update(T &owner, const uint32 & time_diff)
|
||||
{
|
||||
if(!i_target.isValid())
|
||||
if (!i_target.isValid() || !i_target->IsInWorld())
|
||||
return false;
|
||||
|
||||
if( !&owner || !owner.isAlive())
|
||||
if (!owner.isAlive())
|
||||
return true;
|
||||
|
||||
if (owner.hasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_FLEEING | UNIT_STAT_DISTRACTED))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8260"
|
||||
#define REVISION_NR "8261"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue