REPO: Code-style clean-ups

* Fixed pMap->map
* Fixed pInstance->instance
* Fixed pInsta->instance
* Fixed pQuest->quest
* Fixed pWho->who
* Fixed pTarget->target
* Fixed pGo->go

~DEVNOTES: Handlers/QuestHandler.cpp still needs to be cleaned...
This commit is contained in:
Bootz
2011-10-07 19:45:43 -05:00
parent c89b1f6989
commit 5b4c7783c2
324 changed files with 4886 additions and 4849 deletions
+1
View File
@@ -1825,6 +1825,7 @@ void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uin
&& !m_caster->isInFrontInMap(*next, max_range))
|| !m_caster->canSeeOrDetect(*next)
|| !cur->IsWithinLOSInMap(*next)
|| (*next)->GetCreatureType() == CREATURE_TYPE_CRITTER
|| ((GetSpellInfo()->AttributesEx6 & SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED) && !(*next)->CanFreeMove()))
{
++next;
+24 -24
View File
@@ -257,16 +257,16 @@ void Spell::EffectResurrectNew(SpellEffIndex effIndex)
if (!unitTarget->IsInWorld())
return;
Player* pTarget = unitTarget->ToPlayer();
Player* target = unitTarget->ToPlayer();
if (pTarget->isRessurectRequested()) // already have one active request
if (target->isRessurectRequested()) // already have one active request
return;
uint32 health = damage;
uint32 mana = m_spellInfo->Effects[effIndex].MiscValue;
ExecuteLogEffectResurrect(effIndex, pTarget);
pTarget->setResurrectRequestData(m_caster->GetGUID(), m_caster->GetMapId(), m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ(), health, mana);
SendResurrectRequest(pTarget);
ExecuteLogEffectResurrect(effIndex, target);
target->setResurrectRequestData(m_caster->GetGUID(), m_caster->GetMapId(), m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ(), health, mana);
SendResurrectRequest(target);
}
void Spell::EffectInstaKill(SpellEffIndex /*effIndex*/)
@@ -1922,18 +1922,18 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
}
break;
case 66550: // teleports outside (Isle of Conquest)
if (Player* pTarget = unitTarget->ToPlayer())
if (Player* target = unitTarget->ToPlayer())
{
if (pTarget->GetTeamId() == TEAM_ALLIANCE)
if (target->GetTeamId() == TEAM_ALLIANCE)
m_targets.SetDst(442.24f, -835.25f, 44.30f, 0.06f, 628);
else
m_targets.SetDst(1120.43f, -762.11f, 47.92f, 2.94f, 628);
}
break;
case 66551: // teleports inside (Isle of Conquest)
if (Player* pTarget = unitTarget->ToPlayer())
if (Player* target = unitTarget->ToPlayer())
{
if (pTarget->GetTeamId() == TEAM_ALLIANCE)
if (target->GetTeamId() == TEAM_ALLIANCE)
m_targets.SetDst(389.57f, -832.38f, 48.65f, 3.00f, 628);
else
m_targets.SetDst(1174.85f, -763.24f, 48.72f, 6.26f, 628);
@@ -5625,23 +5625,23 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/)
if (!sWorld->getBoolConfig(CONFIG_CAST_UNSTUCK))
return;
Player* pTarget = (Player*)m_caster;
Player* target = (Player*)m_caster;
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell Effect: Stuck");
sLog->outDetail("Player %s (guid %u) used auto-unstuck future at map %u (%f, %f, %f)", pTarget->GetName(), pTarget->GetGUIDLow(), m_caster->GetMapId(), m_caster->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ());
sLog->outDetail("Player %s (guid %u) used auto-unstuck future at map %u (%f, %f, %f)", target->GetName(), target->GetGUIDLow(), m_caster->GetMapId(), m_caster->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
if (pTarget->isInFlight())
if (target->isInFlight())
return;
pTarget->TeleportTo(pTarget->GetStartPosition(), m_caster == m_caster ? TELE_TO_SPELL : 0);
target->TeleportTo(target->GetStartPosition(), m_caster == m_caster ? TELE_TO_SPELL : 0);
// homebind location is loaded always
// pTarget->TeleportTo(pTarget->m_homebindMapId, pTarget->m_homebindX, pTarget->m_homebindY, pTarget->m_homebindZ, pTarget->GetOrientation(), (m_caster == m_caster ? TELE_TO_SPELL : 0));
// target->TeleportTo(target->m_homebindMapId, target->m_homebindX, target->m_homebindY, target->m_homebindZ, target->GetOrientation(), (m_caster == m_caster ? TELE_TO_SPELL : 0));
// Stuck spell trigger Hearthstone cooldown
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(8690);
if (!spellInfo)
return;
Spell spell(pTarget, spellInfo, TRIGGERED_FULL_MASK);
Spell spell(target, spellInfo, TRIGGERED_FULL_MASK);
spell.SendSpellCooldown();
}
@@ -5983,18 +5983,18 @@ void Spell::EffectResurrect(SpellEffIndex effIndex)
break;
}
Player* pTarget = unitTarget->ToPlayer();
Player* target = unitTarget->ToPlayer();
if (pTarget->isRessurectRequested()) // already have one active request
if (target->isRessurectRequested()) // already have one active request
return;
uint32 health = pTarget->CountPctFromMaxHealth(damage);
uint32 mana = CalculatePctN(pTarget->GetMaxPower(POWER_MANA), damage);
uint32 health = target->CountPctFromMaxHealth(damage);
uint32 mana = CalculatePctN(target->GetMaxPower(POWER_MANA), damage);
ExecuteLogEffectResurrect(effIndex, pTarget);
ExecuteLogEffectResurrect(effIndex, target);
pTarget->setResurrectRequestData(m_caster->GetGUID(), m_caster->GetMapId(), m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ(), health, mana);
SendResurrectRequest(pTarget);
target->setResurrectRequestData(m_caster->GetGUID(), m_caster->GetMapId(), m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ(), health, mana);
SendResurrectRequest(target);
}
void Spell::EffectAddExtraAttacks(SpellEffIndex effIndex)
@@ -6291,9 +6291,9 @@ void Spell::EffectQuestClear(SpellEffIndex effIndex)
uint32 quest_id = m_spellInfo->Effects[effIndex].MiscValue;
Quest const* pQuest = sObjectMgr->GetQuestTemplate(quest_id);
Quest const* quest = sObjectMgr->GetQuestTemplate(quest_id);
if (!pQuest)
if (!quest)
return;
// Player has never done this quest