Core/Battlegrounds: Move some areatrigger handling to scripts
Port From (https://github.com/TrinityCore/TrinityCore/commit/9c5b8927f89cda74eb7350801c364b003048ba2b)
This commit is contained in:
@@ -208,31 +208,6 @@ namespace Game.BattleGrounds.Zones
|
||||
TriggerGameEvent(EventStartBattle);
|
||||
}
|
||||
|
||||
public override void HandleAreaTrigger(Player player, uint trigger, bool entered)
|
||||
{
|
||||
switch (trigger)
|
||||
{
|
||||
case 6635: // Horde Start
|
||||
case 6634: // Alliance Start
|
||||
if (GetStatus() == BattlegroundStatus.WaitJoin && !entered)
|
||||
TeleportPlayerToExploitLocation(player);
|
||||
break;
|
||||
case 3948: // Arathi Basin Alliance Exit.
|
||||
case 3949: // Arathi Basin Horde Exit.
|
||||
case 3866: // Stables
|
||||
case 3869: // Gold Mine
|
||||
case 3867: // Farm
|
||||
case 3868: // Lumber Mill
|
||||
case 3870: // Black Smith
|
||||
case 4020: // Unk1
|
||||
case 4021: // Unk2
|
||||
case 4674: // Unk3
|
||||
default:
|
||||
base.HandleAreaTrigger(player, trigger, entered);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void _CreateBanner(byte node, ABNodeStatus type, int teamIndex, bool delay)
|
||||
{
|
||||
// Just put it into the queue
|
||||
|
||||
@@ -5,6 +5,7 @@ using Framework.Constants;
|
||||
using Game.Entities;
|
||||
using Game.Maps;
|
||||
using Game.Networking.Packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Game.BattleGrounds.Zones.EyeofStorm
|
||||
@@ -219,6 +220,7 @@ namespace Game.BattleGrounds.Zones.EyeofStorm
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Remove me when eye of the storm is updated.")]
|
||||
public override void HandleAreaTrigger(Player player, uint trigger, bool entered)
|
||||
{
|
||||
if (!player.IsAlive()) //hack code, must be removed later
|
||||
|
||||
@@ -429,13 +429,6 @@ namespace Game.BattleGrounds.Zones
|
||||
|
||||
public override void RemovePlayer(Player player, ObjectGuid guid, Team team) { }
|
||||
|
||||
public override void HandleAreaTrigger(Player source, uint trigger, bool entered)
|
||||
{
|
||||
// this is wrong way to implement these things. On official it done by gameobject spell cast.
|
||||
if (GetStatus() != BattlegroundStatus.InProgress)
|
||||
return;
|
||||
}
|
||||
|
||||
void TeleportPlayers()
|
||||
{
|
||||
foreach (var pair in GetPlayers())
|
||||
|
||||
@@ -6,6 +6,7 @@ using Game.Entities;
|
||||
using Game.Networking.Packets;
|
||||
using Game.DataStorage;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
@@ -598,6 +599,7 @@ namespace Game.BattleGrounds.Zones
|
||||
UpdateWorldState(WSGWorldStates.FlagCapturesHorde, (int)GetTeamScore(team));
|
||||
}
|
||||
|
||||
[Obsolete("Remove me when warsong gluch is updated.")]
|
||||
public override void HandleAreaTrigger(Player player, uint trigger, bool entered)
|
||||
{
|
||||
//uint SpellId = 0;
|
||||
|
||||
Reference in New Issue
Block a user