Core/Battlegrounds: Move some areatrigger handling to scripts
Port From (https://github.com/TrinityCore/TrinityCore/commit/9c5b8927f89cda74eb7350801c364b003048ba2b)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.AI;
|
||||
using Game.DataStorage;
|
||||
using Game.Entities;
|
||||
using Game.Scripting;
|
||||
using System;
|
||||
@@ -134,4 +135,19 @@ namespace Scripts.EasternKingdoms.AlteracValley
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class at_av_exploit : AreaTriggerScript
|
||||
{
|
||||
public at_av_exploit() : base("at_av_exploit") { }
|
||||
|
||||
public override bool OnTrigger(Player player, AreaTriggerRecord trigger)
|
||||
{
|
||||
var battleground = player.GetBattleground();
|
||||
if (battleground != null && battleground.GetStatus() == BattlegroundStatus.WaitJoin)
|
||||
battleground.TeleportPlayerToExploitLocation(player);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user