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:
@@ -59,6 +59,7 @@ public:
|
|||||||
virtual void OnStateChanged(uint32 /*state*/, Unit* /*unit*/) {}
|
virtual void OnStateChanged(uint32 /*state*/, Unit* /*unit*/) {}
|
||||||
virtual void EventInform(uint32 /*eventId*/) {}
|
virtual void EventInform(uint32 /*eventId*/) {}
|
||||||
virtual void SpellHit(Unit* /*unit*/, const SpellInfo* /*spellInfo*/) {}
|
virtual void SpellHit(Unit* /*unit*/, const SpellInfo* /*spellInfo*/) {}
|
||||||
|
virtual bool CanBeSeen(Player const* /*seer*/) { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class NullGameObjectAI : public GameObjectAI
|
class NullGameObjectAI : public GameObjectAI
|
||||||
|
|||||||
@@ -2655,13 +2655,13 @@ namespace lfg
|
|||||||
{
|
{
|
||||||
switch (dungeonId)
|
switch (dungeonId)
|
||||||
{
|
{
|
||||||
case 285: // The Headless Horseman
|
case LFG_DUNGEON_HEADLESS_HORSEMAN:
|
||||||
return IsHolidayActive(HOLIDAY_HALLOWS_END);
|
return IsHolidayActive(HOLIDAY_HALLOWS_END);
|
||||||
case 286: // The Frost Lord Ahune
|
case LFG_DUNGEON_FROST_LORD_AHUNE:
|
||||||
return IsHolidayActive(HOLIDAY_FIRE_FESTIVAL);
|
return IsHolidayActive(HOLIDAY_FIRE_FESTIVAL);
|
||||||
case 287: // Coren Direbrew
|
case LFG_DUNGEON_COREN_DIREBREW:
|
||||||
return IsHolidayActive(HOLIDAY_BREWFEST);
|
return IsHolidayActive(HOLIDAY_BREWFEST);
|
||||||
case 288: // The Crown Chemical Co.
|
case LFG_DUNGEON_CROWN_CHEMICAL_CO:
|
||||||
return IsHolidayActive(HOLIDAY_LOVE_IS_IN_THE_AIR);
|
return IsHolidayActive(HOLIDAY_LOVE_IS_IN_THE_AIR);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -140,6 +140,14 @@ namespace lfg
|
|||||||
LFG_UPDATE_FLAG_BINDED = 0x80
|
LFG_UPDATE_FLAG_BINDED = 0x80
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum LfgSeasonalDungeons
|
||||||
|
{
|
||||||
|
LFG_DUNGEON_HEADLESS_HORSEMAN = 285,
|
||||||
|
LFG_DUNGEON_FROST_LORD_AHUNE = 286,
|
||||||
|
LFG_DUNGEON_COREN_DIREBREW = 287,
|
||||||
|
LFG_DUNGEON_CROWN_CHEMICAL_CO = 288
|
||||||
|
};
|
||||||
|
|
||||||
struct RBEntryInfo
|
struct RBEntryInfo
|
||||||
{
|
{
|
||||||
RBEntryInfo() {}
|
RBEntryInfo() {}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "Creature.h"
|
#include "Creature.h"
|
||||||
#include "DynamicTree.h"
|
#include "DynamicTree.h"
|
||||||
#include "DynamicVisibility.h"
|
#include "DynamicVisibility.h"
|
||||||
|
#include "GameObjectAI.h"
|
||||||
#include "GridNotifiers.h"
|
#include "GridNotifiers.h"
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
#include "MapMgr.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()))
|
if (cObj->IsAIEnabled && this->ToPlayer() && !cObj->AI()->CanBeSeen(this->ToPlayer()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Gameobject scripts
|
||||||
|
if (GameObject const* goObj = obj->ToGameObject())
|
||||||
|
if (this->ToPlayer() && !goObj->AI()->CanBeSeen(this->ToPlayer()))
|
||||||
|
return false;
|
||||||
|
|
||||||
// pussywizard: arena spectator
|
// pussywizard: arena spectator
|
||||||
if (obj->GetTypeId() == TYPEID_PLAYER)
|
if (obj->GetTypeId() == TYPEID_PLAYER)
|
||||||
if (((const Player*)obj)->IsSpectator() && ((const Player*)obj)->FindMap()->IsBattleArena())
|
if (((const Player*)obj)->IsSpectator() && ((const Player*)obj)->FindMap()->IsBattleArena())
|
||||||
|
|||||||
@@ -1753,6 +1753,17 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CanBeSeen(Player const* player) override
|
||||||
|
{
|
||||||
|
if (player->IsGameMaster())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Group const* group = player->GetGroup();
|
||||||
|
return group && sLFGMgr->GetDungeon(group->GetGUID()) == lfg::LFG_DUNGEON_COREN_DIREBREW;
|
||||||
|
}
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_events.Reset();
|
_events.Reset();
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "CellImpl.h"
|
#include "CellImpl.h"
|
||||||
|
#include "GameObjectAI.h"
|
||||||
#include "GossipDef.h"
|
#include "GossipDef.h"
|
||||||
#include "GridNotifiers.h"
|
#include "GridNotifiers.h"
|
||||||
#include "Group.h"
|
#include "Group.h"
|
||||||
@@ -987,7 +988,7 @@ public:
|
|||||||
|
|
||||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||||
if (!players.isEmpty() && players.begin()->GetSource() && players.begin()->GetSource()->GetGroup())
|
if (!players.isEmpty() && players.begin()->GetSource() && players.begin()->GetSource()->GetGroup())
|
||||||
sLFGMgr->FinishDungeon(players.begin()->GetSource()->GetGroup()->GetGUID(), 285, me->FindMap());
|
sLFGMgr->FinishDungeon(players.begin()->GetSource()->GetGroup()->GetGUID(), lfg::LFG_DUNGEON_HEADLESS_HORSEMAN, me->FindMap());
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* /*who*/) override
|
void KilledUnit(Unit* /*who*/) override
|
||||||
@@ -1428,6 +1429,27 @@ public:
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct go_loosely_turned_soilAI : public GameObjectAI
|
||||||
|
{
|
||||||
|
go_loosely_turned_soilAI(GameObject* gameObject) : GameObjectAI(gameObject) { }
|
||||||
|
|
||||||
|
bool CanBeSeen(Player const* player) override
|
||||||
|
{
|
||||||
|
if (player->IsGameMaster())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Group const* group = player->GetGroup();
|
||||||
|
return group && sLFGMgr->GetDungeon(group->GetGUID()) == lfg::LFG_DUNGEON_HEADLESS_HORSEMAN;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
GameObjectAI* GetAI(GameObject* go) const override
|
||||||
|
{
|
||||||
|
return new go_loosely_turned_soilAI(go);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_event_hallows_end_scripts()
|
void AddSC_event_hallows_end_scripts()
|
||||||
|
|||||||
@@ -345,6 +345,17 @@ public:
|
|||||||
EventMap events;
|
EventMap events;
|
||||||
uint32 speachTimer;
|
uint32 speachTimer;
|
||||||
|
|
||||||
|
bool CanBeSeen(Player const* player) override
|
||||||
|
{
|
||||||
|
if (player->IsGameMaster())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Group const* group = player->GetGroup();
|
||||||
|
return group && sLFGMgr->GetDungeon(group->GetGUID()) == lfg::LFG_DUNGEON_CROWN_CHEMICAL_CO;
|
||||||
|
}
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
speachTimer = 0;
|
speachTimer = 0;
|
||||||
@@ -366,7 +377,7 @@ public:
|
|||||||
me->AI()->Talk(SAY_HUMMEL_5);
|
me->AI()->Talk(SAY_HUMMEL_5);
|
||||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||||
if (!players.isEmpty() && players.begin()->GetSource() && players.begin()->GetSource()->GetGroup())
|
if (!players.isEmpty() && players.begin()->GetSource() && players.begin()->GetSource()->GetGroup())
|
||||||
sLFGMgr->FinishDungeon(players.begin()->GetSource()->GetGroup()->GetGUID(), 288, me->FindMap());
|
sLFGMgr->FinishDungeon(players.begin()->GetSource()->GetGroup()->GetGUID(), lfg::LFG_DUNGEON_CROWN_CHEMICAL_CO, me->FindMap());
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* cr) override
|
void JustSummoned(Creature* cr) override
|
||||||
@@ -481,6 +492,17 @@ public:
|
|||||||
|
|
||||||
EventMap events;
|
EventMap events;
|
||||||
|
|
||||||
|
bool CanBeSeen(Player const* player) override
|
||||||
|
{
|
||||||
|
if (player->IsGameMaster())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Group const* group = player->GetGroup();
|
||||||
|
return group && sLFGMgr->GetDungeon(group->GetGUID()) == lfg::LFG_DUNGEON_CROWN_CHEMICAL_CO;
|
||||||
|
}
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,6 +105,17 @@ public:
|
|||||||
SummonList summons;
|
SummonList summons;
|
||||||
ObjectGuid InvokerGUID;
|
ObjectGuid InvokerGUID;
|
||||||
|
|
||||||
|
bool CanBeSeen(Player const* player) override
|
||||||
|
{
|
||||||
|
if (player->IsGameMaster())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Group const* group = player->GetGroup();
|
||||||
|
return group && sLFGMgr->GetDungeon(group->GetGUID()) == lfg::LFG_DUNGEON_FROST_LORD_AHUNE;
|
||||||
|
}
|
||||||
|
|
||||||
void StartPhase1()
|
void StartPhase1()
|
||||||
{
|
{
|
||||||
me->CastSpell(me, SPELL_AHUNES_SHIELD, true);
|
me->CastSpell(me, SPELL_AHUNES_SHIELD, true);
|
||||||
@@ -300,7 +311,7 @@ public:
|
|||||||
if (player->GetGroup() && !finished)
|
if (player->GetGroup() && !finished)
|
||||||
{
|
{
|
||||||
finished = true;
|
finished = true;
|
||||||
sLFGMgr->FinishDungeon(player->GetGroup()->GetGUID(), 286, me->FindMap());
|
sLFGMgr->FinishDungeon(player->GetGroup()->GetGUID(), lfg::LFG_DUNGEON_FROST_LORD_AHUNE, me->FindMap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user