Core/Misc: Remove large functions from headers
This commit is contained in:
@@ -551,6 +551,11 @@ bool Battlefield::AddOrSetPlayerToCorrectBfGroup(Player* player)
|
||||
//--------------------
|
||||
//-Battlefield Method-
|
||||
//--------------------
|
||||
void Battlefield::SetGraveyardNumber(uint32 number)
|
||||
{
|
||||
m_GraveyardList.resize(number);
|
||||
}
|
||||
|
||||
BfGraveyard* Battlefield::GetGraveyardById(uint32 id) const
|
||||
{
|
||||
if (id < m_GraveyardList.size())
|
||||
|
||||
@@ -175,7 +175,7 @@ class TC_GAME_API Battlefield : public ZoneScript
|
||||
void InvitePlayersInZoneToWar();
|
||||
|
||||
/// Called when a Unit is kill in battlefield zone
|
||||
virtual void HandleKill(Player* /*killer*/, Unit* /*killed*/) { };
|
||||
virtual void HandleKill(Player* /*killer*/, Unit* /*killed*/) { }
|
||||
|
||||
uint32 GetTypeId() const { return m_TypeId; }
|
||||
uint32 GetZoneId() const { return m_ZoneId; }
|
||||
@@ -235,7 +235,7 @@ class TC_GAME_API Battlefield : public ZoneScript
|
||||
// Find which graveyard the player must be teleported to to be resurrected by spiritguide
|
||||
WorldSafeLocsEntry const* GetClosestGraveyard(Player* player);
|
||||
|
||||
void SetGraveyardNumber(uint32 number) { m_GraveyardList.resize(number); }
|
||||
void SetGraveyardNumber(uint32 number);
|
||||
BfGraveyard* GetGraveyardById(uint32 id) const;
|
||||
|
||||
// Misc methods
|
||||
@@ -281,7 +281,7 @@ class TC_GAME_API Battlefield : public ZoneScript
|
||||
void HideNpc(Creature* creature);
|
||||
void ShowNpc(Creature* creature, bool aggressive);
|
||||
|
||||
GraveyardVect GetGraveyardVector() const { return m_GraveyardList; }
|
||||
GraveyardVect const& GetGraveyardVector() const { return m_GraveyardList; }
|
||||
|
||||
uint32 GetTimer() const { return m_Timer; }
|
||||
void SetTimer(uint32 timer) { m_Timer = timer; }
|
||||
|
||||
@@ -83,6 +83,11 @@ Group* GroupMgr::GetGroupByDbStoreId(uint32 storageId) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void GroupMgr::SetGroupDbStoreSize(uint32 newSize)
|
||||
{
|
||||
GroupDbStore.resize(newSize);
|
||||
}
|
||||
|
||||
ObjectGuid::LowType GroupMgr::GenerateGroupId()
|
||||
{
|
||||
if (NextGroupId >= 0xFFFFFFFE)
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
void FreeGroupDbStoreId(Group* group);
|
||||
void SetNextGroupDbStoreId(uint32 storageId) { NextGroupDbStoreId = storageId; };
|
||||
Group* GetGroupByDbStoreId(uint32 storageId) const;
|
||||
void SetGroupDbStoreSize(uint32 newSize) { GroupDbStore.resize(newSize); }
|
||||
void SetGroupDbStoreSize(uint32 newSize);
|
||||
|
||||
void Update(uint32 diff);
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ struct npc_wg_spirit_guide : public ScriptedAI
|
||||
if (!wintergrasp)
|
||||
return true;
|
||||
|
||||
GraveyardVect graveyard = wintergrasp->GetGraveyardVector();
|
||||
GraveyardVect const& graveyard = wintergrasp->GetGraveyardVector();
|
||||
for (uint8 i = 0; i < graveyard.size(); i++)
|
||||
if (graveyard[i]->GetControlTeamId() == player->GetTeamId())
|
||||
AddGossipItemFor(player, GossipOptionNpc::None, player->GetSession()->GetTrinityString(((BfGraveyardWG*)graveyard[i])->GetTextId()), GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + i);
|
||||
@@ -215,7 +215,7 @@ struct npc_wg_spirit_guide : public ScriptedAI
|
||||
Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(me->GetMap(), BATTLEFIELD_BATTLEID_WG);
|
||||
if (wintergrasp)
|
||||
{
|
||||
GraveyardVect gy = wintergrasp->GetGraveyardVector();
|
||||
GraveyardVect const& gy = wintergrasp->GetGraveyardVector();
|
||||
for (uint8 i = 0; i < gy.size(); i++)
|
||||
if (action - GOSSIP_ACTION_INFO_DEF == i && gy[i]->GetControlTeamId() == player->GetTeamId())
|
||||
if (WorldSafeLocsEntry const* safeLoc = sObjectMgr->GetWorldSafeLoc(gy[i]->GetGraveyardId()))
|
||||
|
||||
Reference in New Issue
Block a user