From 4a197ba22af4eed01be632ea2dd7d103a963f043 Mon Sep 17 00:00:00 2001 From: Trisjdc Date: Sat, 12 Jul 2014 13:13:38 +0100 Subject: Core/PathGenerator: Split raycast paths into more points for better path z normalization. Solves many of the 'falling underground with charge' issues --- src/server/game/Movement/PathGenerator.cpp | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'src/server') diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp index 3140fc23296..f2e1bb518d4 100644 --- a/src/server/game/Movement/PathGenerator.cpp +++ b/src/server/game/Movement/PathGenerator.cpp @@ -477,11 +477,29 @@ void PathGenerator::BuildPointPath(const float *startPoint, const float *endPoin dtStatus dtResult = DT_FAILURE; if (_straightLine) { - // if the path is a straight line then start and end position are enough dtResult = DT_SUCCESS; - pointCount = 2; - memcpy(&pathPoints[0], startPoint, sizeof(float)* 3); - memcpy(&pathPoints[3], endPoint, sizeof(float)* 3); + pointCount = 1; + memcpy(&pathPoints[VERTEX_SIZE * 0], startPoint, sizeof(float)* 3); // first point + + // path has to be split into polygons with dist SMOOTH_PATH_STEP_SIZE between them + G3D::Vector3 startVec = G3D::Vector3(startPoint[0], startPoint[1], startPoint[2]); + G3D::Vector3 endVec = G3D::Vector3(endPoint[0], endPoint[1], endPoint[2]); + G3D::Vector3 diffVec = (endVec - startVec); + G3D::Vector3 prevVec = startVec; + float len = diffVec.length(); + diffVec *= SMOOTH_PATH_STEP_SIZE / len; + while (len > SMOOTH_PATH_STEP_SIZE) + { + len -= SMOOTH_PATH_STEP_SIZE; + prevVec += diffVec; + pathPoints[VERTEX_SIZE * pointCount + 0] = prevVec.x; + pathPoints[VERTEX_SIZE * pointCount + 1] = prevVec.y; + pathPoints[VERTEX_SIZE * pointCount + 2] = prevVec.z; + ++pointCount; + } + + memcpy(&pathPoints[VERTEX_SIZE * pointCount], endPoint, sizeof(float)* 3); // last point + ++pointCount; } else if (_useStraightPath) { -- cgit v1.2.3 From d91964912e6547924aa71ce07afcff51f944ed74 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 12 Jul 2014 17:27:26 +0200 Subject: Core/Skills: Fixed spells automatically learned from skill lines adding more skill lines --- src/server/game/Entities/Creature/Creature.cpp | 3 +- src/server/game/Entities/Player/Player.cpp | 163 +++++++++++++------------ src/server/game/Entities/Player/Player.h | 4 +- src/server/game/Handlers/NPCHandler.cpp | 2 +- src/server/game/Spells/SpellEffects.cpp | 2 +- src/server/scripts/Commands/cs_learn.cpp | 10 +- src/server/scripts/Spells/spell_generic.cpp | 2 +- src/server/scripts/Spells/spell_item.cpp | 2 +- 8 files changed, 96 insertions(+), 92 deletions(-) (limited to 'src/server') diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index fd8aaff8159..341225741ea 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -2276,6 +2276,7 @@ void Creature::AllLootRemovedFromCorpse() SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); time_t now = time(NULL); + // Do not reset corpse remove time if corpse is already removed if (m_corpseRemoveTime <= now) return; @@ -2283,7 +2284,7 @@ void Creature::AllLootRemovedFromCorpse() // corpse skinnable, but without skinning flag, and then skinned, corpse will despawn next update if (loot.loot_type == LOOT_SKINNING) - m_corpseRemoveTime = time(NULL); + m_corpseRemoveTime = now; else m_corpseRemoveTime = now + m_corpseDelay * decayRate; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 890e9ef842a..652e484c286 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -3525,7 +3525,7 @@ bool Player::AddTalent(uint32 spellId, uint8 spec, bool learning) return false; } -bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent, bool disabled, bool loading /*= false*/) +bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent, bool disabled, bool loading /*= false*/, bool fromSkill /*= false*/) { SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) @@ -3696,9 +3696,9 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent else if (uint32 prev_spell = sSpellMgr->GetPrevSpellInChain(spellId)) { if (!IsInWorld() || disabled) // at spells loading, no output, but allow save - addSpell(prev_spell, active, true, true, disabled); + AddSpell(prev_spell, active, true, true, disabled, false, fromSkill); else // at normal learning - learnSpell(prev_spell, true); + LearnSpell(prev_spell, true, fromSkill); } PlayerSpell* newspell = new PlayerSpell; @@ -3797,45 +3797,44 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent SetFreePrimaryProfessions(freeProfs-1); } - // add dependent skills - uint16 maxskill = GetMaxSkillValueForLevel(); - - SpellLearnSkillNode const* spellLearnSkill = sSpellMgr->GetSpellLearnSkill(spellId); - SkillLineAbilityMapBounds skill_bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellId); - if (spellLearnSkill) + // add dependent skills if this spell is not learned from adding skill already + if (!fromSkill) { - uint32 skill_value = GetPureSkillValue(spellLearnSkill->skill); - uint32 skill_max_value = GetPureMaxSkillValue(spellLearnSkill->skill); + if (SpellLearnSkillNode const* spellLearnSkill = sSpellMgr->GetSpellLearnSkill(spellId)) + { + uint32 skill_value = GetPureSkillValue(spellLearnSkill->skill); + uint32 skill_max_value = GetPureMaxSkillValue(spellLearnSkill->skill); - if (skill_value < spellLearnSkill->value) - skill_value = spellLearnSkill->value; + if (skill_value < spellLearnSkill->value) + skill_value = spellLearnSkill->value; - uint32 new_skill_max_value = spellLearnSkill->maxvalue == 0 ? maxskill : spellLearnSkill->maxvalue; + uint32 new_skill_max_value = spellLearnSkill->maxvalue == 0 ? GetMaxSkillValueForLevel() : spellLearnSkill->maxvalue; - if (skill_max_value < new_skill_max_value) - skill_max_value = new_skill_max_value; + if (skill_max_value < new_skill_max_value) + skill_max_value = new_skill_max_value; - SetSkill(spellLearnSkill->skill, spellLearnSkill->step, skill_value, skill_max_value); - } - else - { - // not ranked skills - for (SkillLineAbilityMap::const_iterator _spell_idx = skill_bounds.first; _spell_idx != skill_bounds.second; ++_spell_idx) + SetSkill(spellLearnSkill->skill, spellLearnSkill->step, skill_value, skill_max_value); + } + else { - SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(_spell_idx->second->skillId); - if (!pSkill) - continue; + // not ranked skills + for (SkillLineAbilityMap::const_iterator _spell_idx = skill_bounds.first; _spell_idx != skill_bounds.second; ++_spell_idx) + { + SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(_spell_idx->second->skillId); + if (!pSkill) + continue; - if (_spell_idx->second->AutolearnType == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && !HasSkill(pSkill->id)) - LearnDefaultSkill(pSkill->id, 0); + if (_spell_idx->second->AutolearnType == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && !HasSkill(pSkill->id)) + LearnDefaultSkill(pSkill->id, 0); - if (pSkill->id == SKILL_MOUNTS && !Has310Flyer(false)) - for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) - if (spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED && - spellInfo->Effects[i].CalcValue() == 310) - SetHas310Flyer(true); + if (pSkill->id == SKILL_MOUNTS && !Has310Flyer(false)) + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + if (spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED && + spellInfo->Effects[i].CalcValue() == 310) + SetHas310Flyer(true); + } } } @@ -3847,9 +3846,9 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent if (!itr2->second.autoLearned) { if (!IsInWorld() || !itr2->second.active) // at spells loading, no output, but allow save - addSpell(itr2->second.spell, itr2->second.active, true, true, false); + AddSpell(itr2->second.spell, itr2->second.active, true, true, false); else // at normal learning - learnSpell(itr2->second.spell, true); + LearnSpell(itr2->second.spell, true); } } @@ -3908,14 +3907,14 @@ bool Player::IsNeedCastPassiveSpellAtLearn(SpellInfo const* spellInfo) const return need_cast && (!spellInfo->CasterAuraState || HasAuraState(AuraStateType(spellInfo->CasterAuraState))); } -void Player::learnSpell(uint32 spell_id, bool dependent) +void Player::LearnSpell(uint32 spell_id, bool dependent, bool fromSkill /*= false*/) { PlayerSpellMap::iterator itr = m_spells.find(spell_id); bool disabled = (itr != m_spells.end()) ? itr->second->disabled : false; bool active = disabled ? itr->second->active : true; - bool learning = addSpell(spell_id, active, true, dependent, false); + bool learning = AddSpell(spell_id, active, true, dependent, false, false, fromSkill); // prevent duplicated entires in spell book, also not send if not in world (loading) if (learning && IsInWorld()) @@ -3933,7 +3932,7 @@ void Player::learnSpell(uint32 spell_id, bool dependent) { PlayerSpellMap::iterator iter = m_spells.find(nextSpell); if (iter != m_spells.end() && iter->second->disabled) - learnSpell(nextSpell, false); + LearnSpell(nextSpell, false, fromSkill); } SpellsRequiringSpellMapBounds spellsRequiringSpell = sSpellMgr->GetSpellsRequiringSpellBounds(spell_id); @@ -3941,7 +3940,7 @@ void Player::learnSpell(uint32 spell_id, bool dependent) { PlayerSpellMap::iterator iter2 = m_spells.find(itr2->second); if (iter2 != m_spells.end() && iter2->second->disabled) - learnSpell(itr2->second, false); + LearnSpell(itr2->second, false, fromSkill); } } } @@ -4121,7 +4120,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) // now re-learn if need re-activate if (cur_active && !prev_itr->second->active && learn_low_rank) { - if (addSpell(prev_id, true, false, prev_itr->second->dependent, prev_itr->second->disabled)) + if (AddSpell(prev_id, true, false, prev_itr->second->dependent, prev_itr->second->disabled)) { // downgrade spell ranks in spellbook and action bar WorldPacket data(SMSG_SUPERCEDED_SPELL, 4 + 4); @@ -6113,7 +6112,7 @@ bool Player::UpdateCraftSkill(uint32 spellid) if (spellEntry && spellEntry->Mechanic == MECHANIC_DISCOVERY) { if (uint32 discoveredSpell = GetSkillDiscoverySpell(_spell_idx->second->skillId, spellid, this)) - learnSpell(discoveredSpell, false); + LearnSpell(discoveredSpell, false); } uint32 craft_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_CRAFTING); @@ -6456,48 +6455,50 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal) { currVal = 0; for (int i=0; i < PLAYER_MAX_SKILLS; ++i) - if (!GetUInt32Value(PLAYER_SKILL_INDEX(i))) { - SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(id); - if (!pSkill) + if (!GetUInt32Value(PLAYER_SKILL_INDEX(i))) { - TC_LOG_ERROR("entities.player.skills", "Skill not found in SkillLineStore: skill #%u", id); - return; - } + SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(id); + if (!pSkill) + { + TC_LOG_ERROR("entities.player.skills", "Skill not found in SkillLineStore: skill #%u", id); + return; + } - SetUInt32Value(PLAYER_SKILL_INDEX(i), MAKE_PAIR32(id, step)); - SetUInt32Value(PLAYER_SKILL_VALUE_INDEX(i), MAKE_SKILL_VALUE(newVal, maxVal)); - UpdateSkillEnchantments(id, currVal, newVal); - UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL, id); - UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL, id); + SetUInt32Value(PLAYER_SKILL_INDEX(i), MAKE_PAIR32(id, step)); + SetUInt32Value(PLAYER_SKILL_VALUE_INDEX(i), MAKE_SKILL_VALUE(newVal, maxVal)); + UpdateSkillEnchantments(id, currVal, newVal); + UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL, id); + UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL, id); - // insert new entry or update if not deleted old entry yet - if (itr != mSkillStatus.end()) - { - itr->second.pos = i; - itr->second.uState = SKILL_CHANGED; - } - else - mSkillStatus.insert(SkillStatusMap::value_type(id, SkillStatusData(i, SKILL_NEW))); + // insert new entry or update if not deleted old entry yet + if (itr != mSkillStatus.end()) + { + itr->second.pos = i; + itr->second.uState = SKILL_CHANGED; + } + else + mSkillStatus.insert(SkillStatusMap::value_type(id, SkillStatusData(i, SKILL_NEW))); - // apply skill bonuses - SetUInt32Value(PLAYER_SKILL_BONUS_INDEX(i), 0); + // apply skill bonuses + SetUInt32Value(PLAYER_SKILL_BONUS_INDEX(i), 0); - // temporary bonuses - AuraEffectList const& mModSkill = GetAuraEffectsByType(SPELL_AURA_MOD_SKILL); - for (AuraEffectList::const_iterator j = mModSkill.begin(); j != mModSkill.end(); ++j) - if ((*j)->GetMiscValue() == int32(id)) + // temporary bonuses + AuraEffectList const& mModSkill = GetAuraEffectsByType(SPELL_AURA_MOD_SKILL); + for (AuraEffectList::const_iterator j = mModSkill.begin(); j != mModSkill.end(); ++j) + if ((*j)->GetMiscValue() == int32(id)) (*j)->HandleEffect(this, AURA_EFFECT_HANDLE_SKILL, true); - // permanent bonuses - AuraEffectList const& mModSkillTalent = GetAuraEffectsByType(SPELL_AURA_MOD_SKILL_TALENT); - for (AuraEffectList::const_iterator j = mModSkillTalent.begin(); j != mModSkillTalent.end(); ++j) - if ((*j)->GetMiscValue() == int32(id)) + // permanent bonuses + AuraEffectList const& mModSkillTalent = GetAuraEffectsByType(SPELL_AURA_MOD_SKILL_TALENT); + for (AuraEffectList::const_iterator j = mModSkillTalent.begin(); j != mModSkillTalent.end(); ++j) + if ((*j)->GetMiscValue() == int32(id)) (*j)->HandleEffect(this, AURA_EFFECT_HANDLE_SKILL, true); - // Learn all spells for skill - learnSkillRewardedSpells(id, newVal); - return; + // Learn all spells for skill + learnSkillRewardedSpells(id, newVal); + return; + } } } } @@ -18650,7 +18651,7 @@ void Player::_LoadSpells(PreparedQueryResult result) if (result) { do - addSpell((*result)[0].GetUInt32(), (*result)[1].GetBool(), false, false, (*result)[2].GetBool(), true); + AddSpell((*result)[0].GetUInt32(), (*result)[1].GetBool(), false, false, (*result)[2].GetBool(), true); while (result->NextRow()); } } @@ -23106,9 +23107,9 @@ void Player::LearnCustomSpells() uint32 tspell = *itr; TC_LOG_DEBUG("entities.player.loading", "PLAYER (Class: %u Race: %u): Adding initial spell, id = %u", uint32(getClass()), uint32(getRace()), tspell); if (!IsInWorld()) // will send in INITIAL_SPELLS in list anyway at map add - addSpell(tspell, true, true, true, false); + AddSpell(tspell, true, true, true, false); else // but send in normal spell in game learn case - learnSpell(tspell, true); + LearnSpell(tspell, true); } } @@ -23297,9 +23298,9 @@ void Player::learnSkillRewardedSpells(uint32 skill_id, uint32 skill_value) removeSpell(pAbility->spellId); // need learn else if (!IsInWorld()) - addSpell(pAbility->spellId, true, true, true, false); + AddSpell(pAbility->spellId, true, true, true, false, false, true); else - learnSpell(pAbility->spellId, true); + LearnSpell(pAbility->spellId, true, true); } } @@ -24969,7 +24970,7 @@ bool Player::IsKnowHowFlyIn(uint32 mapid, uint32 zone) const void Player::learnSpellHighRank(uint32 spellid) { - learnSpell(spellid, false); + LearnSpell(spellid, false); if (uint32 next = sSpellMgr->GetNextSpellInChain(spellid)) learnSpellHighRank(next); @@ -24995,6 +24996,8 @@ void Player::_LoadSkills(PreparedQueryResult result) { TC_LOG_ERROR("entities.player", "Character: %s (GUID: %u Race: %u Class: %u) has skill %u not allowed for his race/class combination", GetName().c_str(), GetGUIDLow(), uint32(getRace()), uint32(getClass()), skill); + + mSkillStatus.insert(SkillStatusMap::value_type(skill, SkillStatusData(0, SKILL_DELETED))); continue; } @@ -25355,7 +25358,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank) return; // learn! (other talent ranks will unlearned at learning) - learnSpell(spellid, false); + LearnSpell(spellid, false); AddTalent(spellid, m_activeSpec, true); TC_LOG_INFO("entities.player", "TalentID: %u Rank: %u Spell: %u Spec: %u\n", talentId, talentRank, spellid, m_activeSpec); @@ -26213,7 +26216,7 @@ void Player::ActivateSpec(uint8 spec) // if the talent can be found in the newly activated PlayerTalentMap if (HasTalent(talentInfo->RankID[rank], m_activeSpec)) { - learnSpell(talentInfo->RankID[rank], false); // add the talent to the PlayerSpellMap + LearnSpell(talentInfo->RankID[rank], false); // add the talent to the PlayerSpellMap spentTalents += (rank + 1); // increment the spentTalents count } } diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index a146b5d672a..ad47508577c 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1578,8 +1578,8 @@ class Player : public Unit, public GridObject void SendProficiency(ItemClass itemClass, uint32 itemSubclassMask); void SendInitialSpells(); - bool addSpell(uint32 spellId, bool active, bool learning, bool dependent, bool disabled, bool loading = false); - void learnSpell(uint32 spell_id, bool dependent); + bool AddSpell(uint32 spellId, bool active, bool learning, bool dependent, bool disabled, bool loading = false, bool fromSkill = false); + void LearnSpell(uint32 spell_id, bool dependent, bool fromSkill = false); void removeSpell(uint32 spell_id, bool disabled = false, bool learn_low_rank = true); void resetSpells(bool myClassOnly = false); void LearnCustomSpells(); diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp index d8a518a24db..4f65bcee4e5 100644 --- a/src/server/game/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -288,7 +288,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData) if (trainer_spell->IsCastable()) _player->CastSpell(_player, trainer_spell->spell, true); else - _player->learnSpell(spellId, false); + _player->LearnSpell(spellId, false); WorldPacket data(SMSG_TRAINER_BUY_SUCCEEDED, 12); data << uint64(guid); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index c3ca10905fd..2df60855702 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -2373,7 +2373,7 @@ void Spell::EffectLearnSpell(SpellEffIndex effIndex) Player* player = unitTarget->ToPlayer(); uint32 spellToLearn = (m_spellInfo->Id == 483 || m_spellInfo->Id == 55884) ? damage : m_spellInfo->Effects[effIndex].TriggerSpell; - player->learnSpell(spellToLearn, false); + player->LearnSpell(spellToLearn, false); TC_LOG_DEBUG("spells", "Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow()); } diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 03d10149ae5..9fc4e1cfab2 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -114,7 +114,7 @@ public: if (allRanks) targetPlayer->learnSpellHighRank(spell); else - targetPlayer->learnSpell(spell, false); + targetPlayer->LearnSpell(spell, false); if (GetTalentSpellCost(spellInfo->GetFirstRankSpell()->Id)) targetPlayer->SendTalentsInfoData(false); @@ -133,7 +133,7 @@ public: if (!spellInfo->IsAbilityOfSkillType(SKILL_INTERNAL)) continue; - handler->GetSession()->GetPlayer()->learnSpell(i, false); + handler->GetSession()->GetPlayer()->LearnSpell(i, false); } handler->SendSysMessage(LANG_LEARNING_GM_SKILLS); @@ -184,7 +184,7 @@ public: if (!SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer(), false)) continue; - handler->GetSession()->GetPlayer()->learnSpell(spellInfo->Id, false); + handler->GetSession()->GetPlayer()->LearnSpell(spellInfo->Id, false); } handler->SendSysMessage(LANG_COMMAND_LEARN_CLASS_SPELLS); @@ -320,7 +320,7 @@ public: { // skipping UNIVERSAL language (0) for (uint8 i = 1; i < LANGUAGES_COUNT; ++i) - handler->GetSession()->GetPlayer()->learnSpell(lang_description[i].spell_id, false); + handler->GetSession()->GetPlayer()->LearnSpell(lang_description[i].spell_id, false); handler->SendSysMessage(LANG_COMMAND_LEARN_ALL_LANG); return true; @@ -470,7 +470,7 @@ public: if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, player, false)) continue; - player->learnSpell(skillLine->spellId, false); + player->LearnSpell(skillLine->spellId, false); } } diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index d72e2000e84..a8a73310592 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -2912,7 +2912,7 @@ class spell_gen_profession_research : public SpellScriptLoader // learn random explicit discovery recipe (if any) if (uint32 discoveredSpellId = GetExplicitDiscoverySpell(spellId, caster)) - caster->learnSpell(discoveredSpellId, false); + caster->LearnSpell(discoveredSpellId, false); caster->UpdateCraftSkill(spellId); } diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 30f9e914037..7139c9ecfba 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1452,7 +1452,7 @@ class spell_item_book_of_glyph_mastery : public SpellScriptLoader // learn random explicit discovery recipe (if any) if (uint32 discoveredSpellId = GetExplicitDiscoverySpell(spellId, caster)) - caster->learnSpell(discoveredSpellId, false); + caster->LearnSpell(discoveredSpellId, false); } void Register() override -- cgit v1.2.3 From 6d8dbb5c4a638d4a76a8d0901f168a5b91658ccd Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 12 Jul 2014 17:28:35 +0200 Subject: Core/Misc: Renamed a few spell and skill line related methods to follow tc coding standards --- src/server/game/Entities/Player/Player.cpp | 81 ++++++++-------- src/server/game/Entities/Player/Player.h | 16 ++-- src/server/game/Handlers/CharacterHandler.cpp | 4 +- src/server/game/Handlers/SkillHandler.cpp | 2 +- src/server/game/Spells/SpellEffects.cpp | 2 +- src/server/scripts/Commands/cs_learn.cpp | 8 +- src/server/scripts/Commands/cs_reset.cpp | 4 +- src/server/scripts/World/npc_professions.cpp | 128 +++++++++++++------------- 8 files changed, 122 insertions(+), 123 deletions(-) (limited to 'src/server') diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 652e484c286..1c15aebbaba 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -3116,7 +3116,7 @@ void Player::InitTalentForLevel() // Remove all talent points if (m_usedTalentCount > 0) // Free any used talents { - resetTalents(true); /// @todo: Has to (collectively) be renamed to ResetTalents + ResetTalents(true); /// @todo: Has to (collectively) be renamed to ResetTalents SetFreeTalentPoints(0); } } @@ -3134,7 +3134,7 @@ void Player::InitTalentForLevel() if (m_usedTalentCount > talentPointsForLevel) { if (!GetSession()->HasPermission(rbac::RBAC_PERM_SKIP_CHECK_MORE_TALENTS_THAN_ALLOWED)) - resetTalents(true); + ResetTalents(true); else SetFreeTalentPoints(0); } @@ -3688,7 +3688,7 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent if (!rankSpellId || rankSpellId == spellId) continue; - removeSpell(rankSpellId, false, false); + RemoveSpell(rankSpellId, false, false); } } } @@ -3945,7 +3945,7 @@ void Player::LearnSpell(uint32 spell_id, bool dependent, bool fromSkill /*= fals } } -void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) +void Player::RemoveSpell(uint32 spell_id, bool disabled, bool learn_low_rank) { PlayerSpellMap::iterator itr = m_spells.find(spell_id); if (itr == m_spells.end()) @@ -3958,12 +3958,12 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) if (uint32 nextSpell = sSpellMgr->GetNextSpellInChain(spell_id)) { if (HasSpell(nextSpell) && !GetTalentSpellPos(nextSpell)) - removeSpell(nextSpell, disabled, false); + RemoveSpell(nextSpell, disabled, false); } //unlearn spells dependent from recently removed spells SpellsRequiringSpellMapBounds spellsRequiringSpell = sSpellMgr->GetSpellsRequiringSpellBounds(spell_id); for (SpellsRequiringSpellMap::const_iterator itr2 = spellsRequiringSpell.first; itr2 != spellsRequiringSpell.second; ++itr2) - removeSpell(itr2->second, disabled); + RemoveSpell(itr2->second, disabled); // re-search, it can be corrupted in prev loop itr = m_spells.find(spell_id); @@ -4088,7 +4088,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) SpellLearnSpellMapBounds spell_bounds = sSpellMgr->GetSpellLearnSpellMapBounds(spell_id); for (SpellLearnSpellMap::const_iterator itr2 = spell_bounds.first; itr2 != spell_bounds.second; ++itr2) - removeSpell(itr2->second.spell, disabled); + RemoveSpell(itr2->second.spell, disabled); // activate lesser rank in spellbook/action bar, and cast it if need bool prev_activate = false; @@ -4335,7 +4335,7 @@ void Player::_SaveSpellCooldowns(SQLTransaction& trans) trans->Append(ss.str().c_str()); } -uint32 Player::resetTalentsCost() const +uint32 Player::ResetTalentsCost() const { // The first time reset costs 1 gold if (m_resetTalentsCost < 1*GOLD) @@ -4368,7 +4368,7 @@ uint32 Player::resetTalentsCost() const } } -bool Player::resetTalents(bool no_cost) +bool Player::ResetTalents(bool no_cost) { sScriptMgr->OnPlayerTalentsReset(this, no_cost); @@ -4388,7 +4388,7 @@ bool Player::resetTalents(bool no_cost) if (!no_cost && !sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST)) { - cost = resetTalentsCost(); + cost = ResetTalentsCost(); if (!HasEnoughMoney(cost)) { @@ -4425,11 +4425,11 @@ bool Player::resetTalents(bool no_cost) const SpellInfo* _spellEntry = sSpellMgr->GetSpellInfo(talentInfo->RankID[rank]); if (!_spellEntry) continue; - removeSpell(talentInfo->RankID[rank], true); + RemoveSpell(talentInfo->RankID[rank], true); // search for spells that the talent teaches and unlearn them for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) if (_spellEntry->Effects[i].TriggerSpell > 0 && _spellEntry->Effects[i].Effect == SPELL_EFFECT_LEARN_SPELL) - removeSpell(_spellEntry->Effects[i].TriggerSpell, true); + RemoveSpell(_spellEntry->Effects[i].TriggerSpell, true); // if this talent rank can be found in the PlayerTalentMap, mark the talent as removed so it gets deleted PlayerTalentMap::iterator plrTalent = m_talents[m_activeSpec]->find(talentInfo->RankID[rank]); if (plrTalent != m_talents[m_activeSpec]->end()) @@ -6215,7 +6215,7 @@ bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step) uint32 bsl = bonusSkillLevels[i]; if (SkillValue < bsl && new_value >= bsl) { - learnSkillRewardedSpells(SkillId, new_value); + LearnSkillRewardedSpells(SkillId, new_value); break; } } @@ -6422,7 +6422,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal) SetUInt32Value(PLAYER_SKILL_VALUE_INDEX(itr->second.pos), MAKE_SKILL_VALUE(newVal, maxVal)); if (itr->second.uState != SKILL_NEW) itr->second.uState = SKILL_CHANGED; - learnSkillRewardedSpells(id, newVal); + LearnSkillRewardedSpells(id, newVal); // if skill value is going up, update enchantments after setting the new value if (newVal > currVal) UpdateSkillEnchantments(id, currVal, newVal); @@ -6448,7 +6448,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal) for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j) if (SkillLineAbilityEntry const* pAbility = sSkillLineAbilityStore.LookupEntry(j)) if (pAbility->skillId == id) - removeSpell(sSpellMgr->GetFirstSpellInChain(pAbility->spellId)); + RemoveSpell(sSpellMgr->GetFirstSpellInChain(pAbility->spellId)); } } else if (newVal) //add @@ -6496,7 +6496,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal) (*j)->HandleEffect(this, AURA_EFFECT_HANDLE_SKILL, true); // Learn all spells for skill - learnSkillRewardedSpells(id, newVal); + LearnSkillRewardedSpells(id, newVal); return; } } @@ -9775,7 +9775,7 @@ void Player::SendTalentWipeConfirm(uint64 guid) { WorldPacket data(MSG_TALENT_WIPE_CONFIRM, (8+4)); data << uint64(guid); - uint32 cost = sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : resetTalentsCost(); + uint32 cost = sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : ResetTalentsCost(); data << cost; GetSession()->SendPacket(&data); } @@ -18503,7 +18503,7 @@ void Player::_LoadQuestStatusRewarded(PreparedQueryResult result) if (quest) { // learn rewarded spell if unknown - learnQuestRewardedSpells(quest); + LearnQuestRewardedSpells(quest); // set rewarded title if any if (quest->GetCharTitleId()) @@ -23039,7 +23039,7 @@ void Player::ApplyEquipCooldown(Item* pItem) } } -void Player::resetSpells(bool myClassOnly) +void Player::ResetSpells(bool myClassOnly) { // not need after this call if (HasAtLoginFlag(AT_LOGIN_RESET_SPELLS)) @@ -23088,11 +23088,11 @@ void Player::resetSpells(bool myClassOnly) } else for (PlayerSpellMap::const_iterator iter = smap.begin(); iter != smap.end(); ++iter) - removeSpell(iter->first, false, false); // only iter->first can be accessed, object by iter->second can be deleted already + RemoveSpell(iter->first, false, false); // only iter->first can be accessed, object by iter->second can be deleted already LearnDefaultSkills(); LearnCustomSpells(); - learnQuestRewardedSpells(); + LearnQuestRewardedSpells(); } void Player::LearnCustomSpells() @@ -23175,7 +23175,7 @@ void Player::LearnDefaultSkill(uint32 skillId, uint16 rank) } } -void Player::learnQuestRewardedSpells(Quest const* quest) +void Player::LearnQuestRewardedSpells(Quest const* quest) { int32 spell_id = quest->GetRewSpellCast(); uint32 src_spell_id = quest->GetSrcSpell(); @@ -23255,7 +23255,7 @@ void Player::learnQuestRewardedSpells(Quest const* quest) CastSpell(this, spell_id, true); } -void Player::learnQuestRewardedSpells() +void Player::LearnQuestRewardedSpells() { // learn spells received from quest completing for (RewardedQuestSet::const_iterator itr = m_RewardedQuests.begin(); itr != m_RewardedQuests.end(); ++itr) @@ -23264,43 +23264,42 @@ void Player::learnQuestRewardedSpells() if (!quest) continue; - learnQuestRewardedSpells(quest); + LearnQuestRewardedSpells(quest); } } -void Player::learnSkillRewardedSpells(uint32 skill_id, uint32 skill_value) +void Player::LearnSkillRewardedSpells(uint32 skillId, uint32 skillValue) { uint32 raceMask = getRaceMask(); uint32 classMask = getClassMask(); for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j) { - SkillLineAbilityEntry const* pAbility = sSkillLineAbilityStore.LookupEntry(j); - if (!pAbility || pAbility->skillId != skill_id) + SkillLineAbilityEntry const* ability = sSkillLineAbilityStore.LookupEntry(j); + if (!ability || ability->skillId != skillId) continue; - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pAbility->spellId); - if (!spellInfo) + if (!sSpellMgr->GetSpellInfo(ability->spellId)) continue; - if (pAbility->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE && pAbility->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) + if (ability->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE && ability->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) continue; // Check race if set - if (pAbility->racemask && !(pAbility->racemask & raceMask)) + if (ability->racemask && !(ability->racemask & raceMask)) continue; // Check class if set - if (pAbility->classmask && !(pAbility->classmask & classMask)) + if (ability->classmask && !(ability->classmask & classMask)) continue; // need unlearn spell - if (skill_value < pAbility->req_skill_value && pAbility->AutolearnType == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE) - removeSpell(pAbility->spellId); + if (skillValue < ability->req_skill_value && ability->AutolearnType == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE) + RemoveSpell(ability->spellId); // need learn else if (!IsInWorld()) - AddSpell(pAbility->spellId, true, true, true, false, false, true); + AddSpell(ability->spellId, true, true, true, false, false, true); else - LearnSpell(pAbility->spellId, true, true); + LearnSpell(ability->spellId, true, true); } } @@ -24968,12 +24967,12 @@ bool Player::IsKnowHowFlyIn(uint32 mapid, uint32 zone) const return v_map != 571 || HasSpell(54197); // Cold Weather Flying } -void Player::learnSpellHighRank(uint32 spellid) +void Player::LearnSpellHighestRank(uint32 spellid) { LearnSpell(spellid, false); if (uint32 next = sSpellMgr->GetNextSpellInChain(spellid)) - learnSpellHighRank(next); + LearnSpellHighestRank(next); } void Player::_LoadSkills(PreparedQueryResult result) @@ -25050,7 +25049,7 @@ void Player::_LoadSkills(PreparedQueryResult result) mSkillStatus.insert(SkillStatusMap::value_type(skill, SkillStatusData(count, SKILL_UNCHANGED))); - learnSkillRewardedSpells(skill, value); + LearnSkillRewardedSpells(skill, value); ++count; @@ -26169,11 +26168,11 @@ void Player::ActivateSpec(uint8 spec) // skip non-existant talent ranks if (talentInfo->RankID[rank] == 0) continue; - removeSpell(talentInfo->RankID[rank], true); // removes the talent, and all dependant, learned, and chained spells.. + RemoveSpell(talentInfo->RankID[rank], true); // removes the talent, and all dependant, learned, and chained spells.. if (const SpellInfo* _spellEntry = sSpellMgr->GetSpellInfo(talentInfo->RankID[rank])) for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) // search through the SpellInfo for valid trigger spells if (_spellEntry->Effects[i].TriggerSpell > 0 && _spellEntry->Effects[i].Effect == SPELL_EFFECT_LEARN_SPELL) - removeSpell(_spellEntry->Effects[i].TriggerSpell, true); // and remove any spells that the talent teaches + RemoveSpell(_spellEntry->Effects[i].TriggerSpell, true); // and remove any spells that the talent teaches // if this talent rank can be found in the PlayerTalentMap, mark the talent as removed so it gets deleted //PlayerTalentMap::iterator plrTalent = m_talents[m_activeSpec]->find(talentInfo->RankID[rank]); //if (plrTalent != m_talents[m_activeSpec]->end()) diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index ad47508577c..d815b37f98f 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1580,14 +1580,14 @@ class Player : public Unit, public GridObject void SendInitialSpells(); bool AddSpell(uint32 spellId, bool active, bool learning, bool dependent, bool disabled, bool loading = false, bool fromSkill = false); void LearnSpell(uint32 spell_id, bool dependent, bool fromSkill = false); - void removeSpell(uint32 spell_id, bool disabled = false, bool learn_low_rank = true); - void resetSpells(bool myClassOnly = false); + void RemoveSpell(uint32 spell_id, bool disabled = false, bool learn_low_rank = true); + void ResetSpells(bool myClassOnly = false); void LearnCustomSpells(); void LearnDefaultSkills(); void LearnDefaultSkill(uint32 skillId, uint16 rank); - void learnQuestRewardedSpells(); - void learnQuestRewardedSpells(Quest const* quest); - void learnSpellHighRank(uint32 spellid); + void LearnQuestRewardedSpells(); + void LearnQuestRewardedSpells(Quest const* quest); + void LearnSpellHighestRank(uint32 spellid); void AddTemporarySpell(uint32 spellId); void RemoveTemporarySpell(uint32 spellId); void SetReputation(uint32 factionentry, uint32 value); @@ -1595,8 +1595,8 @@ class Player : public Unit, public GridObject std::string const& GetGuildName(); uint32 GetFreeTalentPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS1); } void SetFreeTalentPoints(uint32 points); - bool resetTalents(bool no_cost = false); - uint32 resetTalentsCost() const; + bool ResetTalents(bool no_cost = false); + uint32 ResetTalentsCost() const; void InitTalentForLevel(); void BuildPlayerTalentsInfoData(WorldPacket* data); void BuildPetTalentsInfoData(WorldPacket* data); @@ -1890,7 +1890,7 @@ class Player : public Unit, public GridObject int16 GetSkillTempBonusValue(uint32 skill) const; uint16 GetSkillStep(uint16 skill) const; // 0...6 bool HasSkill(uint32 skill) const; - void learnSkillRewardedSpells(uint32 id, uint32 value); + void LearnSkillRewardedSpells(uint32 skillId, uint32 skillValue); WorldLocation& GetTeleportDest() { return m_teleport_dest; } bool IsBeingTeleported() const { return mSemaphoreTeleport_Near || mSemaphoreTeleport_Far; } diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 9ad382b4686..6c4c657ba2c 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -1003,13 +1003,13 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) // Apply at_login requests if (pCurrChar->HasAtLoginFlag(AT_LOGIN_RESET_SPELLS)) { - pCurrChar->resetSpells(); + pCurrChar->ResetSpells(); SendNotification(LANG_RESET_SPELLS); } if (pCurrChar->HasAtLoginFlag(AT_LOGIN_RESET_TALENTS)) { - pCurrChar->resetTalents(true); + pCurrChar->ResetTalents(true); pCurrChar->SendTalentsInfoData(false); // original talents send already in to SendInitialPacketsBeforeAddToMap, resend reset state SendNotification(LANG_RESET_TALENTS); } diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp index 8a94753b692..92c7c60bca0 100644 --- a/src/server/game/Handlers/SkillHandler.cpp +++ b/src/server/game/Handlers/SkillHandler.cpp @@ -80,7 +80,7 @@ void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket& recvData) if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); - if (!(_player->resetTalents())) + if (!(_player->ResetTalents())) { WorldPacket data(MSG_TALENT_WIPE_CONFIRM, 8+4); //you have not any talent data << uint64(0); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 2df60855702..4c0d5770cea 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1230,7 +1230,7 @@ void Spell::EffectUnlearnSpecialization(SpellEffIndex effIndex) Player* player = unitTarget->ToPlayer(); uint32 spellToUnlearn = m_spellInfo->Effects[effIndex].TriggerSpell; - player->removeSpell(spellToUnlearn); + player->RemoveSpell(spellToUnlearn); TC_LOG_DEBUG("spells", "Spell: Player %u has unlearned spell %u from NpcGUID: %u", player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow()); } diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 9fc4e1cfab2..88acd491427 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -112,7 +112,7 @@ public: } if (allRanks) - targetPlayer->learnSpellHighRank(spell); + targetPlayer->LearnSpellHighestRank(spell); else targetPlayer->LearnSpell(spell, false); @@ -228,7 +228,7 @@ public: continue; // learn highest rank of talent and learn all non-talent spell ranks (recursive by tree) - player->learnSpellHighRank(spellId); + player->LearnSpellHighestRank(spellId); player->AddTalent(spellId, player->GetActiveSpec(), true); } @@ -334,7 +334,7 @@ public: target->LearnDefaultSkills(); target->LearnCustomSpells(); - target->learnQuestRewardedSpells(); + target->LearnQuestRewardedSpells(); handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_DEFAULT_AND_QUEST, handler->GetNameLink(target).c_str()); return true; @@ -499,7 +499,7 @@ public: spellId = sSpellMgr->GetFirstSpellInChain(spellId); if (target->HasSpell(spellId)) - target->removeSpell(spellId, false, !allRanks); + target->RemoveSpell(spellId, false, !allRanks); else handler->SendSysMessage(LANG_FORGET_SPELL); diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index d61c36c887f..e7f1bf2d615 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -165,7 +165,7 @@ public: if (target) { - target->resetSpells(/* bool myClassOnly */); + target->ResetSpells(/* bool myClassOnly */); ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_SPELLS); if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target) @@ -233,7 +233,7 @@ public: if (target) { - target->resetTalents(true); + target->ResetTalents(true); target->SendTalentsInfoData(false); ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_TALENTS); if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target) diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 21489c714e2..083105b6aa4 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -260,90 +260,90 @@ void ProfessionUnlearnSpells(Player* player, uint32 type) switch (type) { case S_UNLEARN_WEAPON: // S_UNLEARN_WEAPON - player->removeSpell(36125); // Light Earthforged Blade - player->removeSpell(36128); // Light Emberforged Hammer - player->removeSpell(36126); // Light Skyforged Axe + player->RemoveSpell(36125); // Light Earthforged Blade + player->RemoveSpell(36128); // Light Emberforged Hammer + player->RemoveSpell(36126); // Light Skyforged Axe break; case S_UNLEARN_ARMOR: // S_UNLEARN_ARMOR - player->removeSpell(36122); // Earthforged Leggings - player->removeSpell(36129); // Heavy Earthforged Breastplate - player->removeSpell(36130); // Stormforged Hauberk - player->removeSpell(34533); // Breastplate of Kings - player->removeSpell(34529); // Nether Chain Shirt - player->removeSpell(34534); // Bulwark of Kings - player->removeSpell(36257); // Bulwark of the Ancient Kings - player->removeSpell(36256); // Embrace of the Twisting Nether - player->removeSpell(34530); // Twisting Nether Chain Shirt - player->removeSpell(36124); // Windforged Leggings + player->RemoveSpell(36122); // Earthforged Leggings + player->RemoveSpell(36129); // Heavy Earthforged Breastplate + player->RemoveSpell(36130); // Stormforged Hauberk + player->RemoveSpell(34533); // Breastplate of Kings + player->RemoveSpell(34529); // Nether Chain Shirt + player->RemoveSpell(34534); // Bulwark of Kings + player->RemoveSpell(36257); // Bulwark of the Ancient Kings + player->RemoveSpell(36256); // Embrace of the Twisting Nether + player->RemoveSpell(34530); // Twisting Nether Chain Shirt + player->RemoveSpell(36124); // Windforged Leggings break; case S_UNLEARN_HAMMER: // S_UNLEARN_HAMMER - player->removeSpell(36262); // Dragonstrike - player->removeSpell(34546); // Dragonmaw - player->removeSpell(34545); // Drakefist Hammer - player->removeSpell(36136); // Lavaforged Warhammer - player->removeSpell(34547); // Thunder - player->removeSpell(34567); // Deep Thunder - player->removeSpell(36263); // Stormherald - player->removeSpell(36137); // Great Earthforged Hammer + player->RemoveSpell(36262); // Dragonstrike + player->RemoveSpell(34546); // Dragonmaw + player->RemoveSpell(34545); // Drakefist Hammer + player->RemoveSpell(36136); // Lavaforged Warhammer + player->RemoveSpell(34547); // Thunder + player->RemoveSpell(34567); // Deep Thunder + player->RemoveSpell(36263); // Stormherald + player->RemoveSpell(36137); // Great Earthforged Hammer break; case S_UNLEARN_AXE: // S_UNLEARN_AXE - player->removeSpell(36260); // Wicked Edge of the Planes - player->removeSpell(34562); // Black Planar Edge - player->removeSpell(34541); // The Planar Edge - player->removeSpell(36134); // Stormforged Axe - player->removeSpell(36135); // Skyforged Great Axe - player->removeSpell(36261); // Bloodmoon - player->removeSpell(34543); // Lunar Crescent - player->removeSpell(34544); // Mooncleaver + player->RemoveSpell(36260); // Wicked Edge of the Planes + player->RemoveSpell(34562); // Black Planar Edge + player->RemoveSpell(34541); // The Planar Edge + player->RemoveSpell(36134); // Stormforged Axe + player->RemoveSpell(36135); // Skyforged Great Axe + player->RemoveSpell(36261); // Bloodmoon + player->RemoveSpell(34543); // Lunar Crescent + player->RemoveSpell(34544); // Mooncleaver break; case S_UNLEARN_SWORD: // S_UNLEARN_SWORD - player->removeSpell(36258); // Blazefury - player->removeSpell(34537); // Blazeguard - player->removeSpell(34535); // Fireguard - player->removeSpell(36131); // Windforged Rapier - player->removeSpell(36133); // Stoneforged Claymore - player->removeSpell(34538); // Lionheart Blade - player->removeSpell(34540); // Lionheart Champion - player->removeSpell(36259); // Lionheart Executioner + player->RemoveSpell(36258); // Blazefury + player->RemoveSpell(34537); // Blazeguard + player->RemoveSpell(34535); // Fireguard + player->RemoveSpell(36131); // Windforged Rapier + player->RemoveSpell(36133); // Stoneforged Claymore + player->RemoveSpell(34538); // Lionheart Blade + player->RemoveSpell(34540); // Lionheart Champion + player->RemoveSpell(36259); // Lionheart Executioner break; case S_UNLEARN_DRAGON: // S_UNLEARN_DRAGON - player->removeSpell(36076); // Dragonstrike Leggings - player->removeSpell(36079); // Golden Dragonstrike Breastplate - player->removeSpell(35576); // Ebon Netherscale Belt - player->removeSpell(35577); // Ebon Netherscale Bracers - player->removeSpell(35575); // Ebon Netherscale Breastplate - player->removeSpell(35582); // Netherstrike Belt - player->removeSpell(35584); // Netherstrike Bracers - player->removeSpell(35580); // Netherstrike Breastplate + player->RemoveSpell(36076); // Dragonstrike Leggings + player->RemoveSpell(36079); // Golden Dragonstrike Breastplate + player->RemoveSpell(35576); // Ebon Netherscale Belt + player->RemoveSpell(35577); // Ebon Netherscale Bracers + player->RemoveSpell(35575); // Ebon Netherscale Breastplate + player->RemoveSpell(35582); // Netherstrike Belt + player->RemoveSpell(35584); // Netherstrike Bracers + player->RemoveSpell(35580); // Netherstrike Breastplate break; case S_UNLEARN_ELEMENTAL: // S_UNLEARN_ELEMENTAL - player->removeSpell(36074); // Blackstorm Leggings - player->removeSpell(36077); // Primalstorm Breastplate - player->removeSpell(35590); // Primalstrike Belt - player->removeSpell(35591); // Primalstrike Bracers - player->removeSpell(35589); // Primalstrike Vest + player->RemoveSpell(36074); // Blackstorm Leggings + player->RemoveSpell(36077); // Primalstorm Breastplate + player->RemoveSpell(35590); // Primalstrike Belt + player->RemoveSpell(35591); // Primalstrike Bracers + player->RemoveSpell(35589); // Primalstrike Vest break; case S_UNLEARN_TRIBAL: // S_UNLEARN_TRIBAL - player->removeSpell(35585); // Windhawk Hauberk - player->removeSpell(35587); // Windhawk Belt - player->removeSpell(35588); // Windhawk Bracers - player->removeSpell(36075); // Wildfeather Leggings - player->removeSpell(36078); // Living Crystal Breastplate + player->RemoveSpell(35585); // Windhawk Hauberk + player->RemoveSpell(35587); // Windhawk Belt + player->RemoveSpell(35588); // Windhawk Bracers + player->RemoveSpell(36075); // Wildfeather Leggings + player->RemoveSpell(36078); // Living Crystal Breastplate break; case S_UNLEARN_SPELLFIRE: // S_UNLEARN_SPELLFIRE - player->removeSpell(26752); // Spellfire Belt - player->removeSpell(26753); // Spellfire Gloves - player->removeSpell(26754); // Spellfire Robe + player->RemoveSpell(26752); // Spellfire Belt + player->RemoveSpell(26753); // Spellfire Gloves + player->RemoveSpell(26754); // Spellfire Robe break; case S_UNLEARN_MOONCLOTH: // S_UNLEARN_MOONCLOTH - player->removeSpell(26760); // Primal Mooncloth Belt - player->removeSpell(26761); // Primal Mooncloth Shoulders - player->removeSpell(26762); // Primal Mooncloth Robe + player->RemoveSpell(26760); // Primal Mooncloth Belt + player->RemoveSpell(26761); // Primal Mooncloth Shoulders + player->RemoveSpell(26762); // Primal Mooncloth Robe break; case S_UNLEARN_SHADOWEAVE: // S_UNLEARN_SHADOWEAVE - player->removeSpell(26756); // Frozen Shadoweave Shoulders - player->removeSpell(26757); // Frozen Shadoweave Boots - player->removeSpell(26758); // Frozen Shadoweave Robe + player->RemoveSpell(26756); // Frozen Shadoweave Shoulders + player->RemoveSpell(26757); // Frozen Shadoweave Boots + player->RemoveSpell(26758); // Frozen Shadoweave Robe break; } } -- cgit v1.2.3