Core/Battleground: Dropped battleground texts from trinity_string and replaced them with proper BroadcastText

This commit is contained in:
hondacrx
2018-01-14 15:57:54 -05:00
parent d0f6692b4b
commit 891fbebef8
13 changed files with 285 additions and 370 deletions
+59 -47
View File
@@ -54,11 +54,6 @@ namespace Game.BattleGrounds.Zones
m_HonorTics = 0;
m_ReputationTics = 0;
StartMessageIds[BattlegroundConst.EventIdFirst] = CypherStrings.BgAbStartTwoMinutes;
StartMessageIds[BattlegroundConst.EventIdSecond] = CypherStrings.BgAbStartOneMinute;
StartMessageIds[BattlegroundConst.EventIdThird] = CypherStrings.BgAbStartHalfMinute;
StartMessageIds[BattlegroundConst.EventIdFourth] = CypherStrings.BgAbHasBegun;
}
public override void PostUpdateImpl(uint diff)
@@ -98,19 +93,17 @@ namespace Game.BattleGrounds.Zones
// create new occupied banner
_CreateBanner(node, ABNodeStatus.Occupied, teamIndex, true);
_SendNodeUpdate(node);
_NodeOccupied(node, (teamIndex == 0) ? Team.Alliance : Team.Horde);
_NodeOccupied(node, (teamIndex == TeamId.Alliance) ? Team.Alliance : Team.Horde);
// Message to chatlog
if (teamIndex == 0)
{
// FIXME: team and node names not localized
SendMessage2ToAll(CypherStrings.BgAbNodeTaken, ChatMsg.BgSystemAlliance, null, CypherStrings.BgAbAlly, _GetNodeNameId(node));
SendBroadcastText(ABBattlegroundBroadcastTexts.ABNodes[node].TextAllianceTaken, ChatMsg.BgSystemAlliance);
PlaySoundToAll(SoundCapturedAlliance);
}
else
{
// FIXME: team and node names not localized
SendMessage2ToAll(CypherStrings.BgAbNodeTaken, ChatMsg.BgSystemHorde, null, CypherStrings.BgAbHorde, _GetNodeNameId(node));
SendBroadcastText(ABBattlegroundBroadcastTexts.ABNodes[node].TextHordeTaken, ChatMsg.BgSystemHorde);
PlaySoundToAll(SoundCapturedHorde);
}
}
@@ -156,9 +149,9 @@ namespace Game.BattleGrounds.Zones
if (!m_IsInformedNearVictory && m_TeamScores[team] > WarningNearVictoryScore)
{
if (team == TeamId.Alliance)
SendMessageToAll(CypherStrings.BgAbANearVictory, ChatMsg.BgSystemNeutral);
SendBroadcastText(ABBattlegroundBroadcastTexts.AllianceNearVictory, ChatMsg.BgSystemNeutral);
else
SendMessageToAll(CypherStrings.BgAbHNearVictory, ChatMsg.BgSystemNeutral);
SendBroadcastText(ABBattlegroundBroadcastTexts.HordeNearVictory, ChatMsg.BgSystemNeutral);
PlaySoundToAll(SoundNearVictory);
m_IsInformedNearVictory = true;
}
@@ -303,27 +296,6 @@ namespace Game.BattleGrounds.Zones
SpawnBGObject(obj, BattlegroundConst.RespawnOneDay);
}
CypherStrings _GetNodeNameId(byte node)
{
switch (node)
{
case ABBattlegroundNodes.NodeStables:
return CypherStrings.BgAbNodeStables;
case ABBattlegroundNodes.NodeBlacksmith:
return CypherStrings.BgAbNodeBlacksmith;
case ABBattlegroundNodes.NodeFarm:
return CypherStrings.BgAbNodeFarm;
case ABBattlegroundNodes.NodeLumberMill:
return CypherStrings.BgAbNodeLumberMill;
case ABBattlegroundNodes.NodeGoldMine:
return CypherStrings.BgAbNodeGoldMine;
default:
Contract.Assert(false);
break;
}
return 0;
}
public override void FillInitialWorldStates(InitWorldStates packet)
{
byte[] plusArray = { 0, 2, 3, 0, 1 };
@@ -472,10 +444,10 @@ namespace Game.BattleGrounds.Zones
m_NodeTimers[node] = FlagCapturingTime;
// FIXME: team and node names not localized
if (teamIndex == 0)
SendMessage2ToAll(CypherStrings.BgAbNodeClaimed, ChatMsg.BgSystemAlliance, source, _GetNodeNameId(node), CypherStrings.BgAbAlly);
if (teamIndex == TeamId.Alliance)
SendBroadcastText(ABBattlegroundBroadcastTexts.ABNodes[node].TextAllianceClaims, ChatMsg.BgSystemAlliance, source);
else
SendMessage2ToAll(CypherStrings.BgAbNodeClaimed, ChatMsg.BgSystemHorde, source, _GetNodeNameId(node), CypherStrings.BgAbHorde);
SendBroadcastText(ABBattlegroundBroadcastTexts.ABNodes[node].TextHordeClaims, ChatMsg.BgSystemHorde, source);
sound = SoundClaimed;
}
@@ -495,11 +467,10 @@ namespace Game.BattleGrounds.Zones
_SendNodeUpdate(node);
m_NodeTimers[node] = FlagCapturingTime;
// FIXME: node names not localized
if (teamIndex == TeamId.Alliance)
SendMessage2ToAll(CypherStrings.BgAbNodeAssaulted, ChatMsg.BgSystemAlliance, source, _GetNodeNameId(node));
SendBroadcastText(ABBattlegroundBroadcastTexts.ABNodes[node].TextAllianceAssaulted, ChatMsg.BgSystemAlliance, source);
else
SendMessage2ToAll(CypherStrings.BgAbNodeAssaulted, ChatMsg.BgSystemHorde, source, _GetNodeNameId(node));
SendBroadcastText(ABBattlegroundBroadcastTexts.ABNodes[node].TextHordeAssaulted, ChatMsg.BgSystemHorde, source);
}
// If contested, change back to occupied
else
@@ -515,11 +486,10 @@ namespace Game.BattleGrounds.Zones
m_NodeTimers[node] = 0;
_NodeOccupied(node, (teamIndex == TeamId.Alliance) ? Team.Alliance : Team.Horde);
// FIXME: node names not localized
if (teamIndex == TeamId.Alliance)
SendMessage2ToAll(CypherStrings.BgAbNodeDefended, ChatMsg.BgSystemAlliance, source, _GetNodeNameId(node));
SendBroadcastText(ABBattlegroundBroadcastTexts.ABNodes[node].TextAllianceDefended, ChatMsg.BgSystemAlliance, source);
else
SendMessage2ToAll(CypherStrings.BgAbNodeDefended, ChatMsg.BgSystemHorde, source, _GetNodeNameId(node));
SendBroadcastText(ABBattlegroundBroadcastTexts.ABNodes[node].TextHordeDefended, ChatMsg.BgSystemHorde, source);
}
sound = (teamIndex == TeamId.Alliance) ? SoundAssaultedAlliance : SoundAssaultedHorde;
}
@@ -537,11 +507,10 @@ namespace Game.BattleGrounds.Zones
_NodeDeOccupied(node);
m_NodeTimers[node] = FlagCapturingTime;
// FIXME: node names not localized
if (teamIndex == TeamId.Alliance)
SendMessage2ToAll(CypherStrings.BgAbNodeAssaulted, ChatMsg.BgSystemAlliance, source, _GetNodeNameId(node));
SendBroadcastText(ABBattlegroundBroadcastTexts.ABNodes[node].TextAllianceAssaulted, ChatMsg.BgSystemAlliance, source);
else
SendMessage2ToAll(CypherStrings.BgAbNodeAssaulted, ChatMsg.BgSystemHorde, source, _GetNodeNameId(node));
SendBroadcastText(ABBattlegroundBroadcastTexts.ABNodes[node].TextHordeAssaulted, ChatMsg.BgSystemHorde, source);
sound = (teamIndex == TeamId.Alliance) ? SoundAssaultedAlliance : SoundAssaultedHorde;
}
@@ -551,9 +520,9 @@ namespace Game.BattleGrounds.Zones
{
// FIXME: team and node names not localized
if (teamIndex == TeamId.Alliance)
SendMessage2ToAll(CypherStrings.BgAbNodeTaken, ChatMsg.BgSystemAlliance, null, CypherStrings.BgAbAlly, _GetNodeNameId(node));
SendBroadcastText(ABBattlegroundBroadcastTexts.ABNodes[node].TextAllianceTaken, ChatMsg.BgSystemAlliance);
else
SendMessage2ToAll(CypherStrings.BgAbNodeTaken, ChatMsg.BgSystemHorde, null, CypherStrings.BgAbHorde, _GetNodeNameId(node));
SendBroadcastText(ABBattlegroundBroadcastTexts.ABNodes[node].TextHordeTaken, ChatMsg.BgSystemHorde);
}
PlaySoundToAll(sound);
}
@@ -1001,6 +970,49 @@ namespace Game.BattleGrounds.Zones
public const int AllCount = 7; // All Nodes (Dynamic And Static)
}
struct ABBattlegroundBroadcastTexts
{
public const uint AllianceNearVictory = 10598;
public const uint HordeNearVictory = 10599;
public static ABNodeInfo[] ABNodes =
{
new ABNodeInfo(ABBattlegroundNodes.NodeStables, 10199, 10200, 10203, 10204, 10201, 10202, 10286, 10287),
new ABNodeInfo(ABBattlegroundNodes.NodeBlacksmith, 10211, 10212, 10213, 10214, 10215, 10216, 10290, 10291),
new ABNodeInfo(ABBattlegroundNodes.NodeFarm, 10217, 10218, 10219, 10220, 10221, 10222, 10288, 10289),
new ABNodeInfo(ABBattlegroundNodes.NodeLumberMill, 10224, 10225, 10226, 10227, 10228, 10229, 10284, 10285),
new ABNodeInfo(ABBattlegroundNodes.NodeGoldMine, 10230, 10231, 10232, 10233, 10234, 10235, 10282, 10283)
};
}
struct ABNodeInfo
{
public ABNodeInfo(uint nodeId, uint textAllianceAssaulted, uint textHordeAssaulted, uint textAllianceTaken, uint textHordeTaken, uint textAllianceDefended, uint textHordeDefended, uint textAllianceClaims, uint textHordeClaims)
{
NodeId = nodeId;
TextAllianceAssaulted = textAllianceAssaulted;
TextHordeAssaulted = textHordeAssaulted;
TextAllianceTaken = textAllianceTaken;
TextHordeTaken = textHordeTaken;
TextAllianceDefended = textAllianceDefended;
TextHordeDefended = textHordeDefended;
TextAllianceClaims = textAllianceClaims;
TextHordeClaims = textHordeClaims;
}
public uint NodeId;
public uint TextAllianceAssaulted;
public uint TextHordeAssaulted;
public uint TextAllianceTaken;
public uint TextHordeTaken;
public uint TextAllianceDefended;
public uint TextHordeDefended;
public uint TextAllianceClaims;
public uint TextHordeClaims;
}
enum ABNodeStatus
{
Neutral = 0,
+60 -52
View File
@@ -59,11 +59,6 @@ namespace Game.BattleGrounds.Zones
for (byte i = 0; i < 2 * EotSPoints.PointsMax; ++i)
m_CurrentPointPlayersCount[i] = 0;
StartMessageIds[BattlegroundConst.EventIdFirst] = CypherStrings.BgEyStartTwoMinutes;
StartMessageIds[BattlegroundConst.EventIdSecond] = CypherStrings.BgEyStartOneMinute;
StartMessageIds[BattlegroundConst.EventIdThird] = CypherStrings.BgEyStartHalfMinute;
StartMessageIds[BattlegroundConst.EventIdFourth] = CypherStrings.BgEyHasBegun;
}
public override void PostUpdateImpl(uint diff)
@@ -300,17 +295,6 @@ namespace Game.BattleGrounds.Zones
void UpdateTeamScore(int team)
{
uint score = GetTeamScore(team);
/// @todo there should be some sound played when one team is near victory!! - and define variables
/*if (!m_IsInformedNearVictory && score >= BG_EY_WARNING_NEAR_VICTORY_SCORE)
{
if (Team == ALLIANCE)
SendMessageToAll(LANG_BG_EY_A_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL);
else
SendMessageToAll(LANG_BG_EY_H_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL);
PlaySoundToAll(BG_EY_SOUND_NEAR_VICTORY);
m_IsInformedNearVictory = true;
}*/
if (score >= EotSScoreIds.MaxTeamScore)
{
score = EotSScoreIds.MaxTeamScore;
@@ -584,7 +568,7 @@ namespace Game.BattleGrounds.Zones
if (send_message)
{
SendMessageToAll(CypherStrings.BgEyResetedFlag, ChatMsg.BgSystemNeutral);
SendBroadcastText(EotSBroadcastTexts.FlagReset, ChatMsg.BgSystemNeutral);
PlaySoundToAll(EotSSoundIds.FlagReset); // flags respawned sound...
}
@@ -644,9 +628,9 @@ namespace Game.BattleGrounds.Zones
UpdateWorldState(EotSWorldStateIds.NetherstormFlagStateAlliance, (uint)EotSFlagState.WaitRespawn);
if (player.GetTeam() == Team.Alliance)
SendMessageToAll(CypherStrings.BgEyDroppedFlag, ChatMsg.BgSystemAlliance, null);
SendBroadcastText(EotSBroadcastTexts.FlagDropped, ChatMsg.BgSystemAlliance, null);
else
SendMessageToAll(CypherStrings.BgEyDroppedFlag, ChatMsg.BgSystemHorde, null);
SendBroadcastText(EotSBroadcastTexts.FlagDropped, ChatMsg.BgSystemHorde, null);
}
public override void EventPlayerClickedOnFlag(Player player, GameObject target_obj)
@@ -676,9 +660,9 @@ namespace Game.BattleGrounds.Zones
player.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.EnterPvpCombat);
if (player.GetTeam() == Team.Alliance)
SendMessageToAll(CypherStrings.BgEyHasTakenFlag, ChatMsg.BgSystemAlliance, null, player.GetName());
SendBroadcastText(EotSBroadcastTexts.TakenFlag, ChatMsg.BgSystemAlliance, player);
else
SendMessageToAll(CypherStrings.BgEyHasTakenFlag, ChatMsg.BgSystemHorde, null, player.GetName());
SendBroadcastText(EotSBroadcastTexts.TakenFlag, ChatMsg.BgSystemHorde, player);
}
void EventTeamLostPoint(Player player, int Point)
@@ -687,7 +671,7 @@ namespace Game.BattleGrounds.Zones
return;
//Natural point
Team Team = (Team)m_PointOwnedByTeam[Point];
Team Team = m_PointOwnedByTeam[Point];
if (Team == 0)
return;
@@ -717,9 +701,9 @@ namespace Game.BattleGrounds.Zones
m_PointState[Point] = EotSPointState.NoOwner;
if (Team == Team.Alliance)
SendMessageToAll(EotSMisc.m_LosingPointTypes[Point].MessageIdAlliance, ChatMsg.BgSystemAlliance, player);
SendBroadcastText(EotSMisc.m_LosingPointTypes[Point].MessageIdAlliance, ChatMsg.BgSystemAlliance, player);
else
SendMessageToAll(EotSMisc.m_LosingPointTypes[Point].MessageIdHorde, ChatMsg.BgSystemHorde, player);
SendBroadcastText(EotSMisc.m_LosingPointTypes[Point].MessageIdHorde, ChatMsg.BgSystemHorde, player);
UpdatePointsIcons(Team, Point);
UpdatePointsCount(Team);
@@ -761,9 +745,9 @@ namespace Game.BattleGrounds.Zones
m_PointState[Point] = EotSPointState.UnderControl;
if (Team == Team.Alliance)
SendMessageToAll(EotSMisc.m_CapturingPointTypes[Point].MessageIdAlliance, ChatMsg.BgSystemAlliance, player);
SendBroadcastText(EotSMisc.m_CapturingPointTypes[Point].MessageIdAlliance, ChatMsg.BgSystemAlliance, player);
else
SendMessageToAll(EotSMisc.m_CapturingPointTypes[Point].MessageIdHorde, ChatMsg.BgSystemHorde, player);
SendBroadcastText(EotSMisc.m_CapturingPointTypes[Point].MessageIdHorde, ChatMsg.BgSystemHorde, player);
if (!BgCreatures[Point].IsEmpty())
DelCreature(Point);
@@ -807,27 +791,22 @@ namespace Game.BattleGrounds.Zones
player.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.EnterPvpCombat);
if (player.GetTeam() == Team.Alliance)
{
SendBroadcastText(EotSBroadcastTexts.AllianceCapturedFlag, ChatMsg.BgSystemAlliance, player);
PlaySoundToAll(EotSSoundIds.FlagCapturedAlliance);
}
else
{
SendBroadcastText(EotSBroadcastTexts.HordeCapturedFlag, ChatMsg.BgSystemHorde, player);
PlaySoundToAll(EotSSoundIds.FlagCapturedHorde);
}
SpawnBGObject((int)BgObjectType, BattlegroundConst.RespawnImmediately);
m_FlagsTimer = EotSMisc.FlagRespawnTime;
m_FlagCapturedBgObjectType = BgObjectType;
uint team_id = 0;
if (player.GetTeam() == Team.Alliance)
{
team_id = TeamId.Alliance;
SendMessageToAll(CypherStrings.BgEyCapturedFlagA, ChatMsg.BgSystemAlliance, player);
}
else
{
team_id = TeamId.Horde;
SendMessageToAll(CypherStrings.BgEyCapturedFlagH, ChatMsg.BgSystemHorde, player);
}
int team_id = player.GetTeam() == Team.Alliance ? TeamId.Alliance : TeamId.Horde;
if (m_TeamPointsCount[team_id] > 0)
AddPoints(player.GetTeam(), EotSMisc.FlagPoints[m_TeamPointsCount[team_id] - 1]);
@@ -1050,7 +1029,7 @@ namespace Game.BattleGrounds.Zones
struct BattlegroundEYLosingPointStruct
{
public BattlegroundEYLosingPointStruct(int _SpawnNeutralObjectType, int _DespawnObjectTypeAlliance, CypherStrings _MessageIdAlliance, int _DespawnObjectTypeHorde, CypherStrings _MessageIdHorde)
public BattlegroundEYLosingPointStruct(int _SpawnNeutralObjectType, int _DespawnObjectTypeAlliance, uint _MessageIdAlliance, int _DespawnObjectTypeHorde, uint _MessageIdHorde)
{
SpawnNeutralObjectType = _SpawnNeutralObjectType;
DespawnObjectTypeAlliance = _DespawnObjectTypeAlliance;
@@ -1061,14 +1040,14 @@ namespace Game.BattleGrounds.Zones
public int SpawnNeutralObjectType;
public int DespawnObjectTypeAlliance;
public CypherStrings MessageIdAlliance;
public uint MessageIdAlliance;
public int DespawnObjectTypeHorde;
public CypherStrings MessageIdHorde;
public uint MessageIdHorde;
}
struct BattlegroundEYCapturingPointStruct
{
public BattlegroundEYCapturingPointStruct(int _DespawnNeutralObjectType, int _SpawnObjectTypeAlliance, CypherStrings _MessageIdAlliance, int _SpawnObjectTypeHorde, CypherStrings _MessageIdHorde, uint _GraveYardId)
public BattlegroundEYCapturingPointStruct(int _DespawnNeutralObjectType, int _SpawnObjectTypeAlliance, uint _MessageIdAlliance, int _SpawnObjectTypeHorde, uint _MessageIdHorde, uint _GraveYardId)
{
DespawnNeutralObjectType = _DespawnNeutralObjectType;
SpawnObjectTypeAlliance = _SpawnObjectTypeAlliance;
@@ -1080,9 +1059,9 @@ namespace Game.BattleGrounds.Zones
public int DespawnNeutralObjectType;
public int SpawnObjectTypeAlliance;
public CypherStrings MessageIdAlliance;
public uint MessageIdAlliance;
public int SpawnObjectTypeHorde;
public CypherStrings MessageIdHorde;
public uint MessageIdHorde;
public uint GraveYardId;
}
@@ -1123,20 +1102,49 @@ namespace Game.BattleGrounds.Zones
};
public static BattlegroundEYLosingPointStruct[] m_LosingPointTypes =
{
new BattlegroundEYLosingPointStruct(EotSObjectTypes.NBannerFelReaverCenter, EotSObjectTypes.ABannerFelReaverCenter, CypherStrings.BgEyHasLostAFRuins, EotSObjectTypes.HBannerFelReaverCenter, CypherStrings.BgEyHasLostHFRuins),
new BattlegroundEYLosingPointStruct(EotSObjectTypes.NBannerBloodElfCenter, EotSObjectTypes.ABannerBloodElfCenter, CypherStrings.BgEyHasLostABTower, EotSObjectTypes.HBannerBloodElfCenter, CypherStrings.BgEyHasLostHBTower),
new BattlegroundEYLosingPointStruct(EotSObjectTypes.NBannerDraeneiRuinsCenter, EotSObjectTypes.ABannerDraeneiRuinsCenter, CypherStrings.BgEyHasLostADRuins, EotSObjectTypes.HBannerDraeneiRuinsCenter, CypherStrings.BgEyHasLostHDRuins),
new BattlegroundEYLosingPointStruct(EotSObjectTypes.NBannerMageTowerCenter, EotSObjectTypes.ABannerMageTowerCenter, CypherStrings.BgEyHasLostAMTower, EotSObjectTypes.HBannerMageTowerCenter, CypherStrings.BgEyHasLostHMTower)
new BattlegroundEYLosingPointStruct(EotSObjectTypes.NBannerFelReaverCenter, EotSObjectTypes.ABannerFelReaverCenter, EotSBroadcastTexts.AllianceLostFelReaverRuins, EotSObjectTypes.HBannerFelReaverCenter, EotSBroadcastTexts.HordeLostFelReaverRuins),
new BattlegroundEYLosingPointStruct(EotSObjectTypes.NBannerBloodElfCenter, EotSObjectTypes.ABannerBloodElfCenter, EotSBroadcastTexts.AllianceLostBloodElfTower, EotSObjectTypes.HBannerBloodElfCenter, EotSBroadcastTexts.HordeLostBloodElfTower),
new BattlegroundEYLosingPointStruct(EotSObjectTypes.NBannerDraeneiRuinsCenter, EotSObjectTypes.ABannerDraeneiRuinsCenter, EotSBroadcastTexts.AllianceLostDraeneiRuins, EotSObjectTypes.HBannerDraeneiRuinsCenter, EotSBroadcastTexts.HordeLostDraeneiRuins),
new BattlegroundEYLosingPointStruct(EotSObjectTypes.NBannerMageTowerCenter, EotSObjectTypes.ABannerMageTowerCenter, EotSBroadcastTexts.AllianceLostMageTower, EotSObjectTypes.HBannerMageTowerCenter, EotSBroadcastTexts.HordeLostMageTower)
};
public static BattlegroundEYCapturingPointStruct[] m_CapturingPointTypes =
{
new BattlegroundEYCapturingPointStruct(EotSObjectTypes.NBannerFelReaverCenter, EotSObjectTypes.ABannerFelReaverCenter, CypherStrings.BgEyHasTakenAFRuins, EotSObjectTypes.HBannerFelReaverCenter, CypherStrings.BgEyHasTakenHFRuins, EotSGaveyardIds.FelReaver),
new BattlegroundEYCapturingPointStruct(EotSObjectTypes.NBannerBloodElfCenter, EotSObjectTypes.ABannerBloodElfCenter, CypherStrings.BgEyHasTakenABTower, EotSObjectTypes.HBannerBloodElfCenter, CypherStrings.BgEyHasTakenHBTower, EotSGaveyardIds.BloodElf),
new BattlegroundEYCapturingPointStruct(EotSObjectTypes.NBannerDraeneiRuinsCenter, EotSObjectTypes.ABannerDraeneiRuinsCenter, CypherStrings.BgEyHasTakenADRuins, EotSObjectTypes.HBannerDraeneiRuinsCenter, CypherStrings.BgEyHasTakenHDRuins, EotSGaveyardIds.DraeneiRuins),
new BattlegroundEYCapturingPointStruct(EotSObjectTypes.NBannerMageTowerCenter, EotSObjectTypes.ABannerMageTowerCenter, CypherStrings.BgEyHasTakenAMTower, EotSObjectTypes.HBannerMageTowerCenter, CypherStrings.BgEyHasTakenHMTower, EotSGaveyardIds.MageTower)
new BattlegroundEYCapturingPointStruct(EotSObjectTypes.NBannerFelReaverCenter, EotSObjectTypes.ABannerFelReaverCenter, EotSBroadcastTexts.AllianceTakenFelReaverRuins, EotSObjectTypes.HBannerFelReaverCenter, EotSBroadcastTexts.HordeTakenFelReaverRuins, EotSGaveyardIds.FelReaver),
new BattlegroundEYCapturingPointStruct(EotSObjectTypes.NBannerBloodElfCenter, EotSObjectTypes.ABannerBloodElfCenter, EotSBroadcastTexts.AllianceTakenBloodElfTower, EotSObjectTypes.HBannerBloodElfCenter, EotSBroadcastTexts.HordeTakenBloodElfTower, EotSGaveyardIds.BloodElf),
new BattlegroundEYCapturingPointStruct(EotSObjectTypes.NBannerDraeneiRuinsCenter, EotSObjectTypes.ABannerDraeneiRuinsCenter, EotSBroadcastTexts.AllianceTakenDraeneiRuins, EotSObjectTypes.HBannerDraeneiRuinsCenter, EotSBroadcastTexts.HordeTakenDraeneiRuins, EotSGaveyardIds.DraeneiRuins),
new BattlegroundEYCapturingPointStruct(EotSObjectTypes.NBannerMageTowerCenter, EotSObjectTypes.ABannerMageTowerCenter, EotSBroadcastTexts.AllianceTakenMageTower, EotSObjectTypes.HBannerMageTowerCenter, EotSBroadcastTexts.HordeTakenMageTower, EotSGaveyardIds.MageTower)
};
}
struct EotSBroadcastTexts
{
public const uint AllianceTakenFelReaverRuins = 17828;
public const uint HordeTakenFelReaverRuins = 17829;
public const uint AllianceLostFelReaverRuins = 17835;
public const uint HordeLostFelReaverRuins = 17836;
public const uint AllianceTakenBloodElfTower = 17819;
public const uint HordeTakenBloodElfTower = 17823;
public const uint AllianceLostBloodElfTower = 17831;
public const uint HordeLostBloodElfTower = 17832;
public const uint AllianceTakenDraeneiRuins = 17826;
public const uint HordeTakenDraeneiRuins = 17827;
public const uint AllianceLostDraeneiRuins = 17833;
public const uint HordeLostDraeneiRuins = 17834;
public const uint AllianceTakenMageTower = 17824;
public const uint HordeTakenMageTower = 17825;
public const uint AllianceLostMageTower = 17837;
public const uint HordeLostMageTower = 17838;
public const uint TakenFlag = 18359;
public const uint FlagDropped = 18361;
public const uint FlagReset = 18364;
public const uint AllianceCapturedFlag = 18375;
public const uint HordeCapturedFlag = 18384;
}
struct EotSWorldStateIds
{
public const uint AllianceResources = 2749;
@@ -28,9 +28,6 @@ namespace Game.BattleGrounds.Zones
{
public BgStrandOfAncients()
{
StartMessageIds[BattlegroundConst.EventIdFirst] = CypherStrings.BgSaStartTwoMinutes;
StartMessageIds[BattlegroundConst.EventIdSecond] = CypherStrings.BgSaStartOneMinute;
StartMessageIds[BattlegroundConst.EventIdThird] = CypherStrings.BgSaStartHalfMinute;
StartMessageIds[BattlegroundConst.EventIdFourth] = 0;
BgObjects = new ObjectGuid[SAObjectTypes.MaxObj];
@@ -323,7 +320,7 @@ namespace Game.BattleGrounds.Zones
{
SignaledRoundTwo = true;
InitSecondRound = false;
SendMessageToAll(CypherStrings.BgSaRoundTwoOneMinute, ChatMsg.BgSystemNeutral);
SendBroadcastText(SABroadcastTexts.RoundTwoStartOneMinute, ChatMsg.BgSystemNeutral);
}
}
else
@@ -385,7 +382,7 @@ namespace Game.BattleGrounds.Zones
if (!SignaledRoundTwoHalfMin)
{
SignaledRoundTwoHalfMin = true;
SendMessageToAll(CypherStrings.BgSaRoundTwoStartHalfMinute, ChatMsg.BgSystemNeutral);
SendBroadcastText(SABroadcastTexts.RoundTwoStartHalfMinute, ChatMsg.BgSystemNeutral);
}
}
StartShips();
@@ -922,9 +919,9 @@ namespace Game.BattleGrounds.Zones
if (clicker.GetTeamId() == Attackers)
{
if (clicker.GetTeamId() == TeamId.Alliance)
SendMessageToAll(CypherStrings.BgSaAllianceCapturedRelic, ChatMsg.BgSystemNeutral);
SendBroadcastText(SABroadcastTexts.AllianceCapturedTitanPortal, ChatMsg.BgSystemNeutral);
else
SendMessageToAll(CypherStrings.BgSaHordeCapturedRelic, ChatMsg.BgSystemNeutral);
SendBroadcastText(SABroadcastTexts.HordeCapturedTitanPortal, ChatMsg.BgSystemNeutral);
if (Status == SAStatus.RoundOne)
{
@@ -1366,7 +1363,7 @@ namespace Game.BattleGrounds.Zones
};
public static uint[] ObjEntries =
{
{
190722,
190727,
190724,
@@ -1419,6 +1416,15 @@ namespace Game.BattleGrounds.Zones
};
}
struct SABroadcastTexts
{
public const uint AllianceCapturedTitanPortal = 28944;
public const uint HordeCapturedTitanPortal = 28945;
public const uint RoundTwoStartOneMinute = 29448;
public const uint RoundTwoStartHalfMinute = 29449;
}
enum SAStatus
{
NotStarted = 0,
+32 -34
View File
@@ -30,10 +30,9 @@ namespace Game.BattleGrounds.Zones
BgObjects = new ObjectGuid[WSGObjectTypes.Max];
BgCreatures = new ObjectGuid[WSGCreatureTypes.Max];
StartMessageIds[BattlegroundConst.EventIdFirst] = CypherStrings.BgWsStartTwoMinutes;
StartMessageIds[BattlegroundConst.EventIdSecond] = CypherStrings.BgWsStartOneMinute;
StartMessageIds[BattlegroundConst.EventIdThird] = CypherStrings.BgWsStartHalfMinute;
StartMessageIds[BattlegroundConst.EventIdFourth] = CypherStrings.BgWsHasBegun;
StartMessageIds[BattlegroundConst.EventIdSecond] = WSGBroadcastTexts.StartOneMinute;
StartMessageIds[BattlegroundConst.EventIdThird] = WSGBroadcastTexts.StartHalfMinute;
StartMessageIds[BattlegroundConst.EventIdFourth] = WSGBroadcastTexts.BattleHasBegun;
}
public override void PostUpdateImpl(uint diff)
@@ -250,7 +249,7 @@ namespace Game.BattleGrounds.Zones
//when map_update will be allowed for Battlegrounds this code will be useless
SpawnBGObject(WSGObjectTypes.HFlag, BattlegroundConst.RespawnImmediately);
SpawnBGObject(WSGObjectTypes.AFlag, BattlegroundConst.RespawnImmediately);
SendMessageToAll(CypherStrings.BgWsFPlaced, ChatMsg.BgSystemNeutral);
SendBroadcastText(WSGBroadcastTexts.FlagsPlaced, ChatMsg.BgSystemNeutral);
PlaySoundToAll(WSGSound.FlagsRespawned); // flag respawned sound...
}
_bothFlagsKept = false;
@@ -263,16 +262,11 @@ namespace Game.BattleGrounds.Zones
RespawnFlag(team, false);
if (team == Team.Alliance)
{
SpawnBGObject(WSGObjectTypes.AFlag, BattlegroundConst.RespawnImmediately);
SendMessageToAll(CypherStrings.BgWsAllianceFlagRespawned, ChatMsg.BgSystemNeutral);
}
else
{
SpawnBGObject(WSGObjectTypes.HFlag, BattlegroundConst.RespawnImmediately);
SendMessageToAll(CypherStrings.BgWsHordeFlagRespawned, ChatMsg.BgSystemNeutral);
}
SendBroadcastText(WSGBroadcastTexts.FlagsPlaced, ChatMsg.BgSystemNeutral);
PlaySoundToAll(WSGSound.FlagsRespawned);
GameObject obj = GetBgMap().GetGameObject(GetDroppedFlagGUID(team));
@@ -338,9 +332,9 @@ namespace Game.BattleGrounds.Zones
SpawnBGObject(WSGObjectTypes.AFlag, WSGTimerOrScore.FlagRespawnTime);
if (player.GetTeam() == Team.Alliance)
SendMessageToAll(CypherStrings.BgWsCapturedHf, ChatMsg.BgSystemAlliance, player);
SendBroadcastText(WSGBroadcastTexts.CapturedHordeFlag, ChatMsg.BgSystemAlliance, player);
else
SendMessageToAll(CypherStrings.BgWsCapturedAf, ChatMsg.BgSystemHorde, player);
SendBroadcastText(WSGBroadcastTexts.CapturedAllianceFlag, ChatMsg.BgSystemHorde, player);
UpdateFlagState(player.GetTeam(), WSGFlagState.WaitRespawn); // flag state none
UpdateTeamScore(player.GetTeamId());
@@ -448,12 +442,12 @@ namespace Game.BattleGrounds.Zones
if (player.GetTeam() == Team.Alliance)
{
SendMessageToAll(CypherStrings.BgWsDroppedHf, ChatMsg.BgSystemHorde, player);
SendBroadcastText(WSGBroadcastTexts.HordeFlagDropped, ChatMsg.BgSystemHorde, player);
UpdateWorldState(WSGWorldStates.FlagUnkHorde, 0xFFFFFFFF);
}
else
{
SendMessageToAll(CypherStrings.BgWsDroppedAf, ChatMsg.BgSystemAlliance, player);
SendBroadcastText(WSGBroadcastTexts.AllianceFlagDropped, ChatMsg.BgSystemAlliance, player);
UpdateWorldState(WSGWorldStates.FlagUnkAlliance, 0xFFFFFFFF);
}
@@ -466,15 +460,11 @@ namespace Game.BattleGrounds.Zones
if (GetStatus() != BattlegroundStatus.InProgress)
return;
CypherStrings message_id = 0;
ChatMsg type = ChatMsg.BgSystemNeutral;
//alliance flag picked up from base
if (player.GetTeam() == Team.Horde && GetFlagState(Team.Alliance) == WSGFlagState.OnBase
&& BgObjects[WSGObjectTypes.AFlag] == target_obj.GetGUID())
{
message_id = CypherStrings.BgWsPickedupAf;
type = ChatMsg.BgSystemHorde;
SendBroadcastText(WSGBroadcastTexts.AllianceFlagPickedUp, ChatMsg.BgSystemHorde, player);
PlaySoundToAll(WSGSound.AllianceFlagPickedUp);
SpawnBGObject(WSGObjectTypes.AFlag, BattlegroundConst.RespawnOneDay);
SetAllianceFlagPicker(player.GetGUID());
@@ -492,8 +482,7 @@ namespace Game.BattleGrounds.Zones
if (player.GetTeam() == Team.Alliance && GetFlagState(Team.Horde) == WSGFlagState.OnBase
&& BgObjects[WSGObjectTypes.HFlag] == target_obj.GetGUID())
{
message_id = CypherStrings.BgWsPickedupHf;
type = ChatMsg.BgSystemAlliance;
SendBroadcastText(WSGBroadcastTexts.HordeFlagPickedUp, ChatMsg.BgSystemAlliance, player);
PlaySoundToAll(WSGSound.HordeFlagPickedUp);
SpawnBGObject(WSGObjectTypes.HFlag, BattlegroundConst.RespawnOneDay);
SetHordeFlagPicker(player.GetGUID());
@@ -513,8 +502,7 @@ namespace Game.BattleGrounds.Zones
{
if (player.GetTeam() == Team.Alliance)
{
message_id = CypherStrings.BgWsReturnedAf;
type = ChatMsg.BgSystemAlliance;
SendBroadcastText(WSGBroadcastTexts.AllianceFlagReturned, ChatMsg.BgSystemAlliance, player);
UpdateFlagState(Team.Horde, WSGFlagState.WaitRespawn);
RespawnFlag(Team.Alliance, false);
SpawnBGObject(WSGObjectTypes.AFlag, BattlegroundConst.RespawnImmediately);
@@ -524,8 +512,7 @@ namespace Game.BattleGrounds.Zones
}
else
{
message_id = CypherStrings.BgWsPickedupAf;
type = ChatMsg.BgSystemHorde;
SendBroadcastText(WSGBroadcastTexts.AllianceFlagPickedUp, ChatMsg.BgSystemHorde, player);
PlaySoundToAll(WSGSound.AllianceFlagPickedUp);
SpawnBGObject(WSGObjectTypes.AFlag, BattlegroundConst.RespawnOneDay);
SetAllianceFlagPicker(player.GetGUID());
@@ -548,8 +535,7 @@ namespace Game.BattleGrounds.Zones
{
if (player.GetTeam() == Team.Horde)
{
message_id = CypherStrings.BgWsReturnedHf;
type = ChatMsg.BgSystemHorde;
SendBroadcastText(WSGBroadcastTexts.HordeFlagReturned, ChatMsg.BgSystemHorde, player);
UpdateFlagState(Team.Alliance, WSGFlagState.WaitRespawn);
RespawnFlag(Team.Horde, false);
SpawnBGObject(WSGObjectTypes.HFlag, BattlegroundConst.RespawnImmediately);
@@ -559,8 +545,7 @@ namespace Game.BattleGrounds.Zones
}
else
{
message_id = CypherStrings.BgWsPickedupHf;
type = ChatMsg.BgSystemAlliance;
SendBroadcastText(WSGBroadcastTexts.HordeFlagPickedUp, ChatMsg.BgSystemAlliance, player);
PlaySoundToAll(WSGSound.HordeFlagPickedUp);
SpawnBGObject(WSGObjectTypes.HFlag, BattlegroundConst.RespawnOneDay);
SetHordeFlagPicker(player.GetGUID());
@@ -577,10 +562,6 @@ namespace Game.BattleGrounds.Zones
//target_obj.Delete();
}
if (message_id == 0)
return;
SendMessageToAll(message_id, type, player);
player.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.EnterPvpCombat);
}
@@ -1117,5 +1098,22 @@ namespace Game.BattleGrounds.Zones
public const uint AllianceFlagPickedUp = 8174;
public const uint FlagsRespawned = 8232;
}
struct WSGBroadcastTexts
{
public const uint StartOneMinute = 10015;
public const uint StartHalfMinute = 10016;
public const uint BattleHasBegun = 10014;
public const uint CapturedHordeFlag = 9801;
public const uint CapturedAllianceFlag = 9802;
public const uint FlagsPlaced = 9803;
public const uint AllianceFlagPickedUp = 9804;
public const uint AllianceFlagDropped = 9805;
public const uint HordeFlagPickedUp = 9807;
public const uint HordeFlagDropped = 9806;
public const uint AllianceFlagReturned = 9808;
public const uint HordeFlagReturned = 9809;
}
#endregion
}