mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-19 08:30:34 +01:00
Core/Game: Converted the game library to a shared library.
* There is still the possibility to static link against game.
(cherry picked from commit bf33159a70)
This commit is contained in:
@@ -147,7 +147,7 @@ struct OutdoorPvPData;
|
||||
event on all registered scripts of that type.
|
||||
*/
|
||||
|
||||
class ScriptObject
|
||||
class TC_GAME_API ScriptObject
|
||||
{
|
||||
friend class ScriptMgr;
|
||||
|
||||
@@ -186,7 +186,7 @@ template<class TObject> class UpdatableScript
|
||||
virtual void OnUpdate(TObject* /*obj*/, uint32 /*diff*/) { }
|
||||
};
|
||||
|
||||
class SpellScriptLoader : public ScriptObject
|
||||
class TC_GAME_API SpellScriptLoader : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -201,7 +201,7 @@ class SpellScriptLoader : public ScriptObject
|
||||
virtual AuraScript* GetAuraScript() const { return NULL; }
|
||||
};
|
||||
|
||||
class ServerScript : public ScriptObject
|
||||
class TC_GAME_API ServerScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -331,14 +331,14 @@ template<class TMap> class MapScript : public UpdatableScript<TMap>
|
||||
virtual void OnPlayerLeave(TMap* /*map*/, Player* /*player*/) { }
|
||||
};
|
||||
|
||||
class WorldMapScript : public ScriptObject, public MapScript<Map>
|
||||
class TC_GAME_API WorldMapScript : public ScriptObject, public MapScript<Map>
|
||||
{
|
||||
protected:
|
||||
|
||||
WorldMapScript(const char* name, uint32 mapId);
|
||||
};
|
||||
|
||||
class InstanceMapScript : public ScriptObject, public MapScript<InstanceMap>
|
||||
class TC_GAME_API InstanceMapScript : public ScriptObject, public MapScript<InstanceMap>
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -350,14 +350,14 @@ class InstanceMapScript : public ScriptObject, public MapScript<InstanceMap>
|
||||
virtual InstanceScript* GetInstanceScript(InstanceMap* /*map*/) const { return NULL; }
|
||||
};
|
||||
|
||||
class BattlegroundMapScript : public ScriptObject, public MapScript<BattlegroundMap>
|
||||
class TC_GAME_API BattlegroundMapScript : public ScriptObject, public MapScript<BattlegroundMap>
|
||||
{
|
||||
protected:
|
||||
|
||||
BattlegroundMapScript(const char* name, uint32 mapId);
|
||||
};
|
||||
|
||||
class ItemScript : public ScriptObject
|
||||
class TC_GAME_API ItemScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -381,7 +381,7 @@ class ItemScript : public ScriptObject
|
||||
virtual bool OnRemove(Player* /*player*/, Item* /*item*/) { return false; }
|
||||
};
|
||||
|
||||
class UnitScript : public ScriptObject
|
||||
class TC_GAME_API UnitScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -404,7 +404,7 @@ class UnitScript : public ScriptObject
|
||||
virtual void ModifySpellDamageTaken(Unit* /*target*/, Unit* /*attacker*/, int32& /*damage*/) { }
|
||||
};
|
||||
|
||||
class CreatureScript : public UnitScript, public UpdatableScript<Creature>
|
||||
class TC_GAME_API CreatureScript : public UnitScript, public UpdatableScript<Creature>
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -440,7 +440,7 @@ class CreatureScript : public UnitScript, public UpdatableScript<Creature>
|
||||
virtual CreatureAI* GetAI(Creature* /*creature*/) const { return NULL; }
|
||||
};
|
||||
|
||||
class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject>
|
||||
class TC_GAME_API GameObjectScript : public ScriptObject, public UpdatableScript<GameObject>
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -485,7 +485,7 @@ class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject>
|
||||
virtual GameObjectAI* GetAI(GameObject* /*go*/) const { return NULL; }
|
||||
};
|
||||
|
||||
class AreaTriggerScript : public ScriptObject
|
||||
class TC_GAME_API AreaTriggerScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -497,7 +497,7 @@ class AreaTriggerScript : public ScriptObject
|
||||
virtual bool OnTrigger(Player* /*player*/, AreaTriggerEntry const* /*trigger*/) { return false; }
|
||||
};
|
||||
|
||||
class BattlegroundScript : public ScriptObject
|
||||
class TC_GAME_API BattlegroundScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -509,7 +509,7 @@ class BattlegroundScript : public ScriptObject
|
||||
virtual Battleground* GetBattleground() const = 0;
|
||||
};
|
||||
|
||||
class OutdoorPvPScript : public ScriptObject
|
||||
class TC_GAME_API OutdoorPvPScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -521,7 +521,7 @@ class OutdoorPvPScript : public ScriptObject
|
||||
virtual OutdoorPvP* GetOutdoorPvP() const = 0;
|
||||
};
|
||||
|
||||
class CommandScript : public ScriptObject
|
||||
class TC_GAME_API CommandScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -533,7 +533,7 @@ class CommandScript : public ScriptObject
|
||||
virtual std::vector<ChatCommand> GetCommands() const = 0;
|
||||
};
|
||||
|
||||
class WeatherScript : public ScriptObject, public UpdatableScript<Weather>
|
||||
class TC_GAME_API WeatherScript : public ScriptObject, public UpdatableScript<Weather>
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -545,7 +545,7 @@ class WeatherScript : public ScriptObject, public UpdatableScript<Weather>
|
||||
virtual void OnChange(Weather* /*weather*/, WeatherState /*state*/, float /*grade*/) { }
|
||||
};
|
||||
|
||||
class AuctionHouseScript : public ScriptObject
|
||||
class TC_GAME_API AuctionHouseScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -566,7 +566,7 @@ class AuctionHouseScript : public ScriptObject
|
||||
virtual void OnAuctionExpire(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { }
|
||||
};
|
||||
|
||||
class ConditionScript : public ScriptObject
|
||||
class TC_GAME_API ConditionScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -578,7 +578,7 @@ class ConditionScript : public ScriptObject
|
||||
virtual bool OnConditionCheck(Condition const* /*condition*/, ConditionSourceInfo& /*sourceInfo*/) { return true; }
|
||||
};
|
||||
|
||||
class VehicleScript : public ScriptObject
|
||||
class TC_GAME_API VehicleScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -605,14 +605,14 @@ class VehicleScript : public ScriptObject
|
||||
virtual void OnRemovePassenger(Vehicle* /*veh*/, Unit* /*passenger*/) { }
|
||||
};
|
||||
|
||||
class DynamicObjectScript : public ScriptObject, public UpdatableScript<DynamicObject>
|
||||
class TC_GAME_API DynamicObjectScript : public ScriptObject, public UpdatableScript<DynamicObject>
|
||||
{
|
||||
protected:
|
||||
|
||||
DynamicObjectScript(const char* name);
|
||||
};
|
||||
|
||||
class TransportScript : public ScriptObject, public UpdatableScript<Transport>
|
||||
class TC_GAME_API TransportScript : public ScriptObject, public UpdatableScript<Transport>
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -633,7 +633,7 @@ class TransportScript : public ScriptObject, public UpdatableScript<Transport>
|
||||
virtual void OnRelocate(Transport* /*transport*/, uint32 /*waypointId*/, uint32 /*mapId*/, float /*x*/, float /*y*/, float /*z*/) { }
|
||||
};
|
||||
|
||||
class AchievementCriteriaScript : public ScriptObject
|
||||
class TC_GAME_API AchievementCriteriaScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -645,7 +645,7 @@ class AchievementCriteriaScript : public ScriptObject
|
||||
virtual bool OnCheck(Player* source, Unit* target) = 0;
|
||||
};
|
||||
|
||||
class PlayerScript : public UnitScript
|
||||
class TC_GAME_API PlayerScript : public UnitScript
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -742,7 +742,7 @@ class PlayerScript : public UnitScript
|
||||
virtual void OnQuestStatusChange(Player* /*player*/, uint32 /*questId*/, QuestStatus /*status*/) { }
|
||||
};
|
||||
|
||||
class AccountScript : public ScriptObject
|
||||
class TC_GAME_API AccountScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -769,7 +769,7 @@ class AccountScript : public ScriptObject
|
||||
virtual void OnFailedPasswordChange(uint32 /*accountId*/) {}
|
||||
};
|
||||
|
||||
class GuildScript : public ScriptObject
|
||||
class TC_GAME_API GuildScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -810,7 +810,7 @@ class GuildScript : public ScriptObject
|
||||
virtual void OnBankEvent(Guild* /*guild*/, uint8 /*eventType*/, uint8 /*tabId*/, ObjectGuid::LowType /*playerGuid*/, uint32 /*itemOrMoney*/, uint16 /*itemStackCount*/, uint8 /*destTabId*/) { }
|
||||
};
|
||||
|
||||
class GroupScript : public ScriptObject
|
||||
class TC_GAME_API GroupScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -840,11 +840,11 @@ class GroupScript : public ScriptObject
|
||||
// namespace
|
||||
// {
|
||||
typedef std::list<std::string> UnusedScriptNamesContainer;
|
||||
extern UnusedScriptNamesContainer UnusedScriptNames;
|
||||
TC_GAME_API extern UnusedScriptNamesContainer UnusedScriptNames;
|
||||
// }
|
||||
|
||||
// Manages registration, loading, and execution of scripts.
|
||||
class ScriptMgr
|
||||
class TC_GAME_API ScriptMgr
|
||||
{
|
||||
friend class ScriptObject;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user