Chore: Remove unused #if statement (TrinityCore, Mangos, AzerothCore, TBC, Classic, Mists, Cata) (#217)

This commit is contained in:
iThorgrim
2025-01-21 17:37:39 +01:00
committed by GitHub
parent 16173cb751
commit 2e89531b05
35 changed files with 60 additions and 2504 deletions

View File

@@ -8,15 +8,7 @@
#define _ELUNA_INSTANCE_DATA_H
#include "LuaEngine.h"
#if defined(TRINITY) || AZEROTHCORE
#include "InstanceScript.h"
#else
#include "InstanceData.h"
#endif
#ifdef TRINITY
#include "Map.h"
#endif
/*
* This class is a small wrapper around `InstanceData`,
@@ -64,35 +56,23 @@ private:
std::string lastSaveData;
public:
#ifdef TRINITY
ElunaInstanceAI(Map* map) : InstanceData(map->ToInstanceMap())
{
}
#else
ElunaInstanceAI(Map* map) : InstanceData(map)
{
}
#endif
#ifndef TRINITY
void Initialize() override;
#endif
/*
* These are responsible for serializing/deserializing the instance's
* data table to/from the core.
*/
void Load(const char* data) override;
#if defined TRINITY || AZEROTHCORE
// Simply calls Save, since the functions are a bit different in name and data types on different cores
std::string GetSaveData() override
{
return Save();
}
const char* Save() const;
#else
const char* Save() const override;
#endif
/*
@@ -139,11 +119,7 @@ public:
sEluna->OnPlayerEnterInstance(this, player);
}
#if defined TRINITY || AZEROTHCORE
void OnGameObjectCreate(GameObject* gameobject) override
#else
void OnObjectCreate(GameObject* gameobject) override
#endif
{
sEluna->OnGameObjectCreate(this, gameobject);
}