Core/Game: Code style again.

Signed-off-by: Gyx <2359980687@qq.com>
This commit is contained in:
Gyx committed 2012-03-28 20:00:29 +08:00
1 parent 72cdcbfced
commit 1544b208da
20 files changed
+233 -137

No files matched your search

+12 -5
View File
@@ -457,7 +457,8 @@ void Unit::resetAttackTimer(WeaponAttackType type)
bool Unit::IsWithinCombatRange(const Unit* obj, float dist2compare) const
{
if (!obj || !IsInMap(obj)) return false;
if (!obj || !IsInMap(obj))
return false;
float dx = GetPositionX() - obj->GetPositionX();
float dy = GetPositionY() - obj->GetPositionY();
@@ -472,7 +473,8 @@ bool Unit::IsWithinCombatRange(const Unit* obj, float dist2compare) const
bool Unit::IsWithinMeleeRange(const Unit* obj, float dist) const
{
if (!obj || !IsInMap(obj)) return false;
if (!obj || !IsInMap(obj))
return false;
float dx = GetPositionX() - obj->GetPositionX();
float dy = GetPositionY() - obj->GetPositionY();
@@ -2878,7 +2880,8 @@ void Unit::SetCurrentCastedSpell(Spell* pSpell)
CurrentSpellTypes CSpellType = pSpell->GetCurrentContainer();
if (pSpell == m_currentSpells[CSpellType]) return; // avoid breaking self
if (pSpell == m_currentSpells[CSpellType]) // avoid breaking self
return;
// break same type spell if it is not delayed
InterruptSpell(CSpellType, false);
@@ -4619,7 +4622,9 @@ GameObject* Unit::GetGameObject(uint32 spellId) const
void Unit::AddGameObject(GameObject* gameObj)
{
if (!gameObj || !gameObj->GetOwnerGUID() == 0) return;
if (!gameObj || !gameObj->GetOwnerGUID() == 0)
return;
m_gameObj.push_back(gameObj);
gameObj->SetOwnerGUID(GetGUID());
@@ -11879,7 +11884,9 @@ float Unit::GetWeaponProcChance() const
float Unit::GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellInfo* spellProto) const
{
// proc per minute chance calculation
if (PPM <= 0) return 0.0f;
if (PPM <= 0)
return 0.0f;
// Apply chance modifer aura
if (spellProto)
if (Player* modOwner = GetSpellModOwner())