Core/Misc: Tab2spaces, remove trailing whitespaces and remove dupe code after merge

This commit is contained in:
Spp
2012-11-27 11:56:23 +01:00
parent 8ae0f2332c
commit 99e050fb27
9 changed files with 15 additions and 18 deletions

View File

@@ -918,7 +918,7 @@ bool BfCapturePoint::HandlePlayerEnter(Player* player)
player->SendUpdateWorldState(capturePoint->GetGOInfo()->capturePoint.worldstate3, m_neutralValuePct);
}
}
return m_activePlayers[player->GetTeamId()].insert(player->GetGUID()).second;
}
@@ -941,7 +941,7 @@ void BfCapturePoint::SendChangePhase()
{
if (!m_capturePointGUID)
return;
if (GameObject* capturePoint = m_Bf->GetGameObject(m_capturePointGUID))
{
// send this too, sometimes the slider disappears, dunno why :(
@@ -989,9 +989,9 @@ bool BfCapturePoint::SetCapturePointData(GameObject* capturePoint)
return true;
}
GameObject* BfCapturePoint::GetCapturePointGo()
{
return m_Bf->GetGameObject(m_capturePointGUID);
GameObject* BfCapturePoint::GetCapturePointGo()
{
return m_Bf->GetGameObject(m_capturePointGUID);
}
bool BfCapturePoint::DelCapturePoint()
@@ -1039,13 +1039,13 @@ bool BfCapturePoint::Update(uint32 diff)
Trinity::AnyPlayerInObjectRangeCheck checker(capturePoint, radius);
Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(capturePoint, players, checker);
capturePoint->VisitNearbyWorldObject(radius, searcher);
for (std::list<Player*>::iterator itr = players.begin(); itr != players.end(); ++itr)
if ((*itr)->IsOutdoorPvPActive())
if (m_activePlayers[(*itr)->GetTeamId()].insert((*itr)->GetGUID()).second)
HandlePlayerEnter(*itr);
}
// get the difference of numbers
float fact_diff = ((float) m_activePlayers[0].size() - (float) m_activePlayers[1].size()) * diff / BATTLEFIELD_OBJECTIVE_UPDATE_INTERVAL;
if (G3D::fuzzyEq(fact_diff, 0.0f))

View File

@@ -106,7 +106,7 @@ class BfCapturePoint
bool SetCapturePointData(GameObject* capturePoint);
GameObject* GetCapturePointGo();
uint32 GetCapturePointEntry(){ return m_capturePointEntry; }
TeamId GetTeamId() { return m_team; }
protected:
bool DelCapturePoint();
@@ -294,7 +294,7 @@ class Battlefield : public ZoneScript
Creature* GetCreature(uint64 GUID);
GameObject* GetGameObject(uint64 GUID);
// Script-methods
/// Called on start

View File

@@ -1201,7 +1201,7 @@ struct BfWGGameObjectBuilding
{
if (!go)
return;
// GameObject associated to object
m_BuildGUID = go->GetGUID();

View File

@@ -1721,9 +1721,6 @@ SpellInfo const* Creature::reachWithSpellAttack(Unit* victim)
if (bcontinue)
continue;
if (bcontinue)
continue;
if (spellInfo->ManaCost > (uint32)GetPower(POWER_MANA))
continue;
float range = spellInfo->GetMaxRange(false);

View File

@@ -226,7 +226,7 @@ public:
if (text)
CreatureAI::Talk(text);
}
void PrepareEncounter()

View File

@@ -171,7 +171,7 @@ public:
++speechCounter;
DoCastAOE(SPELL_THREAT_PULSE, true);
} else
} else
speechTimer -= diff;
return;

View File

@@ -34,7 +34,7 @@ EndScriptData */
//this texts are already used by 3975 and 3976
enum Says
{
SAY_LOST_HEAD = 0,
SAY_LOST_HEAD = 0,
SAY_PLAYER_DEATH = 1,
SAY_ENTRANCE = 0,

View File

@@ -54,7 +54,7 @@ enum Spells
AURA_SPECTRAL_REALM = 46021,
AURA_SPECTRAL_INVISIBILITY = 44801,
AURA_DEMONIC_VISUAL = 44800,
SPELL_SPECTRAL_BLAST = 44869,
SPELL_TELEPORT_SPECTRAL = 46019,
SPELL_ARCANE_BUFFET = 45018,

View File

@@ -34,7 +34,7 @@ EndScriptData */
enum Yells
{
SAY_KJ_OFFCOMBAT = 0,
SAY_KALECGOS_ENCOURAGE = 0,
SAY_KALECGOS_READY1 = 1,
SAY_KALECGOS_READY2 = 2,