fix(Core/DungeonFinder): Seasonal bosses are available only via Dunge… (#8056)

* fix(Core/DungeonFinder): Seasonal bosses are available only via Dungeon Finder tool.

Fixes #7889

* Update.

* Buildfix.

* Missing.
This commit is contained in:
UltraNix
2021-10-14 13:22:37 +02:00
committed by GitHub
parent 01d3747efd
commit b8345a2f98
8 changed files with 88 additions and 7 deletions

View File

@@ -23,6 +23,7 @@
#include "Creature.h"
#include "DynamicTree.h"
#include "DynamicVisibility.h"
#include "GameObjectAI.h"
#include "GridNotifiers.h"
#include "Log.h"
#include "MapMgr.h"
@@ -1673,6 +1674,11 @@ bool WorldObject::CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth, boo
if (cObj->IsAIEnabled && this->ToPlayer() && !cObj->AI()->CanBeSeen(this->ToPlayer()))
return false;
// Gameobject scripts
if (GameObject const* goObj = obj->ToGameObject())
if (this->ToPlayer() && !goObj->AI()->CanBeSeen(this->ToPlayer()))
return false;
// pussywizard: arena spectator
if (obj->GetTypeId() == TYPEID_PLAYER)
if (((const Player*)obj)->IsSpectator() && ((const Player*)obj)->FindMap()->IsBattleArena())