mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
Core/DataStores: Even more converted dbcs
This commit is contained in:
@@ -160,7 +160,7 @@ public:
|
||||
if (!entry)
|
||||
continue;
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(entry->spellId);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(entry->SpellID);
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
@@ -352,10 +352,10 @@ public:
|
||||
if (!skillInfo)
|
||||
continue;
|
||||
|
||||
if ((skillInfo->categoryId == SKILL_CATEGORY_PROFESSION || skillInfo->categoryId == SKILL_CATEGORY_SECONDARY) &&
|
||||
skillInfo->canLink) // only prof. with recipes have
|
||||
if ((skillInfo->CategoryID == SKILL_CATEGORY_PROFESSION || skillInfo->CategoryID == SKILL_CATEGORY_SECONDARY) &&
|
||||
skillInfo->CanLink) // only prof. with recipes have
|
||||
{
|
||||
HandleLearnSkillRecipesHelper(target, skillInfo->id);
|
||||
HandleLearnSkillRecipesHelper(target, skillInfo->ID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -395,12 +395,12 @@ public:
|
||||
if (!skillInfo)
|
||||
continue;
|
||||
|
||||
if ((skillInfo->categoryId != SKILL_CATEGORY_PROFESSION &&
|
||||
skillInfo->categoryId != SKILL_CATEGORY_SECONDARY) ||
|
||||
!skillInfo->canLink) // only prof with recipes have set
|
||||
if ((skillInfo->CategoryID != SKILL_CATEGORY_PROFESSION &&
|
||||
skillInfo->CategoryID != SKILL_CATEGORY_SECONDARY) ||
|
||||
!skillInfo->CanLink) // only prof with recipes have set
|
||||
continue;
|
||||
|
||||
name = skillInfo->name;
|
||||
name = skillInfo->DisplayName_lang;
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
@@ -413,10 +413,10 @@ public:
|
||||
if (!targetSkillInfo)
|
||||
return false;
|
||||
|
||||
HandleLearnSkillRecipesHelper(target, targetSkillInfo->id);
|
||||
HandleLearnSkillRecipesHelper(target, targetSkillInfo->ID);
|
||||
|
||||
uint16 maxLevel = target->GetPureMaxSkillValue(targetSkillInfo->id);
|
||||
target->SetSkill(targetSkillInfo->id, target->GetSkillStep(targetSkillInfo->id), maxLevel, maxLevel);
|
||||
uint16 maxLevel = target->GetPureMaxSkillValue(targetSkillInfo->ID);
|
||||
target->SetSkill(targetSkillInfo->ID, target->GetSkillStep(targetSkillInfo->ID), maxLevel, maxLevel);
|
||||
handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_RECIPES, name.c_str());
|
||||
return true;
|
||||
}
|
||||
@@ -432,26 +432,26 @@ public:
|
||||
continue;
|
||||
|
||||
// wrong skill
|
||||
if (skillLine->skillId != skillId)
|
||||
if (skillLine->SkillLine != skillId)
|
||||
continue;
|
||||
|
||||
// not high rank
|
||||
if (skillLine->forward_spellid)
|
||||
if (skillLine->SupercedesSpell)
|
||||
continue;
|
||||
|
||||
// skip racial skills
|
||||
if (skillLine->racemask != 0)
|
||||
if (skillLine->RaceMask != 0)
|
||||
continue;
|
||||
|
||||
// skip wrong class skills
|
||||
if (skillLine->classmask && (skillLine->classmask & classmask) == 0)
|
||||
if (skillLine->ClassMask && (skillLine->ClassMask & classmask) == 0)
|
||||
continue;
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(skillLine->spellId);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(skillLine->SpellID);
|
||||
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, player, false))
|
||||
continue;
|
||||
|
||||
player->LearnSpell(skillLine->spellId, false);
|
||||
player->LearnSpell(skillLine->SpellID, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -724,7 +724,7 @@ public:
|
||||
SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(id);
|
||||
if (skillInfo)
|
||||
{
|
||||
std::string name = skillInfo->name;
|
||||
std::string name = skillInfo->DisplayName_lang;
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
|
||||
@@ -1359,7 +1359,7 @@ public:
|
||||
// add the skill to the player's book with step 1 (which is the first rank, in most cases something
|
||||
// like 'Apprentice <skill>'.
|
||||
target->SetSkill(skill, targetHasSkill ? target->GetSkillStep(skill) : 1, level, max);
|
||||
handler->PSendSysMessage(LANG_SET_SKILL, skill, skillLine->name, handler->GetNameLink(target).c_str(), level, max);
|
||||
handler->PSendSysMessage(LANG_SET_SKILL, skill, skillLine->DisplayName_lang, handler->GetNameLink(target).c_str(), level, max);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user