aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoschiwald <joschiwald.trinity@gmail.com>2014-08-30 03:34:35 +0200
committerjoschiwald <joschiwald.trinity@gmail.com>2014-08-30 03:34:35 +0200
commit831a6603d46a6a659ffa1e59d7a87bedcabeae82 (patch)
tree0e2a8237a54b5fead562509076e1b68796001f00
parentbcb2b2f6bf2969254e3216a71f34115178a12373 (diff)
Core/Battleground/AV: convert trinity_strings to proper creature_text
Closes #12861
-rw-r--r--sql/updates/world/2014_08_30_00_world_creature_text.sql92
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp11
-rw-r--r--src/server/game/Battlegrounds/Battleground.h1
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp206
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAV.h225
-rw-r--r--src/server/game/Miscellaneous/Language.h36
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp29
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp14
8 files changed, 324 insertions, 290 deletions
diff --git a/sql/updates/world/2014_08_30_00_world_creature_text.sql b/sql/updates/world/2014_08_30_00_world_creature_text.sql
new file mode 100644
index 00000000000..a2926ce2689
--- /dev/null
+++ b/sql/updates/world/2014_08_30_00_world_creature_text.sql
@@ -0,0 +1,92 @@
+DELETE FROM `trinity_string` WHERE (`entry` BETWEEN 1302 AND 1325) OR (`entry` IN (1331,1332));
+
+DELETE FROM `creature_text` WHERE `entry`=14848;
+DELETE FROM `creature_text` WHERE `entry`=11946 AND `groupid`=3 AND `id`=5;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES
+(14848, 1, 0, 'The Stormpike Graveyard was taken by the Alliance!', 14, 0, 100, 0, 0, 8173, 9057, 'Herald'),
+(14848, 2, 0, 'The Stormpike Graveyard is under attack! If left unchecked, the Alliance will capture it!', 14, 0, 100, 0, 0, 8212, 9058, 'Herald'),
+(14848, 3, 0, 'The Stormpike Graveyard was taken by the Horde!', 14, 0, 100, 0, 0, 8213, 9059, 'Herald'),
+(14848, 4, 0, 'The Stormpike Graveyard is under attack! If left unchecked, the Horde will capture it!', 14, 0, 100, 0, 0, 8174, 9060, 'Herald'),
+
+(14848, 5, 0, 'The Snowfall Graveyard was taken by the Alliance!', 14, 0, 100, 0, 0, 8173, 9061, 'Herald'),
+(14848, 6, 0, 'The Snowfall Graveyard is under attack! If left unchecked, the Alliance will capture it!', 14, 0, 100, 0, 0, 8212, 9062, 'Herald'),
+(14848, 7, 0, 'The Snowfall Graveyard was taken by the Horde!', 14, 0, 100, 0, 0, 8213, 9063, 'Herald'),
+(14848, 8, 0, 'The Snowfall Graveyard is under attack! If left unchecked, the Horde will capture it!', 14, 0, 100, 0, 0,8174, 9064, 'Herald'),
+
+(14848, 9, 0, 'The Frostwolf Graveyard was taken by the Alliance!', 14, 0, 100, 0, 0, 8173, 9065, 'Herald'),
+(14848,10, 0, 'The Frostwolf Graveyard is under attack! If left unchecked, the Alliance will capture it!', 14, 0, 100, 0, 0, 8212, 9066, 'Herald'),
+(14848,11, 0, 'The Frostwolf Graveyard was taken by the Horde!', 14, 0, 100, 0, 0, 8213, 9067, 'Herald'),
+(14848,12, 0, 'The Frostwolf Graveyard is under attack! If left unchecked, the Horde will capture it!', 14, 0, 100, 0, 0, 8174, 9068, 'Herald'),
+
+(14848,13, 0, 'The Dun Baldar South Bunker is under attack! If left unchecked, the Horde will destroy it!', 14, 0, 100, 0, 0, 8174, 9174, 'Herald'),
+(14848,14, 0, 'The Dun Baldar South Bunker was destroyed by the Horde!', 14, 0, 100, 0, 0, 8213, 9175, 'Herald'),
+(14848,15, 0, 'The Dun Baldar South Bunker is under attack! If left unchecked, the Alliance will destroy it!', 14, 0, 100, 0, 0, 8212, 9176, 'Herald'),
+(14848,16, 0, 'The Dun Baldar South Bunker was taken by the Alliance!', 14, 0, 100, 0, 0, 8192, 9177, 'Herald'),
+
+(14848,17, 0, 'The Dun Baldar North Bunker is under attack! If left unchecked, the Horde will destroy it!', 14, 0, 100, 0, 0, 8174, 9178, 'Herald'),
+(14848,18, 0, 'The Dun Baldar North Bunker was destroyed by the Horde!', 14, 0, 100, 0, 0, 8213, 9179, 'Herald'),
+(14848,19, 0, 'The Dun Baldar North Bunker is under attack! If left unchecked, the Alliance will destroy it!', 14, 0, 100, 0, 0, 8212, 9180, 'Herald'),
+(14848,20, 0, 'The Dun Baldar North Bunker was taken by the Alliance!', 14, 0, 100, 0, 0, 8192, 9181, 'Herald'),
+
+(14848,21, 0, 'The Icewing Bunker is under attack! If left unchecked, the Horde will destroy it!', 14, 0, 100, 0, 0, 8174, 9182, 'Herald'),
+(14848,22, 0, 'The Icewing Bunker was destroyed by the Horde!', 14, 0, 100, 0, 0, 8213, 9183, 'Herald'),
+(14848,23, 0, 'The Icewing Bunker is under attack! If left unchecked, the Alliance will destroy it!', 14, 0, 100, 0, 0, 8212, 9184, 'Herald'),
+(14848,24, 0, 'The Icewing Bunker was taken by the Alliance!', 14, 0, 100, 0, 0, 8192, 9185, 'Herald'),
+
+(14848,25, 0, 'The Stonehearth Bunker is under attack! If left unchecked, the Horde will destroy it!', 14, 0, 100, 0, 0, 8174, 9186, 'Herald'),
+(14848,26, 0, 'The Stonehearth Bunker was destroyed by the Horde!', 14, 0, 100, 0, 0, 8213, 9187, 'Herald'),
+(14848,27, 0, 'The Stonehearth Bunker is under attack! If left unchecked, the Alliance will destroy it!', 14, 0, 100, 0, 0, 8212, 9188, 'Herald'),
+(14848,28, 0, 'The Stonehearth Bunker was taken by the Alliance!', 14, 0, 100, 0, 0, 8192, 9189, 'Herald'),
+
+(14848,29, 0, 'The West Frostwolf Tower is under attack! If left unchecked, the Horde will destroy it!', 14, 0, 100, 0, 0, 8174, 9190, 'Herald'),
+(14848,30, 0, 'The West Frostwolf Tower was taken by the Horde!', 14, 0, 100, 0, 0, 8192, 9191, 'Herald'),
+(14848,31, 0, 'The West Frostwolf Tower is under attack! If left unchecked, the Alliance will destroy it!', 14, 0, 100, 0, 0, 8212, 9192, 'Herald'),
+(14848,32, 0, 'The West Frostwolf Tower was destroyed by the Alliance!', 14, 0, 100, 0, 0, 8173, 9193, 'Herald'),
+
+(14848,33, 0, 'The East Frostwolf Tower is under attack! If left unchecked, the Horde will destroy it!', 14, 0, 100, 0, 0, 8174, 9194, 'Herald'),
+(14848,34, 0, 'The East Frostwolf Tower was taken by the Horde!', 14, 0, 100, 0, 0, 8192, 9195, 'Herald'),
+(14848,35, 0, 'The East Frostwolf Tower is under attack! If left unchecked, the Alliance will destroy it!', 14, 0, 100, 0, 0, 8212, 9196, 'Herald'),
+(14848,36, 0, 'The East Frostwolf Tower was destroyed by the Alliance!', 14, 0, 100, 0, 0, 8173, 9197, 'Herald'),
+
+(14848,37, 0, 'Tower Point is under attack! If left unchecked, the Horde will destroy it!', 14, 0, 100, 0, 0, 8174, 9198, 'Herald'),
+(14848,38, 0, 'Tower Point was taken by the Horde!', 14, 0, 100, 0, 0, 8192, 9199, 'Herald'),
+(14848,39, 0, 'Tower Point is under attack! If left unchecked, the Alliance will destroy it!', 14, 0, 100, 0, 0, 8212, 9200, 'Herald'),
+(14848,40, 0, 'Tower Point was destroyed by the Alliance!', 14, 0, 100, 0, 0, 8173, 9201, 'Herald'),
+
+(14848,41, 0, 'Iceblood Bunker is under attack! If left unchecked, the Horde will destroy it!', 14, 0, 100, 0, 0, 8174, 9202, 'Herald'),
+(14848,42, 0, 'Iceblood Tower was taken by the Horde!', 14, 0, 100, 0, 0, 8192, 9203, 'Herald'),
+(14848,43, 0, 'Iceblood Tower is under attack! If left unchecked, the Alliance will destroy it!', 14, 0, 100, 0, 0, 8212, 9204, 'Herald'),
+(14848,44, 0, 'Iceblood Tower was destroyed by the Alliance!', 14, 0, 100, 0, 0, 8173, 9205, 'Herald'),
+
+(14848,45, 0, 'The Stormpike Aid Station was taken by the Horde!', 14, 0, 100, 0, 0, 8213, 9211, 'Herald'),
+(14848,46, 0, 'The Stormpike Aid Station is under attack! If left unchecked, the Horde will capture it!', 14, 0, 100, 0, 0, 8174, 9212, 'Herald'),
+(14848,47, 0, 'The Stormpike Aid Station was taken by the Alliance!', 14, 0, 100, 0, 0, 8173, 9213, 'Herald'),
+(14848,48, 0, 'The Stormpike Aid Station is under attack! If left unchecked, the Alliance will capture it!', 14, 0, 100, 0, 0, 8212, 9214, 'Herald'),
+
+(14848,49, 0, 'The Frostwolf Relief Hut was taken by the Horde!', 14, 0, 100, 0, 0, 8213, 9215, 'Herald'),
+(14848,50, 0, 'The Frostwolf Relief Hut is under attack! If left unchecked, the Horde will capture it!', 14, 0, 100, 0, 0, 8174, 9216, 'Herald'),
+(14848,51, 0, 'The Frostwolf Relief Hut was taken by the Alliance!', 14, 0, 100, 0, 0, 8173, 9217, 'Herald'),
+(14848,52, 0, 'The Frostwolf Relief Hut is under attack! If left unchecked, the Alliance will capture it!', 14, 0, 100, 0, 0, 8212, 9218, 'Herald'),
+
+(14848,53, 0, 'The Stonehearth Graveyard was taken by the Horde!', 14, 0, 100, 0, 0, 8213, 9221, 'Herald'),
+(14848,54, 0, 'The Stonehearth Graveyard is under attack! If left unchecked, the Horde will capture it!', 14, 0, 100, 0, 0, 8174, 9222, 'Herald'),
+(14848,55, 0, 'The Stonehearth Graveyard was taken by the Alliance!', 14, 0, 100, 0, 0, 8173, 9223, 'Herald'),
+(14848,56, 0, 'The Stonehearth Graveyard is under attack! If left unchecked, the Alliance will capture it!', 14, 0, 100, 0, 0, 8212, 9224, 'Herald'),
+
+(14848,57, 0, 'The Iceblood Graveyard was taken by the Horde!', 14, 0, 100, 0, 0, 8213, 9225, 'Herald'),
+(14848,58, 0, 'The Iceblood Graveyard is under attack! If left unchecked, the Horde will capture it!', 14, 0, 100, 0, 0, 8174, 9226, 'Herald'),
+(14848,59, 0, 'The Iceblood Graveyard was taken by the Alliance!', 14, 0, 100, 0, 0, 8173, 9227, 'Herald'),
+(14848,60, 0, 'The Iceblood Graveyard is under attack! If left unchecked, the Alliance will capture it!', 14, 0, 100, 0, 0, 8212, 9228, 'Herald'),
+
+(14848,61, 0, 'The Alliance has taken Coldtooth Mine! Its supplies will now be used for reinforcements!', 14, 0, 100, 0, 0, 8173, 8594, 'Herald'),
+(14848,62, 0, 'The Alliance has taken the Irondeep Mine! Its supplies will now be used for reinforcements!', 14, 0, 100, 0, 0, 8173, 8595, 'Herald'),
+(14848,63, 0, 'The Horde has taken the Coldtooth Mine! Its supplies will now be used for reinforcements!', 14, 0, 100, 0, 0, 8213, 8596, 'Herald'),
+(14848,64, 0, 'The Horde has taken the Irondeep Mine! Its supplies will now be used for reinforcements!', 14, 0, 100, 0, 0, 8213, 8597, 'Herald'),
+
+(14848,65, 0, 'The Frostwolf General is dead!', 14, 0, 100, 0, 0, 0, 7296, 'Herald'),
+(14848,66, 0, 'The Stormpike General is dead!', 14, 0, 100, 0, 0, 0, 7297, 'Herald'),
+
+(14848,67, 0, 'The Alliance wins!', 14, 0, 100, 0, 0, 0, 7335, 'Herald'),
+(14848,68, 0, 'The Horde wins!', 14, 0, 100, 0, 0, 0, 7336, 'Herald'),
+
+(11946, 3, 5, 'Leave no survivors!', 14, 0, 100, 0, 0, 0, 12352, 'Drek''Thar');
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index e95e135d8ce..6f6d1b66308 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -655,17 +655,6 @@ void Battleground::RemoveAuraOnTeam(uint32 SpellID, uint32 TeamID)
player->RemoveAura(SpellID);
}
-void Battleground::YellToAll(Creature* creature, char const* text, uint32 language)
-{
- for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
- if (Player* player = _GetPlayer(itr, "YellToAll"))
- {
- WorldPacket data;
- ChatHandler::BuildChatPacket(data, CHAT_MSG_MONSTER_YELL, Language(language), creature, player, text);
- player->SendDirectMessage(&data);
- }
-}
-
void Battleground::RewardHonorToTeam(uint32 Honor, uint32 TeamID)
{
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index c2e5b03e3ae..b0270192fd1 100644
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -343,7 +343,6 @@ class Battleground
virtual void FillInitialWorldStates(WorldPacket& /*data*/) { }
void SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player* sender = NULL, bool self = true);
void SendPacketToAll(WorldPacket* packet);
- void YellToAll(Creature* creature, const char* text, uint32 language);
void SendChatMessage(Creature* source, uint8 textId, WorldObject* target = NULL);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
index eafb02f031d..fde358b4d61 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
@@ -25,6 +25,7 @@
#include "GameObject.h"
#include "Language.h"
#include "Player.h"
+#include "ScriptedCreature.h"
#include "SpellAuras.h"
#include "WorldSession.h"
@@ -85,7 +86,7 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
else if (creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_H_BOSS][0])
triggerSpawnID = AV_CPLACE_TRIGGER19;
*/
- if (entry == BG_AV_CreatureInfo[AV_NPC_A_BOSS][0])
+ if (entry == BG_AV_CreatureInfo[AV_NPC_A_BOSS])
{
CastSpellOnTeam(23658, HORDE); //this is a spell which finishes a quest where a player has to kill the boss
RewardReputationToTeam(729, BG_AV_REP_BOSS, HORDE);
@@ -93,7 +94,7 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
EndBattleground(HORDE);
DelCreature(AV_CPLACE_TRIGGER17);
}
- else if (entry == BG_AV_CreatureInfo[AV_NPC_H_BOSS][0])
+ else if (entry == BG_AV_CreatureInfo[AV_NPC_H_BOSS])
{
CastSpellOnTeam(23658, ALLIANCE); //this is a spell which finishes a quest where a player has to kill the boss
RewardReputationToTeam(730, BG_AV_REP_BOSS, ALLIANCE);
@@ -101,7 +102,7 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
EndBattleground(ALLIANCE);
DelCreature(AV_CPLACE_TRIGGER19);
}
- else if (entry == BG_AV_CreatureInfo[AV_NPC_A_CAPTAIN][0])
+ else if (entry == BG_AV_CreatureInfo[AV_NPC_A_CAPTAIN])
{
if (!m_CaptainAlive[0])
{
@@ -115,12 +116,12 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
//spawn destroyed aura
for (uint8 i=0; i <= 9; i++)
SpawnBGObject(BG_AV_OBJECT_BURN_BUILDING_ALLIANCE+i, RESPAWN_IMMEDIATELY);
- Creature* creature = GetBGCreature(AV_CPLACE_HERALD);
- if (creature)
- YellToAll(creature, GetTrinityString(LANG_BG_AV_A_CAPTAIN_DEAD), LANG_UNIVERSAL);
DelCreature(AV_CPLACE_TRIGGER16);
+
+ if (Creature* herold = GetBGCreature(AV_CPLACE_HERALD))
+ herold->AI()->TalkToMap(TEXT_STORMPIKE_GENERAL_DEAD);
}
- else if (entry == BG_AV_CreatureInfo[AV_NPC_H_CAPTAIN][0])
+ else if (entry == BG_AV_CreatureInfo[AV_NPC_H_CAPTAIN])
{
if (!m_CaptainAlive[1])
{
@@ -134,14 +135,14 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
//spawn destroyed aura
for (uint8 i=0; i <= 9; i++)
SpawnBGObject(BG_AV_OBJECT_BURN_BUILDING_HORDE+i, RESPAWN_IMMEDIATELY);
- Creature* creature = GetBGCreature(AV_CPLACE_HERALD);
- if (creature)
- YellToAll(creature, GetTrinityString(LANG_BG_AV_H_CAPTAIN_DEAD), LANG_UNIVERSAL);
DelCreature(AV_CPLACE_TRIGGER18);
+
+ if (Creature* herold = GetBGCreature(AV_CPLACE_HERALD))
+ herold->AI()->TalkToMap(TEXT_FROSTWOLF_GENERAL_DEAD);
}
- else if (entry == BG_AV_CreatureInfo[AV_NPC_N_MINE_N_4][0] || entry == BG_AV_CreatureInfo[AV_NPC_N_MINE_A_4][0] || entry == BG_AV_CreatureInfo[AV_NPC_N_MINE_H_4][0])
+ else if (entry == BG_AV_CreatureInfo[AV_NPC_N_MINE_N_4] || entry == BG_AV_CreatureInfo[AV_NPC_N_MINE_A_4] || entry == BG_AV_CreatureInfo[AV_NPC_N_MINE_H_4])
ChangeMineOwner(AV_NORTH_MINE, killer->GetTeam());
- else if (entry == BG_AV_CreatureInfo[AV_NPC_S_MINE_N_4][0] || entry == BG_AV_CreatureInfo[AV_NPC_S_MINE_A_4][0] || entry == BG_AV_CreatureInfo[AV_NPC_S_MINE_H_4][0])
+ else if (entry == BG_AV_CreatureInfo[AV_NPC_S_MINE_N_4] || entry == BG_AV_CreatureInfo[AV_NPC_S_MINE_A_4] || entry == BG_AV_CreatureInfo[AV_NPC_S_MINE_H_4])
ChangeMineOwner(AV_SOUTH_MINE, killer->GetTeam());
}
@@ -150,7 +151,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
if (GetStatus() != STATUS_IN_PROGRESS)
return;//maybe we should log this, cause this must be a cheater or a big bug
uint8 team = GetTeamIndexByTeamId(player->GetTeam());
- /// @todo add reputation, events (including quest not available anymore, next quest availabe, go/npc de/spawning)and maybe honor
+ /// @todo add reputation, events (including quest not available anymore, next quest available, go/npc de/spawning)and maybe honor
TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed", questid);
switch (questid)
{
@@ -290,11 +291,11 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
}
else
{
- creature = AddCreature(BG_AV_CreatureInfo[cinfoid][0], type, BG_AV_CreaturePos[type]);
+ creature = AddCreature(BG_AV_CreatureInfo[cinfoid], type, BG_AV_CreaturePos[type]);
}
if (!creature)
return NULL;
- if (creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_A_CAPTAIN][0] || creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_H_CAPTAIN][0])
+ if (creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_A_CAPTAIN] || creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_H_CAPTAIN])
creature->SetRespawnDelay(RESPAWN_ONE_DAY); /// @todo look if this can be done by database + also add this for the wingcommanders
if ((isStatic && cinfoid >= 10 && cinfoid <= 14) || (!isStatic && ((cinfoid >= AV_NPC_A_GRAVEDEFENSE0 && cinfoid <= AV_NPC_A_GRAVEDEFENSE3) ||
@@ -317,22 +318,22 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
uint32 triggerSpawnID = 0;
uint32 newFaction = 0;
- if (creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_A_CAPTAIN][0])
+ if (creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_A_CAPTAIN])
{
triggerSpawnID = AV_CPLACE_TRIGGER16;
newFaction = 84;
}
- else if (creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_A_BOSS][0])
+ else if (creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_A_BOSS])
{
triggerSpawnID = AV_CPLACE_TRIGGER17;
newFaction = 84;
}
- else if (creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_H_CAPTAIN][0])
+ else if (creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_H_CAPTAIN])
{
triggerSpawnID = AV_CPLACE_TRIGGER18;
newFaction = 83;
}
- else if (creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_H_BOSS][0])
+ else if (creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_H_BOSS])
{
triggerSpawnID = AV_CPLACE_TRIGGER19;
newFaction = 83;
@@ -364,16 +365,14 @@ void BattlegroundAV::PostUpdateImpl(uint32 diff)
if (i == 0)
{
CastSpellOnTeam(AV_BUFF_A_CAPTAIN, ALLIANCE);
- Creature* creature = GetBGCreature(AV_CPLACE_MAX + 61);
- if (creature)
- YellToAll(creature, LANG_BG_AV_A_CAPTAIN_BUFF, LANG_COMMON);
+ if (Creature* creature = GetBGCreature(AV_CPLACE_MAX + 61))
+ creature->AI()->DoAction(ACTION_BUFF_YELL);
}
else
{
CastSpellOnTeam(AV_BUFF_H_CAPTAIN, HORDE);
- Creature* creature = GetBGCreature(AV_CPLACE_MAX + 59); /// @todo make the captains a dynamic creature
- if (creature)
- YellToAll(creature, LANG_BG_AV_H_CAPTAIN_BUFF, LANG_ORCISH);
+ if (Creature* creature = GetBGCreature(AV_CPLACE_MAX + 59))
+ creature->AI()->DoAction(ACTION_BUFF_YELL);
}
m_CaptainBuffTimer[i] = 120000 + urand(0, 4)* 60000; //as far as i could see, the buff is randomly so i make 2minutes (thats the duration of the buff itself) + 0-4minutes @todo get the right times
}
@@ -601,16 +600,10 @@ void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
}
}
}
- //send a nice message to all :)
- char buf[256];
- if (IsTower(node))
- sprintf(buf, GetTrinityString(LANG_BG_AV_TOWER_TAKEN), GetNodeName(node), (owner == ALLIANCE) ? GetTrinityString(LANG_BG_AV_ALLY) : GetTrinityString(LANG_BG_AV_HORDE));
- else
- sprintf(buf, GetTrinityString(LANG_BG_AV_GRAVE_TAKEN), GetNodeName(node), (owner == ALLIANCE) ? GetTrinityString(LANG_BG_AV_ALLY) :GetTrinityString(LANG_BG_AV_HORDE));
- Creature* creature = GetBGCreature(AV_CPLACE_HERALD);
- if (creature)
- YellToAll(creature, buf, LANG_UNIVERSAL);
+ if (StaticNodeInfo const* nodeInfo = GetStaticNodeInfo(node))
+ if (Creature* herold = GetBGCreature(AV_CPLACE_HERALD))
+ herold->AI()->TalkToMap(owner == ALLIANCE ? nodeInfo->TextIds.AllianceCapture : nodeInfo->TextIds.HordeCapture);
}
void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial)
@@ -621,8 +614,6 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial)
ASSERT(mine == AV_NORTH_MINE || mine == AV_SOUTH_MINE);
if (team != ALLIANCE && team != HORDE)
team = AV_NEUTRAL_TEAM;
- else
- PlaySoundToAll((team == ALLIANCE)?AV_SOUND_ALLIANCE_GOOD:AV_SOUND_HORDE_GOOD);
if (m_Mine_Owner[mine] == team && !initial)
return;
@@ -684,19 +675,21 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial)
if (team == ALLIANCE || team == HORDE)
{
m_Mine_Reclaim_Timer[mine]=AV_MINE_RECLAIM_TIMER;
- char buf[256];
- sprintf(buf, GetTrinityString(LANG_BG_AV_MINE_TAKEN), GetTrinityString((mine == AV_NORTH_MINE) ? LANG_BG_AV_MINE_NORTH : LANG_BG_AV_MINE_SOUTH),
- (team == ALLIANCE) ? GetTrinityString(LANG_BG_AV_ALLY) : GetTrinityString(LANG_BG_AV_HORDE));
- Creature* creature = GetBGCreature(AV_CPLACE_HERALD);
- if (creature)
- YellToAll(creature, buf, LANG_UNIVERSAL);
+
+ if (Creature* herold = GetBGCreature(AV_CPLACE_HERALD))
+ {
+ if (mine == AV_NORTH_MINE)
+ herold->AI()->TalkToMap(team == ALLIANCE ? TEXT_IRONDEEP_MINE_ALLIANCE_TAKEN : TEXT_IRONDEEP_MINE_HORDE_TAKEN);
+ else if (mine == AV_SOUTH_MINE)
+ herold->AI()->TalkToMap(team == ALLIANCE ? TEXT_COLDTOOTH_MINE_ALLIANCE_TAKEN : TEXT_COLDTOOTH_MINE_HORDE_TAKEN);
+ }
}
else
{
if (mine == AV_SOUTH_MINE) //i think this gets called all the time
{
if (Creature* creature = GetBGCreature(AV_CPLACE_MINE_S_3))
- YellToAll(creature, LANG_BG_AV_S_MINE_BOSS_CLAIMS, LANG_UNIVERSAL);
+ creature->AI()->Talk(TEXT_SNIVVLE_RANDOM);
}
}
return;
@@ -927,19 +920,13 @@ void BattlegroundAV::EventPlayerDefendsPoint(Player* player, uint32 object)
SpawnBGObject(((team == ALLIANCE)?BG_AV_OBJECT_SNOW_EYECANDY_A : BG_AV_OBJECT_SNOW_EYECANDY_H)+i, RESPAWN_IMMEDIATELY);
}
}
- //send a nice message to all :)
- char buf[256];
- sprintf(buf, GetTrinityString((IsTower(node)) ? LANG_BG_AV_TOWER_DEFENDED : LANG_BG_AV_GRAVE_DEFENDED), GetNodeName(node),
- (team == ALLIANCE) ? GetTrinityString(LANG_BG_AV_ALLY) : GetTrinityString(LANG_BG_AV_HORDE));
- Creature* creature = GetBGCreature(AV_CPLACE_HERALD);
- if (creature)
- YellToAll(creature, buf, LANG_UNIVERSAL);
- //update the statistic for the defending player
- UpdatePlayerScore(player, (IsTower(node)) ? SCORE_TOWERS_DEFENDED : SCORE_GRAVEYARDS_DEFENDED, 1);
- if (IsTower(node))
- PlaySoundToAll(AV_SOUND_BOTH_TOWER_DEFEND);
- else
- PlaySoundToAll((team == ALLIANCE)?AV_SOUND_ALLIANCE_GOOD:AV_SOUND_HORDE_GOOD);
+
+ if (StaticNodeInfo const* nodeInfo = GetStaticNodeInfo(node))
+ if (Creature* herold = GetBGCreature(AV_CPLACE_HERALD))
+ herold->AI()->TalkToMap(team == ALLIANCE ? nodeInfo->TextIds.AllianceCapture : nodeInfo->TextIds.HordeCapture);
+
+ // update the statistic for the defending player
+ UpdatePlayerScore(player, IsTower(node) ? SCORE_TOWERS_DEFENDED : SCORE_GRAVEYARDS_DEFENDED, 1);
}
void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
@@ -1025,42 +1012,29 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
AssaultNode(node, team);
UpdateNodeWorldState(node);
- //send a nice message to all :)
- char buf[256];
- sprintf(buf, (IsTower(node)) ? GetTrinityString(LANG_BG_AV_TOWER_ASSAULTED) : GetTrinityString(LANG_BG_AV_GRAVE_ASSAULTED), GetNodeName(node),
- (team == ALLIANCE) ? GetTrinityString(LANG_BG_AV_ALLY) : GetTrinityString(LANG_BG_AV_HORDE));
- Creature* creature = GetBGCreature(AV_CPLACE_HERALD);
- if (creature)
- YellToAll(creature, buf, LANG_UNIVERSAL);
- //update the statistic for the assaulting player
+ if (StaticNodeInfo const* nodeInfo = GetStaticNodeInfo(node))
+ if (Creature* herold = GetBGCreature(AV_CPLACE_HERALD))
+ herold->AI()->TalkToMap(team == ALLIANCE ? nodeInfo->TextIds.AllianceAttack : nodeInfo->TextIds.HordeAttack);
+
+ // update the statistic for the assaulting player
UpdatePlayerScore(player, (IsTower(node)) ? SCORE_TOWERS_ASSAULTED : SCORE_GRAVEYARDS_ASSAULTED, 1);
- PlaySoundToAll((team == ALLIANCE)?AV_SOUND_ALLIANCE_ASSAULTS:AV_SOUND_HORDE_ASSAULTS);
}
void BattlegroundAV::FillInitialWorldStates(WorldPacket& data)
{
- bool stateok;
- //graveyards
- for (uint8 i = BG_AV_NODES_FIRSTAID_STATION; i <= BG_AV_NODES_FROSTWOLF_HUT; i++)
+ for (uint8 i = BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i)
{
- for (uint8 j =1; j <= 3; j+=2)
- {//j=1=assaulted j=3=controled
- stateok = (m_Nodes[i].State == j);
- data << uint32(BG_AV_NodeWorldStates[i][GetWorldStateType(j, ALLIANCE)]) << uint32((m_Nodes[i].Owner == ALLIANCE && stateok)?1:0);
- data << uint32(BG_AV_NodeWorldStates[i][GetWorldStateType(j, HORDE)]) << uint32((m_Nodes[i].Owner == HORDE && stateok)?1:0);
- }
+ uint16 owner = m_Nodes[i].Owner;
+ BG_AV_States state = m_Nodes[i].State;
+
+ data << uint32(BGAVNodeInfo[i].WorldStateIds.AllianceAssault) << uint32(owner == ALLIANCE && state == POINT_ASSAULTED);
+ data << uint32(BGAVNodeInfo[i].WorldStateIds.AllianceControl) << uint32(owner == ALLIANCE && state >= POINT_DESTROYED);
+ data << uint32(BGAVNodeInfo[i].WorldStateIds.HordeAssault) << uint32(owner == HORDE && state == POINT_ASSAULTED);
+ data << uint32(BGAVNodeInfo[i].WorldStateIds.HordeControl) << uint32(owner == HORDE && state >= POINT_DESTROYED);
}
- //towers
- for (uint8 i = BG_AV_NODES_DUNBALDAR_SOUTH; i < BG_AV_NODES_MAX; ++i)
- for (uint8 j =1; j <= 3; j+=2)
- {//j=1=assaulted j=3=controled //i dont have j=2=destroyed cause destroyed is the same like enemy-team controll
- stateok = (m_Nodes[i].State == j || (m_Nodes[i].State == POINT_DESTROYED && j == 3));
- data << uint32(BG_AV_NodeWorldStates[i][GetWorldStateType(j, ALLIANCE)]) << uint32((m_Nodes[i].Owner == ALLIANCE && stateok)?1:0);
- data << uint32(BG_AV_NodeWorldStates[i][GetWorldStateType(j, HORDE)]) << uint32((m_Nodes[i].Owner == HORDE && stateok)?1:0);
- }
- if (m_Nodes[BG_AV_NODES_SNOWFALL_GRAVE].Owner == AV_NEUTRAL_TEAM) //cause neutral teams aren't handled generic
- data << uint32(AV_SNOWFALL_N) << uint32(1);
+ data << uint32(AV_SNOWFALL_N) << uint32(m_Nodes[BG_AV_NODES_SNOWFALL_GRAVE].Owner == AV_NEUTRAL_TEAM);
+
data << uint32(AV_Alliance_Score) << uint32(m_Team_Scores[0]);
data << uint32(AV_Horde_Score) << uint32(m_Team_Scores[1]);
if (GetStatus() == STATUS_IN_PROGRESS){ //only if game started the teamscores are displayed
@@ -1076,36 +1050,21 @@ void BattlegroundAV::FillInitialWorldStates(WorldPacket& data)
SendMineWorldStates(AV_SOUTH_MINE);
}
-uint8 BattlegroundAV::GetWorldStateType(uint8 state, uint16 team) //this is used for node worldstates and returns values which fit good into the worldstatesarray
+void BattlegroundAV::UpdateNodeWorldState(BG_AV_Nodes node)
{
- //neutral stuff cant get handled (currently its only snowfall)
- ASSERT(team != AV_NEUTRAL_TEAM);
- //a_c a_a h_c h_a the positions in worldstate-array
- if (team == ALLIANCE)
- {
- if (state == POINT_CONTROLED || state == POINT_DESTROYED)
- return 0;
- if (state == POINT_ASSAULTED)
- return 1;
- }
- if (team == HORDE)
+ if (StaticNodeInfo const* nodeInfo = GetStaticNodeInfo(node))
{
- if (state == POINT_DESTROYED || state == POINT_CONTROLED)
- return 2;
- if (state == POINT_ASSAULTED)
- return 3;
+ uint16 owner = m_Nodes[node].Owner;
+ BG_AV_States state = m_Nodes[node].State;
+
+ UpdateWorldState(nodeInfo->WorldStateIds.AllianceAssault, owner == ALLIANCE && state == POINT_ASSAULTED);
+ UpdateWorldState(nodeInfo->WorldStateIds.AllianceControl, owner == ALLIANCE && state >= POINT_DESTROYED);
+ UpdateWorldState(nodeInfo->WorldStateIds.HordeAssault, owner == HORDE && state == POINT_ASSAULTED);
+ UpdateWorldState(nodeInfo->WorldStateIds.HordeControl, owner == HORDE && state >= POINT_DESTROYED);
}
- TC_LOG_ERROR("bg.battleground", "BG_AV: should update a strange worldstate state:%i team:%i", state, team);
- return 5; //this will crash the game, but i want to know if something is wrong here
-}
-void BattlegroundAV::UpdateNodeWorldState(BG_AV_Nodes node)
-{
- UpdateWorldState(BG_AV_NodeWorldStates[node][GetWorldStateType(m_Nodes[node].State, m_Nodes[node].Owner)], 1);
- if (m_Nodes[node].PrevOwner == AV_NEUTRAL_TEAM) //currently only snowfall is supported as neutral node (i don't want to make an extra row (neutral states) in worldstatesarray just for one node
- UpdateWorldState(AV_SNOWFALL_N, 0);
- else
- UpdateWorldState(BG_AV_NodeWorldStates[node][GetWorldStateType(m_Nodes[node].PrevState, m_Nodes[node].PrevOwner)], 0);
+ if (node == BG_AV_NODES_SNOWFALL_GRAVE)
+ UpdateWorldState(AV_SNOWFALL_N, m_Nodes[node].Owner == AV_NEUTRAL_TEAM);
}
void BattlegroundAV::SendMineWorldStates(uint32 mine)
@@ -1440,33 +1399,6 @@ bool BattlegroundAV::SetupBattleground()
return true;
}
-char const* BattlegroundAV::GetNodeName(BG_AV_Nodes node)
-{
- switch (node)
- {
- case BG_AV_NODES_FIRSTAID_STATION: return GetTrinityString(LANG_BG_AV_NODE_GRAVE_STORM_AID);
- case BG_AV_NODES_DUNBALDAR_SOUTH: return GetTrinityString(LANG_BG_AV_NODE_TOWER_DUN_S);
- case BG_AV_NODES_DUNBALDAR_NORTH: return GetTrinityString(LANG_BG_AV_NODE_TOWER_DUN_N);
- case BG_AV_NODES_STORMPIKE_GRAVE: return GetTrinityString(LANG_BG_AV_NODE_GRAVE_STORMPIKE);
- case BG_AV_NODES_ICEWING_BUNKER: return GetTrinityString(LANG_BG_AV_NODE_TOWER_ICEWING);
- case BG_AV_NODES_STONEHEART_GRAVE: return GetTrinityString(LANG_BG_AV_NODE_GRAVE_STONE);
- case BG_AV_NODES_STONEHEART_BUNKER: return GetTrinityString(LANG_BG_AV_NODE_TOWER_STONE);
- case BG_AV_NODES_SNOWFALL_GRAVE: return GetTrinityString(LANG_BG_AV_NODE_GRAVE_SNOW);
- case BG_AV_NODES_ICEBLOOD_TOWER: return GetTrinityString(LANG_BG_AV_NODE_TOWER_ICE);
- case BG_AV_NODES_ICEBLOOD_GRAVE: return GetTrinityString(LANG_BG_AV_NODE_GRAVE_ICE);
- case BG_AV_NODES_TOWER_POINT: return GetTrinityString(LANG_BG_AV_NODE_TOWER_POINT);
- case BG_AV_NODES_FROSTWOLF_GRAVE: return GetTrinityString(LANG_BG_AV_NODE_GRAVE_FROST);
- case BG_AV_NODES_FROSTWOLF_ETOWER: return GetTrinityString(LANG_BG_AV_NODE_TOWER_FROST_E);
- case BG_AV_NODES_FROSTWOLF_WTOWER: return GetTrinityString(LANG_BG_AV_NODE_TOWER_FROST_W);
- case BG_AV_NODES_FROSTWOLF_HUT: return GetTrinityString(LANG_BG_AV_NODE_GRAVE_FROST_HUT);
- default:
- TC_LOG_ERROR("bg.battleground", "tried to get name for node %u", node);
- break;
- }
-
- return "Unknown";
-}
-
void BattlegroundAV::AssaultNode(BG_AV_Nodes node, uint16 team)
{
if (m_Nodes[node].TotalOwner == team)
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
index b56ec2ca489..22534d2015b 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
@@ -23,10 +23,6 @@
#include "BattlegroundScore.h"
#include "Object.h"
-#define LANG_BG_AV_A_CAPTAIN_BUFF "Begone. Uncouth scum! The Alliance shall prevail in Alterac Valley!"
-#define LANG_BG_AV_H_CAPTAIN_BUFF "Now is the time to attack! For the Horde!"
-#define LANG_BG_AV_S_MINE_BOSS_CLAIMS "Snivvle is here! Snivvle claims the Coldtooth Mine!"
-
#define BG_AV_CAPTIME 240000 //4:00
#define BG_AV_SNOWFALL_FIRSTCAP 300000 //5:00 but i also have seen 4:05
@@ -54,6 +50,11 @@
#define BG_AV_EVENT_START_BATTLE 9166 // Achievement: The Alterac Blitz
+enum SharedActions
+{
+ ACTION_BUFF_YELL = -30001
+};
+
enum BG_AV_Sounds
{ /// @todo: get out if there comes a sound when neutral team captures mine
@@ -1041,63 +1042,63 @@ enum BG_AV_CreatureIds
//entry, team, minlevel, maxlevel
/// @todo: this array should be removed, the only needed things are the entrys (for spawning(?) and handlekillunit)
-const uint32 BG_AV_CreatureInfo[AV_NPC_INFO_MAX][4] =
+const uint32 BG_AV_CreatureInfo[AV_NPC_INFO_MAX] =
{
- { 12050, 1216, 58, 58 }, //Stormpike Defender
- { 13326, 1216, 59, 59 }, //Seasoned Defender
- { 13331, 1216, 60, 60 }, //Veteran Defender
- { 13422, 1216, 61, 61 }, //Champion Defender
- { 13358, 1216, 59, 60 }, //Stormpike Bowman /// @todo: Confirm if this is correct. Author assumpted 60, 61 & 69, 70, but wouldn't work here
- { 11949, 469, 0, 0}, //not spawned with this data, but used for handlekillunit
- { 11948, 469, 0, 0}, //not spawned with this data, but used for handlekillunit
- { 12053, 1214, 58, 58 }, //Frostwolf Guardian
- { 13328, 1214, 59, 59 }, //Seasoned Guardian
- { 13332, 1214, 60, 60 }, //Veteran Guardian
- { 13421, 1214, 61, 61 }, //Champion Guardian
- { 13359, 1214, 59, 60 }, //Frostwolf Bowman
- { 11947, 67, 0, 0}, //not spawned with this data, but used for handlekillunit
- { 11946, 67, 0, 0}, //not spawned with this data, but used for handlekillunit
- { 14763, 1534, 60, 60 }, //Dun Baldar South Marshal
- { 14762, 1534, 60, 60 }, //Dun Baldar North Marshal
- { 14764, 1534, 60, 60 }, //Icewing Marshal
- { 14765, 1534, 60, 60 }, //Stonehearth Marshal
-
- { 14773, 1214, 60, 60 }, //Iceblood Warmaster
- { 14776, 1214, 60, 60 }, //Tower Point Warmaster
- { 14772, 1214, 60, 60 }, //East Frostwolf Warmaster
- { 14777, 1214, 60, 60 }, //West Frostwolf Warmaster
-
- { 10987, 59, 52, 53 }, //Irondeep Trogg
- { 11600, 59, 53, 54 }, //Irondeep Shaman
- { 11602, 59, 54, 55 }, //Irondeep Skullthumper
- { 11657, 59, 58, 58 }, //Morloch
-
- {13396, 469, 52, 53}, // irondeep alliance /// @todo: Correct and give correct ids
- {13080, 469, 53, 54},
- {13098, 469, 54, 55},
- {13078, 469, 58, 58},
-
- {13397, 67, 52, 53}, //irondeep horde
- {13099, 67, 53, 54},
- {13081, 67, 54, 55},
- {13079, 67, 58, 58},
-
- { 11603, 59, 52, 53 }, //south mine neutral
- { 11604, 59, 53, 54 },
- { 11605, 59, 54, 55 },
- { 11677, 59, 58, 58 },
- { 10982, 59, 52, 53 }, //vermin
-
- {13317, 469, 52, 53}, //alliance
- {13096, 469, 54, 55}, //explorer
- {13087, 469, 54, 55}, //invader
- {13086, 469, 58, 58},
-
- {13316, 67, 52, 53}, //horde
- {13097, 67, 54, 55}, //surveypr
- {13089, 67, 54, 55}, //guard
- {13088, 67, 58, 58},
- {14848, 67, 58, 58} //Herald
+ 12050, // Stormpike Defender
+ 13326, // Seasoned Defender
+ 13331, // Veteran Defender
+ 13422, // Champion Defender
+ 13358, // Stormpike Bowman /// @todo: Confirm if this is correct. Author assumpted 60, 61 & 69, 70, but wouldn't work here
+ 11949, // not spawned with this data, but used for handlekillunit
+ 11948, // not spawned with this data, but used for handlekillunit
+ 12053, // Frostwolf Guardian
+ 13328, // Seasoned Guardian
+ 13332, // Veteran Guardian
+ 13421, // Champion Guardian
+ 13359, // Frostwolf Bowman
+ 11947, // not spawned with this data, but used for handlekillunit
+ 11946, // not spawned with this data, but used for handlekillunit
+ 14763, // Dun Baldar South Marshal
+ 14762, // Dun Baldar North Marshal
+ 14764, // Icewing Marshal
+ 14765, // Stonehearth Marshal
+
+ 14773, // Iceblood Warmaster
+ 14776, // Tower Point Warmaster
+ 14772, // East Frostwolf Warmaster
+ 14777, // West Frostwolf Warmaster
+
+ 10987, // Irondeep Trogg
+ 11600, // Irondeep Shaman
+ 11602, // Irondeep Skullthumper
+ 11657, // Morloch
+
+ 13396, // irondeep alliance /// @todo: Correct and give correct ids
+ 13080,
+ 13098,
+ 13078,
+
+ 13397, // irondeep horde
+ 13099,
+ 13081,
+ 13079,
+
+ 11603, // south mine neutral
+ 11604,
+ 11605,
+ 11677,
+ 10982, // vermin
+
+ 13317, // alliance
+ 13096, // explorer
+ 13087, // invader
+ 13086,
+
+ 13316, // horde
+ 13097, // surveypr
+ 13089, // guard
+ 13088,
+ 14848 // Herald
};
//x, y, z, o, static_creature_info-id
@@ -1444,41 +1445,6 @@ const uint32 BG_AV_MineWorldStates[2][3] =
{1355, 1357, 1356}
};
-//alliance_control alliance_assault h_control h_assault
-const uint32 BG_AV_NodeWorldStates[16][4] =
-{
- //Stormpike first aid station
- {1325, 1326, 1327, 1328},
- //Stormpike Graveyard
- {1333, 1335, 1334, 1336},
- //Stoneheart Grave
- {1302, 1304, 1301, 1303},
- //Snowfall Grave
- {1341, 1343, 1342, 1344},
- //Iceblood grave
- {1346, 1348, 1347, 1349},
- //Frostwolf Grave
- {1337, 1339, 1338, 1340},
- //Frostwolf Hut
- {1329, 1331, 1330, 1332},
- //Dunbaldar South Bunker
- {1361, 1375, 1370, 1378},
- //Dunbaldar North Bunker
- {1362, 1374, 1371, 1379},
- //Icewing Bunker
- {1363, 1376, 1372, 1380},
- //Stoneheart Bunker
- {1364, 1377, 1373, 1381},
- //Iceblood Tower
- {1368, 1390, 1385, 1395},
- //Tower Point
- {1367, 1389, 1384, 1394},
- //Frostwolf East
- {1366, 1388, 1383, 1393},
- //Frostwolf West
- {1365, 1387, 1382, 1392},
-};
-
enum BG_AV_QuestIds
{
AV_QUEST_A_SCRAPS1 = 7223,
@@ -1513,6 +1479,63 @@ enum BG_AV_Objectives
AV_OBJECTIVE_DEFEND_GRAVEYARD = 65
};
+struct StaticNodeInfo
+{
+ BG_AV_Nodes NodeId;
+
+ struct
+ {
+ uint8 AllianceCapture;
+ uint8 AllianceAttack;
+ uint8 HordeCapture;
+ uint8 HordeAttack;
+ } TextIds;
+
+ struct
+ {
+ uint32 AllianceControl;
+ uint32 AllianceAssault;
+ uint32 HordeControl;
+ uint32 HordeAssault;
+ } WorldStateIds;
+};
+
+static StaticNodeInfo const BGAVNodeInfo[] =
+{
+ { BG_AV_NODES_FIRSTAID_STATION, { 47, 48, 45, 46 }, { 1325, 1326, 1327, 1328 } }, // Stormpike First Aid Station
+ { BG_AV_NODES_STORMPIKE_GRAVE, { 1, 2, 3, 4 }, { 1333, 1335, 1334, 1336 } }, // Stormpike Graveyard
+ { BG_AV_NODES_STONEHEART_GRAVE, { 55, 56, 53, 54 }, { 1302, 1304, 1301, 1303 } }, // Stoneheart Graveyard
+ { BG_AV_NODES_SNOWFALL_GRAVE, { 5, 6, 7, 8 }, { 1341, 1343, 1342, 1344 } }, // Snowfall Graveyard
+ { BG_AV_NODES_ICEBLOOD_GRAVE, { 59, 60, 57, 58 }, { 1346, 1348, 1347, 1349 } }, // Iceblood Graveyard
+ { BG_AV_NODES_FROSTWOLF_GRAVE, { 9, 10, 11, 12 }, { 1337, 1339, 1338, 1340 } }, // Frostwolf Graveyard
+ { BG_AV_NODES_FROSTWOLF_HUT, { 51, 52, 49, 50 }, { 1329, 1331, 1330, 1332 } }, // Frostwolf Hut
+ { BG_AV_NODES_DUNBALDAR_SOUTH, { 16, 15, 14, 13 }, { 1361, 1375, 1370, 1378 } }, // Dunbaldar South Bunker
+ { BG_AV_NODES_DUNBALDAR_NORTH, { 20, 19, 18, 17 }, { 1362, 1374, 1371, 1379 } }, // Dunbaldar North Bunker
+ { BG_AV_NODES_ICEWING_BUNKER, { 24, 23, 22, 21 }, { 1363, 1376, 1372, 1380 } }, // Icewing Bunker
+ { BG_AV_NODES_STONEHEART_BUNKER, { 28, 27, 26, 25 }, { 1364, 1377, 1373, 1381 } }, // Stoneheart Bunker
+ { BG_AV_NODES_ICEBLOOD_TOWER, { 44, 43, 42, 41 }, { 1368, 1390, 1385, 1395 } }, // Iceblood Tower
+ { BG_AV_NODES_TOWER_POINT, { 40, 39, 38, 37 }, { 1367, 1389, 1384, 1394 } }, // Tower Point
+ { BG_AV_NODES_FROSTWOLF_ETOWER, { 36, 35, 34, 33 }, { 1366, 1388, 1383, 1393 } }, // Frostwolf East Tower
+ { BG_AV_NODES_FROSTWOLF_WTOWER, { 32, 31, 30, 29 }, { 1365, 1387, 1382, 1392 } }, // Frostwolf West Tower
+};
+
+enum Texts
+{
+ // Herold
+ // Towers/Graveyards = 1 - 60
+ TEXT_COLDTOOTH_MINE_ALLIANCE_TAKEN = 61,
+ TEXT_IRONDEEP_MINE_ALLIANCE_TAKEN = 62,
+ TEXT_COLDTOOTH_MINE_HORDE_TAKEN = 63,
+ TEXT_IRONDEEP_MINE_HORDE_TAKEN = 64,
+ TEXT_FROSTWOLF_GENERAL_DEAD = 65, /// @todo: sound is missing
+ TEXT_STORMPIKE_GENERAL_DEAD = 66, /// @todo: sound is missing
+ TEXT_ALLIANCE_WINS = 67, // NYI /// @todo: sound is missing
+ TEXT_HORDE_WINS = 68, // NYI /// @todo: sound is missing
+
+ // Taskmaster Snivvle
+ TEXT_SNIVVLE_RANDOM = 0
+};
+
struct BG_AV_NodeInfo
{
BG_AV_States State;
@@ -1524,7 +1547,7 @@ struct BG_AV_NodeInfo
bool Tower;
};
-inline BG_AV_Nodes &operator++(BG_AV_Nodes &i){ return i = BG_AV_Nodes(i + 1); }
+inline BG_AV_Nodes &operator++(BG_AV_Nodes& i) { return i = BG_AV_Nodes(i + 1); }
struct BattlegroundAVScore final : public BattlegroundScore
{
@@ -1633,9 +1656,16 @@ class BattlegroundAV : public Battleground
void PopulateNode(BG_AV_Nodes node);
void DePopulateNode(BG_AV_Nodes node);
+ StaticNodeInfo const* GetStaticNodeInfo(BG_AV_Nodes node) const
+ {
+ for (uint8 i = 0; i < BG_AV_NODES_MAX; ++i)
+ if (BGAVNodeInfo[i].NodeId == node)
+ return &BGAVNodeInfo[i];
+ return nullptr;
+ }
+
BG_AV_Nodes GetNodeThroughObject(uint32 object);
uint32 GetObjectThroughNode(BG_AV_Nodes node);
- char const* GetNodeName(BG_AV_Nodes node);
bool IsTower(BG_AV_Nodes node) { return m_Nodes[node].Tower; }
/*mine*/
@@ -1643,7 +1673,6 @@ class BattlegroundAV : public Battleground
/*worldstates*/
void FillInitialWorldStates(WorldPacket& data) override;
- uint8 GetWorldStateType(uint8 state, uint16 team);
void SendMineWorldStates(uint32 mine);
void UpdateNodeWorldState(BG_AV_Nodes node);
diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h
index cb868097ac6..66cae69cb33 100644
--- a/src/server/game/Miscellaneous/Language.h
+++ b/src/server/game/Miscellaneous/Language.h
@@ -999,48 +999,18 @@ enum TrinityStrings
LANG_BG_IC_REFINERY = 1222,
LANG_BG_IC_QUARRY = 1223,
LANG_BG_IC_HANGAR = 1224,
+ // 1225-1299
LANG_BG_IC_ALLIANCE = 1300,
LANG_BG_IC_HORDE = 1301,
- // FREE IDS 1228-9999
-
+ // 1302-1325
// AV
- LANG_BG_AV_ALLY = 1300,
- LANG_BG_AV_HORDE = 1301,
- LANG_BG_AV_TOWER_TAKEN = 1302,
- LANG_BG_AV_TOWER_ASSAULTED = 1303,
- LANG_BG_AV_TOWER_DEFENDED = 1304,
- LANG_BG_AV_GRAVE_TAKEN = 1305,
- LANG_BG_AV_GRAVE_DEFENDED = 1306,
- LANG_BG_AV_GRAVE_ASSAULTED = 1307,
-
- LANG_BG_AV_MINE_TAKEN = 1308,
- LANG_BG_AV_MINE_NORTH = 1309,
- LANG_BG_AV_MINE_SOUTH = 1310,
-
- LANG_BG_AV_NODE_GRAVE_STORM_AID = 1311,
- LANG_BG_AV_NODE_TOWER_DUN_S = 1312,
- LANG_BG_AV_NODE_TOWER_DUN_N = 1313,
- LANG_BG_AV_NODE_GRAVE_STORMPIKE = 1314,
- LANG_BG_AV_NODE_TOWER_ICEWING = 1315,
- LANG_BG_AV_NODE_GRAVE_STONE = 1316,
- LANG_BG_AV_NODE_TOWER_STONE = 1317,
- LANG_BG_AV_NODE_GRAVE_SNOW = 1318,
- LANG_BG_AV_NODE_TOWER_ICE = 1319,
- LANG_BG_AV_NODE_GRAVE_ICE = 1320,
- LANG_BG_AV_NODE_TOWER_POINT = 1321,
- LANG_BG_AV_NODE_GRAVE_FROST = 1322,
- LANG_BG_AV_NODE_TOWER_FROST_E = 1323,
- LANG_BG_AV_NODE_TOWER_FROST_W = 1324,
- LANG_BG_AV_NODE_GRAVE_FROST_HUT = 1325,
-
LANG_BG_AV_START_ONE_MINUTE = 1326,
LANG_BG_AV_START_HALF_MINUTE = 1327,
LANG_BG_AV_HAS_BEGUN = 1328,
LANG_BG_AV_A_NEAR_LOSE = 1329,
LANG_BG_AV_H_NEAR_LOSE = 1330,
- LANG_BG_AV_H_CAPTAIN_DEAD = 1331,
- LANG_BG_AV_A_CAPTAIN_DEAD = 1332,
+ // 1331-1332
LANG_BG_AV_START_TWO_MINUTES = 1333,
// FREE IDS 1334-1999
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
index 60a8e943bc7..52a05f6c0a3 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
@@ -20,27 +20,32 @@
enum Spells
{
- SPELL_ARCANE_EXPLOSION = 46608,
- SPELL_CONE_OF_COLD = 38384,
- SPELL_FIREBALL = 46988,
- SPELL_FROSTBOLT = 46987
+ SPELL_ARCANE_EXPLOSION = 46608,
+ SPELL_CONE_OF_COLD = 38384,
+ SPELL_FIREBALL = 46988,
+ SPELL_FROSTBOLT = 46987
};
enum Yells
{
- YELL_AGGRO = 0,
- YELL_EVADE = 1,
- YELL_SALVATION = 2,
+ YELL_AGGRO = 0,
+ YELL_EVADE = 1,
+ YELL_SALVATION = 2,
};
enum Creatures
{
- NPC_WATER_ELEMENTAL = 25040
+ NPC_WATER_ELEMENTAL = 25040
+};
+
+enum Action
+{
+ ACTION_BUFF_YELL = -30001 // shared from Battleground
};
enum WaterElementalSpells
{
- SPELL_WATERBOLT = 46983
+ SPELL_WATERBOLT = 46983
};
class npc_water_elemental : public CreatureScript
@@ -151,6 +156,12 @@ public:
summons.DespawnAll();
}
+ void DoAction(int32 actionId) override
+ {
+ if (actionId == ACTION_BUFF_YELL)
+ Talk(YELL_AGGRO);
+ }
+
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
index c00b7db2ce7..9e4fc5838ad 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
@@ -30,7 +30,13 @@ enum Spells
enum Yells
{
YELL_AGGRO = 0,
- YELL_EVADE = 1
+ YELL_EVADE = 1,
+ YELL_BUFF = 2
+};
+
+enum Action
+{
+ ACTION_BUFF_YELL = -30001 // shared from Battleground
};
class boss_galvangar : public CreatureScript
@@ -69,6 +75,12 @@ public:
Reset();
}
+ void DoAction(int32 actionId) override
+ {
+ if (actionId == ACTION_BUFF_YELL)
+ Talk(YELL_BUFF);
+ }
+
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())