aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGroundAV.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-12 17:09:15 -0600
committermegamage <none@none>2009-02-12 17:09:15 -0600
commit6aee5fcbe7473a3cbac12b7e8482a7b98bef8be3 (patch)
tree91ec91d5c19eba9c2fe0e84b1c9dc7047a3de80e /src/game/BattleGroundAV.cpp
parent2d2f433b4de1c35b22aaf07854fc0ee11fcb350d (diff)
parentf385747164c3fb278c92ef46fbd6c3da6590bbf0 (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGroundAV.cpp')
-rw-r--r--src/game/BattleGroundAV.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/game/BattleGroundAV.cpp b/src/game/BattleGroundAV.cpp
index d8e0fce535e..c8d1ed3b673 100644
--- a/src/game/BattleGroundAV.cpp
+++ b/src/game/BattleGroundAV.cpp
@@ -54,7 +54,7 @@ void BattleGroundAV::HandleKillPlayer(Player *player, Player *killer)
return;
BattleGround::HandleKillPlayer(player, killer);
- UpdateScore(player->GetTeam(),-1);
+ UpdateScore(player->GetTeam(),-1);
}
void BattleGroundAV::HandleKillUnit(Creature *unit, Player *killer)
@@ -345,19 +345,19 @@ void BattleGroundAV::Update(uint32 diff)
//creatures
sLog.outDebug("BG_AV start poputlating nodes");
- for(BG_AV_Nodes i= BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i )
+ for(BG_AV_Nodes i= BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i )
{
if(m_Nodes[i].Owner)
- PopulateNode(i);
+ PopulateNode(i);
}
//all creatures which don't get despawned through the script are static
sLog.outDebug("BG_AV: start spawning static creatures");
for(i=0; i < AV_STATICCPLACE_MAX; i++ )
AddAVCreature(0,i+AV_CPLACE_MAX);
- //mainspiritguides:
+ //mainspiritguides:
sLog.outDebug("BG_AV: start spawning spiritguides creatures");
- AddSpiritGuide(7, BG_AV_CreaturePos[7][0], BG_AV_CreaturePos[7][1], BG_AV_CreaturePos[7][2], BG_AV_CreaturePos[7][3], ALLIANCE);
- AddSpiritGuide(8, BG_AV_CreaturePos[8][0], BG_AV_CreaturePos[8][1], BG_AV_CreaturePos[8][2], BG_AV_CreaturePos[8][3], HORDE);
+ AddSpiritGuide(7, BG_AV_CreaturePos[7][0], BG_AV_CreaturePos[7][1], BG_AV_CreaturePos[7][2], BG_AV_CreaturePos[7][3], ALLIANCE);
+ AddSpiritGuide(8, BG_AV_CreaturePos[8][0], BG_AV_CreaturePos[8][1], BG_AV_CreaturePos[8][2], BG_AV_CreaturePos[8][3], HORDE);
//spawn the marshals (those who get deleted, if a tower gets destroyed)
sLog.outDebug("BG_AV: start spawning marshal creatures");
for(i=AV_NPC_A_MARSHAL_SOUTH; i<= AV_NPC_H_MARSHAL_WTOWER; i++)
@@ -542,7 +542,7 @@ void BattleGroundAV::HandleAreaTrigger(Player *Source, uint32 Trigger)
{
case 95:
case 2608:
- if(Source->GetTeam() != ALLIANCE)
+ if(Source->GetTeam() != ALLIANCE)
Source->GetSession()->SendAreaTriggerMessage("Only The Alliance can use that portal");
else
Source->LeaveBattleground();
@@ -559,7 +559,7 @@ void BattleGroundAV::HandleAreaTrigger(Player *Source, uint32 Trigger)
case 3329:
case 3330:
case 3331:
- //Source->Unmount();
+ //Source->Unmount();
break;
default:
sLog.outDebug("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
@@ -744,8 +744,8 @@ 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));
+ 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);
@@ -773,7 +773,7 @@ bool BattleGroundAV::PlayerCanDoMineQuest(int32 GOId,uint32 team)
void BattleGroundAV::PopulateNode(BG_AV_Nodes node)
{
uint32 owner = m_Nodes[node].Owner;
- assert(owner);
+ assert(owner);
uint32 c_place = AV_CPLACE_DEFENSE_STORM_AID + ( 4 * node );
uint32 creatureid;
@@ -782,7 +782,7 @@ void BattleGroundAV::PopulateNode(BG_AV_Nodes node)
else
{
uint8 team2 = GetTeamIndexByTeamId(owner);
- if (m_Team_QuestStatus[team2][0] < 500 )
+ if (m_Team_QuestStatus[team2][0] < 500 )
creatureid = ( owner == ALLIANCE )? AV_NPC_A_GRAVEDEFENSE0 : AV_NPC_H_GRAVEDEFENSE0;
else if ( m_Team_QuestStatus[team2][0] < 1000 )
creatureid = ( owner == ALLIANCE )? AV_NPC_A_GRAVEDEFENSE1 : AV_NPC_H_GRAVEDEFENSE1;
@@ -804,7 +804,7 @@ void BattleGroundAV::PopulateNode(BG_AV_Nodes node)
}
void BattleGroundAV::DePopulateNode(BG_AV_Nodes node)
{
- uint32 c_place = AV_CPLACE_DEFENSE_STORM_AID + ( 4 * node );
+ uint32 c_place = AV_CPLACE_DEFENSE_STORM_AID + ( 4 * node );
for(uint8 i=0; i<4; i++)
if( m_BgCreatures[c_place+i] )
DelCreature(c_place+i);
@@ -817,21 +817,21 @@ void BattleGroundAV::DePopulateNode(BG_AV_Nodes node)
const BG_AV_Nodes BattleGroundAV::GetNodeThroughObject(uint32 object)
{
sLog.outDebug("bg_AV getnodethroughobject %i",object);
- if( object <= BG_AV_OBJECT_FLAG_A_STONEHEART_BUNKER )
- return BG_AV_Nodes(object);
- if( object <= BG_AV_OBJECT_FLAG_C_A_FROSTWOLF_HUT )
- return BG_AV_Nodes(object - 11);
- if( object <= BG_AV_OBJECT_FLAG_C_A_FROSTWOLF_WTOWER )
- return BG_AV_Nodes(object - 7);
- if( object <= BG_AV_OBJECT_FLAG_C_H_STONEHEART_BUNKER )
- return BG_AV_Nodes(object -22);
- if( object <= BG_AV_OBJECT_FLAG_H_FROSTWOLF_HUT )
- return BG_AV_Nodes(object - 33);
- if( object <= BG_AV_OBJECT_FLAG_H_FROSTWOLF_WTOWER )
- return BG_AV_Nodes(object - 29);
- if( object == BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE )
- return BG_AV_NODES_SNOWFALL_GRAVE;
- sLog.outError("BattleGroundAV: ERROR! GetPlace got a wrong object :(");
+ if( object <= BG_AV_OBJECT_FLAG_A_STONEHEART_BUNKER )
+ return BG_AV_Nodes(object);
+ if( object <= BG_AV_OBJECT_FLAG_C_A_FROSTWOLF_HUT )
+ return BG_AV_Nodes(object - 11);
+ if( object <= BG_AV_OBJECT_FLAG_C_A_FROSTWOLF_WTOWER )
+ return BG_AV_Nodes(object - 7);
+ if( object <= BG_AV_OBJECT_FLAG_C_H_STONEHEART_BUNKER )
+ return BG_AV_Nodes(object -22);
+ if( object <= BG_AV_OBJECT_FLAG_H_FROSTWOLF_HUT )
+ return BG_AV_Nodes(object - 33);
+ if( object <= BG_AV_OBJECT_FLAG_H_FROSTWOLF_WTOWER )
+ return BG_AV_Nodes(object - 29);
+ if( object == BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE )
+ return BG_AV_NODES_SNOWFALL_GRAVE;
+ sLog.outError("BattleGroundAV: ERROR! GetPlace got a wrong object :(");
assert(false);
return BG_AV_Nodes(0);
}
@@ -942,7 +942,7 @@ void BattleGroundAV::EventPlayerDefendsPoint(Player* player, uint32 object)
SpawnBGObject(object, RESPAWN_ONE_DAY);
DefendNode(node,team);
- PopulateNode(node);
+ PopulateNode(node);
UpdateNodeWorldState(node);
if(IsTower(node))
@@ -961,14 +961,14 @@ 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));
+ //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);
+ //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
@@ -1422,7 +1422,7 @@ void BattleGroundAV::ResetBGSubclass()
{
for(uint8 j=0; j<9; j++)
m_Team_QuestStatus[i][j]=0;
- m_Team_Scores[i]=BG_AV_SCORE_INITIAL_POINTS;
+ m_Team_Scores[i]=BG_AV_SCORE_INITIAL_POINTS;
m_IsInformedNearVictory[i]=false;
m_CaptainAlive[i] = true;
m_CaptainBuffTimer[i] = 120000 + urand(0,4)* 60; //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
@@ -1431,7 +1431,7 @@ void BattleGroundAV::ResetBGSubclass()
}
for(BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i <= BG_AV_NODES_STONEHEART_GRAVE; ++i) //alliance graves
InitNode(i,ALLIANCE,false);
- for(BG_AV_Nodes i = BG_AV_NODES_DUNBALDAR_SOUTH; i <= BG_AV_NODES_STONEHEART_BUNKER; ++i) //alliance towers
+ for(BG_AV_Nodes i = BG_AV_NODES_DUNBALDAR_SOUTH; i <= BG_AV_NODES_STONEHEART_BUNKER; ++i) //alliance towers
InitNode(i,ALLIANCE,true);
for(BG_AV_Nodes i = BG_AV_NODES_ICEBLOOD_GRAVE; i <= BG_AV_NODES_FROSTWOLF_HUT; ++i) //horde graves
InitNode(i,HORDE,false);