mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 16:39:08 +01:00
Replace tabs with spaces in more files.
--HG-- branch : trunk
This commit is contained in:
@@ -53,7 +53,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)
|
||||
@@ -344,19 +344,19 @@ void BattleGroundAV::Update(time_t 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++)
|
||||
@@ -541,7 +541,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();
|
||||
@@ -558,7 +558,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);
|
||||
@@ -743,8 +743,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);
|
||||
@@ -772,7 +772,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;
|
||||
@@ -781,7 +781,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;
|
||||
@@ -803,7 +803,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);
|
||||
@@ -816,21 +816,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);
|
||||
}
|
||||
@@ -941,7 +941,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))
|
||||
@@ -960,14 +960,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
|
||||
@@ -1421,7 +1421,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
|
||||
@@ -1430,7 +1430,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);
|
||||
|
||||
Reference in New Issue
Block a user