Battlefields: Move BF scripts out of game

Port From (https://github.com/TrinityCore/TrinityCore/commit/49523a74a4c28e5ae17f9a8352aa8224b765b7d8)
This commit is contained in:
hondacrx
2022-02-24 10:51:24 -05:00
parent 628a24923c
commit 569232c3fe
18 changed files with 763 additions and 548 deletions
+7
View File
@@ -18,6 +18,7 @@
using Framework.Constants;
using Framework.Database;
using Game.AI;
using Game.BattleFields;
using Game.BattleGrounds;
using Game.Chat;
using Game.Conditions;
@@ -711,6 +712,12 @@ namespace Game.Scripting
return RunScriptRet<AreaTriggerScript>(p => entered ? p.OnTrigger(player, trigger) : p.OnExit(player, trigger), Global.ObjectMgr.GetAreaTriggerScriptId(trigger.Id));
}
//BattlefieldScript
public BattleField CreateBattlefield(uint scriptId)
{
return RunScriptRet<BattlefieldScript, BattleField>(p => p.GetBattlefield(), scriptId, null);
}
//BattlegroundScript
public Battleground CreateBattleground(BattlegroundTypeId typeId)
{