mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Battlefields: Move BF scripts out of game
This commit introduces the usual script interface
for battlefields.
(cherry picked from commit f7faf20254)
This commit is contained in:
@@ -28,6 +28,7 @@ class AreaTriggerAI;
|
||||
class AuctionHouseObject;
|
||||
class Aura;
|
||||
class AuraScript;
|
||||
class Battlefield;
|
||||
class Battleground;
|
||||
class BattlegroundMap;
|
||||
class Channel;
|
||||
@@ -470,6 +471,17 @@ class TC_GAME_API OnlyOnceAreaTriggerScript : public AreaTriggerScript
|
||||
void ResetAreaTriggerDone(Player const* player, AreaTriggerEntry const* trigger);
|
||||
};
|
||||
|
||||
class TC_GAME_API BattlefieldScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
BattlefieldScript(char const* name);
|
||||
|
||||
public:
|
||||
|
||||
virtual Battlefield* GetBattlefield() const = 0;
|
||||
};
|
||||
|
||||
class TC_GAME_API BattlegroundScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
@@ -1016,6 +1028,10 @@ class TC_GAME_API ScriptMgr
|
||||
|
||||
bool OnAreaTrigger(Player* player, AreaTriggerEntry const* trigger, bool entered);
|
||||
|
||||
public: /* BattlefieldScript */
|
||||
|
||||
Battlefield* CreateBattlefield(uint32 scriptId);
|
||||
|
||||
public: /* BattlegroundScript */
|
||||
|
||||
Battleground* CreateBattleground(BattlegroundTypeId typeId);
|
||||
|
||||
Reference in New Issue
Block a user