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:
megamage
2011-09-20 10:26:34 -04:00
parent 8aead2a1ee
commit 4ccb22e1a6
+5 -3
View File
@@ -178,9 +178,11 @@ 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);