mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +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
|
|
@ -1749,7 +1749,7 @@ bool Creature::IsVisibleInGridForPlayer(Player* pl) const
|
|||
// Live player (or with not release body see live creatures or death creatures with corpse disappearing time > 0
|
||||
if(pl->isAlive() || pl->GetDeathTimer() > 0)
|
||||
{
|
||||
if(GetCreatureInfo()->flags_extra & (CREATURE_FLAG_EXTRA_INVISIBLE | CREATURE_FLAG_EXTRA_GHOST))
|
||||
if (GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_INVISIBLE)
|
||||
return false;
|
||||
return (isAlive() || m_deathTimer > 0 || (m_isDeadByDefault && m_deathState == CORPSE));
|
||||
}
|
||||
|
|
@ -1766,8 +1766,8 @@ bool Creature::IsVisibleInGridForPlayer(Player* pl) const
|
|||
}
|
||||
}
|
||||
|
||||
// Dead player see ghosts
|
||||
if (GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_GHOST)
|
||||
// Dead player can see ghosts
|
||||
if (GetCreatureInfo()->type_flags & CREATURE_TYPEFLAGS_GHOST_VISIBLE)
|
||||
return true;
|
||||
|
||||
// and not see any other
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue