*Cleanup, proper indentation, and remove some wrong/irrelevant comments copied from custom patches..

--HG--
branch : trunk
This commit is contained in:
maximius
2009-12-18 13:41:30 -08:00
parent 89464472a9
commit dc1207139a
30 changed files with 195 additions and 199 deletions
-1
View File
@@ -784,7 +784,6 @@ void BattleGround::EndBattleGround(uint32 winner)
else if(winner)
RewardMark(plr,ITEM_LOSER_COUNT);
plr->SetHealth(plr->GetMaxHealth());
plr->SetPower(POWER_MANA, plr->GetMaxPower(POWER_MANA));
plr->CombatStopWithPets(true);
+7 -8
View File
@@ -70,24 +70,23 @@ void BattleGroundWS::Update(uint32 diff)
if (GetStatus() == STATUS_IN_PROGRESS)
{
if( GetStartTime() >= 25*MINUTE*1000 ) // Òàéìåð òèêàòü íà÷èíàåò ïîñëå 25 ìèíóò
if (GetStartTime() >= 25*MINUTE*IN_MILISECONDS) // Òàéìåð òèêàòü íà÷èíàåò ïîñëå 25 ìèíóò
{
if( GetTeamScore(ALLIANCE) == 0 )
if (GetTeamScore(ALLIANCE) == 0)
{
if ( GetTeamScore(HORDE) == 0 ) // No one scored - result is tie
if (GetTeamScore(HORDE) == 0) // No one scored - result is tie
EndBattleGround(NULL);
else // Horde has more points and thus wins
EndBattleGround(HORDE);
}
else if( GetTeamScore(HORDE) == 0 )
EndBattleGround(ALLIANCE); // Alliance has >0, Horde has 0, alliance wins
else if (GetTeamScore(HORDE) == 0)
EndBattleGround(ALLIANCE); // Alliance has > 0, Horde has 0, alliance wins
else if( GetTeamScore(HORDE) == GetTeamScore(ALLIANCE) ) // Team score equal, winner is team that scored the first flag
else if (GetTeamScore(HORDE) == GetTeamScore(ALLIANCE)) // Team score equal, winner is team that scored the first flag
EndBattleGround(m_FirstFlagCaptureTeam);
else if( GetTeamScore(HORDE) > GetTeamScore(ALLIANCE) ) // Last but not least, check who has the higher score
else if (GetTeamScore(HORDE) > GetTeamScore(ALLIANCE)) // Last but not least, check who has the higher score
EndBattleGround(HORDE);
else
EndBattleGround(ALLIANCE);
+1 -1
View File
@@ -187,7 +187,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
return false;
}
// Åñëè ÈÊ èëè È×, òî ïðîâåðÿòü óðîâåíü øìîòà îäåòîãî íà ïåðñå.
//if(mapid==649)
//if (mapid == 649)
}
}
-1
View File
@@ -5253,7 +5253,6 @@ void ObjectMgr::LoadAreaTriggerScripts()
sLog.outString( ">> Loaded %u areatrigger scripts", count );
}
// use searched_node for search some known node
uint32 ObjectMgr::GetNearestTaxiNode( float x, float y, float z, uint32 mapid, uint32 team )
{
bool found = false;
+2 -2
View File
@@ -955,10 +955,10 @@ void AuraEffect::HandleSchoolAbsorb(bool apply, bool Real, bool changeAmount)
if (apply)
{
// prevent double apply bonuses
if (m_target->GetTypeId()!=TYPEID_PLAYER || !((Player*)m_target)->GetSession()->PlayerLoading())
if (m_target->GetTypeId() != TYPEID_PLAYER || !((Player*)m_target)->GetSession()->PlayerLoading())
{
float DoneActualBenefit = 0.0f;
switch(m_spellProto->SpellFamilyName)
switch (m_spellProto->SpellFamilyName)
{
case SPELLFAMILY_PRIEST:
// Power Word: Shield
+4 -4
View File
@@ -954,10 +954,10 @@ bool Guardian::UpdateStats(Stats stat)
mod = 0.3f;
if (((Creature*)this)->isPet())
{
PetSpellMap::const_iterator itr = (((Pet*)this)->m_spells.find(62758)); //Wild Hunt rank1
PetSpellMap::const_iterator itr = (((Pet*)this)->m_spells.find(62758)); // Wild Hunt rank 1
if (itr == ((Pet*)this)->m_spells.end())
{
itr = ((Pet*)this)->m_spells.find(62762); //Wild Hunt rank2
itr = ((Pet*)this)->m_spells.find(62762); // Wild Hunt rank 2
}
if (itr != ((Pet*)this)->m_spells.end()) // If pet has Wild Hunt
{
@@ -1120,10 +1120,10 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged)
float mod = 1.0f; //Hunter contribution modifier
if (((Creature*)this)->isPet())
{
PetSpellMap::const_iterator itr = ((Pet*)this)->m_spells.find(62758); //Wild Hunt rank1
PetSpellMap::const_iterator itr = ((Pet*)this)->m_spells.find(62758); //Wild Hunt rank 1
if (itr == ((Pet*)this)->m_spells.end())
{
itr = ((Pet*)this)->m_spells.find(62762); //Wild Hunt rank2
itr = ((Pet*)this)->m_spells.find(62762); //Wild Hunt rank 2
}
if (itr != ((Pet*)this)->m_spells.end()) // If pet has Wild Hunt
{
-1
View File
@@ -1037,7 +1037,6 @@ int WorldSocket::iSendPartialPacket(WorldPacket& pct)
return 1; // some byte written and packet completed
}
bool WorldSocket::iFlushPacketQueue()
{
WorldPacket *pct;
+2 -2
View File
@@ -348,7 +348,7 @@ public:
template<class type>
inline bool operator < (type & right)
{
for (uint8 i=3; i>0; i--)
for (uint8 i=3; i > 0; --i)
{
if (part[i-1]<right.part[i-1])
return 1;
@@ -361,7 +361,7 @@ public:
template<class type>
inline bool operator < (type & right) const
{
for (uint8 i=3; i>0; i--)
for (uint8 i = 3; i > 0; --i)
{
if (part[i-1]<right.part[i-1])
return 1;