diff options
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_dk.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 14 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_holiday.cpp | 8 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 22 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_monk.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_pet.cpp | 8 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 2 |
10 files changed, 35 insertions, 35 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index bff1d8a1ba3..e22b5386e24 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -88,7 +88,7 @@ class spell_dk_advantage_t10_4p : public AuraScript if (Unit* caster = eventInfo.GetActor()) { Player* player = caster->ToPlayer(); - if (!player || caster->getClass() != CLASS_DEATH_KNIGHT) + if (!player || caster->GetClass() != CLASS_DEATH_KNIGHT) return false; for (uint8 i = 0; i < player->GetMaxPower(POWER_RUNES); ++i) @@ -367,7 +367,7 @@ class spell_dk_death_gate : public SpellScript SpellCastResult CheckClass() { - if (GetCaster()->getClass() != CLASS_DEATH_KNIGHT) + if (GetCaster()->GetClass() != CLASS_DEATH_KNIGHT) { SetCustomCastResultMessage(SPELL_CUSTOM_ERROR_MUST_BE_DEATH_KNIGHT); return SPELL_FAILED_CUSTOM_ERROR; diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index bad3932c032..68bdcfe8696 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -415,7 +415,7 @@ class spell_gen_aura_service_uniform : public AuraScript Unit* target = GetTarget(); if (target->GetTypeId() == TYPEID_PLAYER) { - if (target->getGender() == GENDER_MALE) + if (target->GetGender() == GENDER_MALE) target->SetDisplayId(MODEL_GOBLIN_MALE); else target->SetDisplayId(MODEL_GOBLIN_FEMALE); @@ -1154,7 +1154,7 @@ class spell_gen_dalaran_disguise : public SpellScriptLoader { if (Player* player = GetHitPlayer()) { - uint8 gender = player->getGender(); + uint8 gender = player->GetGender(); uint32 spellId = GetSpellInfo()->Id; @@ -1567,7 +1567,7 @@ class spell_ethereal_pet_aura : public AuraScript bool CheckProc(ProcEventInfo& eventInfo) { - uint32 levelDiff = std::abs(GetTarget()->getLevel() - eventInfo.GetProcTarget()->getLevel()); + uint32 levelDiff = std::abs(GetTarget()->GetLevel() - eventInfo.GetProcTarget()->GetLevel()); return levelDiff <= 9; } @@ -2382,7 +2382,7 @@ class spell_gen_orc_disguise : public SpellScript Unit* caster = GetCaster(); if (Player* target = GetHitPlayer()) { - uint8 gender = target->getGender(); + uint8 gender = target->GetGender(); if (!gender) caster->CastSpell(target, SPELL_ORC_DISGUISE_MALE, true); else @@ -2532,7 +2532,7 @@ class spell_gen_pet_summoned : public SpellScript Player* player = GetCaster()->ToPlayer(); if (player->GetLastPetNumber()) { - PetType newPetType = (player->getClass() == CLASS_HUNTER) ? HUNTER_PET : SUMMON_PET; + PetType newPetType = (player->GetClass() == CLASS_HUNTER) ? HUNTER_PET : SUMMON_PET; Pet* newPet = new Pet(player, newPetType); if (newPet->LoadPetFromDB(player, 0, player->GetLastPetNumber(), true)) { @@ -3671,7 +3671,7 @@ class spell_gen_gm_freeze : public AuraScript player->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE); // if player class = hunter || warlock remove pet if alive - if ((player->getClass() == CLASS_HUNTER) || (player->getClass() == CLASS_WARLOCK)) + if ((player->GetClass() == CLASS_HUNTER) || (player->GetClass() == CLASS_WARLOCK)) { if (Pet* pet = player->GetPet()) { @@ -3690,7 +3690,7 @@ class spell_gen_gm_freeze : public AuraScript if (Player* player = GetTarget()->ToPlayer()) { // Reset player faction + allow combat + allow duels - player->setFactionForRace(player->getRace()); + player->setFactionForRace(player->GetRace()); player->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); // save player player->SaveToDB(); diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp index ec1f16c27ec..1cc0abe6b46 100644 --- a/src/server/scripts/Spells/spell_holiday.cpp +++ b/src/server/scripts/Spells/spell_holiday.cpp @@ -189,13 +189,13 @@ class spell_hallow_end_candy_pirate : public SpellScriptLoader void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - uint32 spell = GetTarget()->getGender() == GENDER_FEMALE ? SPELL_HALLOWS_END_CANDY_FEMALE_DEFIAS_PIRATE : SPELL_HALLOWS_END_CANDY_MALE_DEFIAS_PIRATE; + uint32 spell = GetTarget()->GetGender() == GENDER_FEMALE ? SPELL_HALLOWS_END_CANDY_FEMALE_DEFIAS_PIRATE : SPELL_HALLOWS_END_CANDY_MALE_DEFIAS_PIRATE; GetTarget()->CastSpell(GetTarget(), spell, true); } void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - uint32 spell = GetTarget()->getGender() == GENDER_FEMALE ? SPELL_HALLOWS_END_CANDY_FEMALE_DEFIAS_PIRATE : SPELL_HALLOWS_END_CANDY_MALE_DEFIAS_PIRATE; + uint32 spell = GetTarget()->GetGender() == GENDER_FEMALE ? SPELL_HALLOWS_END_CANDY_FEMALE_DEFIAS_PIRATE : SPELL_HALLOWS_END_CANDY_MALE_DEFIAS_PIRATE; GetTarget()->RemoveAurasDueToSpell(spell); } @@ -258,7 +258,7 @@ class spell_hallow_end_trick : public SpellScriptLoader Unit* caster = GetCaster(); if (Player* target = GetHitPlayer()) { - uint8 gender = target->getGender(); + uint8 gender = target->GetGender(); uint32 spellId = SPELL_TRICK_BUFF; switch (urand(0, 5)) { @@ -426,7 +426,7 @@ public: Unit* target = GetHitUnit(); uint32 spellId = 0; - uint8 gender = target->getGender(); + uint8 gender = target->GetGender(); switch (GetSpellInfo()->Id) { diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index d8c880cb827..dae411c3046 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -579,7 +579,7 @@ class spell_hun_tame_beast : public SpellScriptLoader if (Creature* target = GetExplTargetUnit()->ToCreature()) { - if (target->getLevel() > caster->getLevel()) + if (target->GetLevel() > caster->GetLevel()) return SPELL_FAILED_HIGHLEVEL; // use SMSG_PET_TAME_FAILURE? diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 9471cedc4c8..2e7f034eefd 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -283,7 +283,7 @@ class spell_item_arcane_shroud : public AuraScript void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) { - int32 diff = GetUnitOwner()->getLevel() - 60; + int32 diff = GetUnitOwner()->GetLevel() - 60; if (diff > 0) amount += 2 * diff; } @@ -366,7 +366,7 @@ class spell_item_aura_of_madness : public AuraScript PreventDefaultAction(); Unit* caster = eventInfo.GetActor(); - uint32 spellId = Trinity::Containers::SelectRandomContainerElement(triggeredSpells[caster->getClass()]); + uint32 spellId = Trinity::Containers::SelectRandomContainerElement(triggeredSpells[caster->GetClass()]); caster->CastSpell(caster, spellId, aurEff); if (roll_chance_i(10)) @@ -594,7 +594,7 @@ class spell_item_deathbringers_will : public SpellScriptLoader PreventDefaultAction(); Unit* caster = eventInfo.GetActor(); - std::vector<uint32> const& randomSpells = triggeredSpells[caster->getClass()]; + std::vector<uint32> const& randomSpells = triggeredSpells[caster->GetClass()]; if (randomSpells.empty()) return; @@ -932,7 +932,7 @@ class spell_item_flask_of_the_north : public SpellScript { Unit* caster = GetCaster(); std::vector<uint32> possibleSpells; - switch (caster->getClass()) + switch (caster->GetClass()) { case CLASS_WARLOCK: case CLASS_MAGE: @@ -960,7 +960,7 @@ class spell_item_flask_of_the_north : public SpellScript if (possibleSpells.empty()) { - TC_LOG_WARN("spells", "Missing spells for class %u in script spell_item_flask_of_the_north", caster->getClass()); + TC_LOG_WARN("spells", "Missing spells for class %u in script spell_item_flask_of_the_north", caster->GetClass()); return; } @@ -1636,9 +1636,9 @@ class spell_item_savory_deviate_delight : public SpellScript switch (urand(1, 2)) { // Flip Out - ninja - case 1: spellId = (caster->getGender() == GENDER_MALE ? SPELL_FLIP_OUT_MALE : SPELL_FLIP_OUT_FEMALE); break; + case 1: spellId = (caster->GetGender() == GENDER_MALE ? SPELL_FLIP_OUT_MALE : SPELL_FLIP_OUT_FEMALE); break; // Yaaarrrr - pirate - case 2: spellId = (caster->getGender() == GENDER_MALE ? SPELL_YAAARRRR_MALE : SPELL_YAAARRRR_FEMALE); break; + case 2: spellId = (caster->GetGender() == GENDER_MALE ? SPELL_YAAARRRR_MALE : SPELL_YAAARRRR_FEMALE); break; } caster->CastSpell(caster, spellId, true); } @@ -1690,7 +1690,7 @@ class spell_item_scroll_of_recall : public SpellScript break; } - if (caster->getLevel() > maxSafeLevel) + if (caster->GetLevel() > maxSafeLevel) { caster->CastSpell(caster, SPELL_LOST, true); @@ -2157,7 +2157,7 @@ class spell_item_the_eye_of_diminution : public AuraScript void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) { - int32 diff = GetUnitOwner()->getLevel() - 60; + int32 diff = GetUnitOwner()->GetLevel() - 60; if (diff > 0) amount += diff; } @@ -3401,7 +3401,7 @@ class spell_item_soul_preserver : public AuraScript Unit* caster = eventInfo.GetActor(); - switch (caster->getClass()) + switch (caster->GetClass()) { case CLASS_DRUID: caster->CastSpell(caster, SPELL_SOUL_PRESERVER_DRUID, aurEff); @@ -3516,7 +3516,7 @@ class spell_item_toy_train_set_pulse : public SpellScript if (Player* target = GetHitUnit()->ToPlayer()) { target->HandleEmoteCommand(EMOTE_ONESHOT_TRAIN); - if (EmotesTextSoundEntry const* soundEntry = sDB2Manager.GetTextSoundEmoteFor(TEXT_EMOTE_TRAIN, target->getRace(), target->getGender(), target->getClass())) + if (EmotesTextSoundEntry const* soundEntry = sDB2Manager.GetTextSoundEmoteFor(TEXT_EMOTE_TRAIN, target->GetRace(), target->GetGender(), target->GetClass())) target->PlayDistanceSound(soundEntry->SoundID); } } diff --git a/src/server/scripts/Spells/spell_monk.cpp b/src/server/scripts/Spells/spell_monk.cpp index 07072cbff43..06e06da66cf 100644 --- a/src/server/scripts/Spells/spell_monk.cpp +++ b/src/server/scripts/Spells/spell_monk.cpp @@ -223,7 +223,7 @@ class spell_monk_stagger : public AuraScript Unit* target = GetTarget(); float agility = target->GetStat(STAT_AGILITY); float base = CalculatePct(agility, float(effect->GetAmount())); - float K = sDB2Manager.EvaluateExpectedStat(ExpectedStatType::ArmorConstant, target->getLevel(), -2, 0, Classes(target->getClass())); + float K = sDB2Manager.EvaluateExpectedStat(ExpectedStatType::ArmorConstant, target->GetLevel(), -2, 0, Classes(target->GetClass())); float newAmount = (base / (base + K)); newAmount *= multiplier; diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index d6e7c02f53a..89eff75fb1f 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -198,7 +198,7 @@ class spell_pal_blessing_of_faith : public SpellScript if (Unit* unitTarget = GetHitUnit()) { uint32 spell_id = 0; - switch (unitTarget->getClass()) + switch (unitTarget->GetClass()) { case CLASS_DRUID: spell_id = SPELL_PALADIN_BLESSING_OF_LOWER_CITY_DRUID; @@ -438,7 +438,7 @@ class spell_pal_divine_steed : public SpellScript Unit* caster = GetCaster(); uint32 spellId = SPELL_PALADIN_DIVINE_STEED_HUMAN; - switch (caster->getRace()) + switch (caster->GetRace()) { case RACE_HUMAN: spellId = SPELL_PALADIN_DIVINE_STEED_HUMAN; @@ -1073,7 +1073,7 @@ class spell_pal_t3_6p_bonus : public SpellScriptLoader Unit* caster = eventInfo.GetActor(); Unit* target = eventInfo.GetProcTarget(); - switch (target->getClass()) + switch (target->GetClass()) { case CLASS_PALADIN: case CLASS_PRIEST: diff --git a/src/server/scripts/Spells/spell_pet.cpp b/src/server/scripts/Spells/spell_pet.cpp index fa9acf4087f..dc9d588a6a4 100644 --- a/src/server/scripts/Spells/spell_pet.cpp +++ b/src/server/scripts/Spells/spell_pet.cpp @@ -256,7 +256,7 @@ public: if (Unit* pet = GetUnitOwner()) if (_tempBonus) { - PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(pet->GetEntry(), pet->getLevel()); + PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(pet->GetEntry(), pet->GetLevel()); uint32 healthMod = 0; uint32 baseHealth = pInfo->health; switch (pet->GetEntry()) @@ -288,7 +288,7 @@ public: if (Unit* pet = GetUnitOwner()) if (pet->IsPet()) { - PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(pet->GetEntry(), pet->getLevel()); + PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(pet->GetEntry(), pet->GetLevel()); pet->ToPet()->SetCreateHealth(pInfo->health); } } @@ -400,7 +400,7 @@ public: if (Unit* pet = GetUnitOwner()) if (_tempBonus) { - PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(pet->GetEntry(), pet->getLevel()); + PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(pet->GetEntry(), pet->GetLevel()); uint32 manaMod = 0; uint32 baseMana = pInfo->mana; switch (pet->GetEntry()) @@ -428,7 +428,7 @@ public: if (Unit* pet = GetUnitOwner()) if (pet->IsPet()) { - PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(pet->GetEntry(), pet->getLevel()); + PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(pet->GetEntry(), pet->GetLevel()); pet->ToPet()->SetCreateMana(pInfo->mana); } } diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index a29ea36c040..b0c62f349f0 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -829,7 +829,7 @@ class spell_q10041_q10040_who_are_they : public SpellScriptLoader PreventHitDefaultEffect(effIndex); if (Player* target = GetHitPlayer()) { - target->CastSpell(target, target->getGender() == GENDER_MALE ? SPELL_MALE_DISGUISE : SPELL_FEMALE_DISGUISE, true); + target->CastSpell(target, target->GetGender() == GENDER_MALE ? SPELL_MALE_DISGUISE : SPELL_FEMALE_DISGUISE, true); target->CastSpell(target, SPELL_GENERIC_DISGUISE, true); } } diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 24bc8a45b6c..5cbd0706e87 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -1146,7 +1146,7 @@ class spell_sha_t3_6p_bonus : public SpellScriptLoader Unit* caster = eventInfo.GetActor(); Unit* target = eventInfo.GetProcTarget(); - switch (target->getClass()) + switch (target->GetClass()) { case CLASS_PALADIN: case CLASS_PRIEST: |
