diff options
Diffstat (limited to 'src/server/scripts')
34 files changed, 93 insertions, 93 deletions
diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index 5420077bc6d..a00e96e82d0 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -279,7 +279,7 @@ public: if (titleInfo && target->HasTitle(titleInfo)) { - std::string name = (target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)[handler->GetSessionDbcLocale()]; + std::string name = (target->GetGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)[handler->GetSessionDbcLocale()]; if (name.empty()) continue; @@ -450,7 +450,7 @@ public: if (!handler->extractPlayerTarget(nameStr, &target, &targetGuid, &targetName)) return false; - int32 oldlevel = target ? target->getLevel() : sCharacterCache->GetCharacterLevelByGuid(targetGuid); + int32 oldlevel = target ? target->GetLevel() : sCharacterCache->GetCharacterLevelByGuid(targetGuid); int32 newlevel = levelStr ? atoi(levelStr) : oldlevel; if (newlevel < 1) @@ -903,7 +903,7 @@ public: if (!handler->extractPlayerTarget(nameStr, &target, &targetGuid, &targetName)) return false; - int32 oldlevel = target ? target->getLevel() : sCharacterCache->GetCharacterLevelByGuid(targetGuid); + int32 oldlevel = target ? target->GetLevel() : sCharacterCache->GetCharacterLevelByGuid(targetGuid); int32 addlevel = levelStr ? atoi(levelStr) : 1; int32 newlevel = oldlevel + addlevel; diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 4b86ff544cf..3a5699cdcd0 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -143,7 +143,7 @@ public: static bool HandleLearnAllMySpellsCommand(ChatHandler* handler, char const* /*args*/) { - ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(handler->GetSession()->GetPlayer()->getClass()); + ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(handler->GetSession()->GetPlayer()->GetClass()); if (!classEntry) return true; uint32 family = classEntry->SpellClassSet; @@ -184,7 +184,7 @@ public: static bool HandleLearnAllMyTalentsCommand(ChatHandler* handler, char const* /*args*/) { Player* player = handler->GetSession()->GetPlayer(); - uint32 playerClass = player->getClass(); + uint32 playerClass = player->GetClass(); for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i) { @@ -417,7 +417,7 @@ public: static void HandleLearnSkillRecipesHelper(Player* player, uint32 skillId) { - uint32 classmask = player->getClassMask(); + uint32 classmask = player->GetClassMask(); for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j) { diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index 9bc96553784..6a3721dc86e 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -621,7 +621,7 @@ public: { uint32 color = ItemQualityColors[itemTemplate->GetQuality()]; std::ostringstream itemStr; - itemStr << "|c" << std::hex << color << "|Hitem:" << item_entry << ":0:0:0:0:0:0:0:" << handler->GetSession()->GetPlayer()->getLevel() + itemStr << "|c" << std::hex << color << "|Hitem:" << item_entry << ":0:0:0:0:0:0:0:" << handler->GetSession()->GetPlayer()->GetLevel() << ":0:0:0:0:0|h[" << itemTemplate->GetName(handler->GetSessionDbcLocale()) << "]|h|r"; handler->PSendSysMessage(LANG_LIST_MAIL_INFO_ITEM, itemStr.str().c_str(), item_entry, item_guid, item_count); } diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 55cc08587c8..1b287cb585d 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -1263,7 +1263,7 @@ public: { for (uint8 gender = GENDER_MALE; gender <= GENDER_FEMALE; ++gender) { - if (target && target->getGender() != gender) + if (target && target->GetGender() != gender) continue; LocaleConstant locale = handler->GetSessionDbcLocale(); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 7f1175a4503..aa90509e128 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1698,10 +1698,10 @@ public: accId = target->GetSession()->GetAccountId(); money = target->GetMoney(); totalPlayerTime = target->GetTotalPlayedTime(); - level = target->getLevel(); + level = target->GetLevel(); latency = target->GetSession()->GetLatency(); - raceid = target->getRace(); - classid = target->getClass(); + raceid = target->GetRace(); + classid = target->GetClass(); muteTime = target->GetSession()->m_muteTime; mapId = target->GetMapId(); areaId = target->GetAreaId(); diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 4b4de0fa107..85db49ba75f 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -868,7 +868,7 @@ public: return false; } - PlayerInfo const* info = sObjectMgr->GetPlayerInfo(target->getRace(), target->getClass()); + PlayerInfo const* info = sObjectMgr->GetPlayerInfo(target->GetRace(), target->GetClass()); if (!info) return false; @@ -879,14 +879,14 @@ public: if (!strncmp(gender_str, "male", gender_len)) // MALE { - if (target->getGender() == GENDER_MALE) + if (target->GetGender() == GENDER_MALE) return true; gender = GENDER_MALE; } else if (!strncmp(gender_str, "female", gender_len)) // FEMALE { - if (target->getGender() == GENDER_FEMALE) + if (target->GetGender() == GENDER_FEMALE) return true; gender = GENDER_FEMALE; @@ -911,8 +911,8 @@ public: // Generate random customizations std::vector<UF::ChrCustomizationChoice> customizations; - Classes playerClass = Classes(target->getClass()); - std::vector<ChrCustomizationOptionEntry const*> const* options = sDB2Manager.GetCustomiztionOptions(target->getRace(), gender); + Classes playerClass = Classes(target->GetClass()); + std::vector<ChrCustomizationOptionEntry const*> const* options = sDB2Manager.GetCustomiztionOptions(target->GetRace(), gender); WorldSession const* worldSession = target->GetSession(); for (ChrCustomizationOptionEntry const* option : *options) { diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index e38cbf25613..64330b8aa64 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -676,7 +676,7 @@ public: handler->PSendSysMessage(LANG_SPAWNINFO_GROUP_ID, groupData->name.c_str(), groupData->groupId, groupData->flags, target->GetMap()->IsSpawnGroupActive(groupData->groupId)); } handler->PSendSysMessage(LANG_SPAWNINFO_COMPATIBILITY_MODE, target->GetRespawnCompatibilityMode()); - handler->PSendSysMessage(LANG_NPCINFO_LEVEL, target->getLevel()); + handler->PSendSysMessage(LANG_NPCINFO_LEVEL, target->GetLevel()); handler->PSendSysMessage(LANG_NPCINFO_EQUIPMENT, target->GetCurrentEquipmentId(), target->GetOriginalEquipmentId()); handler->PSendSysMessage(LANG_NPCINFO_HEALTH, target->GetCreateHealth(), std::to_string(target->GetMaxHealth()).c_str(), std::to_string(target->GetHealth()).c_str()); handler->PSendSysMessage(LANG_NPCINFO_MOVEMENT_DATA, target->GetMovementTemplate().ToString().c_str()); @@ -1401,7 +1401,7 @@ public: pet->SetReactState(REACT_DEFENSIVE); // calculate proper level - uint8 level = std::max<uint8>(player->getLevel()-5, creatureTarget->getLevel()); + uint8 level = std::max<uint8>(player->GetLevel()-5, creatureTarget->GetLevel()); // prepare visual effect for levelup pet->SetLevel(level - 1); diff --git a/src/server/scripts/Commands/cs_pet.cpp b/src/server/scripts/Commands/cs_pet.cpp index b282a1a5497..7ca9de2c249 100644 --- a/src/server/scripts/Commands/cs_pet.cpp +++ b/src/server/scripts/Commands/cs_pet.cpp @@ -105,7 +105,7 @@ public: pet->SetCreatorGUID(player->GetGUID()); pet->SetFaction(player->GetFaction()); - if (!pet->InitStatsForLevel(creatureTarget->getLevel())) + if (!pet->InitStatsForLevel(creatureTarget->GetLevel())) { TC_LOG_ERROR("misc", "InitStatsForLevel() in EffectTameCreature failed! Pet deleted."); handler->PSendSysMessage("Error 2"); @@ -114,7 +114,7 @@ public: } // prepare visual effect for levelup - pet->SetLevel(creatureTarget->getLevel() - 1); + pet->SetLevel(creatureTarget->GetLevel() - 1); pet->GetCharmInfo()->SetPetNumber(sObjectMgr->GeneratePetNumber(), true); // this enables pet details window (Shift+P) @@ -124,7 +124,7 @@ public: pet->GetMap()->AddToMap(pet->ToCreature()); // visual effect for levelup - pet->SetLevel(creatureTarget->getLevel()); + pet->SetLevel(creatureTarget->GetLevel()); player->SetMinion(pet, true); pet->SavePetToDB(PET_SAVE_AS_CURRENT); @@ -211,7 +211,7 @@ public: int32 level = args ? atoi(args) : 0; if (level == 0) - level = owner->getLevel() - pet->getLevel(); + level = owner->GetLevel() - pet->GetLevel(); if (level == 0 || level < -STRONG_MAX_LEVEL || level > STRONG_MAX_LEVEL) { handler->SendSysMessage(LANG_BAD_VALUE); @@ -219,11 +219,11 @@ public: return false; } - int32 newLevel = pet->getLevel() + level; + int32 newLevel = pet->GetLevel() + level; if (newLevel < 1) newLevel = 1; - else if (newLevel > owner->getLevel()) - newLevel = owner->getLevel(); + else if (newLevel > owner->GetLevel()) + newLevel = owner->GetLevel(); pet->GivePetLevel(newLevel); return true; diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index e168681fee2..a3f6dda4870 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -91,10 +91,10 @@ public: static bool HandleResetStatsOrLevelHelper(Player* player) { - ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(player->getClass()); + ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(player->GetClass()); if (!classEntry) { - TC_LOG_ERROR("misc", "Class %u not found in DBC (Wrong DBC files?)", player->getClass()); + TC_LOG_ERROR("misc", "Class %u not found in DBC (Wrong DBC files?)", player->GetClass()); return false; } @@ -104,7 +104,7 @@ public: if (!player->HasAuraType(SPELL_AURA_MOD_SHAPESHIFT)) player->SetShapeshiftForm(FORM_NONE); - player->setFactionForRace(player->getRace()); + player->setFactionForRace(player->GetRace()); player->SetPowerType(Powers(powerType)); // reset only if player not in some form; @@ -129,10 +129,10 @@ public: if (!HandleResetStatsOrLevelHelper(target)) return false; - uint8 oldLevel = target->getLevel(); + uint8 oldLevel = target->GetLevel(); // set starting level - uint8 startLevel = target->GetStartLevel(target->getRace(), target->getClass(), {}); + uint8 startLevel = target->GetStartLevel(target->GetRace(), target->GetClass(), {}); target->_ApplyAllLevelScaleItemMods(false); target->SetLevel(startLevel); diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp index 392ed03f37f..db69ce78f47 100644 --- a/src/server/scripts/Commands/cs_titles.cpp +++ b/src/server/scripts/Commands/cs_titles.cpp @@ -95,7 +95,7 @@ public: target->SetChosenTitle(titleInfo->MaskID); handler->PSendSysMessage(LANG_TITLE_CURRENT_RES, id, - (target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)[handler->GetSessionDbcLocale()], + (target->GetGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)[handler->GetSessionDbcLocale()], tNameLink.c_str()); return true; } @@ -138,7 +138,7 @@ public: std::string tNameLink = handler->GetNameLink(target); std::string titleNameStr = Trinity::StringFormat( - (target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)[handler->GetSessionDbcLocale()], + (target->GetGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)[handler->GetSessionDbcLocale()], target->GetName().c_str() ); @@ -188,7 +188,7 @@ public: std::string tNameLink = handler->GetNameLink(target); std::string titleNameStr = Trinity::StringFormat( - (target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)[handler->GetSessionDbcLocale()], + (target->GetGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)[handler->GetSessionDbcLocale()], target->GetName().c_str() ); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp index fcfeb69fa0c..c642be5f59c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp @@ -593,7 +593,7 @@ public: { if (Creature* infiltrator = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_SCARSHIELD_INFILTRATOR))) { - if (player->getLevel() >= 57) + if (player->GetLevel() >= 57) infiltrator->AI()->SetData(1, 1); else if (infiltrator->GetEntry() == NPC_SCARSHIELD_INFILTRATOR) infiltrator->AI()->Talk(0, player); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp index 742b76f3913..7681f1a0cb6 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp @@ -513,7 +513,7 @@ public: break; case EVENT_CLASSCALL: if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true)) - switch (target->getClass()) + switch (target->GetClass()) { case CLASS_MAGE: Talk(SAY_MAGE); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index fb2d4f28b24..002b7703a99 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -624,7 +624,7 @@ public: // summoned->SetVisibility(VISIBILITY_OFF); //with this we cant see the armageddon visuals } else - summoned->SetLevel(me->getLevel()); + summoned->SetLevel(me->GetLevel()); summoned->SetFaction(me->GetFaction()); summons.Summon(summoned); @@ -953,7 +953,7 @@ public: void JustSummoned(Creature* summoned) override { summoned->SetFaction(me->GetFaction()); - summoned->SetLevel(me->getLevel()); + summoned->SetLevel(me->GetLevel()); } void JustEngagedWith(Unit* who) override @@ -1046,7 +1046,7 @@ public: void JustSummoned(Creature* summoned) override { summoned->SetFaction(me->GetFaction()); - summoned->SetLevel(me->getLevel()); + summoned->SetLevel(me->GetLevel()); } void UpdateAI(uint32 diff) override @@ -1327,7 +1327,7 @@ public: if ((victimClass == 0) && me->GetVictim()) { - victimClass = me->EnsureVictim()->getClass(); + victimClass = me->EnsureVictim()->GetClass(); switch (victimClass) { case CLASS_DRUID: diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index ab6d48a4ed1..76f070187c6 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -424,7 +424,7 @@ public: if (victim->GetTypeId() == TYPEID_PLAYER) { - switch (victim->getClass()) + switch (victim->GetClass()) { case CLASS_PRIEST: case CLASS_PALADIN: diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp index 7dd82f416f7..cdce3694680 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp @@ -283,7 +283,7 @@ public: soulmodel = target->GetDisplayId(); soulholder = target->GetGUID(); - soulclass = target->getClass(); + soulclass = target->GetClass(); DoCast(target, SPELL_STOLEN_SOUL); me->SummonCreature(ENTRY_STOLEN_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp index c8dd0f21c32..6978dd0ac5d 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp @@ -97,7 +97,7 @@ public: { summoned->CastSpell(summoned, SPELL_FOCUS_FIRE_VISUAL, false); summoned->SetFaction(me->GetFaction()); - summoned->SetLevel(me->getLevel()); + summoned->SetLevel(me->GetLevel()); summoned->AddUnitState(UNIT_STATE_ROOT); if (Unit* pFocusedTarget = ObjectAccessor::GetUnit(*me, FocusedTargetGUID)) 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 1769436a3c5..d6c6256dd59 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 @@ -103,7 +103,7 @@ class boss_nazan : public CreatureScript { if (summoned && summoned->GetEntry() == NPC_LIQUID_FIRE) { - summoned->SetLevel(me->getLevel()); + summoned->SetLevel(me->GetLevel()); summoned->SetFaction(me->GetFaction()); summoned->CastSpell(summoned, DUNGEON_MODE(SPELL_SUMMON_LIQUID_FIRE, SPELL_SUMMON_LIQUID_FIRE_H), true); summoned->CastSpell(summoned, SPELL_FIRE_NOVA_VISUAL, true); diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index 366de0b1ad1..e02f98e0b0e 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -440,7 +440,7 @@ class boss_alar : public CreatureScript Summoned->SetObjectScale(Summoned->GetObjectScale() * 2.5f); Summoned->SetDisplayId(11686); Summoned->SetFaction(me->GetFaction()); - Summoned->SetLevel(me->getLevel()); + Summoned->SetLevel(me->GetLevel()); Summoned->CastSpell(Summoned, SPELL_FLAME_PATCH, false); } } diff --git a/src/server/scripts/Pet/pet_hunter.cpp b/src/server/scripts/Pet/pet_hunter.cpp index b3ebdcd45d1..ae96e8c9da2 100644 --- a/src/server/scripts/Pet/pet_hunter.cpp +++ b/src/server/scripts/Pet/pet_hunter.cpp @@ -52,7 +52,7 @@ class npc_pet_hunter_snake_trap : public CreatureScript { _isViper = me->GetEntry() == NPC_HUNTER_VIPER ? true : false; - me->SetMaxHealth(uint32(107 * (me->getLevel() - 40) * 0.025f)); + me->SetMaxHealth(uint32(107 * (me->GetLevel() - 40) * 0.025f)); // Add delta to make them not all hit the same time me->SetBaseAttackTime(BASE_ATTACK, me->GetBaseAttackTime(BASE_ATTACK) + urandms(0,6)); 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: diff --git a/src/server/scripts/World/duel_reset.cpp b/src/server/scripts/World/duel_reset.cpp index 7246abc8377..d5d4a9a0de7 100644 --- a/src/server/scripts/World/duel_reset.cpp +++ b/src/server/scripts/World/duel_reset.cpp @@ -78,11 +78,11 @@ class DuelResetScript : public PlayerScript loser->RestoreHealthAfterDuel(); // check if player1 class uses mana - if (winner->GetPowerType() == POWER_MANA || winner->getClass() == CLASS_DRUID) + if (winner->GetPowerType() == POWER_MANA || winner->GetClass() == CLASS_DRUID) winner->RestoreManaAfterDuel(); // check if player2 class uses mana - if (loser->GetPowerType() == POWER_MANA || loser->getClass() == CLASS_DRUID) + if (loser->GetPowerType() == POWER_MANA || loser->GetClass() == CLASS_DRUID) loser->RestoreManaAfterDuel(); } } diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 4f1b0c433c4..178f3248a4e 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -1170,7 +1170,7 @@ public: Creature* target = GetClosestCreatureWithEntry(player, NPC_OUTHOUSE_BUNNY, 3.0f); if (target) { - target->AI()->SetData(1, player->getGender()); + target->AI()->SetData(1, player->GetGender()); me->CastSpell(target, SPELL_INDISPOSED_III); } me->CastSpell(player, SPELL_INDISPOSED); diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index 2979c83bf6d..f0e3c207b16 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -397,7 +397,7 @@ class item_generic_limit_chance_above_60 : public ItemScript bool OnCastItemCombatSpell(Player* player, Unit* victim, SpellInfo const* /*spellInfo*/, Item* /*item*/) override { // spell proc chance gets severely reduced on victims > 60 (formula unknown) - if (victim->getLevel() > 60) + if (victim->GetLevel() > 60) { // gives ~0.1% proc chance at lvl 70 float const lvlPenaltyFactor = 9.93f; diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 729afef7455..eb4ede9bad9 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -246,7 +246,7 @@ int32 DoHighUnlearnCost(Player* /*player*/) //tailor, alchemy int32 DoMedUnlearnCost(Player* player) //blacksmith, leatherwork { - uint8 level = player->getLevel(); + uint8 level = player->GetLevel(); if (level < 51) return 250000; else if (level < 66) @@ -257,7 +257,7 @@ int32 DoMedUnlearnCost(Player* player) //blacksmith, leather int32 DoLowUnlearnCost(Player* player) //blacksmith { - uint8 level = player->getLevel(); + uint8 level = player->GetLevel(); if (level < 66) return 50000; else @@ -449,7 +449,7 @@ public: if (me->IsTrainer()) AddGossipItemFor(player, GossipOptionIcon::Trainer, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); - if (player->HasSkill(SKILL_ALCHEMY) && player->GetBaseSkillValue(SKILL_ALCHEMY) >= 350 && player->getLevel() > 67) + if (player->HasSkill(SKILL_ALCHEMY) && player->GetBaseSkillValue(SKILL_ALCHEMY) >= 350 && player->GetLevel() > 67) { if (player->GetQuestRewardStatus(Q_MASTER_TRANSMUTE) || player->GetQuestRewardStatus(Q_MASTER_ELIXIR) || player->GetQuestRewardStatus(Q_MASTER_POTION)) { @@ -652,7 +652,7 @@ public: } } //WEAPONSMITH SPEC - if (player->HasSpell(S_WEAPON) && player->getLevel() > 49 && player->GetBaseSkillValue(SKILL_BLACKSMITHING) >= 250) + if (player->HasSpell(S_WEAPON) && player->GetLevel() > 49 && player->GetBaseSkillValue(SKILL_BLACKSMITHING) >= 250) { switch (creatureId) { @@ -989,7 +989,7 @@ public: if (me->IsTrainer()) AddGossipItemFor(player, GossipOptionIcon::Trainer, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); - if (player->HasSkill(SKILL_LEATHERWORKING) && player->GetBaseSkillValue(SKILL_LEATHERWORKING) >= 250 && player->getLevel() > 49) + if (player->HasSkill(SKILL_LEATHERWORKING) && player->GetBaseSkillValue(SKILL_LEATHERWORKING) >= 250 && player->GetLevel() > 49) { switch (me->GetEntry()) { @@ -1125,7 +1125,7 @@ public: AddGossipItemFor(player, GossipOptionIcon::Trainer, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); //TAILORING SPEC - if (player->HasSkill(SKILL_TAILORING) && player->GetBaseSkillValue(SKILL_TAILORING) >= 350 && player->getLevel() > 59) + if (player->HasSkill(SKILL_TAILORING) && player->GetBaseSkillValue(SKILL_TAILORING) >= 350 && player->GetLevel() > 59) { if (player->GetQuestRewardStatus(10831) || player->GetQuestRewardStatus(10832) || player->GetQuestRewardStatus(10833)) { diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 08e54e4602e..0138914cb4c 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -1699,11 +1699,11 @@ enum TournamentPennantSpells case NPC_ARGENT_WARHORSE: { if (player->HasAchieved(ACHIEVEMENT_CHAMPION_ALLIANCE) || player->HasAchieved(ACHIEVEMENT_CHAMPION_HORDE)) - return player->getClass() == CLASS_DEATH_KNIGHT ? SPELL_PENNANT_EBON_BLADE_CHAMPION : SPELL_PENNANT_ARGENT_CRUSADE_CHAMPION; + return player->GetClass() == CLASS_DEATH_KNIGHT ? SPELL_PENNANT_EBON_BLADE_CHAMPION : SPELL_PENNANT_ARGENT_CRUSADE_CHAMPION; else if (player->HasAchieved(ACHIEVEMENT_ARGENT_VALOR)) - return player->getClass() == CLASS_DEATH_KNIGHT ? SPELL_PENNANT_EBON_BLADE_VALIANT : SPELL_PENNANT_ARGENT_CRUSADE_VALIANT; + return player->GetClass() == CLASS_DEATH_KNIGHT ? SPELL_PENNANT_EBON_BLADE_VALIANT : SPELL_PENNANT_ARGENT_CRUSADE_VALIANT; else - return player->getClass() == CLASS_DEATH_KNIGHT ? SPELL_PENNANT_EBON_BLADE_ASPIRANT : SPELL_PENNANT_ARGENT_CRUSADE_ASPIRANT; + return player->GetClass() == CLASS_DEATH_KNIGHT ? SPELL_PENNANT_EBON_BLADE_ASPIRANT : SPELL_PENNANT_ARGENT_CRUSADE_ASPIRANT; } default: return 0; |