mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[8688] proper implementation of creatures ghost-flags
this reverts 8676 (9c50d9e70314b0cd9eb0fe3bac8040d64a9965a5) the new flag is from wdb-files so your database should be already alright also i've dropped the function Player::CanInteractWithNPCs cause it was used only in one place and didn't seem to make anything easier NOTE for this flag: it just means that the creature can be seen by ghost-players too.. so they are still visible for alive players.. unless a special aura or ther unitflag (spiritguide/healer) disables this.. (see next commit for it)
This commit is contained in:
parent
58139610eb
commit
e990d5c509
12 changed files with 24 additions and 36 deletions
|
|
@ -9603,8 +9603,7 @@ bool Unit::isTargetableForAttack(bool inverseAlive /*=false*/) const
|
|||
if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE))
|
||||
return false;
|
||||
|
||||
// target is dead or has ghost-flag
|
||||
if ((!isAlive() || (GetTypeId() == TYPEID_UNIT && ((Creature *)this)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_GHOST)) != inverseAlive)
|
||||
if (!(isAlive() != inverseAlive))
|
||||
return false;
|
||||
|
||||
return IsInWorld() && !hasUnitState(UNIT_STAT_DIED)&& !isInFlight() /*&& !isStealth()*/;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue