mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[11650] Group members see same group member ghosts.
Also drop battleground case that just same check in fact. Original patch and research provided by Den.
This commit is contained in:
parent
17b7e3b32c
commit
45292a9d56
2 changed files with 10 additions and 17 deletions
|
|
@ -19840,19 +19840,13 @@ bool Player::IsVisibleInGridForPlayer( Player* pl ) const
|
|||
if (pl->isGameMaster() && GetSession()->GetSecurity() <= pl->GetSession()->GetSecurity())
|
||||
return true;
|
||||
|
||||
// It seems in battleground everyone sees everyone, except the enemy-faction ghosts
|
||||
if (InBattleGround())
|
||||
{
|
||||
if (!(isAlive() || m_deathTimer > 0) && !IsFriendlyTo(pl) )
|
||||
return false;
|
||||
// player see dead player/ghost from own group/raid
|
||||
if (IsInSameRaidWith(pl))
|
||||
return true;
|
||||
}
|
||||
|
||||
// Live player see live player or dead player with not realized corpse
|
||||
if (pl->isAlive() || pl->m_deathTimer > 0)
|
||||
{
|
||||
return isAlive() || m_deathTimer > 0;
|
||||
}
|
||||
|
||||
// Ghost see other friendly ghosts, that's for sure
|
||||
if (!(isAlive() || m_deathTimer > 0) && IsFriendlyTo(pl))
|
||||
|
|
@ -19861,8 +19855,7 @@ bool Player::IsVisibleInGridForPlayer( Player* pl ) const
|
|||
// Dead player see live players near own corpse
|
||||
if (isAlive())
|
||||
{
|
||||
Corpse *corpse = pl->GetCorpse();
|
||||
if(corpse)
|
||||
if (Corpse *corpse = pl->GetCorpse())
|
||||
{
|
||||
// 20 - aggro distance for same level, 25 - max additional distance if player level less that creature level
|
||||
if (corpse->IsWithinDistInMap(this, (20 + 25) * sWorld.getConfig(CONFIG_FLOAT_RATE_CREATURE_AGGRO)))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11649"
|
||||
#define REVISION_NR "11650"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue