Core/Datastores: updated DBC structure names to generated member format

This commit is contained in:
Ovahlord committed 2020-01-25 12:36:32 +01:00
1 parent 06ffa70afc
commit fcb79fee07
105 files changed
+2301 -2328

No files matched your search

+26 -26
View File
@@ -151,11 +151,11 @@ public:
ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(handler->GetSession()->GetPlayer()->getClass());
if (!classEntry)
return true;
uint32 family = classEntry->spellfamily;
uint32 family = classEntry->SpellClassSet;
for (SkillLineAbilityEntry const* entry : sSkillLineAbilityStore)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(entry->spellId);
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(entry->Spell);
if (!spellInfo)
continue;
@@ -193,7 +193,7 @@ public:
for (TalentEntry const* talentInfo : sTalentStore)
{
TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab);
TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TabID);
if (!talentTabInfo)
continue;
@@ -204,9 +204,9 @@ public:
uint32 spellId = 0;
for (int8 rank = MAX_TALENT_RANK - 1; rank >= 0; --rank)
{
if (talentInfo->RankID[rank] != 0)
if (talentInfo->SpellRank[rank] != 0)
{
spellId = talentInfo->RankID[rank];
spellId = talentInfo->SpellRank[rank];
break;
}
}
@@ -257,7 +257,7 @@ public:
return false;
}
if (petFamily->petTalentType < 0) // not hunter pet
if (petFamily->PetTalentType < 0) // not hunter pet
{
handler->SendSysMessage(LANG_WRONG_PET_TYPE);
handler->SetSentErrorMessage(true);
@@ -266,12 +266,12 @@ public:
for (TalentEntry const* talentInfo : sTalentStore)
{
TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab);
TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TabID);
if (!talentTabInfo)
continue;
// prevent learn talent for different family (cheating)
if (((1 << petFamily->petTalentType) & talentTabInfo->petTalentMask) == 0)
if (((1 << petFamily->PetTalentType) & talentTabInfo->CategoryEnumID) == 0)
continue;
// search highest talent rank
@@ -279,9 +279,9 @@ public:
for (int8 rank = MAX_TALENT_RANK - 1; rank >= 0; --rank)
{
if (talentInfo->RankID[rank] != 0)
if (talentInfo->SpellRank[rank] != 0)
{
spellId = talentInfo->RankID[rank];
spellId = talentInfo->SpellRank[rank];
break;
}
}
@@ -339,10 +339,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);
}
}
@@ -382,12 +382,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;
if (name.empty())
continue;
@@ -400,10 +400,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;
}
@@ -415,26 +415,26 @@ public:
for (SkillLineAbilityEntry const* skillLine : sSkillLineAbilityStore)
{
// wrong skill
if (skillLine->skillId != skillId)
if (skillLine->SkillLine != skillId)
continue;
// not high rank
if (skillLine->forward_spellid)
if (skillLine->SupercededBySpell)
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->Spell);
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, player, false))
continue;
player->LearnSpell(skillLine->spellId, false);
player->LearnSpell(skillLine->Spell, false);
}
}