diff options
author | click <click@gonnamakeyou.com> | 2011-07-02 23:50:02 +0200 |
---|---|---|
committer | click <click@gonnamakeyou.com> | 2011-07-02 23:50:02 +0200 |
commit | f997363c08ad472d4f30375b46b8dfb6ac9cfbb8 (patch) | |
tree | 2654251d93b9e5fa2f96edc5580b86b999143879 /src | |
parent | 5cafed655a8ef605969e56c9a066d5bbfc8e7452 (diff) |
Core: Cleaning up hungarian notation - Phase3: pVictim -> victim
Diffstat (limited to 'src')
16 files changed, 46 insertions, 46 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp index baa181d2ad7..7c01110b18e 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp @@ -115,7 +115,7 @@ public: me->CallForHelp(VISIBLE_RANGE); } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* /*victim*/) { DoScriptText(SAY_MO_KILL, me); } @@ -273,7 +273,7 @@ public: DoScriptText(SAY_WH_INTRO, me); } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* /*victim*/) { DoScriptText(SAY_WH_KILL, me); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp index 963149022c8..34faab240f6 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp @@ -73,11 +73,11 @@ public: pInstance->SetData(TYPE_NERUB, IN_PROGRESS); } - void RaiseUndeadScarab(Unit* pVictim) + void RaiseUndeadScarab(Unit* victim) { if (Creature* pUndeadScarab = DoSpawnCreature(10876, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) if (pUndeadScarab->AI()) - pUndeadScarab->AI()->AttackStart(pVictim); + pUndeadScarab->AI()->AttackStart(victim); } void UpdateAI(const uint32 diff) diff --git a/src/server/scripts/EasternKingdoms/boss_kruul.cpp b/src/server/scripts/EasternKingdoms/boss_kruul.cpp index 7b328f57fc8..3167eadc5fe 100644 --- a/src/server/scripts/EasternKingdoms/boss_kruul.cpp +++ b/src/server/scripts/EasternKingdoms/boss_kruul.cpp @@ -76,10 +76,10 @@ public: DoCast(me, SPELL_CAPTURESOUL); } - void SummonHounds(Unit* pVictim) + void SummonHounds(Unit* victim) { if (Creature* Hound = DoSpawnCreature(19207, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000)) - Hound->AI()->AttackStart(pVictim); + Hound->AI()->AttackStart(victim); } void UpdateAI(const uint32 diff) diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp index ad344ab5347..9fc4f76d8e5 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp @@ -61,10 +61,10 @@ public: { } - void SummonAdds(Unit* pVictim) + void SummonAdds(Unit* victim) { if (Creature* Add = DoSpawnCreature(13456, float(irand(-7, 7)), float(irand(-7, 7)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000)) - Add->AI()->AttackStart(pVictim); + Add->AI()->AttackStart(victim); } void UpdateAI(const uint32 diff) diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp index 7e9aac30a74..80a546ed4c9 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp @@ -220,7 +220,7 @@ public: Summons.Despawn(summon); } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* /*victim*/) { DoScriptText(SAY_KILL, me); } diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp index b180458a3a9..53797939e77 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp @@ -333,9 +333,9 @@ public: pInstance->SetData(DATA_ANUBARAK_EVENT, DONE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* victim) { - if (pVictim == me) + if (victim == me) return; DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me); } diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp index d32bade761f..9926a27c52c 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp @@ -382,7 +382,7 @@ public: } } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* /*victim*/) { DoScriptText(RAND(SAY_SARTHARION_SLAY_1, SAY_SARTHARION_SLAY_2, SAY_SARTHARION_SLAY_3), me); } @@ -1020,7 +1020,7 @@ public: DoCast(me, SPELL_POWER_OF_TENEBRON); } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* /*victim*/) { DoScriptText(RAND(SAY_TENEBRON_SLAY_1, SAY_TENEBRON_SLAY_2), me); } @@ -1116,7 +1116,7 @@ public: DoCast(me, SPELL_POWER_OF_SHADRON); } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* /*victim*/) { DoScriptText(RAND(SAY_SHADRON_SLAY_1, SAY_SHADRON_SLAY_2), me); } @@ -1215,7 +1215,7 @@ public: DoCast(me, SPELL_POWER_OF_VESPERON); } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* /*victim*/) { DoScriptText(RAND(SAY_VESPERON_SLAY_1, SAY_VESPERON_SLAY_2), me); } diff --git a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp index 270829b1bee..a2e58475c28 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp @@ -159,9 +159,9 @@ public: pInstance->SetData(DATA_MOORABI_EVENT, DONE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* victim) { - if (pVictim == me) + if (victim == me) return; DoScriptText(RAND(SAY_SLAY_2, SAY_SLAY_3), me); diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp index a36581d9136..9304549c21e 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp @@ -178,7 +178,7 @@ public: m_pInstance->SetData(TYPE_BJARNGRIM, IN_PROGRESS); } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* /*victim*/) { DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me); } diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp index d6b298a2399..a12465f3b91 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp @@ -123,7 +123,7 @@ public: m_pInstance->SetData(TYPE_LOKEN, DONE); } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* /*victim*/) { DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me); } diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp index 4cec6577c42..fea4ed4a5ac 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp @@ -170,7 +170,7 @@ public: } } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* /*victim*/) { DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me); } diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp index 12a41b791f2..c566208ba30 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp @@ -235,8 +235,8 @@ public: void DoAction(const int32 /*action*/) { if (pInstance) - if (Unit* pVictim = me->GetUnit(*me, pInstance->GetData64(DATA_SACRIFICED_PLAYER))) - DoCast(pVictim, SPELL_PARALYZE); + if (Unit* victim = me->GetUnit(*me, pInstance->GetData64(DATA_SACRIFICED_PLAYER))) + DoCast(victim, SPELL_PARALYZE); } void EnterCombat(Unit* /*who*/) @@ -390,7 +390,7 @@ public: } } - void KilledUnit(Unit* /*pVictim*/) + void KilledUnit(Unit* /*victim*/) { DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me); } diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp index c4bbf4dab36..047217a1291 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp @@ -213,9 +213,9 @@ public: } } } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* victim) { - if (pVictim == me) + if (victim == me) return; DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me); diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index 16c273bd2b2..b9262135f51 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -130,8 +130,8 @@ class boss_nazan : public CreatureScript if (Fireball_Timer <= diff) { - if (Unit* pVictim = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(pVictim, DUNGEON_MODE(SPELL_FIREBALL, SPELL_FIREBALL_H), true); + if (Unit* victim = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(victim, DUNGEON_MODE(SPELL_FIREBALL, SPELL_FIREBALL_H), true); Fireball_Timer = urand(4000, 7000); } else @@ -148,8 +148,8 @@ class boss_nazan : public CreatureScript me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING); me->GetMotionMaster()->Clear(); - if (Unit* pVictim = SelectTarget(SELECT_TARGET_NEAREST, 0)) - me->AI()->AttackStart(pVictim); + if (Unit* victim = SelectTarget(SELECT_TARGET_NEAREST, 0)) + me->AI()->AttackStart(victim); DoStartMovement(me->getVictim()); DoScriptText(EMOTE, me); return; @@ -370,18 +370,18 @@ class boss_vazruden_the_herald : public CreatureScript { if (!pSummoned) return; - Unit* pVictim = me->getVictim(); + Unit* victim = me->getVictim(); if (pSummoned->GetEntry() == ENTRY_NAZAN) { CAST_AI(boss_nazan::boss_nazanAI, pSummoned->AI())->VazrudenGUID = VazrudenGUID; pSummoned->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); pSummoned->SetSpeed(MOVE_FLIGHT, 2.5f); - if (pVictim) - AttackStartNoMove(pVictim); + if (victim) + AttackStartNoMove(victim); } else - if (pVictim) - pSummoned->AI()->AttackStart(pVictim); + if (victim) + pSummoned->AI()->AttackStart(victim); } void SentryDownBy(Unit* pKiller) diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 2de2e5a13cf..5beb421c88b 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -71,31 +71,31 @@ public: void Absorb(AuraEffect * aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) { - Unit* pVictim = GetTarget(); - int32 remainingHealth = pVictim->GetHealth() - dmgInfo.GetDamage(); - uint32 allowedHealth = pVictim->CountPctFromMaxHealth(35); + Unit* victim = GetTarget(); + int32 remainingHealth = victim->GetHealth() - dmgInfo.GetDamage(); + uint32 allowedHealth = victim->CountPctFromMaxHealth(35); // If damage kills us - if (remainingHealth <= 0 && !pVictim->ToPlayer()->HasSpellCooldown(PAL_SPELL_ARDENT_DEFENDER_HEAL)) + if (remainingHealth <= 0 && !victim->ToPlayer()->HasSpellCooldown(PAL_SPELL_ARDENT_DEFENDER_HEAL)) { // Cast healing spell, completely avoid damage absorbAmount = dmgInfo.GetDamage(); - uint32 defenseSkillValue = pVictim->GetDefenseSkillValue(); + uint32 defenseSkillValue = victim->GetDefenseSkillValue(); // Max heal when defense skill denies critical hits from raid bosses // Formula: max defense at level + 140 (raiting from gear) - uint32 reqDefForMaxHeal = pVictim->getLevel() * 5 + 140; + uint32 reqDefForMaxHeal = victim->getLevel() * 5 + 140; float pctFromDefense = (defenseSkillValue >= reqDefForMaxHeal) ? 1.0f : float(defenseSkillValue) / float(reqDefForMaxHeal); - int32 healAmount = int32(pVictim->CountPctFromMaxHealth(uint32(healPct * pctFromDefense))); - pVictim->CastCustomSpell(pVictim, PAL_SPELL_ARDENT_DEFENDER_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff); - pVictim->ToPlayer()->AddSpellCooldown(PAL_SPELL_ARDENT_DEFENDER_HEAL, 0, time(NULL) + 120); + int32 healAmount = int32(victim->CountPctFromMaxHealth(uint32(healPct * pctFromDefense))); + victim->CastCustomSpell(victim, PAL_SPELL_ARDENT_DEFENDER_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff); + victim->ToPlayer()->AddSpellCooldown(PAL_SPELL_ARDENT_DEFENDER_HEAL, 0, time(NULL) + 120); } else if (remainingHealth < int32(allowedHealth)) { // Reduce damage that brings us under 35% (or full damage if we are already under 35%) by x% - uint32 damageToReduce = (pVictim->GetHealth() < allowedHealth) + uint32 damageToReduce = (victim->GetHealth() < allowedHealth) ? dmgInfo.GetDamage() : allowedHealth - remainingHealth; absorbAmount = CalculatePctN(damageToReduce, absorbPct); diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index 035c6d9b9b5..e82e7fc79fd 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -227,8 +227,8 @@ public: void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) { Unit* target = GetTarget(); - Unit* pVictim = target->getVictim(); - if (pVictim && (target->GetHealthPct() > pVictim->GetHealthPct())) + Unit* victim = target->getVictim(); + if (victim && (target->GetHealthPct() > victim->GetHealthPct())) { if (!target->HasAura(ROGUE_SPELL_PREY_ON_THE_WEAK)) { |