Core/Game: Include cleanup

* Mostly aimed at removing Log/DatabaseEnv includes from other headers
* Fix most packet headers including other packet headers - moved common structures such as ItemInstance to their own files
* Moved SAI function definitions to source files (massive or requiring many different dependencies)
This commit is contained in:
Shauren
2017-05-18 23:52:58 +02:00
parent 7445670314
commit c5d3dd90be
357 changed files with 4791 additions and 3886 deletions

View File

@@ -16,30 +16,33 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Common.h"
#include "Opcodes.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "Player.h"
#include "Pet.h"
#include "World.h"
#include "ObjectMgr.h"
#include "GroupMgr.h"
#include "Group.h"
#include "Formulas.h"
#include "ObjectAccessor.h"
#include "Battleground.h"
#include "BattlegroundMgr.h"
#include "MapManager.h"
#include "Common.h"
#include "DatabaseEnv.h"
#include "Formulas.h"
#include "GroupMgr.h"
#include "InstanceSaveMgr.h"
#include "Util.h"
#include "Random.h"
#include "LFGMgr.h"
#include "UpdateFieldFlags.h"
#include "SpellAuras.h"
#include "PartyPackets.h"
#include "Log.h"
#include "LootMgr.h"
#include "LootPackets.h"
#include "MapManager.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "Opcodes.h"
#include "PartyPackets.h"
#include "Pet.h"
#include "Player.h"
#include "Random.h"
#include "SpellAuras.h"
#include "UpdateData.h"
#include "UpdateFieldFlags.h"
#include "Util.h"
#include "World.h"
#include "WorldPacket.h"
#include "WorldSession.h"
Roll::Roll(LootItem const& li) : itemid(li.itemid),
itemRandomPropId(li.randomPropertyId), itemRandomSuffix(li.randomSuffix), itemCount(li.count),
@@ -76,9 +79,12 @@ Group::~Group()
if (m_bgGroup)
{
TC_LOG_DEBUG("bg.battleground", "Group::~Group: battleground group being deleted.");
if (m_bgGroup->GetBgRaid(ALLIANCE) == this) m_bgGroup->SetBgRaid(ALLIANCE, NULL);
else if (m_bgGroup->GetBgRaid(HORDE) == this) m_bgGroup->SetBgRaid(HORDE, NULL);
else TC_LOG_ERROR("misc", "Group::~Group: battleground group is not linked to the correct battleground.");
if (m_bgGroup->GetBgRaid(ALLIANCE) == this)
m_bgGroup->SetBgRaid(ALLIANCE, NULL);
else if (m_bgGroup->GetBgRaid(HORDE) == this)
m_bgGroup->SetBgRaid(HORDE, NULL);
else
TC_LOG_ERROR("misc", "Group::~Group: battleground group is not linked to the correct battleground.");
}
Rolls::iterator itr;
while (!RollId.empty())