diff options
-rw-r--r-- | src/server/game/Achievements/AchievementMgr.cpp | 4 | ||||
-rw-r--r-- | src/server/game/Battlegrounds/Battleground.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Battlegrounds/BattlegroundQueue.cpp | 4 | ||||
-rw-r--r-- | src/server/game/Chat/ChatLink.cpp | 8 | ||||
-rw-r--r-- | src/server/game/DataStores/DBCStores.cpp | 37 | ||||
-rw-r--r-- | src/server/game/DataStores/DBCStructure.h | 179 | ||||
-rw-r--r-- | src/server/game/DataStores/DBCfmt.h | 18 | ||||
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 74 | ||||
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 8 | ||||
-rw-r--r-- | src/server/game/Groups/Group.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Maps/MapInstanced.cpp | 11 | ||||
-rw-r--r-- | src/server/game/Skills/SkillDiscovery.cpp | 4 | ||||
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 4 | ||||
-rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 4 | ||||
-rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 6 | ||||
-rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 14 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_learn.cpp | 34 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_lookup.cpp | 2 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 2 |
19 files changed, 205 insertions, 212 deletions
diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 47424798ec0..fed0a00d0dc 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -1342,7 +1342,7 @@ void AchievementMgr<T>::UpdateAchievementCriteria(AchievementCriteriaTypes type, SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellIter->first); for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter) { - if (skillIter->second->skillId == achievementCriteria->learn_skillline_spell.skillLine) + if (skillIter->second->SkillLine == achievementCriteria->learn_skillline_spell.skillLine) spellCount++; } } @@ -1367,7 +1367,7 @@ void AchievementMgr<T>::UpdateAchievementCriteria(AchievementCriteriaTypes type, { SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellIter->first); for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter) - if (skillIter->second->skillId == achievementCriteria->learn_skill_line.skillLine) + if (skillIter->second->SkillLine == achievementCriteria->learn_skill_line.skillLine) spellCount++; } SetCriteriaProgress(achievementCriteria, spellCount, referencePlayer); diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 396b549c0bc..ee3cb147b9f 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1902,7 +1902,7 @@ void Battleground::StartTimedAchievement(AchievementCriteriaTimedTypes type, uin void Battleground::SetBracket(PvPDifficultyEntry const* bracketEntry) { m_BracketId = bracketEntry->GetBracketId(); - SetLevelRange(bracketEntry->minLevel, bracketEntry->maxLevel); + SetLevelRange(bracketEntry->MinLevel, bracketEntry->MaxLevel); } void Battleground::RewardXPAtKill(Player* killer, Player* victim) diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index 095446bf627..65ae7de2d8c 100644 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -201,8 +201,8 @@ GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, Battlegr uint32 MinPlayers = bg->GetMinPlayersPerTeam(); uint32 qHorde = 0; uint32 qAlliance = 0; - uint32 q_min_level = bracketEntry->minLevel; - uint32 q_max_level = bracketEntry->maxLevel; + uint32 q_min_level = bracketEntry->MinLevel; + uint32 q_max_level = bracketEntry->MaxLevel; GroupsQueueType::const_iterator itr; for (itr = m_QueuedGroups[bracketId][BG_QUEUE_NORMAL_ALLIANCE].begin(); itr != m_QueuedGroups[bracketId][BG_QUEUE_NORMAL_ALLIANCE].end(); ++itr) if (!(*itr)->IsInvitedToBGInstanceGUID) diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index ea6df4c984c..e671713c643 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -299,15 +299,15 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context) TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): skill line ability not found for spell %u", context, _spell->Id); return false; } - SkillLineEntry const* skillLine = sSkillLineStore.LookupEntry(skillInfo->skillId); + SkillLineEntry const* skillLine = sSkillLineStore.LookupEntry(skillInfo->SkillLine); if (!skillLine) { - TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): skill line not found for skill %u", context, skillInfo->skillId); + TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): skill line not found for skill %u", context, skillInfo->SkillLine); return false; } - uint32 skillLineNameLength = strlen(skillLine->name); - if (skillLineNameLength > 0 && strncmp(skillLine->name, buffer, skillLineNameLength) == 0) + uint32 skillLineNameLength = strlen(skillLine->DisplayName_lang); + if (skillLineNameLength > 0 && strncmp(skillLine->DisplayName_lang, buffer, skillLineNameLength) == 0) { // found the prefix, remove it to perform spellname validation below // -2 = strlen(": ") diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 1acb88b9ae5..18965178656 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -515,7 +515,7 @@ void LoadDBCStores(const std::string& dataPath) for (uint32 i = 0; i < sPvPDifficultyStore.GetNumRows(); ++i) if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i)) - if (entry->bracketId > MAX_BATTLEGROUND_BRACKETS) + if (entry->BracketID > MAX_BATTLEGROUND_BRACKETS) ASSERT(false && "Need update MAX_BATTLEGROUND_BRACKETS by DBC data"); LoadDBC(availableDbcLocales, bad_dbc_files, sQuestXPStore, dbcPath, "QuestXP.dbc");//15595 @@ -531,8 +531,8 @@ void LoadDBCStores(const std::string& dataPath) LoadDBC(availableDbcLocales, bad_dbc_files, sSkillRaceClassInfoStore, dbcPath, "SkillRaceClassInfo.dbc"); for (uint32 i = 0; i < sSkillRaceClassInfoStore.GetNumRows(); ++i) if (SkillRaceClassInfoEntry const* entry = sSkillRaceClassInfoStore.LookupEntry(i)) - if (sSkillLineStore.LookupEntry(entry->SkillId)) - SkillRaceClassInfoBySkill.emplace(entry->SkillId, entry); + if (sSkillLineStore.LookupEntry(entry->SkillID)) + SkillRaceClassInfoBySkill.emplace(entry->SkillID, entry); LoadDBC(availableDbcLocales, bad_dbc_files, sSkillTiersStore, dbcPath, "SkillTiers.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sSoundEntriesStore, dbcPath, "SoundEntries.dbc");//15595 @@ -584,7 +584,7 @@ void LoadDBCStores(const std::string& dataPath) if (!skillLine) continue; - SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->spellId); + SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->SpellID); if (!spellInfo) continue; @@ -600,10 +600,10 @@ void LoadDBCStores(const std::string& dataPath) if (!cFamily) continue; - if (skillLine->skillId != cFamily->SkillLine[0] && skillLine->skillId != cFamily->SkillLine[1]) + if (skillLine->SkillLine != cFamily->SkillLine[0] && skillLine->SkillLine != cFamily->SkillLine[1]) continue; - if (skillLine->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) + if (skillLine->AquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) continue; sPetFamilySpellsStore[i].insert(spellInfo->Id); @@ -1081,15 +1081,15 @@ PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 lev if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i)) { // skip unrelated and too-high brackets - if (entry->mapId != mapid || entry->minLevel > level) + if (entry->MapID != mapid || entry->MinLevel > level) continue; // exactly fit - if (entry->maxLevel >= level) + if (entry->MaxLevel >= level) return entry; // remember for possible out-of-range case (search higher from existed) - if (!maxEntry || maxEntry->maxLevel < entry->maxLevel) + if (!maxEntry || maxEntry->MaxLevel < entry->MaxLevel) maxEntry = entry; } } @@ -1101,7 +1101,7 @@ PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundB { for (uint32 i = 0; i < sPvPDifficultyStore.GetNumRows(); ++i) if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i)) - if (entry->mapId == mapid && entry->GetBracketId() == id) + if (entry->MapID == mapid && entry->GetBracketId() == id) return entry; return NULL; @@ -1203,7 +1203,6 @@ uint32 ScalingStatValuesEntry::GetArmor(uint32 inventoryType, uint32 armorType) case INVTYPE_FINGER: case INVTYPE_TRINKET: case INVTYPE_WEAPON: - case INVTYPE_SHIELD: case INVTYPE_RANGED: case INVTYPE_2HWEAPON: case INVTYPE_BAG: @@ -1227,7 +1226,9 @@ uint32 ScalingStatValuesEntry::GetArmor(uint32 inventoryType, uint32 armorType) case INVTYPE_WRISTS: return Armor[7][armorType]; case INVTYPE_CLOAK: - return CloakArmor; + return ArmorBack; + case INVTYPE_SHIELD: + return ArmorShield; default: break; } @@ -1247,7 +1248,7 @@ uint32 ScalingStatValuesEntry::GetDPSAndDamageMultiplier(uint32 subClass, bool i case ITEM_SUBCLASS_WEAPON_DAGGER: case ITEM_SUBCLASS_WEAPON_THROWN: *damageMultiplier = 0.3f; - return dpsMod[0]; + return DPSMod[0]; case ITEM_SUBCLASS_WEAPON_AXE2: case ITEM_SUBCLASS_WEAPON_MACE2: case ITEM_SUBCLASS_WEAPON_POLEARM: @@ -1255,12 +1256,12 @@ uint32 ScalingStatValuesEntry::GetDPSAndDamageMultiplier(uint32 subClass, bool i case ITEM_SUBCLASS_WEAPON_STAFF: case ITEM_SUBCLASS_WEAPON_FISHING_POLE: *damageMultiplier = 0.2f; - return dpsMod[1]; + return DPSMod[1]; case ITEM_SUBCLASS_WEAPON_BOW: case ITEM_SUBCLASS_WEAPON_GUN: case ITEM_SUBCLASS_WEAPON_CROSSBOW: *damageMultiplier = 0.3f; - return dpsMod[4]; + return DPSMod[4]; case ITEM_SUBCLASS_WEAPON_Obsolete: case ITEM_SUBCLASS_WEAPON_EXOTIC: case ITEM_SUBCLASS_WEAPON_EXOTIC2: @@ -1280,17 +1281,17 @@ uint32 ScalingStatValuesEntry::GetDPSAndDamageMultiplier(uint32 subClass, bool i if (mask & 0x562) { *damageMultiplier = 0.2f; - return dpsMod[3]; + return DPSMod[3]; } if (mask & (1 << ITEM_SUBCLASS_WEAPON_WAND)) { *damageMultiplier = 0.3f; - return dpsMod[5]; + return DPSMod[5]; } } *damageMultiplier = 0.3f; - return dpsMod[2]; + return DPSMod[2]; } return 0; } diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index b9a891ccec4..22bf5f20317 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1628,80 +1628,80 @@ struct NameGenEntry struct OverrideSpellDataEntry { - uint32 id; // 0 - uint32 spellId[MAX_OVERRIDE_SPELL]; // 1-10 - //uint32 unk0; // 11 - //char* SpellBarName; // 12 + uint32 ID; // 0 + uint32 SpellID[MAX_OVERRIDE_SPELL]; // 1-10 + //uint32 Flags; // 11 + //char* PlayerActionbarFileDataID; // 12 }; struct PowerDisplayEntry { - uint32 Id; // 0 - uint32 PowerType; // 1 - //char* Name; // 2 - //uint32 R; // 3 - //uint32 G; // 4 - //uint32 B; // 5 + uint32 ID; // 0 + uint32 PowerType; // 1 + //char* GlobalStringBaseTag; // 2 + //uint8 Red; // 3 + //uint8 Green; // 3 + //uint8 Blue; // 3 + //uint8 _padding0; // 3 }; struct PvPDifficultyEntry { - //uint32 id; // 0 m_ID - uint32 mapId; // 1 - uint32 bracketId; // 2 - uint32 minLevel; // 3 - uint32 maxLevel; // 4 - uint32 difficulty; // 5 + //uint32 ID; // 0 + uint32 MapID; // 1 + uint32 BracketID; // 2 m_rangeIndex + uint32 MinLevel; // 3 + uint32 MaxLevel; // 4 // helpers - BattlegroundBracketId GetBracketId() const { return BattlegroundBracketId(bracketId); } + BattlegroundBracketId GetBracketId() const { return BattlegroundBracketId(BracketID); } }; struct QuestSortEntry { - uint32 id; // 0 m_ID - //char* name; // 1 m_SortName_lang + uint32 ID; // 0 + //char* SortName_lang; // 1 }; struct QuestXPEntry { - uint32 id; - uint32 Exp[10]; + uint32 ID; // 0 + uint32 Exp[10]; // 1 }; struct QuestFactionRewEntry { - uint32 id; - int32 QuestRewFactionValue[10]; + uint32 ID; // 0 + int32 QuestRewFactionValue[10]; // 1-10 }; struct RandomPropertiesPointsEntry { - //uint32 Id; // 0 hidden key - uint32 itemLevel; // 1 - uint32 EpicPropertiesPoints[5]; // 2-6 - uint32 RarePropertiesPoints[5]; // 7-11 - uint32 UncommonPropertiesPoints[5]; // 12-16 + uint32 ItemLevel; // 0 + uint32 EpicPropertiesPoints[5]; // 1-5 + uint32 RarePropertiesPoints[5]; // 6-10 + uint32 UncommonPropertiesPoints[5]; // 11-15 }; struct ScalingStatDistributionEntry { - uint32 Id; // 0 - int32 StatMod[10]; // 1-10 - uint32 Modifier[10]; // 11-20 - //uint32 unk1; // 21 - uint32 MaxLevel; // 22 m_maxlevel + uint32 ID; // 0 + int32 StatID[10]; // 1-10 + uint32 Modifier[10]; // 11-20 + //uint32 MinLevel; // 21 + uint32 MaxLevel; // 22 m_maxlevel }; struct ScalingStatValuesEntry { - uint32 Id; // 0 - uint32 Level; // 1 - uint32 dpsMod[6]; // 2-7 DPS mod for level - uint32 Spellpower; // 8 spell power for level - uint32 StatMultiplier[5]; // 9-13 Multiplier for ScalingStatDistribution - uint32 Armor[8][4]; // 14-46 Armor for level - uint32 CloakArmor; // 47 armor for cloak + uint32 ID; // 0 + uint32 CharLevel; // 1 + uint32 DPSMod[6]; // 2-7 DPS mod for level + uint32 SpellPower; // 8 spell power for level + uint32 StatMultiplier[5]; // 9-13 Multiplier for ScalingStatDistribution + uint32 Armor[8][4]; // 14-46 Armor for level + uint32 ArmorBack; // 47 + uint32 ArmorShield; // 48 uint32 GetStatMultiplier(uint32 inventoryType) const; uint32 GetArmor(uint32 inventoryType, uint32 armorType) const; @@ -1717,73 +1717,74 @@ struct ScalingStatValuesEntry struct SkillLineEntry { - uint32 id; // 0 m_ID - int32 categoryId; // 1 m_categoryID - //uint32 skillCostID; // 2 m_skillCostsID - char* name; // 3 m_displayName_lang - //char* description; // 4 m_description_lang - uint32 spellIcon; // 5 m_spellIconID - //char* alternateVerb; // 6 m_alternateVerb_lang - uint32 canLink; // 7 m_canLink (prof. with recipes) + uint32 ID; // 0 m_ID + int32 CategoryID; // 1 m_categoryID + char* DisplayName_lang; // 2 m_displayName_lang + //char* Description_lang; // 3 m_description_lang + uint32 SpellIconID; // 4 m_spellIconID + //char* AlternateVerb_lang; // 5 m_alternateVerb_lang + uint32 CanLink; // 6 m_canLink (prof. with recipes) + //uint32 ParentSkillLineID; // 7 + //uint32 Flags; // 8 }; struct SkillLineAbilityEntry { - uint32 id; // 0 m_ID - uint32 skillId; // 1 m_skillLine - uint32 spellId; // 2 m_spell - uint32 racemask; // 3 m_raceMask - uint32 classmask; // 4 m_classMask - //uint32 racemaskNot; // 5 m_excludeRace - //uint32 classmaskNot; // 6 m_excludeClass - uint32 req_skill_value; // 7 m_minSkillLineRank - uint32 forward_spellid; // 8 m_supercededBySpell - uint32 AutolearnType; // 9 m_acquireMethod - uint32 max_value; // 10 m_trivialSkillLineRankHigh - uint32 min_value; // 11 m_trivialSkillLineRankLow - uint32 character_points[2]; // 12-13 m_characterPoints + uint32 ID; // 0 + uint32 SkillLine; // 1 + uint32 SpellID; // 2 + uint32 RaceMask; // 3 + uint32 ClassMask; // 4 + uint32 MinSkillLineRank; // 7 + uint32 SupercedesSpell; // 8 + uint32 AquireMethod; // 9 + uint32 TrivialSkillLineRankHigh; // 10 + uint32 TrivialSkillLineRankLow; // 11 + uint32 NumSkillUps; // 12 + uint32 UniqueBit; // 13 + uint32 TradeSkillCategoryID; // 14 }; struct SkillRaceClassInfoEntry { - //uint32 Id; // 0 m_ID - uint32 SkillId; // 1 m_skillID - uint32 RaceMask; // 2 m_raceMask - uint32 ClassMask; // 3 m_classMask - uint32 Flags; // 4 m_flags - //uint32 Unk; // 5 m_unk - //uint32 MinLevel; // 6 m_minLevel - uint32 SkillTier; // 7 m_skillTierID - //uint32 SkillCostType; // 8 m_skillCostIndex + //uint32 ID; // 0 + uint32 SkillID; // 1 + uint32 RaceMask; // 2 + uint32 ClassMask; // 3 + uint32 Flags; // 4 + //uint32 Availability; // 5 + //uint32 MinLevel; // 6 + uint32 SkillTierID; // 7 }; #define MAX_SKILL_STEP 16 struct SkillTiersEntry { - uint32 Id; // 0 m_ID - //uint32 StepCost[MAX_SKILL_STEP]; // 1-16 m_cost - uint32 MaxSkill[MAX_SKILL_STEP]; // 17-32 m_valueMax + uint32 ID; // 0 + uint32 Value[MAX_SKILL_STEP]; // 1-16 }; struct SoundEntriesEntry { - uint32 Id; // 0 m_ID - //uint32 Type; // 1 m_soundType - //char* InternalName; // 2 m_name - //char* FileName[10]; // 3-12 m_File[10] - //uint32 Unk13[10]; // 13-22 m_Freq[10] - //char* Path; // 23 m_DirectoryBase - // 24 m_volumeFloat - // 25 m_flags - // 26 m_minDistance - // 27 m_distanceCutoff - // 28 m_EAXDef - // 29 m_soundEntriesAdvancedID, new in 3.1 - //unk // 30 4.0.0 - //unk // 31 4.0.0 - //unk // 32 4.0.0 - //unk // 33 4.0.0 + uint32 ID; // 0 + //uint32 SoundType; // 1 + //char* Name; // 2 + //uint32 FileDataID[20]; // 3-22 + //uint32 Freq[20]; // 23-42 + //float VolumeFloat; // 43 + //uint32 Flags; // 44 + //float MinDistance; // 45 + //float DistanceCutoff; // 46 + //uint32 EAXDef; // 47 + //uint32 SoundEntriesAdvancedID; // 48 + //float VolumeVariationPlus; // 49 + //float VolumeVariationMinus; // 50 + //float PitchVariationPlus; // 51 + //float PitchVariationMinus; // 52 + //float PitchAdjust; // 53 + //uint32 DialogType; // 54 + //uint32 BusOverwriteID; // 55 }; // SpellEffect.dbc diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index d01d33ac685..84e98751a28 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -115,16 +115,16 @@ char const OverrideSpellDatafmt[] = "niiiiiiiiiixx"; char const QuestFactionRewardfmt[] = "niiiiiiiiii"; char const QuestSortEntryfmt[] = "nx"; char const QuestXPfmt[] = "niiiiiiiiii"; -char const PowerDisplayfmt[] = "nixxxx"; -char const PvPDifficultyfmt[] = "diiiii"; -char const RandomPropertiesPointsfmt[] = "niiiiiiiiiiiiiii"; +char const PowerDisplayfmt[] = "nixx"; +char const PvPDifficultyfmt[] = "diiii"; +char const RandomPropertiesPointsfmt[] = "niiiiiiiiiiiiii"; char const ScalingStatDistributionfmt[] = "niiiiiiiiiiiiiiiiiiiixi"; -char const ScalingStatValuesfmt[] = "iniiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii"; -char const SkillLinefmt[] = "nisxixi"; -char const SkillLineAbilityfmt[] = "niiiixxiiiiiii"; -char const SkillRaceClassInfofmt[] = "diiiixxix"; -char const SkillTiersfmt[] = "nxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiii"; -char const SoundEntriesfmt[] = "nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; +char const ScalingStatValuesfmt[] = "iniiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii"; +char const SkillLinefmt[] = "nisxixixx"; +char const SkillLineAbilityfmt[] = "niiiiiiiiiiii"; +char const SkillRaceClassInfofmt[] = "diiiixxi"; +char const SkillTiersfmt[] = "niiiiiiiiiiiiiiii"; +char const SoundEntriesfmt[] = "nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; char const SpellCastTimefmt[] = "nixx"; char const SpellCategoriesEntryfmt[] = "diiiiii"; char const SpellCategoryfmt[] = "nixx"; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index b01b602449e..139b36a35da 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -3687,13 +3687,13 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent // 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); + SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(_spell_idx->second->SkillLine); if (!pSkill) continue; ///@todo: confirm if rogues start with lockpicking skill at level 1 but only receive the spell to use it at level 16 - if ((_spell_idx->second->AutolearnType == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && !HasSkill(pSkill->id)) || (pSkill->id == SKILL_LOCKPICKING && _spell_idx->second->max_value == 0)) - LearnDefaultSkill(pSkill->id, 0); + if ((_spell_idx->second->AquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && !HasSkill(pSkill->ID)) || (pSkill->ID == SKILL_LOCKPICKING && _spell_idx->second->TrivialSkillLineRankHigh == 0)) + LearnDefaultSkill(pSkill->ID, 0); } } } @@ -3717,8 +3717,8 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent // not ranked skills for (SkillLineAbilityMap::const_iterator _spell_idx = skill_bounds.first; _spell_idx != skill_bounds.second; ++_spell_idx) { - UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE, _spell_idx->second->skillId); - UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS, _spell_idx->second->skillId); + UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE, _spell_idx->second->SkillLine); + UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS, _spell_idx->second->SkillLine); } UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL, spellId); @@ -5858,24 +5858,24 @@ bool Player::UpdateCraftSkill(uint32 spellid) for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx) { - if (_spell_idx->second->skillId) + if (_spell_idx->second->SkillLine) { - uint32 SkillValue = GetPureSkillValue(_spell_idx->second->skillId); + uint32 SkillValue = GetPureSkillValue(_spell_idx->second->SkillLine); // Alchemy Discoveries here SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(spellid); if (spellEntry && spellEntry->Mechanic == MECHANIC_DISCOVERY) { - if (uint32 discoveredSpell = GetSkillDiscoverySpell(_spell_idx->second->skillId, spellid, this)) + if (uint32 discoveredSpell = GetSkillDiscoverySpell(_spell_idx->second->SkillLine, spellid, this)) LearnSpell(discoveredSpell, false); } uint32 craft_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_CRAFTING); - return UpdateSkillPro(_spell_idx->second->skillId, SkillGainChance(SkillValue, - _spell_idx->second->max_value, - (_spell_idx->second->max_value + _spell_idx->second->min_value)/2, - _spell_idx->second->min_value), + return UpdateSkillPro(_spell_idx->second->SkillLine, SkillGainChance(SkillValue, + _spell_idx->second->TrivialSkillLineRankHigh, + (_spell_idx->second->TrivialSkillLineRankHigh + _spell_idx->second->TrivialSkillLineRankLow)/2, + _spell_idx->second->TrivialSkillLineRankLow), craft_skill_gain); } } @@ -6015,7 +6015,7 @@ void Player::UpdateSkillsForLevel() if (GetSkillRangeType(rcEntry) != SKILL_RANGE_LEVEL) continue; - if (IsWeaponSkill(rcEntry->SkillId)) + if (IsWeaponSkill(rcEntry->SkillID)) continue; uint16 field = itr->second.pos / 2; @@ -6047,10 +6047,10 @@ void Player::UpdateSkillsToMaxSkillsForLevel() if (!rcEntry) continue; - if (IsProfessionOrRidingSkill(rcEntry->SkillId)) + if (IsProfessionOrRidingSkill(rcEntry->SkillID)) continue; - if (IsWeaponSkill(rcEntry->SkillId)) + if (IsWeaponSkill(rcEntry->SkillID)) continue; uint16 field = itr->second.pos / 2; @@ -6128,8 +6128,8 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal) // remove all spells that related to this skill for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j) if (SkillLineAbilityEntry const* pAbility = sSkillLineAbilityStore.LookupEntry(j)) - if (pAbility->skillId == id) - RemoveSpell(sSpellMgr->GetFirstSpellInChain(pAbility->spellId)); + if (pAbility->SkillLine == id) + RemoveSpell(sSpellMgr->GetFirstSpellInChain(pAbility->SpellID)); // Clear profession lines if (GetUInt32Value(PLAYER_PROFESSION_SKILL_LINE_1) == id) @@ -6156,7 +6156,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal) } SetUInt16Value(PLAYER_SKILL_LINEID + SKILL_ID_OFFSET + field, offset, id); - if (skillEntry->categoryId == SKILL_CATEGORY_PROFESSION) + if (skillEntry->CategoryID == SKILL_CATEGORY_PROFESSION) { if (!GetUInt32Value(PLAYER_PROFESSION_SKILL_LINE_1)) SetUInt32Value(PLAYER_PROFESSION_SKILL_LINE_1, id); @@ -7882,9 +7882,9 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply // If set ScalingStatDistribution need get stats and values from it if (ssd && ssv) { - if (ssd->StatMod[i] < 0) + if (ssd->StatID[i] < 0) continue; - statType = ssd->StatMod[i]; + statType = ssd->StatID[i]; val = (ssv->GetStatMultiplier(proto->InventoryType) * ssd->Modifier[i]) / 10000; } else @@ -8060,7 +8060,7 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply // Apply Spell Power from ScalingStatValue if set if (ssv && proto->Flags2 & ITEM_FLAGS_EXTRA_CASTER_WEAPON) - if (int32 spellbonus = int32(ssv->Spellpower)) + if (int32 spellbonus = int32(ssv->SpellPower)) ApplySpellPowerBonus(spellbonus, apply); // If set ScalingStatValue armor get it or use item armor @@ -23490,8 +23490,8 @@ void Player::LearnDefaultSkill(uint32 skillId, uint16 rank) if (!rank) break; - SkillTiersEntry const* tier = sSkillTiersStore.LookupEntry(rcInfo->SkillTier); - uint16 maxValue = tier->MaxSkill[std::max<int32>(rank - 1, 0)]; + SkillTiersEntry const* tier = sSkillTiersStore.LookupEntry(rcInfo->SkillTierID); + uint16 maxValue = tier->Value[std::max<int32>(rank - 1, 0)]; uint16 skillValue = 1; if (rcInfo->Flags & SKILL_FLAG_ALWAYS_MAX_VALUE) skillValue = maxValue; @@ -23606,31 +23606,31 @@ void Player::LearnSkillRewardedSpells(uint32 skillId, uint32 skillValue) for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j) { SkillLineAbilityEntry const* ability = sSkillLineAbilityStore.LookupEntry(j); - if (!ability || ability->skillId != skillId) + if (!ability || ability->SkillLine != skillId) continue; - if (!sSpellMgr->GetSpellInfo(ability->spellId)) + if (!sSpellMgr->GetSpellInfo(ability->SpellID)) continue; - if (ability->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE && ability->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) + if (ability->AquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE && ability->AquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) continue; // Check race if set - if (ability->racemask && !(ability->racemask & raceMask)) + if (ability->RaceMask && !(ability->RaceMask & raceMask)) continue; // Check class if set - if (ability->classmask && !(ability->classmask & classMask)) + if (ability->ClassMask && !(ability->ClassMask & classMask)) continue; // need unlearn spell - if (skillValue < ability->req_skill_value && ability->AutolearnType == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE) - RemoveSpell(ability->spellId); + if (skillValue < ability->MinSkillLineRank && ability->AquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE) + RemoveSpell(ability->SpellID); // need learn else if (!IsInWorld()) - AddSpell(ability->spellId, true, true, true, false, false, true); + AddSpell(ability->SpellID, true, true, true, false, false, true); else - LearnSpell(ability->spellId, true, true); + LearnSpell(ability->SpellID, true, true); } } @@ -23897,11 +23897,11 @@ bool Player::IsSpellFitByClassAndRace(uint32 spell_id) const for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx) { // skip wrong race skills - if (_spell_idx->second->racemask && (_spell_idx->second->racemask & racemask) == 0) + if (_spell_idx->second->RaceMask && (_spell_idx->second->RaceMask & racemask) == 0) continue; // skip wrong class skills - if (_spell_idx->second->classmask && (_spell_idx->second->classmask & classmask) == 0) + if (_spell_idx->second->ClassMask && (_spell_idx->second->ClassMask & classmask) == 0) continue; return true; @@ -25418,13 +25418,13 @@ void Player::_LoadSkills(PreparedQueryResult result) SetUInt16Value(PLAYER_SKILL_LINEID + SKILL_ID_OFFSET + field, offset, skill); uint16 step = 0; - SkillLineEntry const* skillLine = sSkillLineStore.LookupEntry(rcEntry->SkillId); + SkillLineEntry const* skillLine = sSkillLineStore.LookupEntry(rcEntry->SkillID); if (skillLine) { - if (skillLine->categoryId == SKILL_CATEGORY_SECONDARY) + if (skillLine->CategoryID == SKILL_CATEGORY_SECONDARY) step = max / 75; - if (skillLine->categoryId == SKILL_CATEGORY_PROFESSION) + if (skillLine->CategoryID == SKILL_CATEGORY_PROFESSION) { step = max / 75; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 0e5c82510b4..97e2a40a02f 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -7865,17 +7865,17 @@ int32 ObjectMgr::GetBaseReputationOf(FactionEntry const* factionEntry, uint8 rac SkillRangeType GetSkillRangeType(SkillRaceClassInfoEntry const* rcEntry) { - SkillLineEntry const* skill = sSkillLineStore.LookupEntry(rcEntry->SkillId); + SkillLineEntry const* skill = sSkillLineStore.LookupEntry(rcEntry->SkillID); if (!skill) return SKILL_RANGE_NONE; - if (sSkillTiersStore.LookupEntry(rcEntry->SkillTier)) + if (sSkillTiersStore.LookupEntry(rcEntry->SkillTierID)) return SKILL_RANGE_RANK; - if (rcEntry->SkillId == SKILL_RUNEFORGING) + if (rcEntry->SkillID == SKILL_RUNEFORGING) return SKILL_RANGE_MONO; - switch (skill->categoryId) + switch (skill->CategoryID) { case SKILL_CATEGORY_ARMOR: return SKILL_RANGE_MONO; diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 8795bd812de..2aa40942171 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -1881,7 +1881,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* if (member->GetTeam() != team) return ERR_BATTLEGROUND_JOIN_TIMED_OUT; // not in the same battleground level braket, don't let join - PvPDifficultyEntry const* memberBracketEntry = GetBattlegroundBracketByLevel(bracketEntry->mapId, member->getLevel()); + PvPDifficultyEntry const* memberBracketEntry = GetBattlegroundBracketByLevel(bracketEntry->MapID, member->getLevel()); if (memberBracketEntry != bracketEntry) return ERR_BATTLEGROUND_JOIN_RANGE_INDEX; // don't let join rated matches if the arena team id doesn't match diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index 498c669ba01..8dfa4449e12 100644 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -227,16 +227,7 @@ BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battlegroun TC_LOG_DEBUG("maps", "MapInstanced::CreateBattleground: map bg %d for %d created.", InstanceId, GetId()); - PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), bg->GetMinLevel()); - - uint8 spawnMode; - - if (bracketEntry) - spawnMode = bracketEntry->difficulty; - else - spawnMode = REGULAR_DIFFICULTY; - - BattlegroundMap* map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this, spawnMode); + BattlegroundMap* map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this, REGULAR_DIFFICULTY); ASSERT(map->IsBattlegroundOrArena()); map->SetBG(bg); bg->SetBgMap(map); diff --git a/src/server/game/Skills/SkillDiscovery.cpp b/src/server/game/Skills/SkillDiscovery.cpp index e8a89039031..4d9800acedd 100644 --- a/src/server/game/Skills/SkillDiscovery.cpp +++ b/src/server/game/Skills/SkillDiscovery.cpp @@ -122,7 +122,7 @@ void LoadSkillDiscoveryTable() } for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx) - SkillDiscoveryStore[-int32(_spell_idx->second->skillId)].push_back(SkillDiscoveryEntry(spellId, reqSkillValue, chance)); + SkillDiscoveryStore[-int32(_spell_idx->second->SkillLine)].push_back(SkillDiscoveryEntry(spellId, reqSkillValue, chance)); } else { @@ -164,7 +164,7 @@ uint32 GetExplicitDiscoverySpell(uint32 spellId, Player* player) return 0; SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellId); - uint32 skillvalue = bounds.first != bounds.second ? player->GetSkillValue(bounds.first->second->skillId) : uint32(0); + uint32 skillvalue = bounds.first != bounds.second ? player->GetSkillValue(bounds.first->second->SkillLine) : uint32(0); float full_chance = 0; for (SkillDiscoveryList::const_iterator item_iter = tab->second.begin(); item_iter != tab->second.end(); ++item_iter) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index c8fbbcbec53..ef83bdced50 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -5293,7 +5293,7 @@ void AuraEffect::HandleAuraOverrideSpells(AuraApplication const* aurApp, uint8 m target->SetUInt16Value(PLAYER_FIELD_BYTES2, 0, overrideId); if (OverrideSpellDataEntry const* overrideSpells = sOverrideSpellDataStore.LookupEntry(overrideId)) for (uint8 i = 0; i < MAX_OVERRIDE_SPELL; ++i) - if (uint32 spellId = overrideSpells->spellId[i]) + if (uint32 spellId = overrideSpells->SpellID[i]) target->AddTemporarySpell(spellId); } else @@ -5301,7 +5301,7 @@ void AuraEffect::HandleAuraOverrideSpells(AuraApplication const* aurApp, uint8 m target->SetUInt16Value(PLAYER_FIELD_BYTES2, 0, 0); if (OverrideSpellDataEntry const* overrideSpells = sOverrideSpellDataStore.LookupEntry(overrideId)) for (uint8 i = 0; i < MAX_OVERRIDE_SPELL; ++i) - if (uint32 spellId = overrideSpells->spellId[i]) + if (uint32 spellId = overrideSpells->SpellID[i]) target->RemoveTemporarySpell(spellId); } } diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 0f84226cf06..c441bd9b3f7 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -2447,12 +2447,12 @@ void Spell::EffectLearnSkill(SpellEffIndex effIndex) if (!rcEntry) return; - SkillTiersEntry const* tier = sSkillTiersStore.LookupEntry(rcEntry->SkillTier); + SkillTiersEntry const* tier = sSkillTiersStore.LookupEntry(rcEntry->SkillTierID); if (!tier) return; uint16 skillval = unitTarget->ToPlayer()->GetPureSkillValue(skillid); - unitTarget->ToPlayer()->SetSkill(skillid, m_spellInfo->Effects[effIndex].CalcValue(), std::max<uint16>(skillval, 1), tier->MaxSkill[damage - 1]); + unitTarget->ToPlayer()->SetSkill(skillid, m_spellInfo->Effects[effIndex].CalcValue(), std::max<uint16>(skillval, 1), tier->Value[damage - 1]); } void Spell::EffectPlayMovie(SpellEffIndex effIndex) diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 8eb358cdcbb..917f69547a1 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1131,10 +1131,10 @@ bool SpellInfo::IsAbilityLearnedWithProfession() const for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx) { SkillLineAbilityEntry const* pAbility = _spell_idx->second; - if (!pAbility || pAbility->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE) + if (!pAbility || pAbility->AquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE) continue; - if (pAbility->req_skill_value > 0) + if (pAbility->MinSkillLineRank > 0) return true; } @@ -1146,7 +1146,7 @@ bool SpellInfo::IsAbilityOfSkillType(uint32 skillType) const SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id); for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx) - if (_spell_idx->second->skillId == uint32(skillType)) + if (_spell_idx->second->SkillLine == uint32(skillType)) return true; return false; diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 7aebc202d81..4463fc0da75 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -35,20 +35,20 @@ bool IsPrimaryProfessionSkill(uint32 skill) { SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(skill); - return pSkill && pSkill->categoryId == SKILL_CATEGORY_PROFESSION; + return pSkill && pSkill->CategoryID == SKILL_CATEGORY_PROFESSION; } bool IsWeaponSkill(uint32 skill) { SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(skill); - return pSkill && pSkill->categoryId == SKILL_CATEGORY_WEAPON; + return pSkill && pSkill->CategoryID == SKILL_CATEGORY_WEAPON; } bool IsPartOfSkillLine(uint32 skillId, uint32 spellId) { SkillLineAbilityMapBounds skillBounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellId); for (SkillLineAbilityMap::const_iterator itr = skillBounds.first; itr != skillBounds.second; ++itr) - if (itr->second->skillId == skillId) + if (itr->second->SkillLine == skillId) return true; return false; @@ -2207,7 +2207,7 @@ void SpellMgr::LoadSkillLineAbilityMap() if (!SkillInfo) continue; - mSkillLineAbilityMap.insert(SkillLineAbilityMap::value_type(SkillInfo->spellId, SkillInfo)); + mSkillLineAbilityMap.insert(SkillLineAbilityMap::value_type(SkillInfo->SpellID, SkillInfo)); ++count; } @@ -2445,13 +2445,13 @@ void SpellMgr::LoadPetLevelupSpellMap() // (!creatureFamily->SkillLine[1] || skillLine->skillId != creatureFamily->SkillLine[1])) // continue; - if (skillLine->skillId != creatureFamily->SkillLine[j]) + if (skillLine->SkillLine != creatureFamily->SkillLine[j]) continue; - if (skillLine->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) + if (skillLine->AquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) continue; - SpellInfo const* spell = GetSpellInfo(skillLine->spellId); + SpellInfo const* spell = GetSpellInfo(skillLine->SpellID); if (!spell) // not exist or triggered or talent continue; diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index bed6715fec1..eb5be0950aa 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -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); } } diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 67505e713de..7d8fec52143 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -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; diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index d51150edb66..4c2b7d40a89 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -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; } |