Fix the incorrect logic of threat online status check. Also add targets in other map or phase to offline container.
This commit is contained in:
@@ -178,11 +178,13 @@ void HostileReference::updateOnlineStatus()
|
|||||||
// ref is valid
|
// ref is valid
|
||||||
// target is no player or not gamemaster
|
// target is no player or not gamemaster
|
||||||
// target is not in flight
|
// target is not in flight
|
||||||
if (isValid() &&
|
if (isValid()
|
||||||
((getTarget()->GetTypeId() != TYPEID_PLAYER || !getTarget()->ToPlayer()->isGameMaster()) ||
|
&& (getTarget()->GetTypeId() != TYPEID_PLAYER || !getTarget()->ToPlayer()->isGameMaster())
|
||||||
!getTarget()->HasUnitState(UNIT_STAT_IN_FLIGHT)))
|
&& !getTarget()->HasUnitState(UNIT_STAT_IN_FLIGHT)
|
||||||
|
&& getTarget()->IsInMap(getSourceUnit())
|
||||||
|
)
|
||||||
{
|
{
|
||||||
Creature* creature = getSourceUnit()->ToCreature();
|
Creature* creature = getSourceUnit()->ToCreature();
|
||||||
online = getTarget()->isInAccessiblePlaceFor(creature);
|
online = getTarget()->isInAccessiblePlaceFor(creature);
|
||||||
if (!online)
|
if (!online)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user