Battlefields: Move BF scripts out of game
This commit introduces the usual script interface for battlefields.
This commit is contained in:
1 parent
d5f7d7b754
commit
0ef220fca0
17 files changed
+320
-206
No files matched your search
@@ -28,6 +28,7 @@ class AccountMgr;
|
||||
class AuctionHouseObject;
|
||||
class Aura;
|
||||
class AuraScript;
|
||||
class Battlefield;
|
||||
class Battleground;
|
||||
class BattlegroundMap;
|
||||
class Channel;
|
||||
@@ -453,6 +454,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:
|
||||
@@ -934,6 +946,10 @@ class TC_GAME_API ScriptMgr
|
||||
|
||||
bool OnAreaTrigger(Player* player, AreaTriggerEntry const* trigger);
|
||||
|
||||
public: /* BattlefieldScript */
|
||||
|
||||
Battlefield* CreateBattlefield(uint32 scriptId);
|
||||
|
||||
public: /* BattlegroundScript */
|
||||
|
||||
Battleground* CreateBattleground(BattlegroundTypeId typeId);
|
||||
|
||||
Reference in new issue
Block a user