From fcb79fee0757aa32c98b9d2c7f9e318bacc2592b Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Sat, 25 Jan 2020 02:14:41 +0100 Subject: [PATCH] Core/Datastores: updated DBC structure names to generated member format --- src/server/game/AI/CoreAI/UnitAI.cpp | 8 +- src/server/game/AI/PlayerAI/PlayerAI.cpp | 2 +- src/server/game/AI/SmartScripts/SmartAI.cpp | 4 +- .../game/AI/SmartScripts/SmartScript.cpp | 6 +- .../game/Achievements/AchievementMgr.cpp | 200 +- src/server/game/Achievements/AchievementMgr.h | 2 +- .../game/AuctionHouse/AuctionHouseMgr.cpp | 16 +- src/server/game/Battlefield/Battlefield.cpp | 6 +- .../game/Battlegrounds/Battleground.cpp | 4 +- .../game/Battlegrounds/BattlegroundMgr.cpp | 16 +- .../game/Battlegrounds/BattlegroundQueue.cpp | 4 +- .../Battlegrounds/Zones/BattlegroundAB.cpp | 2 +- .../Battlegrounds/Zones/BattlegroundAV.cpp | 4 +- .../Battlegrounds/Zones/BattlegroundBFG.cpp | 2 +- .../Battlegrounds/Zones/BattlegroundEY.cpp | 16 +- .../Battlegrounds/Zones/BattlegroundIC.cpp | 2 +- .../Battlegrounds/Zones/BattlegroundSA.cpp | 10 +- .../Battlegrounds/Zones/BattlegroundTP.cpp | 4 +- .../Battlegrounds/Zones/BattlegroundWS.cpp | 4 +- src/server/game/Chat/Channels/Channel.cpp | 16 +- src/server/game/Chat/Channels/ChannelMgr.cpp | 6 +- src/server/game/Chat/Chat.cpp | 4 +- src/server/game/Chat/ChatLink.cpp | 20 +- src/server/game/Combat/HostileRefManager.cpp | 2 +- src/server/game/DataStores/DBCStores.cpp | 144 +- src/server/game/DataStores/DBCStores.h | 1 - src/server/game/DataStores/DBCStructure.h | 2325 ++++++++--------- src/server/game/DataStores/DBCfmt.h | 22 +- src/server/game/DungeonFinding/LFGMgr.cpp | 24 +- .../game/Entities/Creature/Creature.cpp | 2 +- .../Entities/Creature/TemporarySummon.cpp | 4 +- .../game/Entities/GameObject/GameObject.cpp | 30 +- src/server/game/Entities/Item/Item.cpp | 69 +- src/server/game/Entities/Object/Object.cpp | 6 +- src/server/game/Entities/Pet/Pet.cpp | 24 +- src/server/game/Entities/Player/Player.cpp | 498 ++-- src/server/game/Entities/Totem/Totem.cpp | 4 +- .../game/Entities/Transport/Transport.cpp | 32 +- src/server/game/Entities/Unit/StatSystem.cpp | 10 +- src/server/game/Entities/Unit/Unit.cpp | 94 +- src/server/game/Entities/Vehicle/Vehicle.cpp | 30 +- src/server/game/Events/GameEventMgr.cpp | 10 +- src/server/game/Globals/ObjectMgr.cpp | 94 +- src/server/game/Groups/Group.cpp | 14 +- src/server/game/Guilds/Guild.cpp | 14 +- src/server/game/Guilds/GuildFinderMgr.cpp | 2 +- src/server/game/Guilds/GuildMgr.cpp | 12 +- .../game/Handlers/AuctionHouseHandler.cpp | 4 +- src/server/game/Handlers/CalendarHandler.cpp | 2 +- src/server/game/Handlers/CharacterHandler.cpp | 54 +- src/server/game/Handlers/ChatHandler.cpp | 2 +- src/server/game/Handlers/CombatHandler.cpp | 2 +- src/server/game/Handlers/GroupHandler.cpp | 4 +- src/server/game/Handlers/ItemHandler.cpp | 20 +- src/server/game/Handlers/MailHandler.cpp | 2 +- src/server/game/Handlers/MiscHandler.cpp | 4 +- src/server/game/Handlers/MovementHandler.cpp | 2 +- src/server/game/Handlers/NPCHandler.cpp | 2 +- src/server/game/Handlers/SkillHandler.cpp | 2 +- src/server/game/Handlers/TaxiHandler.cpp | 4 +- src/server/game/Handlers/VehicleHandler.cpp | 4 +- src/server/game/Instances/InstanceSaveMgr.cpp | 2 +- src/server/game/Instances/InstanceScript.cpp | 10 +- src/server/game/Loot/Loot.cpp | 6 +- src/server/game/Loot/LootMgr.cpp | 2 +- src/server/game/Maps/Map.cpp | 22 +- src/server/game/Maps/MapInstanced.cpp | 2 +- src/server/game/Maps/MapManager.cpp | 2 +- src/server/game/Maps/TransportMgr.cpp | 26 +- .../FlightPathMovementGenerator.cpp | 28 +- src/server/game/Quests/QuestDef.cpp | 4 +- src/server/game/Reputation/ReputationMgr.cpp | 60 +- src/server/game/Reputation/ReputationMgr.h | 4 +- src/server/game/Scripting/ScriptMgr.cpp | 6 +- .../game/Server/Packets/CharacterPackets.cpp | 2 +- .../Skills/Archaeology/ArchaeologyMgr.cpp | 10 +- src/server/game/Skills/SkillDiscovery.cpp | 4 +- .../game/Spells/Auras/SpellAuraEffects.cpp | 26 +- src/server/game/Spells/Spell.cpp | 22 +- src/server/game/Spells/SpellEffects.cpp | 24 +- src/server/game/Spells/SpellHistory.cpp | 2 +- src/server/game/Spells/SpellInfo.cpp | 180 +- src/server/game/Spells/SpellMgr.cpp | 64 +- .../game/Tools/CharacterDatabaseCleaner.cpp | 2 +- src/server/scripts/Commands/cs_character.cpp | 10 +- src/server/scripts/Commands/cs_debug.cpp | 22 +- src/server/scripts/Commands/cs_go.cpp | 10 +- src/server/scripts/Commands/cs_gobject.cpp | 2 +- src/server/scripts/Commands/cs_learn.cpp | 52 +- src/server/scripts/Commands/cs_lookup.cpp | 22 +- src/server/scripts/Commands/cs_message.cpp | 4 +- src/server/scripts/Commands/cs_misc.cpp | 6 +- src/server/scripts/Commands/cs_modify.cpp | 6 +- src/server/scripts/Commands/cs_reset.cpp | 2 +- src/server/scripts/Commands/cs_titles.cpp | 10 +- .../BlackwingDescent/boss_maloriak.cpp | 2 +- .../EasternKingdoms/zone_tol_barad.cpp | 2 +- src/server/scripts/Events/childrens_week.cpp | 2 +- .../scripts/Northrend/zone_wintergrasp.cpp | 4 +- .../scripts/OutdoorPvP/OutdoorPvPSI.cpp | 4 +- src/server/scripts/Spells/spell_generic.cpp | 2 +- src/server/scripts/Spells/spell_item.cpp | 2 +- src/server/scripts/Spells/spell_rogue.cpp | 10 +- .../scripts/World/areatrigger_scripts.cpp | 10 +- src/server/scripts/World/go_scripts.cpp | 2 +- 105 files changed, 2301 insertions(+), 2328 deletions(-) diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp index 53d29a5591..badfc9814c 100644 --- a/src/server/game/AI/CoreAI/UnitAI.cpp +++ b/src/server/game/AI/CoreAI/UnitAI.cpp @@ -304,7 +304,7 @@ bool SpellTargetSelector::operator()(Unit const* target) const float rangeMod = 0.0f; if (_spellInfo->RangeEntry) { - if (_spellInfo->RangeEntry->type & SPELL_RANGE_MELEE) + if (_spellInfo->RangeEntry->Flags & SPELL_RANGE_MELEE) { rangeMod = _caster->GetCombatReach() + 4.0f / 3.0f; rangeMod += target->GetCombatReach(); @@ -314,7 +314,7 @@ bool SpellTargetSelector::operator()(Unit const* target) const else { float meleeRange = 0.0f; - if (_spellInfo->RangeEntry->type & SPELL_RANGE_RANGED) + if (_spellInfo->RangeEntry->Flags & SPELL_RANGE_RANGED) { meleeRange = _caster->GetCombatReach() + 4.0f / 3.0f; meleeRange += target->GetCombatReach(); @@ -328,12 +328,12 @@ bool SpellTargetSelector::operator()(Unit const* target) const rangeMod = _caster->GetCombatReach(); rangeMod += target->GetCombatReach(); - if (minRange > 0.0f && !(_spellInfo->RangeEntry->type & SPELL_RANGE_RANGED)) + if (minRange > 0.0f && !(_spellInfo->RangeEntry->Flags & SPELL_RANGE_RANGED)) minRange += rangeMod; } if (_caster->isMoving() && target->isMoving() && !_caster->IsWalking() && !target->IsWalking() && - (_spellInfo->RangeEntry->type & SPELL_RANGE_MELEE || target->GetTypeId() == TYPEID_PLAYER)) + (_spellInfo->RangeEntry->Flags & SPELL_RANGE_MELEE || target->GetTypeId() == TYPEID_PLAYER)) rangeMod += 8.0f / 3.0f; } diff --git a/src/server/game/AI/PlayerAI/PlayerAI.cpp b/src/server/game/AI/PlayerAI/PlayerAI.cpp index fa5406f7aa..95ce20e570 100644 --- a/src/server/game/AI/PlayerAI/PlayerAI.cpp +++ b/src/server/game/AI/PlayerAI/PlayerAI.cpp @@ -459,7 +459,7 @@ uint8 PlayerAI::GetPlayerSpec(Player const* who) if (!tabEntry) return 0; - return tabEntry->tabpage; + return tabEntry->OrderIndex; } bool PlayerAI::IsPlayerHealer(Player const* who) diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 089c98cca5..088ecb35ce 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -1085,10 +1085,10 @@ class SmartTrigger : public AreaTriggerScript if (!player->IsAlive()) return false; - TC_LOG_DEBUG("scripts.ai", "AreaTrigger %u is using SmartTrigger script", trigger->id); + TC_LOG_DEBUG("scripts.ai", "AreaTrigger %u is using SmartTrigger script", trigger->ID); SmartScript script; script.OnInitialize(nullptr, trigger); - script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->id); + script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->ID); return true; } }; diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 890a0c0f9a..5658c88eb6 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -3705,7 +3705,7 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTriggerEn if (obj) TC_LOG_DEBUG("scripts.ai", "SmartScript: EventMap for Entry %u is empty but is using SmartScript.", obj->GetEntry()); if (at) - TC_LOG_DEBUG("scripts.ai", "SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->id); + TC_LOG_DEBUG("scripts.ai", "SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->ID); return; } for (SmartAIEventList::iterator i = e.begin(); i != e.end(); ++i) @@ -3749,7 +3749,7 @@ void SmartScript::GetScript() } else if (trigger) { - e = sSmartScriptMgr->GetScript((int32)trigger->id, mScriptType); + e = sSmartScriptMgr->GetScript((int32)trigger->ID, mScriptType); FillScript(e, nullptr, trigger); } } @@ -3778,7 +3778,7 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTriggerEntry const* at) { mScriptType = SMART_SCRIPT_TYPE_AREATRIGGER; trigger = at; - TC_LOG_DEBUG("scripts.ai", "SmartScript::OnInitialize: source is AreaTrigger %u", trigger->id); + TC_LOG_DEBUG("scripts.ai", "SmartScript::OnInitialize: source is AreaTrigger %u", trigger->ID); } else { diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index bb5f69d9ad..43b7560e77 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -52,7 +52,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) return false; } - switch (criteria->type) + switch (criteria->Type) { case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE: case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE: @@ -83,7 +83,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) default: if (dataType != ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT) { - TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` contains data for a non-supported criteria type (Entry: %u Type: %u), ignored.", criteria->ID, criteria->type); + TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` contains data for a non-supported criteria type (Entry: %u Type: %u), ignored.", criteria->ID, criteria->Type); return false; } break; @@ -98,7 +98,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (!creature.id || !sObjectMgr->GetCreatureTemplate(creature.id)) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_CREATURE (%u) contains a non-existing creature id in value1 (%u), ignored.", - criteria->ID, criteria->type, dataType, creature.id); + criteria->ID, criteria->Type, dataType, creature.id); return false; } return true; @@ -106,19 +106,19 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (!classRace.class_id && !classRace.race_id) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.", - criteria->ID, criteria->type, dataType); + criteria->ID, criteria->Type, dataType); return false; } if (classRace.class_id && ((1 << (classRace.class_id-1)) & CLASSMASK_ALL_PLAYABLE) == 0) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) contains a non-existing class in value1 (%u), ignored.", - criteria->ID, criteria->type, dataType, classRace.class_id); + criteria->ID, criteria->Type, dataType, classRace.class_id); return false; } if (classRace.race_id && ((1 << (classRace.race_id-1)) & RACEMASK_ALL_PLAYABLE) == 0) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) contains a non-existing race in value2 (%u), ignored.", - criteria->ID, criteria->type, dataType, classRace.race_id); + criteria->ID, criteria->Type, dataType, classRace.race_id); return false; } return true; @@ -126,7 +126,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (health.percent < 1 || health.percent > 100) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_PLAYER_LESS_HEALTH (%u) contains a wrong percent value in value1 (%u), ignored.", - criteria->ID, criteria->type, dataType, health.percent); + criteria->ID, criteria->Type, dataType, health.percent); return false; } return true; @@ -137,19 +137,19 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (!spellEntry) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) contains a wrong spell id in value1 (%u), ignored.", - criteria->ID, criteria->type, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.spell_id); + criteria->ID, criteria->Type, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.spell_id); return false; } if (aura.effect_idx >= 3) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) contains a wrong spell effect index in value2 (%u), ignored.", - criteria->ID, criteria->type, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.effect_idx); + criteria->ID, criteria->Type, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.effect_idx); return false; } if (!spellEntry->Effects[aura.effect_idx].ApplyAuraName) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) contains a non-aura spell effect (ID: %u Effect: %u), ignored.", - criteria->ID, criteria->type, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.spell_id, aura.effect_idx); + criteria->ID, criteria->Type, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.spell_id, aura.effect_idx); return false; } return true; @@ -158,7 +158,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (value.compType >= COMP_TYPE_MAX) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE (%u) contains a wrong ComparisionType in value2 (%u), ignored.", - criteria->ID, criteria->type, dataType, value.compType); + criteria->ID, criteria->Type, dataType, value.compType); return false; } return true; @@ -166,7 +166,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (level.minlevel > STRONG_MAX_LEVEL) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL (%u) contains a wrong minlevel in value1 (%u), ignored.", - criteria->ID, criteria->type, dataType, level.minlevel); + criteria->ID, criteria->Type, dataType, level.minlevel); return false; } return true; @@ -174,7 +174,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (gender.gender > GENDER_NONE) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER (%u) contains a wrong gender value in value1 (%u), ignored.", - criteria->ID, criteria->type, dataType, gender.gender); + criteria->ID, criteria->Type, dataType, gender.gender); return false; } return true; @@ -182,7 +182,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (!ScriptId) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT (%u) does not have a ScriptName set, ignored.", - criteria->ID, criteria->type, dataType); + criteria->ID, criteria->Type, dataType); return false; } return true; @@ -190,7 +190,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (map_players.maxcount <= 0) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT (%u) contains a wrong max players count in value1 (%u), ignored.", - criteria->ID, criteria->type, dataType, map_players.maxcount); + criteria->ID, criteria->Type, dataType, map_players.maxcount); return false; } return true; @@ -198,7 +198,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (team.team != ALLIANCE && team.team != HORDE) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM (%u) contains an unknown team value in value1 (%u), ignored.", - criteria->ID, criteria->type, dataType, team.team); + criteria->ID, criteria->Type, dataType, team.team); return false; } return true; @@ -206,7 +206,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (drunk.state >= MAX_DRUNKEN) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK (%u) contains an unknown drunken state value in value1 (%u), ignored.", - criteria->ID, criteria->type, dataType, drunk.state); + criteria->ID, criteria->Type, dataType, drunk.state); return false; } return true; @@ -214,7 +214,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (!sHolidaysStore.LookupEntry(holiday.id)) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY (%u) contains an unknown holiday entry in value1 (%u), ignored.", - criteria->ID, criteria->type, dataType, holiday.id); + criteria->ID, criteria->Type, dataType, holiday.id); return false; } return true; @@ -224,7 +224,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (game_event.id < 1 || game_event.id >= events.size()) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_GAME_EVENT (%u) has unknown game_event in value1 (%u), ignored.", - criteria->ID, criteria->type, dataType, game_event.id); + criteria->ID, criteria->Type, dataType, game_event.id); return false; } return true; @@ -236,7 +236,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (equipped_item.item_quality >= MAX_ITEM_QUALITY) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) contains an unknown quality state value in value1 (%u), ignored.", - criteria->ID, criteria->type, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM ? "ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM" : "ACHIEVEMENT_CRITERIA_DATA_TYPE_S_ITEM_QUALITY"), dataType, equipped_item.item_quality); + criteria->ID, criteria->Type, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM ? "ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM" : "ACHIEVEMENT_CRITERIA_DATA_TYPE_S_ITEM_QUALITY"), dataType, equipped_item.item_quality); return false; } return true; @@ -244,19 +244,19 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (!classRace.class_id && !classRace.race_id) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) should not have 0 in either value field. Ignored.", - criteria->ID, criteria->type, dataType); + criteria->ID, criteria->Type, dataType); return false; } if (classRace.class_id && ((1 << (classRace.class_id-1)) & CLASSMASK_ALL_PLAYABLE) == 0) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) contains a non-existing class entry in value1 (%u), ignored.", - criteria->ID, criteria->type, dataType, classRace.class_id); + criteria->ID, criteria->Type, dataType, classRace.class_id); return false; } if (classRace.race_id && ((1 << (classRace.race_id-1)) & RACEMASK_ALL_PLAYABLE) == 0) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) contains a non-existing race entry in value2 (%u), ignored.", - criteria->ID, criteria->type, dataType, classRace.race_id); + criteria->ID, criteria->Type, dataType, classRace.race_id); return false; } return true; @@ -264,12 +264,12 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) if (!sCharTitlesStore.LookupEntry(known_title.title_id)) { TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_KNOWN_TITLE (%u) contains an unknown title_id in value1 (%u), ignore.", - criteria->ID, criteria->type, dataType, known_title.title_id); + criteria->ID, criteria->Type, dataType, known_title.title_id); return false; } return true; default: - TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) contains data of a non-supported data type (%u), ignored.", criteria->ID, criteria->type, dataType); + TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) contains data of a non-supported data type (%u), ignored.", criteria->ID, criteria->Type, dataType); return false; } } @@ -373,7 +373,7 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_KNOWN_TITLE: { if (CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(known_title.title_id)) - return source && source->HasTitle(titleInfo->bit_index); + return source && source->HasTitle(titleInfo->Mask_ID); return false; } @@ -488,7 +488,7 @@ void AchievementMgr::ResetAchievementCriteria(AchievementCriteriaTypes type, { AchievementCriteriaEntry const* achievementCriteria = (*i); - AchievementEntry const* achievement = sAchievementMgr->GetAchievement(achievementCriteria->achievement); + AchievementEntry const* achievement = sAchievementMgr->GetAchievement(achievementCriteria->Achievement_ID); if (!achievement) continue; @@ -679,7 +679,7 @@ void AchievementMgr::LoadFromDB(PreparedQueryResult achievementResult, P ca.date = time_t(fields[1].GetUInt32()); ca.changed = false; - _achievementPoints += achievement->points; + _achievementPoints += achievement->Points; // title achievement rewards are retroactive if (AchievementReward const* reward = sAchievementMgr->GetAchievementReward(achievement)) @@ -713,7 +713,7 @@ void AchievementMgr::LoadFromDB(PreparedQueryResult achievementResult, P continue; } - if (criteria->timeLimit && time_t(date + criteria->timeLimit) < GameTime::GetGameTime()) + if (criteria->Timer_time && time_t(date + criteria->Timer_time) < GameTime::GetGameTime()) continue; CriteriaProgress& progress = m_criteriaProgress[id]; @@ -748,7 +748,7 @@ void AchievementMgr::LoadFromDB(PreparedQueryResult achievementResult, Pr ca.changed = false; - _achievementPoints += achievement->points; + _achievementPoints += achievement->Points; } while (achievementResult->NextRow()); } @@ -775,7 +775,7 @@ void AchievementMgr::LoadFromDB(PreparedQueryResult achievementResult, Pr continue; } - if (criteria->timeLimit && time_t(date + criteria->timeLimit) < GameTime::GetGameTime()) + if (criteria->Timer_time && time_t(date + criteria->Timer_time) < GameTime::GetGameTime()) continue; CriteriaProgress& progress = m_criteriaProgress[id]; @@ -859,7 +859,7 @@ template void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement) const { // Don't send for achievements with ACHIEVEMENT_FLAG_HIDDEN - if (achievement->flags & ACHIEVEMENT_FLAG_HIDDEN) + if (achievement->Flags & ACHIEVEMENT_FLAG_HIDDEN) return; TC_LOG_DEBUG("achievement", "AchievementMgr::SendAchievementEarned(%u)", achievement->ID); @@ -871,7 +871,7 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievemen guild->BroadcastWorker(_localizer, GetOwner()); } - if (achievement->flags & (ACHIEVEMENT_FLAG_REALM_FIRST_KILL | ACHIEVEMENT_FLAG_REALM_FIRST_REACH | ACHIEVEMENT_FLAG_REALM_FIRST_GUILD)) + if (achievement->Flags & (ACHIEVEMENT_FLAG_REALM_FIRST_KILL | ACHIEVEMENT_FLAG_REALM_FIRST_REACH | ACHIEVEMENT_FLAG_REALM_FIRST_GUILD)) { // broadcast realm first reached WorldPacket data(SMSG_SERVER_FIRST_ACHIEVEMENT, GetOwner()->GetName().size() + 1 + 8 + 4 + 4); @@ -942,7 +942,7 @@ void AchievementMgr::SendCriteriaUpdate(AchievementCriteriaEntry const* data.appendPackGUID(progress->counter); data << GetOwner()->GetPackGUID(); - if (!entry->timeLimit) + if (!entry->Timer_time) data << uint32(0); else data << uint32(timedCompleted ? 1 : 0); // this are some flags, 1 is for keeping the counter at 0 in client @@ -1160,10 +1160,10 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, for (AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i != achievementCriteriaList.end(); ++i) { AchievementCriteriaEntry const* achievementCriteria = (*i); - AchievementEntry const* achievement = sAchievementMgr->GetAchievement(achievementCriteria->achievement); + AchievementEntry const* achievement = sAchievementMgr->GetAchievement(achievementCriteria->Achievement_ID); if (!achievement) { - TC_LOG_ERROR("achievement", "UpdateAchievementCriteria: Achievement %u not found!", achievementCriteria->achievement); + TC_LOG_ERROR("achievement", "UpdateAchievementCriteria: Achievement %u not found!", achievementCriteria->Achievement_ID); continue; } @@ -1373,7 +1373,7 @@ void AchievementMgr::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++; } } @@ -1398,7 +1398,7 @@ void AchievementMgr::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); @@ -1504,7 +1504,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, // check again the completeness for SUMM and REQ COUNT achievements, // as they don't depend on the completed criteria but on the sum of the progress of each individual criteria - if (achievement->flags & ACHIEVEMENT_FLAG_SUMM) + if (achievement->Flags & ACHIEVEMENT_FLAG_SUMM) if (IsCompletedAchievement(achievement)) CompletedAchievement(achievement, referencePlayer); @@ -1530,10 +1530,10 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achi return false; // counter can never complete - if (achievement->flags & ACHIEVEMENT_FLAG_COUNTER) + if (achievement->Flags & ACHIEVEMENT_FLAG_COUNTER) return false; - if (achievement->flags & (ACHIEVEMENT_FLAG_REALM_FIRST_REACH | ACHIEVEMENT_FLAG_REALM_FIRST_KILL | ACHIEVEMENT_FLAG_REALM_FIRST_GUILD)) + if (achievement->Flags & (ACHIEVEMENT_FLAG_REALM_FIRST_REACH | ACHIEVEMENT_FLAG_REALM_FIRST_KILL | ACHIEVEMENT_FLAG_REALM_FIRST_GUILD)) { // someone on this realm has already completed that achievement if (sAchievementMgr->IsRealmCompleted(achievement, GetInstanceId(GetOwner()))) @@ -1544,7 +1544,7 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achi if (!progress) return false; - switch (AchievementCriteriaTypes(achievementCriteria->type)) + switch (AchievementCriteriaTypes(achievementCriteria->Type)) { case ACHIEVEMENT_CRITERIA_TYPE_WIN_BG: return progress->counter >= achievementCriteria->win_bg.winCount; @@ -1720,7 +1720,7 @@ template void AchievementMgr::CompletedCriteriaFor(AchievementEntry const* achievement, Player* referencePlayer) { // counter can never complete - if (achievement->flags & ACHIEVEMENT_FLAG_COUNTER) + if (achievement->Flags & ACHIEVEMENT_FLAG_COUNTER) return; // already completed and stored @@ -1735,12 +1735,12 @@ template bool AchievementMgr::IsCompletedAchievement(AchievementEntry const* entry) { // counter can never complete - if (entry->flags & ACHIEVEMENT_FLAG_COUNTER) + if (entry->Flags & ACHIEVEMENT_FLAG_COUNTER) return false; // for achievement with referenced achievement criterias get from referenced and counter from self - uint32 achievementForTestId = entry->refAchievement ? entry->refAchievement : entry->ID; - uint32 achievementForTestCount = entry->count; + uint32 achievementForTestId = entry->Shares_criteria ? entry->Shares_criteria : entry->ID; + uint32 achievementForTestCount = entry->Minimum_criteria; AchievementCriteriaEntryList const* cList = sAchievementMgr->GetAchievementCriteriaByAchievement(achievementForTestId); if (!cList) @@ -1749,7 +1749,7 @@ bool AchievementMgr::IsCompletedAchievement(AchievementEntry const* entry) // For SUMM achievements, we have to count the progress of each criteria of the achievement. // Oddly, the target count is NOT contained in the achievement, but in each individual criteria - if (entry->flags & ACHIEVEMENT_FLAG_SUMM) + if (entry->Flags & ACHIEVEMENT_FLAG_SUMM) { for (AchievementCriteriaEntryList::const_iterator itr = cList->begin(); itr != cList->end(); ++itr) { @@ -1810,7 +1810,7 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entr { // Don't allow to cheat - doing timed achievements without timer active TimedAchievementMap::iterator timedIter = m_timedAchievements.find(entry->ID); - if (entry->timeLimit && timedIter == m_timedAchievements.end()) + if (entry->Timer_time && timedIter == m_timedAchievements.end()) return; TC_LOG_DEBUG("achievement", "SetCriteriaProgress(%u, " UI64FMTD ") for (%s)", @@ -1821,7 +1821,7 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entr { // not create record for 0 counter but allow it for timed achievements // we will need to send 0 progress to client to start the timer - if (changeValue == 0 && !entry->timeLimit) + if (changeValue == 0 && !entry->Timer_time) return; progress = &m_criteriaProgress[entry->ID]; @@ -1848,7 +1848,7 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entr } // not update (not mark as changed) if counter will have same value - if (progress->counter == newValue && !entry->timeLimit) + if (progress->counter == newValue && !entry->Timer_time) return; progress->counter = newValue; @@ -1857,21 +1857,21 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entr progress->changed = true; progress->date = GameTime::GetGameTime(); // set the date to the latest update. - AchievementEntry const* achievement = sAchievementMgr->GetAchievement(entry->achievement); + AchievementEntry const* achievement = sAchievementMgr->GetAchievement(entry->Achievement_ID); uint32 timeElapsed = 0; bool criteriaComplete = IsCompletedCriteria(entry, achievement); - if (entry->timeLimit) + if (entry->Timer_time) { // Client expects this in packet - timeElapsed = entry->timeLimit - (timedIter->second/IN_MILLISECONDS); + timeElapsed = entry->Timer_time - (timedIter->second/IN_MILLISECONDS); // Remove the timer, we wont need it anymore if (criteriaComplete) m_timedAchievements.erase(timedIter); } - if (criteriaComplete && achievement->flags & ACHIEVEMENT_FLAG_SHOW_CRITERIA_MEMBERS && !progress->CompletedGUID) + if (criteriaComplete && achievement->Flags & ACHIEVEMENT_FLAG_SHOW_CRITERIA_MEMBERS && !progress->CompletedGUID) progress->CompletedGUID = referencePlayer->GetGUID(); SendCriteriaUpdate(entry, progress, timeElapsed, criteriaComplete); @@ -1911,16 +1911,16 @@ void AchievementMgr::StartTimedAchievement(AchievementCriteriaTimedTypes AchievementCriteriaEntryList const& achievementCriteriaList = sAchievementMgr->GetTimedAchievementCriteriaByType(type); for (AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i != achievementCriteriaList.end(); ++i) { - if ((*i)->timedCriteriaMiscId != entry) + if ((*i)->Timer_asset_ID != entry) continue; - AchievementEntry const* achievement = sAchievementMgr->GetAchievement((*i)->achievement); + AchievementEntry const* achievement = sAchievementMgr->GetAchievement((*i)->Achievement_ID); if (m_timedAchievements.find((*i)->ID) == m_timedAchievements.end() && !IsCompletedCriteria(*i, achievement)) { // Start the timer - if ((*i)->timeLimit * IN_MILLISECONDS > timeLost) + if ((*i)->Timer_time * IN_MILLISECONDS > timeLost) { - m_timedAchievements[(*i)->ID] = (*i)->timeLimit * IN_MILLISECONDS - timeLost; + m_timedAchievements[(*i)->ID] = (*i)->Timer_time * IN_MILLISECONDS - timeLost; // and at client too SetCriteriaProgress(*i, 0, GetOwner(), PROGRESS_SET); @@ -1935,7 +1935,7 @@ void AchievementMgr::RemoveTimedAchievement(AchievementCriteriaTimedTypes typ AchievementCriteriaEntryList const& achievementCriteriaList = sAchievementMgr->GetTimedAchievementCriteriaByType(type); for (AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i != achievementCriteriaList.end(); ++i) { - if ((*i)->timedCriteriaMiscId != entry) + if ((*i)->Timer_asset_ID != entry) continue; TimedAchievementMap::iterator timedIter = m_timedAchievements.find((*i)->ID); @@ -1958,12 +1958,12 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achiev if (GetOwner()->IsGameMaster()) return; - if (achievement->flags & ACHIEVEMENT_FLAG_COUNTER || HasAchieved(achievement->ID)) + if (achievement->Flags & ACHIEVEMENT_FLAG_COUNTER || HasAchieved(achievement->ID)) return; - if (achievement->flags & ACHIEVEMENT_FLAG_SHOW_IN_GUILD_NEWS) + if (achievement->Flags & ACHIEVEMENT_FLAG_SHOW_IN_GUILD_NEWS) if (Guild* guild = referencePlayer->GetGuild()) - guild->AddGuildNews(GUILD_NEWS_PLAYER_ACHIEVEMENT, referencePlayer->GetGUID(), achievement->flags & ACHIEVEMENT_FLAG_SHOW_IN_GUILD_HEADER, achievement->ID); + guild->AddGuildNews(GUILD_NEWS_PLAYER_ACHIEVEMENT, referencePlayer->GetGUID(), achievement->Flags & ACHIEVEMENT_FLAG_SHOW_IN_GUILD_HEADER, achievement->ID); if (!GetOwner()->GetSession()->PlayerLoading()) SendAchievementEarned(achievement); @@ -1977,10 +1977,10 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achiev sAchievementMgr->SetRealmCompleted(achievement, GetOwner()->GetInstanceId()); - _achievementPoints += achievement->points; + _achievementPoints += achievement->Points; UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT, 0, 0, 0, nullptr, referencePlayer); - UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_ACHIEVEMENT_POINTS, achievement->points, 0, 0, nullptr, referencePlayer); + UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_ACHIEVEMENT_POINTS, achievement->Points, 0, 0, nullptr, referencePlayer); // reward items and titles if any AchievementReward const* reward = sAchievementMgr->GetAchievementReward(achievement); @@ -2044,19 +2044,19 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achieve { TC_LOG_DEBUG("achievement", "AchievementMgr::CompletedAchievement(%u)", achievement->ID); - if (achievement->flags & ACHIEVEMENT_FLAG_COUNTER || HasAchieved(achievement->ID)) + if (achievement->Flags & ACHIEVEMENT_FLAG_COUNTER || HasAchieved(achievement->ID)) return; - if (achievement->flags & ACHIEVEMENT_FLAG_SHOW_IN_GUILD_NEWS) + if (achievement->Flags & ACHIEVEMENT_FLAG_SHOW_IN_GUILD_NEWS) if (Guild* guild = referencePlayer->GetGuild()) - guild->AddGuildNews(GUILD_NEWS_GUILD_ACHIEVEMENT, ObjectGuid::Empty, achievement->flags & ACHIEVEMENT_FLAG_SHOW_IN_GUILD_HEADER, achievement->ID); + guild->AddGuildNews(GUILD_NEWS_GUILD_ACHIEVEMENT, ObjectGuid::Empty, achievement->Flags & ACHIEVEMENT_FLAG_SHOW_IN_GUILD_HEADER, achievement->ID); SendAchievementEarned(achievement); CompletedAchievementData& ca = m_completedAchievements[achievement->ID]; ca.date = GameTime::GetGameTime(); ca.changed = true; - if (achievement->flags & ACHIEVEMENT_FLAG_SHOW_GUILD_MEMBERS) + if (achievement->Flags & ACHIEVEMENT_FLAG_SHOW_GUILD_MEMBERS) { if (referencePlayer->GetGuildId() == GetOwner()->GetId()) ca.guids.insert(referencePlayer->GetGUID()); @@ -2070,10 +2070,10 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achieve sAchievementMgr->SetRealmCompleted(achievement, referencePlayer->GetInstanceId()); - _achievementPoints += achievement->points; + _achievementPoints += achievement->Points; UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT, 0, 0, 0, nullptr, referencePlayer); - UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_GUILD_ACHIEVEMENT_POINTS, achievement->points, 0, 0, nullptr, referencePlayer); + UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_GUILD_ACHIEVEMENT_POINTS, achievement->Points, 0, 0, nullptr, referencePlayer); } struct VisibleAchievementPred @@ -2081,7 +2081,7 @@ struct VisibleAchievementPred bool operator()(CompletedAchievementMap::value_type const& val) { AchievementEntry const* achievement = sAchievementMgr->GetAchievement(val.first); - return achievement && !(achievement->flags & ACHIEVEMENT_FLAG_HIDDEN); + return achievement && !(achievement->Flags & ACHIEVEMENT_FLAG_HIDDEN); } }; @@ -2401,50 +2401,50 @@ bool AchievementMgr::CanUpdateCriteria(AchievementCriteriaEntry const* criter if (DisableMgr::IsDisabledFor(DISABLE_TYPE_ACHIEVEMENT_CRITERIA, criteria->ID, nullptr)) { TC_LOG_TRACE("achievement", "CanUpdateCriteria: (Id: %u Type %s) Disabled", - criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->type)); + criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->Type)); return false; } - if (achievement->mapID != -1 && referencePlayer->GetMapId() != uint32(achievement->mapID)) + if (achievement->Instance_ID != -1 && referencePlayer->GetMapId() != uint32(achievement->Instance_ID)) { TC_LOG_TRACE("achievement", "CanUpdateCriteria: (Id: %u Type %s Achievement %u) Wrong map", - criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->type), achievement->ID); + criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->Type), achievement->ID); return false; } - if ((achievement->requiredFaction == ACHIEVEMENT_FACTION_HORDE && referencePlayer->GetTeam() != HORDE) || - (achievement->requiredFaction == ACHIEVEMENT_FACTION_ALLIANCE && referencePlayer->GetTeam() != ALLIANCE)) + if ((achievement->Faction == ACHIEVEMENT_FACTION_HORDE && referencePlayer->GetTeam() != HORDE) || + (achievement->Faction == ACHIEVEMENT_FACTION_ALLIANCE && referencePlayer->GetTeam() != ALLIANCE)) { TC_LOG_TRACE("achievement", "CanUpdateCriteria: (Id: %u Type %s Achievement %u) Wrong faction", - criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->type), achievement->ID); + criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->Type), achievement->ID); return false; } if (IsCompletedCriteria(criteria, achievement)) { TC_LOG_TRACE("achievement", "CanUpdateCriteria: %s (Id: %u Type %s) Is Completed", - criteria->name, criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->type)); + criteria->Description, criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->Type)); return false; } if (!RequirementsSatisfied(criteria, miscValue1, miscValue2, miscValue3, unit, referencePlayer, go)) { TC_LOG_TRACE("achievement", "CanUpdateCriteria: %s (Id: %u Type %s) Requirements not satisfied", - criteria->name, criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->type)); + criteria->Description, criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->Type)); return false; } if (!AdditionalRequirementsSatisfied(criteria, miscValue1, miscValue2, unit, referencePlayer)) { TC_LOG_TRACE("achievement", "CanUpdateCriteria: %s (Id: %u Type %s) Additional requirements not satisfied", - criteria->name, criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->type)); + criteria->Description, criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->Type)); return false; } if (!ConditionsSatisfied(criteria, referencePlayer)) { TC_LOG_TRACE("achievement", "CanUpdateCriteria: (Id: %u Type %s) Conditions not satisfied", - criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->type)); + criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->Type)); return false; } @@ -2480,7 +2480,7 @@ bool AchievementMgr::ConditionsSatisfied(AchievementCriteriaEntry const* crit template bool AchievementMgr::RequirementsSatisfied(AchievementCriteriaEntry const* achievementCriteria, uint64 miscValue1, uint64 miscValue2, uint64 miscValue3, Unit const* unit, Player* referencePlayer, GameObject* go) const { - switch (AchievementCriteriaTypes(achievementCriteria->type)) + switch (AchievementCriteriaTypes(achievementCriteria->Type)) { case ACHIEVEMENT_CRITERIA_TYPE_ACCEPTED_SUMMONINGS: case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST: @@ -2588,7 +2588,7 @@ bool AchievementMgr::RequirementsSatisfied(AchievementCriteriaEntry const* ac bool notfit = false; for (int j = 0; j < MAX_ARENA_SLOT; ++j) { - if (achievIdByArenaSlot[j] == achievementCriteria->achievement) + if (achievIdByArenaSlot[j] == achievementCriteria->Achievement_ID) { Battleground* bg = referencePlayer->GetBattleground(); if (!bg || !bg->isArena() || ArenaTeam::GetSlotByType(bg->GetArenaType()) != j) @@ -2613,7 +2613,7 @@ bool AchievementMgr::RequirementsSatisfied(AchievementCriteriaEntry const* ac bool found = false; for (int j = 0; achievIdForDungeon[j][0]; ++j) { - if (achievIdForDungeon[j][0] == achievementCriteria->achievement) + if (achievIdForDungeon[j][0] == achievementCriteria->Achievement_ID) { if (map->IsRaid()) { @@ -2722,7 +2722,7 @@ bool AchievementMgr::RequirementsSatisfied(AchievementCriteriaEntry const* ac bool matchFound = false; for (int j = 0; j < MAX_WORLD_MAP_OVERLAY_AREA_IDX; ++j) { - AreaTableEntry const* area = sAreaTableStore.LookupEntry(worldOverlayEntry->areatableID[j]); + AreaTableEntry const* area = sAreaTableStore.LookupEntry(worldOverlayEntry->AreaID[j]); if (!area) break; @@ -2859,8 +2859,8 @@ bool AchievementMgr::AdditionalRequirementsSatisfied(AchievementCriteriaEntry { for (uint8 i = 0; i < MAX_ADDITIONAL_CRITERIA_CONDITIONS; ++i) { - uint32 reqType = criteria->additionalConditionType[i]; - uint32 reqValue = criteria->additionalConditionValue[i]; + uint32 reqType = criteria->AdditionalConditionType[i]; + uint32 reqValue = criteria->AdditionalConditionValue[i]; switch (AchievementCriteriaAdditionalCondition(reqType)) { @@ -3024,7 +3024,7 @@ bool AchievementMgr::AdditionalRequirementsSatisfied(AchievementCriteriaEntry ResearchProjectEntry const* rp = sResearchProjectStore.LookupEntry(miscValue1); if (!rp) return false; - if (rp->hasReward != reqValue) + if (rp->Rarity != reqValue) return false; break; @@ -3312,17 +3312,17 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList() if (!criteria) continue; - AchievementEntry const* achievement = sAchievementMgr->GetAchievement(criteria->achievement); + AchievementEntry const* achievement = sAchievementMgr->GetAchievement(criteria->Achievement_ID); - m_AchievementCriteriaListByAchievement[criteria->achievement].push_back(criteria); + m_AchievementCriteriaListByAchievement[criteria->Achievement_ID].push_back(criteria); - if (achievement && achievement->flags & ACHIEVEMENT_FLAG_GUILD) - ++guildCriterias, m_GuildAchievementCriteriasByType[criteria->type].push_back(criteria); + if (achievement && achievement->Flags & ACHIEVEMENT_FLAG_GUILD) + ++guildCriterias, m_GuildAchievementCriteriasByType[criteria->Type].push_back(criteria); else - ++criterias, m_AchievementCriteriasByType[criteria->type].push_back(criteria); + ++criterias, m_AchievementCriteriasByType[criteria->Type].push_back(criteria); - if (criteria->timeLimit) - m_AchievementCriteriasByTimedType[criteria->timedCriteriaStartType].push_back(criteria); + if (criteria->Timer_time) + m_AchievementCriteriasByTimedType[criteria->Timer_start_event].push_back(criteria); } TC_LOG_INFO("server.loading", ">> Loaded %u achievement criteria and %u guild achievement crieteria in %u ms.", criterias, guildCriterias, GetMSTimeDiffToNow(oldMSTime)); @@ -3343,16 +3343,16 @@ void AchievementGlobalMgr::LoadAchievementReferenceList() for (uint32 entryId = 0; entryId < sAchievementStore.GetNumRows(); ++entryId) { AchievementEntry const* achievement = sAchievementMgr->GetAchievement(entryId); - if (!achievement || !achievement->refAchievement) + if (!achievement || !achievement->Shares_criteria) continue; - m_AchievementListByReferencedId[achievement->refAchievement].push_back(achievement); + m_AchievementListByReferencedId[achievement->Shares_criteria].push_back(achievement); ++count; } // Once Bitten, Twice Shy (10 player) - Icecrown Citadel if (AchievementEntry const* achievement = sAchievementMgr->GetAchievement(4539)) - const_cast(achievement)->mapID = 631; // Correct map requirement (currently has Ulduar) + const_cast(achievement)->Instance_ID = 631; // Correct map requirement (currently has Ulduar) TC_LOG_INFO("server.loading", ">> Loaded %u achievement references in %u ms.", count, GetMSTimeDiffToNow(oldMSTime)); } @@ -3447,7 +3447,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements() continue; } - else if (achievement->flags & (ACHIEVEMENT_FLAG_REALM_FIRST_REACH | ACHIEVEMENT_FLAG_REALM_FIRST_KILL | ACHIEVEMENT_FLAG_REALM_FIRST_GUILD)) + else if (achievement->Flags & (ACHIEVEMENT_FLAG_REALM_FIRST_REACH | ACHIEVEMENT_FLAG_REALM_FIRST_KILL | ACHIEVEMENT_FLAG_REALM_FIRST_GUILD)) m_allCompletedAchievements[achievementId] = uint32(0xFFFFFFFF); } while (result->NextRow()); @@ -3498,7 +3498,7 @@ void AchievementGlobalMgr::LoadRewards() continue; } - if (achievement->requiredFaction == ACHIEVEMENT_FACTION_ANY && (!reward.TitleID[0] ^ !reward.TitleID[1])) + if (achievement->Faction == ACHIEVEMENT_FACTION_ANY && (!reward.TitleID[0] ^ !reward.TitleID[1])) TC_LOG_ERROR("sql.sql", "Table `achievement_reward` (ID: %u) contains the title (A: %u H: %u) for only one team.", id, reward.TitleID[0], reward.TitleID[1]); if (reward.TitleID[0]) diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h index dc3ccb36b8..76b715519e 100644 --- a/src/server/game/Achievements/AchievementMgr.h +++ b/src/server/game/Achievements/AchievementMgr.h @@ -360,7 +360,7 @@ class TC_GAME_API AchievementGlobalMgr if (itr == m_allCompletedAchievements.end()) return false; - if (achievement->flags & ACHIEVEMENT_FLAG_REALM_FIRST_KILL) + if (achievement->Flags & ACHIEVEMENT_FLAG_REALM_FIRST_KILL) return itr->second != instanceId; return true; diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 1e2f601ed0..c44dbf246b 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -65,9 +65,9 @@ AuctionHouseObject* AuctionHouseMgr::GetAuctionsMap(uint32 factionTemplateId) FactionTemplateEntry const* uEntry = sFactionTemplateStore.LookupEntry(factionTemplateId); if (!uEntry) return &mNeutralAuctions; - else if (uEntry->ourMask & FACTION_MASK_ALLIANCE) + else if (uEntry->FactionGroup & FACTION_MASK_ALLIANCE) return &mAllianceAuctions; - else if (uEntry->ourMask & FACTION_MASK_HORDE) + else if (uEntry->FactionGroup & FACTION_MASK_HORDE) return &mHordeAuctions; else return &mNeutralAuctions; @@ -93,7 +93,7 @@ uint32 AuctionHouseMgr::GetAuctionDeposit(AuctionHouseEntry const* entry, uint32 if (MSV <= 0) return AH_MINIMUM_DEPOSIT * sWorld->getRate(RATE_AUCTION_DEPOSIT); - float multiplier = CalculatePct(float(entry->depositPercent), 3); + float multiplier = CalculatePct(float(entry->DepositRate), 3); uint32 timeHr = (((time / 60) / 60) / 12); uint32 deposit = uint32(MSV * multiplier * sWorld->getRate(RATE_AUCTION_DEPOSIT)); float remainderbase = float(MSV * multiplier * sWorld->getRate(RATE_AUCTION_DEPOSIT)) - deposit; @@ -578,9 +578,9 @@ AuctionHouseEntry const* AuctionHouseMgr::GetAuctionHouseEntry(uint32 factionTem FactionTemplateEntry const* u_entry = sFactionTemplateStore.LookupEntry(factionTemplateId); if (!u_entry) houseid = AUCTIONHOUSE_NEUTRAL; // goblin auction house - else if (u_entry->ourMask & FACTION_MASK_ALLIANCE) + else if (u_entry->FactionGroup & FACTION_MASK_ALLIANCE) houseid = AUCTIONHOUSE_ALLIANCE; // human auction house - else if (u_entry->ourMask & FACTION_MASK_HORDE) + else if (u_entry->FactionGroup & FACTION_MASK_HORDE) houseid = AUCTIONHOUSE_HORDE; // orc auction house else houseid = AUCTIONHOUSE_NEUTRAL; // goblin auction house @@ -800,13 +800,13 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player { ItemRandomSuffixEntry const* itemRandSuffix = sItemRandomSuffixStore.LookupEntry(-propRefID); if (itemRandSuffix) - suffix = itemRandSuffix->nameSuffix; + suffix = itemRandSuffix->Name; } else { ItemRandomPropertiesEntry const* itemRandProp = sItemRandomPropertiesStore.LookupEntry(propRefID); if (itemRandProp) - suffix = itemRandProp->nameSuffix; + suffix = itemRandProp->Name; } // dbc local name @@ -871,7 +871,7 @@ bool AuctionEntry::BuildAuctionInfo(WorldPacket& data, Item* sourceItem) const uint32 AuctionEntry::GetAuctionCut() const { - int32 cut = int32(CalculatePct(bid, auctionHouseEntry->cutPercent) * sWorld->getRate(RATE_AUCTION_CUT)); + int32 cut = int32(CalculatePct(bid, auctionHouseEntry->ConsignmentRate) * sWorld->getRate(RATE_AUCTION_CUT)); return std::max(cut, 0); } diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp index 6bb812e3f4..f3894e1467 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -664,7 +664,7 @@ void BfGraveyard::SetSpirit(Creature* spirit, TeamId team) float BfGraveyard::GetDistance(Player* player) { WorldSafeLocsEntry const* safeLoc = sWorldSafeLocsStore.LookupEntry(m_GraveyardId); - return player->GetDistance2d(safeLoc->x, safeLoc->y); + return player->GetDistance2d(safeLoc->Loc.X, safeLoc->Loc.Y); } void BfGraveyard::AddPlayer(ObjectGuid playerGuid) @@ -740,12 +740,12 @@ void BfGraveyard::RelocateDeadPlayers() continue; if (closestGrave) - player->TeleportTo(player->GetMapId(), closestGrave->x, closestGrave->y, closestGrave->z, player->GetOrientation()); + player->TeleportTo(player->GetMapId(), closestGrave->Loc.X, closestGrave->Loc.Y, closestGrave->Loc.Z, player->GetOrientation()); else { closestGrave = m_Bf->GetClosestGraveyard(player); if (closestGrave) - player->TeleportTo(player->GetMapId(), closestGrave->x, closestGrave->y, closestGrave->z, player->GetOrientation()); + player->TeleportTo(player->GetMapId(), closestGrave->Loc.X, closestGrave->Loc.Y, closestGrave->Loc.Z, player->GetOrientation()); } } } diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index bc6cbf786c..a623c9a1ed 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1441,7 +1441,7 @@ void Battleground::RelocateDeadPlayers(ObjectGuid guideGuid) closestGrave = GetClosestGraveyard(player); if (closestGrave) - player->TeleportTo(GetMapId(), closestGrave->x, closestGrave->y, closestGrave->z, player->GetOrientation()); + player->TeleportTo(GetMapId(), closestGrave->Loc.X, closestGrave->Loc.Y, closestGrave->Loc.Z, player->GetOrientation()); } ghostList.clear(); } @@ -1932,7 +1932,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/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index a1774fe541..557b20528a 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -49,7 +49,7 @@ bool BattlegroundTemplate::IsArena() const { - return BattlemasterEntry->type == MAP_ARENA; + return BattlemasterEntry->InstanceType == MAP_ARENA; } /*********************************************************/ @@ -752,8 +752,8 @@ bool BattlegroundMgr::CreateBattleground(BattlegroundTemplate const* bgTemplate) AddBattleground(bg); } - bg->SetMapId(bgTemplate->BattlemasterEntry->mapid[0]); - bg->SetName(bgTemplate->BattlemasterEntry->name); + bg->SetMapId(bgTemplate->BattlemasterEntry->MapID[0]); + bg->SetName(bgTemplate->BattlemasterEntry->Name); bg->SetInstanceID(0); bg->SetArenaorBGType(bgTemplate->IsArena()); bg->SetMinPlayersPerTeam(bgTemplate->MinPlayersPerTeam); @@ -837,7 +837,7 @@ void BattlegroundMgr::LoadBattlegroundTemplates() uint32 startId = fields[5].GetUInt32(); if (WorldSafeLocsEntry const* start = sWorldSafeLocsStore.LookupEntry(startId)) { - bgTemplate.StartLocation[TEAM_ALLIANCE].Relocate(start->x, start->y, start->z, fields[6].GetFloat()); + bgTemplate.StartLocation[TEAM_ALLIANCE].Relocate(start->Loc.X, start->Loc.Y, start->Loc.Z, fields[6].GetFloat()); } else { @@ -848,7 +848,7 @@ void BattlegroundMgr::LoadBattlegroundTemplates() startId = fields[7].GetUInt32(); if (WorldSafeLocsEntry const* start = sWorldSafeLocsStore.LookupEntry(startId)) { - bgTemplate.StartLocation[TEAM_HORDE].Relocate(start->x, start->y, start->z, fields[8].GetFloat()); + bgTemplate.StartLocation[TEAM_HORDE].Relocate(start->Loc.X, start->Loc.Y, start->Loc.Z, fields[8].GetFloat()); } else { @@ -862,8 +862,8 @@ void BattlegroundMgr::LoadBattlegroundTemplates() _battlegroundTemplates[bgTypeId] = bgTemplate; - if (bgTemplate.BattlemasterEntry->mapid[1] == -1) // in this case we have only one mapId - _battlegroundMapTemplates[bgTemplate.BattlemasterEntry->mapid[0]] = &_battlegroundTemplates[bgTypeId]; + if (bgTemplate.BattlemasterEntry->MapID[1] == -1) // in this case we have only one mapId + _battlegroundMapTemplates[bgTemplate.BattlemasterEntry->MapID[0]] = &_battlegroundTemplates[bgTypeId]; ++count; } @@ -1229,7 +1229,7 @@ BattlegroundTypeId BattlegroundMgr::GetRandomBG(BattlegroundTypeId bgTypeId) ids.reserve(16); std::vector weights; weights.reserve(16); - for (int32 mapId : bgTemplate->BattlemasterEntry->mapid) + for (int32 mapId : bgTemplate->BattlemasterEntry->MapID) { if (mapId == -1) break; diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index 518e2e39fd..8064fd0bcd 100644 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -204,8 +204,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/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index 573f57de4d..7d77b8a982 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -657,7 +657,7 @@ WorldSafeLocsEntry const* BattlegroundAB::GetClosestGraveyard(Player* player) WorldSafeLocsEntry const*entry = sWorldSafeLocsStore.LookupEntry(BG_AB_GraveyardIds[nodes[i]]); if (!entry) continue; - float dist = (entry->x - plr_x)*(entry->x - plr_x)+(entry->y - plr_y)*(entry->y - plr_y); + float dist = (entry->Loc.X - plr_x)*(entry->Loc.X - plr_x)+(entry->Loc.Y - plr_y)*(entry->Loc.Y - plr_y); if (mindist > dist) { mindist = dist; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index b253272647..3c93acbd3f 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -1116,7 +1116,7 @@ WorldSafeLocsEntry const* BattlegroundAV::GetClosestGraveyard(Player* player) player->GetPosition(x, y); pGraveyard = sWorldSafeLocsStore.LookupEntry(BG_AV_GraveyardIds[GetTeamIndexByTeamId(player->GetTeam())+7]); - minDist = (pGraveyard->x - x)*(pGraveyard->x - x)+(pGraveyard->y - y)*(pGraveyard->y - y); + minDist = (pGraveyard->Loc.X - x) * (pGraveyard->Loc.X - x) + (pGraveyard->Loc.Y - y) * (pGraveyard->Loc.Y - y); for (uint8 i = BG_AV_NODES_FIRSTAID_STATION; i <= BG_AV_NODES_FROSTWOLF_HUT; ++i) if (m_Nodes[i].Owner == player->GetTeam() && m_Nodes[i].State == POINT_CONTROLED) @@ -1124,7 +1124,7 @@ WorldSafeLocsEntry const* BattlegroundAV::GetClosestGraveyard(Player* player) entry = sWorldSafeLocsStore.LookupEntry(BG_AV_GraveyardIds[i]); if (entry) { - dist = (entry->x - x)*(entry->x - x)+(entry->y - y)*(entry->y - y); + dist = (entry->Loc.X - x) * (entry->Loc.X - x) +(entry->Loc.Y - y) * (entry->Loc.Y - y); if (dist < minDist) { minDist = dist; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBFG.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundBFG.cpp index 90a8e077d8..7a601e33ac 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundBFG.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundBFG.cpp @@ -637,7 +637,7 @@ WorldSafeLocsEntry const* BattlegroundBFG::GetClosestGraveyard(Player* player) WorldSafeLocsEntry const*entry = sWorldSafeLocsStore.LookupEntry(BG_BFG_GraveyardIds[nodes[i]]); if (!entry) continue; - float dist = (entry->x - plr_x)*(entry->x - plr_x) + (entry->y - plr_y)*(entry->y - plr_y); + float dist = (entry->Loc.X - plr_x)*(entry->Loc.X - plr_x) + (entry->Loc.Y - plr_y)*(entry->Loc.Y - plr_y); if (mindist > dist) { mindist = dist; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp index f277e94e83..e242f0ad3e 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp @@ -505,22 +505,22 @@ bool BattlegroundEY::SetupBattleground() TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Unknown trigger: %u", m_Points_Trigger[i]); continue; } - if (!AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3, Buff_Entries[0], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY) - || !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3 + 1, Buff_Entries[1], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY) - || !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3 + 2, Buff_Entries[2], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY) + if (!AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3, Buff_Entries[0], at->Pos.X, at->Pos.Y, at->Pos.Z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY) + || !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3 + 1, Buff_Entries[1], at->Pos.X, at->Pos.Y, at->Pos.Z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY) + || !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3 + 2, Buff_Entries[2], at->Pos.X, at->Pos.Y, at->Pos.Z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY) ) TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Could not spawn Speedbuff Fel Reaver."); } WorldSafeLocsEntry const* sg = sWorldSafeLocsStore.LookupEntry(EY_GRAVEYARD_MAIN_ALLIANCE); - if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, TEAM_ALLIANCE)) + if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_ALLIANCE, sg->Loc.X, sg->Loc.Y, sg->Loc.Z, 3.124139f, TEAM_ALLIANCE)) { TC_LOG_ERROR("sql.sql", "BatteGroundEY: Failed to spawn spirit guide. The battleground was not created."); return false; } sg = sWorldSafeLocsStore.LookupEntry(EY_GRAVEYARD_MAIN_HORDE); - if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_HORDE, sg->x, sg->y, sg->z, 3.193953f, TEAM_HORDE)) + if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_HORDE, sg->Loc.X, sg->Loc.Y, sg->Loc.Z, 3.193953f, TEAM_HORDE)) { TC_LOG_ERROR("sql.sql", "BatteGroundEY: Failed to spawn spirit guide. The battleground was not created."); return false; @@ -756,7 +756,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player* player, uint32 Point) DelCreature(Point); WorldSafeLocsEntry const* sg = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[Point].GraveyardId); - if (!sg || !AddSpiritGuide(Point, sg->x, sg->y, sg->z, 3.124139f, GetTeamIndexByTeamId(Team))) + if (!sg || !AddSpiritGuide(Point, sg->Loc.X, sg->Loc.Y, sg->Loc.Z, 3.124139f, GetTeamIndexByTeamId(Team))) TC_LOG_ERROR("bg.battleground", "BatteGroundEY: Failed to spawn spirit guide. point: %u, team: %u, graveyard_id: %u", Point, Team, m_CapturingPointTypes[Point].GraveyardId); @@ -907,7 +907,7 @@ WorldSafeLocsEntry const* BattlegroundEY::GetClosestGraveyard(Player* player) float plr_y = player->GetPositionY(); float plr_z = player->GetPositionZ(); - distance = (entry->x - plr_x)*(entry->x - plr_x) + (entry->y - plr_y)*(entry->y - plr_y) + (entry->z - plr_z)*(entry->z - plr_z); + distance = (entry->Loc.X - plr_x)*(entry->Loc.X - plr_x) + (entry->Loc.Y - plr_y)*(entry->Loc.Y - plr_y) + (entry->Loc.Z - plr_z)*(entry->Loc.Z - plr_z); nearestDistance = distance; for (uint8 i = 0; i < EY_POINTS_MAX; ++i) @@ -919,7 +919,7 @@ WorldSafeLocsEntry const* BattlegroundEY::GetClosestGraveyard(Player* player) TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Graveyard %u could not be found.", m_CapturingPointTypes[i].GraveyardId); else { - distance = (entry->x - plr_x)*(entry->x - plr_x) + (entry->y - plr_y)*(entry->y - plr_y) + (entry->z - plr_z)*(entry->z - plr_z); + distance = (entry->Loc.X - plr_x)*(entry->Loc.X - plr_x) + (entry->Loc.Y - plr_y)*(entry->Loc.Y - plr_y) + (entry->Loc.Z - plr_z)*(entry->Loc.Z - plr_z); if (distance < nearestDistance) { nearestDistance = distance; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index e37e770de2..6336578130 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -884,7 +884,7 @@ WorldSafeLocsEntry const* BattlegroundIC::GetClosestGraveyard(Player* player) WorldSafeLocsEntry const*entry = sWorldSafeLocsStore.LookupEntry(BG_IC_GraveyardIds[nodes[i]]); if (!entry) continue; - float dist = (entry->x - player_x)*(entry->x - player_x)+(entry->y - player_y)*(entry->y - player_y); + float dist = (entry->Loc.X - player_x)*(entry->Loc.X - player_x)+(entry->Loc.Y - player_y)*(entry->Loc.Y - player_y); if (mindist > dist) { mindist = dist; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index 9f4bd715ad..980f480e1f 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -205,12 +205,12 @@ bool BattlegroundSA::ResetObjs() if (i == BG_SA_BEACH_GY) { GraveyardStatus[i] = Attackers; - AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], Attackers); + AddSpiritGuide(i + BG_SA_MAXNPC, sg->Loc.X, sg->Loc.Y, sg->Loc.Z, BG_SA_GYOrientation[i], Attackers); } else { GraveyardStatus[i] = ((Attackers == TEAM_HORDE)? TEAM_ALLIANCE : TEAM_HORDE); - if (!AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], Attackers == TEAM_HORDE ? TEAM_ALLIANCE : TEAM_HORDE)) + if (!AddSpiritGuide(i + BG_SA_MAXNPC, sg->Loc.X, sg->Loc.Y, sg->Loc.Z, BG_SA_GYOrientation[i], Attackers == TEAM_HORDE ? TEAM_ALLIANCE : TEAM_HORDE)) TC_LOG_ERROR("bg.battleground", "SOTA: couldn't spawn GY: %u", i); } } @@ -712,7 +712,7 @@ WorldSafeLocsEntry const* BattlegroundSA::GetClosestGraveyard(Player* player) safeloc = BG_SA_GYEntries[BG_SA_DEFENDER_LAST_GY]; closest = sWorldSafeLocsStore.LookupEntry(safeloc); - nearest = player->GetExactDistSq(closest->x, closest->y, closest->z); + nearest = player->GetExactDistSq(closest->Loc.X, closest->Loc.Y, closest->Loc.Z); for (uint8 i = BG_SA_RIGHT_CAPTURABLE_GY; i < BG_SA_MAX_GY; i++) { @@ -720,7 +720,7 @@ WorldSafeLocsEntry const* BattlegroundSA::GetClosestGraveyard(Player* player) continue; ret = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]); - dist = player->GetExactDistSq(ret->x, ret->y, ret->z); + dist = player->GetExactDistSq(ret->Loc.X, ret->Loc.Y, ret->Loc.Z); if (dist < nearest) { closest = ret; @@ -820,7 +820,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source) return; } - AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], GraveyardStatus[i]); + AddSpiritGuide(i + BG_SA_MAXNPC, sg->Loc.X, sg->Loc.Y, sg->Loc.Z, BG_SA_GYOrientation[i], GraveyardStatus[i]); uint32 npc = 0; uint32 flag = 0; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundTP.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundTP.cpp index 71054edf88..9f22f31dd1 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundTP.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundTP.cpp @@ -290,7 +290,7 @@ bool BattlegroundTP::SetupBattleground() uint32 creatureType = team == TEAM_ALLIANCE ? TP_SPIRIT_ALLIANCE : TP_SPIRIT_HORDE; float orientation = float(team == TEAM_ALLIANCE ? M_PI : 0); - if (!AddSpiritGuide(creatureType, grave->x, grave->y, grave->z, orientation, TeamId(team))) + if (!AddSpiritGuide(creatureType, grave->Loc.X, grave->Loc.Y, grave->Loc.Z, orientation, TeamId(team))) { TC_LOG_ERROR("misc", "BatteGroundTP: Failed to spawn spirit guide id: %u. Battleground not created!", grave->ID); return false; @@ -503,7 +503,7 @@ WorldSafeLocsEntry const* BattlegroundTP::GetClosestGraveyard(Player* player) WorldSafeLocsEntry const* grave_enemy_base = sWorldSafeLocsStore.LookupEntry(BG_TP_GraveyardIds[TP_GRAVEYARD_FLAGROOM_ALLIANCE + (team ^ 1)]); WorldSafeLocsEntry const* grave_enemy_middle = sWorldSafeLocsStore.LookupEntry(BG_TP_GraveyardIds[TP_GRAVEYARD_MIDDLE_ALLIANCE + (team ^ 1)]); - if (player->GetDistance2d(grave_enemy_base->x, grave_enemy_base->y) < player->GetDistance2d(grave_enemy_middle->x, grave_enemy_middle->y)) + if (player->GetDistance2d(grave_enemy_base->Loc.X, grave_enemy_base->Loc.Y) < player->GetDistance2d(grave_enemy_middle->Loc.X, grave_enemy_middle->Loc.Y)) return sWorldSafeLocsStore.LookupEntry(BG_TP_GraveyardIds[TP_GRAVEYARD_START_ALLIANCE + team]); else return sWorldSafeLocsStore.LookupEntry(BG_TP_GraveyardIds[TP_GRAVEYARD_MIDDLE_ALLIANCE + team]); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp index ddc8e12139..8a3b86400f 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp @@ -696,14 +696,14 @@ bool BattlegroundWS::SetupBattleground() } WorldSafeLocsEntry const* sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_ALLIANCE); - if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, TEAM_ALLIANCE)) + if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_ALLIANCE, sg->Loc.X, sg->Loc.Y, sg->Loc.Z, 3.124139f, TEAM_ALLIANCE)) { TC_LOG_ERROR("sql.sql", "BatteGroundWS: Failed to spawn Alliance spirit guide! Battleground not created!"); return false; } sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_HORDE); - if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_HORDE, sg->x, sg->y, sg->z, 3.193953f, TEAM_HORDE)) + if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_HORDE, sg->Loc.X, sg->Loc.Y, sg->Loc.Z, 3.193953f, TEAM_HORDE)) { TC_LOG_ERROR("sql.sql", "BatteGroundWS: Failed to spawn Horde spirit guide! Battleground not created!"); return false; diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp index f3a5e3cc12..ef3deeda1b 100644 --- a/src/server/game/Chat/Channels/Channel.cpp +++ b/src/server/game/Chat/Channels/Channel.cpp @@ -44,13 +44,13 @@ Channel::Channel(uint32 channelId, uint32 team /*= 0*/, AreaTableEntry const* zo _zoneEntry(zoneEntry) { ChatChannelsEntry const* channelEntry = sChatChannelsStore.AssertEntry(channelId); - if (channelEntry->flags & CHANNEL_DBC_FLAG_TRADE) // for trade channel + if (channelEntry->Flags & CHANNEL_DBC_FLAG_TRADE) // for trade channel _channelFlags |= CHANNEL_FLAG_TRADE; - if (channelEntry->flags & CHANNEL_DBC_FLAG_CITY_ONLY2) // for city only channels + if (channelEntry->Flags & CHANNEL_DBC_FLAG_CITY_ONLY2) // for city only channels _channelFlags |= CHANNEL_FLAG_CITY; - if (channelEntry->flags & CHANNEL_DBC_FLAG_LFG) // for LFG channel + if (channelEntry->Flags & CHANNEL_DBC_FLAG_LFG) // for LFG channel _channelFlags |= CHANNEL_FLAG_LFG; else // for all other channels _channelFlags |= CHANNEL_FLAG_NOT_LFG; @@ -116,15 +116,15 @@ void Channel::GetChannelName(std::string& channelName, uint32 channelId, LocaleC if (channelId) { ChatChannelsEntry const* channelEntry = sChatChannelsStore.AssertEntry(channelId); - if (!(channelEntry->flags & CHANNEL_DBC_FLAG_GLOBAL)) + if (!(channelEntry->Flags & CHANNEL_DBC_FLAG_GLOBAL)) { - if (channelEntry->flags & CHANNEL_DBC_FLAG_CITY_ONLY) - channelName = Trinity::StringFormat(channelEntry->pattern, sObjectMgr->GetTrinityString(LANG_CHANNEL_CITY, locale)); + if (channelEntry->Flags & CHANNEL_DBC_FLAG_CITY_ONLY) + channelName = Trinity::StringFormat(channelEntry->Name, sObjectMgr->GetTrinityString(LANG_CHANNEL_CITY, locale)); else - channelName = Trinity::StringFormat(channelEntry->pattern, ASSERT_NOTNULL(zoneEntry)->AreaName); + channelName = Trinity::StringFormat(channelEntry->Name, ASSERT_NOTNULL(zoneEntry)->AreaName); } else - channelName = channelEntry->pattern; + channelName = channelEntry->Name; } } diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp index 38887d1cd6..e54f6b325a 100644 --- a/src/server/game/Chat/Channels/ChannelMgr.cpp +++ b/src/server/game/Chat/Channels/ChannelMgr.cpp @@ -77,7 +77,7 @@ Channel* ChannelMgr::GetJoinChannel(uint32 channelId, std::string const& name, A { ChatChannelsEntry const* channelEntry = sChatChannelsStore.AssertEntry(channelId); uint32 zoneId = zoneEntry ? zoneEntry->ID : 0; - if (channelEntry->flags & (CHANNEL_DBC_FLAG_GLOBAL | CHANNEL_DBC_FLAG_CITY_ONLY)) + if (channelEntry->Flags & (CHANNEL_DBC_FLAG_GLOBAL | CHANNEL_DBC_FLAG_CITY_ONLY)) zoneId = 0; std::pair key = std::make_pair(channelId, zoneId); @@ -116,7 +116,7 @@ Channel* ChannelMgr::GetChannel(uint32 channelId, std::string const& name, Playe { ChatChannelsEntry const* channelEntry = sChatChannelsStore.AssertEntry(channelId); uint32 zoneId = zoneEntry ? zoneEntry->ID : 0; - if (channelEntry->flags & (CHANNEL_DBC_FLAG_GLOBAL | CHANNEL_DBC_FLAG_CITY_ONLY)) + if (channelEntry->Flags & (CHANNEL_DBC_FLAG_GLOBAL | CHANNEL_DBC_FLAG_CITY_ONLY)) zoneId = 0; std::pair key = std::make_pair(channelId, zoneId); @@ -177,7 +177,7 @@ void ChannelMgr::LeftChannel(uint32 channelId, AreaTableEntry const* zoneEntry) { ChatChannelsEntry const* channelEntry = sChatChannelsStore.AssertEntry(channelId); uint32 zoneId = zoneEntry ? zoneEntry->ID : 0; - if (channelEntry->flags & (CHANNEL_DBC_FLAG_GLOBAL | CHANNEL_DBC_FLAG_CITY_ONLY)) + if (channelEntry->Flags & (CHANNEL_DBC_FLAG_GLOBAL | CHANNEL_DBC_FLAG_CITY_ONLY)) zoneId = 0; std::pair key = std::make_pair(channelId, zoneId); diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 32e0b68c89..acbec67a2a 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -985,7 +985,7 @@ uint32 ChatHandler::extractSpellIdFromLink(char* text) if (rank >= MAX_TALENT_RANK) return 0; - return talentEntry->RankID[rank]; + return talentEntry->SpellRank[rank]; } case SPELL_LINK_ENCHANT: case SPELL_LINK_TRADE: @@ -998,7 +998,7 @@ uint32 ChatHandler::extractSpellIdFromLink(char* text) if (!glyphPropEntry) return 0; - return glyphPropEntry->SpellId; + return glyphPropEntry->SpellID; } } diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index 76e7c162a5..234b7a13ca 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -184,7 +184,7 @@ bool ItemChatLink::ValidateName(char* buffer, char const* context) { ChatLink::ValidateName(buffer, context); - char* suffixStrings = _suffix ? _suffix->nameSuffix : (_property ? _property->nameSuffix : nullptr); + char* suffixStrings = _suffix ? _suffix->Name : (_property ? _property->Name : nullptr); bool res = (FormatName(LOCALE_enUS, nullptr, suffixStrings) == buffer); if (!res) @@ -300,15 +300,15 @@ bool SpellChatLink::ValidateName(char* buffer, char const* 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); + if (skillLineNameLength > 0 && strncmp(skillLine->DisplayName, buffer, skillLineNameLength) == 0) { // found the prefix, remove it to perform spellname validation below // -2 = strlen(": ") @@ -373,7 +373,7 @@ bool AchievementChatLink::ValidateName(char* buffer, char const* context) { ChatLink::ValidateName(buffer, context); - if (*_achievement->name && strcmp(_achievement->name, buffer) == 0) + if (*_achievement->Title && strcmp(_achievement->Title, buffer) == 0) return true; TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): linked achievement (id: %u) name wasn't found in any localization", context, _achievement->ID); @@ -452,10 +452,10 @@ bool TalentChatLink::Initialize(std::istringstream& iss) return false; } // Validate talent's spell - _spell = sSpellMgr->GetSpellInfo(talentInfo->RankID[0]); + _spell = sSpellMgr->GetSpellInfo(talentInfo->SpellRank[0]); if (!_spell) { - TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), talentInfo->RankID[0]); + TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), talentInfo->SpellRank[0]); return false; } // Delimiter @@ -523,10 +523,10 @@ bool GlyphChatLink::Initialize(std::istringstream& iss) return false; } // Validate glyph's spell - _spell = sSpellMgr->GetSpellInfo(_glyph->SpellId); + _spell = sSpellMgr->GetSpellInfo(_glyph->SpellID); if (!_spell) { - TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |glyph command", iss.str().c_str(), _glyph->SpellId); + TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |glyph command", iss.str().c_str(), _glyph->SpellID); return false; } return true; diff --git a/src/server/game/Combat/HostileRefManager.cpp b/src/server/game/Combat/HostileRefManager.cpp index 39bd2cfbf7..0a2ccdc331 100644 --- a/src/server/game/Combat/HostileRefManager.cpp +++ b/src/server/game/Combat/HostileRefManager.cpp @@ -131,7 +131,7 @@ void HostileRefManager::deleteReferencesForFaction(uint32 faction) while (ref) { HostileReference* nextRef = ref->next(); - if (ref->GetSource()->GetOwner()->GetFactionTemplateEntry()->faction == faction) + if (ref->GetSource()->GetOwner()->GetFactionTemplateEntry()->Faction == faction) { ref->removeReference(); delete ref; diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 364d6fdc77..8281e0dbcb 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -225,7 +225,6 @@ DBCStorage sSpellRuneCostStore(SpellRuneCostfmt); DBCStorage sSpellShapeshiftStore(SpellShapeshiftEntryfmt); DBCStorage sSpellShapeshiftFormStore(SpellShapeshiftFormfmt); DBCStorage sSpellVisualStore(SpellVisualfmt); -DBCStorage sStableSlotPricesStore(StableSlotPricesfmt); DBCStorage sSummonPropertiesStore(SummonPropertiesfmt); DBCStorage sTalentStore(TalentEntryfmt); TalentSpellPosMap sTalentSpellPosMap; @@ -486,7 +485,6 @@ void LoadDBCStores(const std::string& dataPath) LOAD_DBC(sSpellShapeshiftStore, "SpellShapeshift.dbc");//15595 LOAD_DBC(sSpellShapeshiftFormStore, "SpellShapeshiftForm.dbc");//15595 LOAD_DBC(sSpellVisualStore, "SpellVisual.dbc");//15595 - //LOAD_DBC(sStableSlotPricesStore, "StableSlotPrices.dbc"); LOAD_DBC(sSummonPropertiesStore, "SummonProperties.dbc");//15595 LOAD_DBC(sTalentStore, "Talent.dbc");//15595 LOAD_DBC(sTalentTabStore, "TalentTab.dbc");//15595 @@ -518,11 +516,11 @@ void LoadDBCStores(const std::string& dataPath) #undef LOAD_DBC_EXT for (CharStartOutfitEntry const* outfit : sCharStartOutfitStore) - sCharStartOutfitMap[outfit->Race | (outfit->Class << 8) | (outfit->Gender << 16)] = outfit; + sCharStartOutfitMap[outfit->RaceID | (outfit->ClassID << 8) | (outfit->SexID << 16)] = outfit; for (CharSectionsEntry const* entry : sCharSectionsStore) - if (entry->Race && ((1 << (entry->Race - 1)) & RACEMASK_ALL_PLAYABLE) != 0) //ignore Nonplayable races - sCharSectionMap.insert({ entry->GenType | (entry->Gender << 8) | (entry->Race << 16), entry }); + if (entry->RaceID && ((1 << (entry->RaceID - 1)) & RACEMASK_ALL_PLAYABLE) != 0) //ignore Nonplayable races + sCharSectionMap.insert({ entry->BaseSection | (entry->SexID << 8) | (entry->RaceID << 16), entry }); for (uint32 i = 0; i < MAX_CLASSES; ++i) for (uint32 j = 0; j < MAX_POWERS; ++j) @@ -534,44 +532,44 @@ void LoadDBCStores(const std::string& dataPath) { uint32 index = 0; for (uint32 j = 0; j < MAX_POWERS; ++j) - if (PowersByClass[power->classId][j] != MAX_POWERS) + if (PowersByClass[power->ClassID][j] != MAX_POWERS) ++index; - PowersByClass[power->classId][power->power] = index; + PowersByClass[power->ClassID][power->PowerType] = index; } } for (EmotesTextSoundEntry const* entry : sEmotesTextSoundStore) - sEmotesTextSoundMap[EmotesTextSoundKey(entry->EmotesTextId, entry->RaceId, entry->SexId)] = entry; + sEmotesTextSoundMap[EmotesTextSoundKey(entry->EmotesTextID, entry->RaceID, entry->SexID)] = entry; for (FactionEntry const* faction : sFactionStore) { - if (faction->team) + if (faction->ParentFactionID) { - SimpleFactionsList& flist = sFactionTeamMap[faction->team]; + SimpleFactionsList& flist = sFactionTeamMap[faction->ParentFactionID]; flist.push_back(faction->ID); } } for (GameObjectDisplayInfoEntry const* info : sGameObjectDisplayInfoStore) { - if (info->maxX < info->minX) - std::swap(*(float*)(&info->maxX), *(float*)(&info->minX)); - if (info->maxY < info->minY) - std::swap(*(float*)(&info->maxY), *(float*)(&info->minY)); - if (info->maxZ < info->minZ) - std::swap(*(float*)(&info->maxZ), *(float*)(&info->minZ)); + if (info->GeoBoxMax.X < info->GeoBoxMin.X) + std::swap(*(float*)(&info->GeoBoxMax.X), *(float*)(&info->GeoBoxMin.X)); + if (info->GeoBoxMax.Y < info->GeoBoxMin.Y) + std::swap(*(float*)(&info->GeoBoxMax.Y), *(float*)(&info->GeoBoxMin.Y)); + if (info->GeoBoxMax.Z < info->GeoBoxMin.Z) + std::swap(*(float*)(&info->GeoBoxMax.Z), *(float*)(&info->GeoBoxMin.Z)); } // fill data sMapDifficultyMap[MAKE_PAIR32(0, 0)] = MapDifficulty(0, 0, false); // map 0 is missing from MapDifficulty.dbc use this till its ported to sql for (MapDifficultyEntry const* entry : sMapDifficultyStore) - sMapDifficultyMap[MAKE_PAIR32(entry->MapId, entry->Difficulty)] = MapDifficulty(entry->resetTime, entry->maxPlayers, entry->areaTriggerText[0] > 0); + sMapDifficultyMap[MAKE_PAIR32(entry->MapID, entry->Difficulty)] = MapDifficulty(entry->RaidDuration, entry->MaxPlayers, !std::string(entry->Message).empty()); sMapDifficultyMap.erase(MAKE_PAIR32(189, 1)); // Scarlet Monastry has a incorrect heroic entry so we drop it for (NameGenEntry const* entry : sNameGenStore) - sGenNameVectoArraysMap[entry->race].stringVectorArray[entry->gender].push_back(std::string(entry->name)); + sGenNameVectoArraysMap[entry->RaceID].stringVectorArray[entry->Sex].push_back(std::string(entry->Name)); for (NamesProfanityEntry const* namesProfanity : sNamesProfanityStore) { @@ -602,39 +600,39 @@ void LoadDBCStores(const std::string& dataPath) } for (PhaseGroupEntry const* group : sPhaseGroupStore) - if (PhaseEntry const* phase = sPhaseStore.LookupEntry(group->PhaseId)) - sPhasesByGroup[group->GroupId].push_back(phase->ID); + if (PhaseEntry const* phase = sPhaseStore.LookupEntry(group->PhaseID)) + sPhasesByGroup[group->PhaseGroupID].push_back(phase->ID); for (PvPDifficultyEntry const* entry : sPvPDifficultyStore) - if (entry->bracketId > MAX_BATTLEGROUND_BRACKETS) + if (entry->RangeIndex > MAX_BATTLEGROUND_BRACKETS) ASSERT(false && "Need update MAX_BATTLEGROUND_BRACKETS by DBC data"); for (SkillRaceClassInfoEntry const* entry : sSkillRaceClassInfoStore) - if (sSkillLineStore.LookupEntry(entry->SkillId)) - SkillRaceClassInfoBySkill.emplace(entry->SkillId, entry); + if (sSkillLineStore.LookupEntry(entry->SkillID)) + SkillRaceClassInfoBySkill.emplace(entry->SkillID, entry); // Must be done when sSkillLineAbilityStore, sSpellStore, sSpellLevelsStore and sCreatureFamilyStore are all loaded for (SkillLineAbilityEntry const* skillLine : sSkillLineAbilityStore) { - SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->spellId); + SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->Spell); if (!spellInfo) continue; - SpellLevelsEntry const* levels = sSpellLevelsStore.LookupEntry(spellInfo->SpellLevelsId); - if (spellInfo->SpellLevelsId && (!levels || levels->spellLevel)) + SpellLevelsEntry const* levels = sSpellLevelsStore.LookupEntry(spellInfo->LevelsID); + if (spellInfo->LevelsID && (!levels || levels->SpellLevel)) continue; if (spellInfo && spellInfo->Attributes & SPELL_ATTR0_PASSIVE) { for (CreatureFamilyEntry const* cFamily : sCreatureFamilyStore) { - 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->AcquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) continue; - sPetFamilySpellsStore[cFamily->ID].insert(spellInfo->Id); + sPetFamilySpellsStore[cFamily->ID].insert(spellInfo->ID); } } } @@ -643,33 +641,33 @@ void LoadDBCStores(const std::string& dataPath) for (SpellDifficultyEntry const* spellDiff : sSpellDifficultyStore) { SpellDifficultyEntry newEntry; - memset(newEntry.SpellID, 0, 4 * sizeof(uint32)); + memset(newEntry.DifficultySpellID, 0, 4 * sizeof(uint32)); for (uint32 x = 0; x < MAX_DIFFICULTY; ++x) { - if (spellDiff->SpellID[x] <= 0 || !sSpellStore.LookupEntry(spellDiff->SpellID[x])) + if (spellDiff->DifficultySpellID[x] <= 0 || !sSpellStore.LookupEntry(spellDiff->DifficultySpellID[x])) { - if (spellDiff->SpellID[x] > 0)//don't show error if spell is <= 0, not all modes have spells and there are unknown negative values - TC_LOG_ERROR("sql.sql", "spelldifficulty_dbc: spell %i at field id:%u at spellid%i does not exist in SpellStore (spell.dbc), loaded as 0", spellDiff->SpellID[x], spellDiff->ID, x); - newEntry.SpellID[x] = 0;//spell was <= 0 or invalid, set to 0 + if (spellDiff->DifficultySpellID[x] > 0)//don't show error if spell is <= 0, not all modes have spells and there are unknown negative values + TC_LOG_ERROR("sql.sql", "spelldifficulty_dbc: spell %i at field id:%u at spellid%i does not exist in SpellStore (spell.dbc), loaded as 0", spellDiff->DifficultySpellID[x], spellDiff->ID, x); + newEntry.DifficultySpellID[x] = 0;//spell was <= 0 or invalid, set to 0 } else - newEntry.SpellID[x] = spellDiff->SpellID[x]; + newEntry.DifficultySpellID[x] = spellDiff->DifficultySpellID[x]; } - if (newEntry.SpellID[0] <= 0 || newEntry.SpellID[1] <= 0)//id0-1 must be always set! + if (newEntry.DifficultySpellID[0] <= 0 || newEntry.DifficultySpellID[1] <= 0)//id0-1 must be always set! continue; for (uint32 x = 0; x < MAX_DIFFICULTY; ++x) - if (newEntry.SpellID[x]) - sSpellMgr->SetSpellDifficultyId(uint32(newEntry.SpellID[x]), spellDiff->ID); + if (newEntry.DifficultySpellID[x]) + sSpellMgr->SetSpellDifficultyId(uint32(newEntry.DifficultySpellID[x]), spellDiff->ID); } // create talent spells set for (TalentEntry const* talentInfo : sTalentStore) { for (uint8 j = 0; j < MAX_TALENT_RANK; ++j) - if (talentInfo->RankID[j]) - sTalentSpellPosMap[talentInfo->RankID[j]] = TalentSpellPos(talentInfo->TalentID, j); + if (talentInfo->SpellRank[j]) + sTalentSpellPosMap[talentInfo->SpellRank[j]] = TalentSpellPos(talentInfo->ID, j); } // prepare fast data access to bit pos of talent ranks for use at inspecting @@ -684,15 +682,15 @@ void LoadDBCStores(const std::string& dataPath) // store class talent tab pages for (uint32 cls = 1; cls < MAX_CLASSES; ++cls) if (talentTabInfo->ClassMask & (1 << (cls - 1))) - sTalentTabPages[cls][talentTabInfo->tabpage] = talentTabInfo->TalentTabID; + sTalentTabPages[cls][talentTabInfo->OrderIndex] = talentTabInfo->ID; } } for (TalentTreePrimarySpellsEntry const* talentSpell : sTalentTreePrimarySpellsStore) - sTalentTreePrimarySpellsMap[talentSpell->TalentTree].push_back(talentSpell->SpellId); + sTalentTreePrimarySpellsMap[talentSpell->TalentTabID].push_back(talentSpell->SpellID); for (TaxiPathEntry const* entry : sTaxiPathStore) - sTaxiPathSetBySource[entry->from][entry->to] = TaxiPathBySourceAndDestination(entry->ID, entry->price); + sTaxiPathSetBySource[entry->FromTaxiNode][entry->ToTaxiNode] = TaxiPathBySourceAndDestination(entry->ID, entry->Cost); uint32 pathCount = sTaxiPathStore.GetNumRows(); // Calculate path nodes count @@ -759,7 +757,7 @@ void LoadDBCStores(const std::string& dataPath) sDeathKnightTaxiNodesMask[field] |= submask; // old continent node (+ nodes virtually at old continents, check explicitly to avoid loading map files for zone info) - if (node->map_id < 2 || node->ID == 82 || node->ID == 83 || node->ID == 93 || node->ID == 94) + if (node->ContinentID < 2 || node->ID == 82 || node->ID == 83 || node->ID == 93 || node->ID == 94) sOldContinentsNodesMask[field] |= submask; // fix DK node at Ebon Hold and Shadow Vault flight master @@ -769,7 +767,7 @@ void LoadDBCStores(const std::string& dataPath) } for (WMOAreaTableEntry const* entry : sWMOAreaTableStore) - sWMOAreaInfoByTripple[WMOAreaTableKey(entry->rootId, entry->adtId, entry->groupId)] = entry; + sWMOAreaInfoByTripple[WMOAreaTableKey(entry->WMOID, entry->NameSetID, entry->WMOGroupID)] = entry; // error checks if (bad_dbc_files.size() >= DBCFileCount) @@ -854,13 +852,13 @@ WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid char const* GetRaceName(uint8 race, uint8 /*locale*/) { ChrRacesEntry const* raceEntry = sChrRacesStore.LookupEntry(race); - return raceEntry ? raceEntry->name : nullptr; + return raceEntry ? raceEntry->Name : nullptr; } char const* GetClassName(uint8 class_, uint8 /*locale*/) { ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(class_); - return classEntry ? classEntry->name : nullptr; + return classEntry ? classEntry->Name : nullptr; } uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId) @@ -869,7 +867,7 @@ uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId) return mapid; if (WorldMapAreaEntry const* wma = sWorldMapAreaStore.LookupEntry(zoneId)) - return wma->virtual_map_id >= 0 ? wma->virtual_map_id : wma->map_id; + return wma->DisplayMapID >= 0 ? wma->DisplayMapID : wma->MapID; return mapid; } @@ -934,10 +932,10 @@ bool IsTotemCategoryCompatibleWith(uint32 itemTotemCategoryId, uint32 requiredTo if (!reqEntry) return false; - if (itemEntry->categoryType != reqEntry->categoryType) + if (itemEntry->TotemCategoryType != reqEntry->TotemCategoryType) return false; - return (itemEntry->categoryMask & reqEntry->categoryMask) == reqEntry->categoryMask; + return (itemEntry->TotemCategoryMask & reqEntry->TotemCategoryMask) == reqEntry->TotemCategoryMask; } void Zone2MapCoordinates(float& x, float& y, uint32 zone) @@ -949,8 +947,8 @@ void Zone2MapCoordinates(float& x, float& y, uint32 zone) return; std::swap(x, y); // at client map coords swapped - x = x*((maEntry->x2-maEntry->x1)/100)+maEntry->x1; - y = y*((maEntry->y2-maEntry->y1)/100)+maEntry->y1; // client y coord from top to down + x = x * ((maEntry->LocBottom - maEntry->LocTop) / 100) + maEntry->LocTop; + y = y * ((maEntry->LocRight - maEntry->LocLeft) / 100) + maEntry->LocLeft; // client y coord from top to down } void Map2ZoneCoordinates(float& x, float& y, uint32 zone) @@ -961,8 +959,8 @@ void Map2ZoneCoordinates(float& x, float& y, uint32 zone) if (!maEntry) return; - x = (x-maEntry->x1)/((maEntry->x2-maEntry->x1)/100); - y = (y-maEntry->y1)/((maEntry->y2-maEntry->y1)/100); // client y coord from top to down + x = (x - maEntry->LocTop) / ((maEntry->LocBottom - maEntry->LocTop) / 100); + y = (y - maEntry->LocLeft) / ((maEntry->LocRight - maEntry->LocLeft) / 100); // client y coord from top to down std::swap(x, y); // client have map coords swapped } @@ -1004,15 +1002,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; } } @@ -1024,7 +1022,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 nullptr; @@ -1047,7 +1045,7 @@ std::vector const* GetTalentTreePrimarySpells(uint32 talentTree) uint32 GetLiquidFlags(uint32 liquidType) { if (LiquidTypeEntry const* liq = sLiquidTypeStore.LookupEntry(liquidType)) - return 1 << liq->Type; + return 1 << liq->SoundBank; return 0; } @@ -1066,7 +1064,7 @@ CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSectionType genType std::pair eqr = sCharSectionMap.equal_range(uint32(genType) | uint32(gender << 8) | uint32(race << 16)); for (CharSectionsMap::const_iterator itr = eqr.first; itr != eqr.second; ++itr) { - if (itr->second->Type == type && itr->second->Color == color) + if (itr->second->VariationIndex == type && itr->second->ColorIndex == color) return itr->second; } @@ -1239,7 +1237,7 @@ LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty) if (!dungeon) continue; - if (dungeon->map == int32(mapId) && Difficulty(dungeon->difficulty) == difficulty) + if (dungeon->MapID == int32(mapId) && Difficulty(dungeon->DifficultyID) == difficulty) return dungeon; } @@ -1254,8 +1252,8 @@ uint32 GetDefaultMapLight(uint32 mapId) if (!light) continue; - if (light->MapId == mapId && light->X == 0.0f && light->Y == 0.0f && light->Z == 0.0f) - return light->Id; + if (light->ContinentID == mapId && light->X == 0.0f && light->Y == 0.0f && light->Z == 0.0f) + return light->ID; } return 0; @@ -1373,14 +1371,14 @@ uint32 ItemTemplate::GetEffectiveArmor(Player const* owner) const if (SubClass < ITEM_SUBCLASS_ARMOR_CLOTH || SubClass > ITEM_SUBCLASS_ARMOR_PLATE) return 0; - return uint32(armorQuality->Value[Quality] * armorTotal->Value[SubClass - ITEM_SUBCLASS_ARMOR_CLOTH] * location->Value[SubClass - ITEM_SUBCLASS_ARMOR_CLOTH] + 0.5f); + return uint32(armorQuality->Qualitymod[Quality] * armorTotal->Value[SubClass - ITEM_SUBCLASS_ARMOR_CLOTH] * location->Value[SubClass - ITEM_SUBCLASS_ARMOR_CLOTH] + 0.5f); } ItemArmorShieldEntry const* shield = sItemArmorShieldStore.LookupEntry(level); if (!shield) return 0; - return uint32(shield->Value[Quality] + 0.5f); + return uint32(shield->Quality[Quality] + 0.5f); } bool ItemTemplate::GetWeaponDamage(Player const* owner, float& minValue, float& maxValue, float& dps) const @@ -1449,9 +1447,9 @@ bool ItemTemplate::GetWeaponDamage(Player const* owner, float& minValue, float& if (!damageInfo) return false; - dps = damageInfo->DPS[Quality]; + dps = damageInfo->Quality[Quality]; - float avgDamage = Delay * damageInfo->DPS[Quality] * 0.001f; + float avgDamage = Delay * damageInfo->Quality[Quality] * 0.001f; float scaled_stat = std::floor((StatScalingFactor * 0.5f + 1.f) * avgDamage + 0.5f); if (Delay && ArmorDamageModifier != 0.f) { @@ -1556,10 +1554,10 @@ uint32 ItemTemplate::GetStatValue(uint32 index, Player const* owner /*= nullptr* // req. check at equip, but allow use for extended range if range limit max level, set proper level uint32 ssdLevel = owner->getLevel(); - if (ssd && ssdLevel > ssd->MaxLevel) - ssdLevel = ssd->MaxLevel; - if (ssd && ssdLevel < ssd->MinLevel) - ssdLevel = ssd->MinLevel; + if (ssd && ssdLevel > ssd->Maxlevel) + ssdLevel = ssd->Maxlevel; + if (ssd && ssdLevel < ssd->Minlevel) + ssdLevel = ssd->Minlevel; if (ssdLevel < 1) ssdLevel = 1; @@ -1568,10 +1566,10 @@ uint32 ItemTemplate::GetStatValue(uint32 index, Player const* owner /*= nullptr* uint32 statBaseValue = 0; if (ssd && ssv) { - if (ssd->StatMod[index] < 0) + if (ssd->StatID[index] < 0) return 0; // What do we do ? - statBaseValue = ssv->GetStatMultiplier(InventoryType) * ssd->Modifier[index] / 10000; + statBaseValue = ssv->GetStatMultiplier(InventoryType) * ssd->Bonus[index] / 10000; } else { diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index 607408d72b..1de74205fc 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -238,7 +238,6 @@ TC_GAME_API extern DBCStorage sSpellReagentsStore TC_GAME_API extern DBCStorage sSpellScalingStore; TC_GAME_API extern DBCStorage sSpellTargetRestrictionsStore; TC_GAME_API extern DBCStorage sSpellTotemsStore; -//TC_GAME_API extern DBCStorage sStableSlotPricesStore; TC_GAME_API extern DBCStorage sSummonPropertiesStore; TC_GAME_API extern DBCStorage sTalentStore; TC_GAME_API extern DBCStorage sTalentTabStore; diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 3881fa06e7..adfed8370a 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -31,35 +31,35 @@ struct AchievementEntry { - uint32 ID; // 0 - int32 requiredFaction; // 1 -1=all, 0=horde, 1=alliance - int32 mapID; // 2 -1=none - //uint32 parentAchievement; // 3 its Achievement parent (can`t start while parent uncomplete, use its Criteria if don`t have own, use its progress on begin) - char* name; // 4 - //char* description; // 5 - uint32 categoryId; // 6 - uint32 points; // 7 reward points - //uint32 OrderInCategory; // 8 - uint32 flags; // 9 - //uint32 icon; // 10 icon (from SpellIcon.dbc) - //char* reward; // 11 - uint32 count; // 12 - need this count of completed criterias (own or referenced achievement criterias) - uint32 refAchievement; // 13 - referenced achievement (counting of all completed criterias) + uint32 ID; // 0 + int32 Faction; // 1 -1=all, 0=horde, 1=alliance + int32 Instance_ID; // 2 -1=none + //uint32 Supercedes; // 3 its Achievement parent (can`t start while parent uncomplete, use its Criteria if don`t have own, use its progress on begin) + char* Title; // 4 + //char* Description; // 5 + uint32 Category; // 6 + uint32 Points; // 7 reward points + //uint32 Ui_order; // 8 + uint32 Flags; // 9 + //uint32 IconID; // 10 icon (from SpellIcon.dbc) + //char* Reward; // 11 + uint32 Minimum_criteria; // 12 - need this count of completed criterias (own or referenced achievement criterias) + uint32 Shares_criteria; // 13 - referenced achievement (counting of all completed criterias) }; struct AchievementCategoryEntry { - uint32 ID; // 0 - uint32 parentCategory; // 1 -1 for main category - //char* name; // 2 - //uint32 sortOrder; // 3 + uint32 ID; // 0 + uint32 Parent; // 1 -1 for main category + //char* Name; // 2 + //uint32 Ui_order; // 3 }; struct AchievementCriteriaEntry { uint32 ID; // 0 - uint32 achievement; // 1 - uint32 type; // 2 + uint32 Achievement_ID; // 1 + uint32 Type; // 2 union { // ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE = 0 @@ -605,26 +605,26 @@ struct AchievementCriteriaEntry uint32 additionalRequirement_value; } additionalRequirements[MAX_CRITERIA_REQUIREMENTS]; - char* name; // 9 m_description_lang - uint32 completionFlag; // 10 m_flags - uint32 timedCriteriaStartType; // 11 m_timer_start_event Only appears with timed achievements, seems to be the type of starting a timed Achievement, only type 1 and some of type 6 need manual starting + char* Description; // 9 + uint32 Flags; // 10 + uint32 Timer_start_event; // 11 Only appears with timed achievements, seems to be the type of starting a timed Achievement, only type 1 and some of type 6 need manual starting // 1: ByEventId(?) (serverside IDs), 2: ByQuestId, 5: ByCastSpellId(?) // 6: BySpellIdTarget(some of these are unknown spells, some not, some maybe spells) // 7: ByKillNpcId, 9: ByUseItemId - uint32 timedCriteriaMiscId; // 12 m_timer_asset_id Alway appears with timed events, used internally to start the achievement, store - uint32 timeLimit; // 13 m_timer_time time limit in seconds - uint32 showOrder; // 14 m_ui_order also used in achievement shift-links as index in state bitmask + uint32 Timer_asset_ID; // 12 Alway appears with timed events, used internally to start the achievement, store + uint32 Timer_time; // 13 time limit in seconds + uint32 Ui_order; // 14 also used in achievement shift-links as index in state bitmask //uint32 unk1; // 15 only one value, still unknown //uint32 unk2; // 16 all zeros - uint32 additionalConditionType[MAX_ADDITIONAL_CRITERIA_CONDITIONS]; // 17-19 - uint32 additionalConditionValue[MAX_ADDITIONAL_CRITERIA_CONDITIONS]; // 20-22 + uint32 AdditionalConditionType[MAX_ADDITIONAL_CRITERIA_CONDITIONS]; // 17-19 + uint32 AdditionalConditionValue[MAX_ADDITIONAL_CRITERIA_CONDITIONS]; // 20-22 }; struct AnimKitEntry { - uint32 ID; // 0 - //uint32 OneShotDuration; // 1 - //uint32 OneShotStopAnimKitID; // 2 + uint32 ID; // 0 + //uint32 OneShotDuration; // 1 + //uint32 OneShotStopAnimKitID; // 2 }; struct AreaTableEntry @@ -633,17 +633,17 @@ struct AreaTableEntry uint32 ContinentID; // 1 uint32 ParentAreaID; // 2 if 0 then it's zone, else it's zone id of this area uint32 AreaBit; // 3 - uint32 Flags; // 4, - uint32 SoundProviderPref; // 5, - uint32 SoundProviderPrefUnderwater; // 6, - uint32 AmbienceID; // 7, - uint32 ZoneMusic; // 8, - uint32 IntroSound; // 9, + uint32 Flags; // 4 + uint32 SoundProviderPref; // 5 + uint32 SoundProviderPrefUnderwater; // 6 + uint32 AmbienceID; // 7 + uint32 ZoneMusic; // 8 + uint32 IntroSound; // 9 uint32 ExplorationLevel; // 10 char const* AreaName; // 11 uint32 FactionGroupMask; // 12 uint32 LiquidTypeID[4]; // 13-16 liquid override by type - float MinElevation; // 17, + float MinElevation; // 17 float AmbientMultiplier; // 18 client only? uint32 LightID; // 19 uint32 MountFlags; // 20 @@ -677,117 +677,116 @@ struct AreaTableEntry struct AreaGroupEntry { - uint32 AreaGroupId; // 0 - uint32 AreaId[MAX_GROUP_AREA_IDS]; // 1-6 - uint32 nextGroup; // 7 index of next group + uint32 ID; // 0 + uint32 AreaID[MAX_GROUP_AREA_IDS]; // 1-6 + uint32 NextAreaID; // 7 index of next group }; struct AreaPOIEntry { - uint32 id; //0 - uint32 icon[11]; //1-11 - float x; //12 - float y; //13 - uint32 mapId; //14 - //uint32 val1; //15 - uint32 zoneId; //16 - //char* name; //17 - name - //char* name2; //18 - name2 - uint32 worldState; //19 - //uint32 val2; //20 - //uint32 unk; //21 + uint32 ID; // 0 + // uint32 Importance // 1 + uint32 Icon[9]; // 2-10 + // uint32 FactionID // 11 + DBCPosition2D Pos; // 12 - 13 + uint32 ContinentID; // 14 + // uint32 Flags; // 15 + uint32 AreaID; // 16 + //char* Name; // 17 + //char* Description; // 18 + uint32 WorldStateID; // 19 + //uint32 WorldMapLink; // 20 + //uint32 PortLocID; // 21 }; struct AreaTriggerEntry { - uint32 id; // 0 m_ID - uint32 mapid; // 1 m_ContinentID - float x; // 2 m_x - float y; // 3 m_y - float z; // 4 m_z - uint32 PhaseUseFlags; // 5 PhaseUseFlags - uint32 PhaseID; // 6 PhaseID - uint32 PhaseGroupID; // 7 PhaseGroupID - float radius; // 8 m_radius - float box_x; // 9 m_box_length - float box_y; // 10 m_box_width - float box_z; // 11 m_box_heigh - float box_orientation; // 12 m_box_yaw + uint32 ID; // 0 + uint32 ContinentID; // 1 + DBCPosition3D Pos; // 2 - 4 + uint32 PhaseUseFlags; // 5 + uint32 PhaseID; // 6 + uint32 PhaseGroupID; // 7 + float Radius; // 8 + float Box_length; // 9 + float Box_width; // 10 + float Box_height; // 11 + float Box_yaw; // 12 }; struct ArmorLocationEntry { - uint32 InventoryType; // 0 - float Value[5]; // 1-5 multiplier for armor types (cloth...plate, no armor?) + uint32 ID; // 0 + float Value[5]; // 1-5 multiplier for armor types (cloth...plate, no armor?) }; struct AuctionHouseEntry { - uint32 houseId; // 0 index - uint32 faction; // 1 id of faction.dbc for player factions associated with city - uint32 depositPercent; // 2 1/3 from real - uint32 cutPercent; // 3 - //char* name; // 4 + uint32 ID; // 0 index + uint32 FactionID; // 1 id of faction.dbc for player factions associated with city + uint32 DepositRate; // 2 1/3 from real + uint32 ConsignmentRate; // 3 + //char* Name; // 4 }; struct BankBagSlotPricesEntry { - uint32 ID; - uint32 price; + uint32 ID; // 0 + uint32 Cost; // 1 }; struct BannedAddOnsEntry { - uint32 Id; - // uint32 NameMD5[4]; - // uint32 VersionMD5[4]; - // uint32 Timestamp; - // uint32 State; + uint32 ID; // 0 + // uint32 NameMD5[4]; // 1 - 4 + // uint32 VersionMD5[4]; // 5 - 8 + // uint32 LastModified; // 9 + // uint32 Flags; // 10 }; struct BarberShopStyleEntry { - uint32 Id; // 0 - uint32 type; // 1 value 0 -> hair, value 2 -> facialhair - //char* name; // 2 m_DisplayName_lang - //uint32 unk_name; // 3 m_Description_lang - //float CostMultiplier; // 4 m_Cost_Modifier - uint32 race; // 5 m_race - uint32 gender; // 6 m_sex - uint32 hair_id; // 7 m_data (real ID to hair/facial hair) + uint32 ID; // 0 + uint32 Type; // 1 value 0 -> hair, value 2 -> facialhair + //char* DisplayName; // 2 + //uint32 Description; // 3 + //float Cost_Modifier; // 4 + uint32 Race; // 5 + uint32 Sex; // 6 + uint32 Data; // 7 }; struct BattlemasterListEntry { - uint32 id; // 0 - int32 mapid[8]; // 1-8 mapid - uint32 type; // 9 map type (3 - BG, 4 - arena) - //uint32 canJoinAsGroup; // 10 (0 or 1) - char* name; // 11 - uint32 maxGroupSize; // 12 maxGroupSize, used for checking if queue as group - uint32 HolidayWorldStateId; // 13 new 3.1 - uint32 minLevel; // 14, min level (sync with PvPDifficulty.dbc content) - uint32 maxLevel; // 15, max level (sync with PvPDifficulty.dbc content) - //uint32 maxGroupSizeRated; // 16 4.0.1 - //uint32 MinPlayers; // 17 - 4.0.6.13596 - //uint32 maxPlayers; // 18 4.0.1 - //uint32 Flags; // 19 4.0.3, value 2 for Rated Battlegrounds + uint32 ID; // 0 + int32 MapID[8]; // 1-8 + uint32 InstanceType; // 9 map type (3 - BG, 4 - arena) + //uint32 GroupsAllowed; // 10 (0 or 1) + char* Name; // 11 + uint32 MaxGroupSize; // 12 maxGroupSize, used for checking if queue as group + uint32 HolidayWorldState; // 13 new 3.1 + uint32 Minlevel; // 14, min level (sync with PvPDifficulty.dbc content) + uint32 Maxlevel; // 15, max level (sync with PvPDifficulty.dbc content) + //uint32 RatedPlayers; // 16 4.0.1 + //uint32 MinPlayers; // 17 - 4.0.6.13596 + //uint32 MaxPlayers; // 18 4.0.1 + //uint32 Flags; // 19 4.0.3, value 2 for Rated Battlegrounds }; #define MAX_OUTFIT_ITEMS 24 struct CharStartOutfitEntry { - //uint32 Id; // 0 - uint8 Race; // 1 - uint8 Class; // 2 - uint8 Gender; // 3 - //uint8 Unused; // 4 - int32 ItemId[MAX_OUTFIT_ITEMS]; // 5-28 - //int32 ItemDisplayId[MAX_OUTFIT_ITEMS]; // 29-52 not required at server side - //int32 ItemInventorySlot[MAX_OUTFIT_ITEMS]; // 53-76 not required at server side - uint32 PetDisplayId; // 77 Pet Model ID for starting pet - uint32 PetFamilyEntry; // 78 Pet Family Entry for starting pet + //uint32 ID; // 0 + uint8 RaceID; // 1 + uint8 ClassID; // 2 + uint8 SexID; // 3 + //uint8 OutfitID; // 4 + int32 ItemID[MAX_OUTFIT_ITEMS]; // 5-28 + //int32 DisplayItemID[MAX_OUTFIT_ITEMS]; // 29-52 not required at server side + //int32 InventoryType[MAX_OUTFIT_ITEMS]; // 53-76 not required at server side + uint32 PetDisplayID; // 77 Pet Model ID for starting pet + uint32 PetFamilyID; // 78 Pet Family Entry for starting pet }; enum CharSectionFlags @@ -807,97 +806,87 @@ enum CharSectionType struct CharSectionsEntry { - //uint32 Id; - uint32 Race; - uint32 Gender; - uint32 GenType; - //char* TexturePath[3]; - uint32 Flags; - uint32 Type; - uint32 Color; + //uint32 ID // 0 + uint32 RaceID; // 1 + uint32 SexID; // 2 + uint32 BaseSection; // 3 + //char* TextureName[3]; // 4 - 7 + uint32 Flags; // 8 + uint32 VariationIndex; // 9 + uint32 ColorIndex; // 10 }; struct CharTitlesEntry { - uint32 ID; // 0, title ids, for example in Quest::GetCharTitleId() - //uint32 unk1; // 1 flags? - char* nameMale; // 2 m_name_lang - char* nameFemale; // 3 m_name1_lang - uint32 bit_index; // 4 m_mask_ID used in PLAYER_CHOSEN_TITLE and 1<[21] + ArmorSubClassCost<32>[8] }; struct DurabilityQualityEntry { - uint32 Id; // 0 - float quality_mod; // 1 + uint32 ID; // 0 + float Data; // 1 }; struct EmotesEntry { - uint32 Id; // 0 - //char* Name; // 1, internal name - //uint32 AnimationId; // 2, ref to animationData - uint32 Flags; // 3, bitmask, may be unit_flags - uint32 EmoteType; // 4, Can be 0, 1 or 2 (determine how emote are shown) - uint32 UnitStandState; // 5, uncomfirmed, may be enum UnitStandStateType - //uint32 SoundId; // 6, ref to soundEntries - //uint32 unk7 // 7 + uint32 ID; // 0 + //char* EmoteSlashCommand; // 1, internal name + //uint32 AnimID; // 2, ref to animationData + uint32 EmoteFlags; // 3, bitmask, may be unit_flags + uint32 EmoteSpecProc; // 4, Can be 0, 1 or 2 (determine how emote are shown) + uint32 EmoteSpecProcParam; // 5, uncomfirmed, may be enum UnitStandStateType + //uint32 EventSoundID; // 6, ref to soundEntries + //uint32 SpellVisualKitID // 7 }; struct EmotesTextEntry { - uint32 Id; - uint32 textid; + uint32 ID; // 0 + // char* Name; // 1 + uint32 EmoteID; // 2 + // uint32 EmoteText[16]; // 3 - 18 }; struct EmotesTextSoundEntry { - uint32 Id; // 0 - uint32 EmotesTextId; // 1 - uint32 RaceId; // 2 - uint32 SexId; // 3, 0 male / 1 female - uint32 SoundId; // 4 + uint32 ID; // 0 + uint32 EmotesTextID; // 1 + uint32 RaceID; // 2 + uint32 SexID; // 3 0 male / 1 female + uint32 SoundID; // 4 }; struct FactionEntry { - uint32 ID; // 0 m_ID - int32 reputationListID; // 1 m_reputationIndex - uint32 BaseRepRaceMask[4]; // 2-5 m_reputationRaceMask - uint32 BaseRepClassMask[4]; // 6-9 m_reputationClassMask - int32 BaseRepValue[4]; // 10-13 m_reputationBase - uint32 ReputationFlags[4]; // 14-17 m_reputationFlags - uint32 team; // 18 m_parentFactionID - float spilloverRateIn; // 19 Faction gains incoming rep * spilloverRateIn - float spilloverRateOut; // 20 Faction outputs rep * spilloverRateOut as spillover reputation - uint32 spilloverMaxRankIn; // 21 The highest rank the faction will profit from incoming spillover - //uint32 spilloverRank_unk; // 22 It does not seem to be the max standing at which a faction outputs spillover ...so no idea - char* name; // 23 m_name_lang - //char* description; // 24 m_description_lang - uint32 GroupExpansion; // 25 m_factionGroupExpansion + uint32 ID; // 0 + int32 ReputationIndex; // 1 + uint32 ReputationRaceMask[4]; // 2 - 5 + uint32 ReputationClassMask[4]; // 6 - 9 + int32 ReputationBase[4]; // 10 - 13 + uint32 ReputationFlags[4]; // 14 - 17 + uint32 ParentFactionID; // 18 + float ParentFactionMod[2]; // 19 - 20 Faction gains incoming rep * spilloverRateIn and Faction outputs rep * spilloverRateOut as spillover reputation + uint32 ParentFactionCap[2]; // 21 - 22 The highest rank the faction will profit from incoming spillover and It does not seem to be the max standing at which a faction outputs spillover ...so no idea + char* Name; // 23 + // char* Description; // 24 + uint32 Expansion; // 25 // helpers bool CanHaveReputation() const { - return reputationListID >= 0; + return ReputationIndex >= 0; } }; @@ -1142,102 +1128,104 @@ struct FactionEntry struct FactionTemplateEntry { - uint32 ID; // 0 m_ID - uint32 faction; // 1 m_faction - uint32 factionFlags; // 2 m_flags - uint32 ourMask; // 3 m_factionGroup - uint32 friendlyMask; // 4 m_friendGroup - uint32 hostileMask; // 5 m_enemyGroup - uint32 enemyFaction[MAX_FACTION_RELATIONS]; // 6 m_enemies[MAX_FACTION_RELATIONS] - uint32 friendFaction[MAX_FACTION_RELATIONS]; // 10 m_friend[MAX_FACTION_RELATIONS] - //------------------------------------------------------- end structure + uint32 ID; // 0 + uint32 Faction; // 1 + uint32 Flags; // 2 + uint32 FactionGroup; // 3 + uint32 FriendGroup; // 4 + uint32 EnemyGroup; // 5 + uint32 Enemies[MAX_FACTION_RELATIONS]; // 6 + uint32 Friend[MAX_FACTION_RELATIONS]; // 10 // helpers bool IsFriendlyTo(FactionTemplateEntry const& entry) const { if (ID == entry.ID) return true; - if (entry.faction) + + if (entry.Faction) { - for (int i = 0; i < MAX_FACTION_RELATIONS; ++i) - if (enemyFaction[i] == entry.faction) + for (uint8 i = 0; i < MAX_FACTION_RELATIONS; ++i) + if (Enemies[i] == entry.Faction) return false; - for (int i = 0; i < MAX_FACTION_RELATIONS; ++i) - if (friendFaction[i] == entry.faction) + for (uint8 i = 0; i < MAX_FACTION_RELATIONS; ++i) + if (Friend[i] == entry.Faction) return true; } - return (friendlyMask & entry.ourMask) || (ourMask & entry.friendlyMask); + return (FriendGroup & entry.FactionGroup) || (FactionGroup & entry.FriendGroup); } bool IsHostileTo(FactionTemplateEntry const& entry) const { if (ID == entry.ID) return false; - if (entry.faction) + + if (entry.Faction) { - for (int i = 0; i < MAX_FACTION_RELATIONS; ++i) - if (enemyFaction[i] == entry.faction) + for (uint8 i = 0; i < MAX_FACTION_RELATIONS; i++) + if (Enemies[i] == entry.Faction) return true; - for (int i = 0; i < MAX_FACTION_RELATIONS; ++i) - if (friendFaction[i] == entry.faction) + + for (uint8 i = 0; i < MAX_FACTION_RELATIONS; i++) + if (Friend[i] == entry.Faction) return false; } - return (hostileMask & entry.ourMask) != 0; + return (EnemyGroup & entry.FactionGroup) != 0; } - bool IsHostileToPlayers() const { return (hostileMask & FACTION_MASK_PLAYER) !=0; } + + bool IsHostileToPlayers() const { return (EnemyGroup & FACTION_MASK_PLAYER) != 0; } bool IsNeutralToAll() const { - for (int i = 0; i < MAX_FACTION_RELATIONS; ++i) - if (enemyFaction[i] != 0) + for (uint8 i = 0; i < MAX_FACTION_RELATIONS; i++) + if (Enemies[i] != 0) return false; - return hostileMask == 0 && friendlyMask == 0; + + return EnemyGroup == 0 && FriendGroup == 0; } - bool IsContestedGuardFaction() const { return (factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD) != 0; } + bool IsContestedGuardFaction() const { return (Flags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD) != 0; } }; struct GameObjectArtKitEntry { uint32 ID; // 0 - //char* TextureVariation[3] // 1-3 m_textureVariations[3] - //char* AttachModel[4] // 4-8 m_attachModels[4] + //char* TextureVariation[3] // 1-3 + //char* AttachModel[4] // 4-8 }; struct GameObjectDisplayInfoEntry { - uint32 Displayid; // 0 m_ID - char* filename; // 1 - //uint32 unk1[10]; //2-11 - float minX; - float minY; - float minZ; - float maxX; - float maxY; - float maxZ; - //uint32 transport; //18 + uint32 ID; // 0 + char* ModelName; // 1 + // uint32 Sound[10]; // 2 - 11 + DBCPosition3D GeoBoxMin; // 12 - 14 + DBCPosition3D GeoBoxMax; // 15 - 17 + // uint32 ObjectEffectPackageID; // 18 + // float OverrideLootEffectScale; // 19 + // float OverrideNameScale; // 20 }; struct GemPropertiesEntry { - uint32 ID; // 0 m_id - uint32 spellitemenchantement; // 1 m_enchant_id - // 2 m_maxcount_inv - // 3 m_maxcount_item - uint32 color; // 4 m_type - uint32 minJewelCraftingSkill; // 5 m_minJewelCraftingSkill + uint32 ID; // 0 + uint32 Enchant_ID; // 1 + // uint32 Maxcount_inv; // 2 + // uint32 Maxcount_item; // 3 + uint32 Type; // 4 + uint32 Min_item_level; // 5 }; struct GlyphPropertiesEntry { - uint32 Id; - uint32 SpellId; - uint32 TypeFlags; - uint32 IconId; // GlyphIconId (SpellIcon.dbc) + uint32 ID; // 0 + uint32 SpellID; // 1 + uint32 GlyphSlotFlags; // 2 + uint32 SpellIconID; // 3 GlyphIconId (SpellIcon.dbc) }; struct GlyphSlotEntry { - uint32 Id; - uint32 TypeFlags; - uint32 Order; + uint32 ID; // 0 + uint32 Type; // 1 + uint32 Tooltip; // 2 }; // All Gt* DBC store data for 100 levels, some by 100 per class/race @@ -1331,24 +1319,24 @@ struct GtOCTBaseMPByClassEntry struct GuildPerkSpellsEntry { - //uint32 Id; - uint32 Level; - uint32 SpellId; + // uint32 ID; // 0 + uint32 GuildLevel; // 1 + uint32 SpellID; // 2 }; -/* no used +/* not used struct HolidayDescriptionsEntry { - uint32 ID; // 0, m_holidayDescriptionID - //char* name // 1 m_name_lang + uint32 ID; // 0 + //char* Description // 1 }; */ -/* no used +/* not used struct HolidayNamesEntry { - uint32 ID; // 0, m_holidayNameID - //char* name // 1 m_name_lang + uint32 ID; // 0 + //char* Name // 1 }; */ @@ -1358,28 +1346,28 @@ struct HolidayNamesEntry struct HolidaysEntry { - uint32 Id; // 0 m_ID - uint32 Duration[MAX_HOLIDAY_DURATIONS]; // 1-10 m_duration - uint32 Date[MAX_HOLIDAY_DATES]; // 11-36 m_date (dates in unix time starting at January, 1, 2000) - uint32 Region; // 37 m_region (wow region) - uint32 Looping; // 38 m_looping - uint32 CalendarFlags[MAX_HOLIDAY_FLAGS]; // 39-48 m_calendarFlags - //uint32 holidayNameId; // 49 m_holidayNameID (HolidayNames.dbc) - //uint32 holidayDescriptionId; // 50 m_holidayDescriptionID (HolidayDescriptions.dbc) - char* TextureFilename; // 51 m_textureFilename - uint32 Priority; // 52 m_priority - int32 CalendarFilterType; // 53 m_calendarFilterType (-1 = Fishing Contest, 0 = Unk, 1 = Darkmoon Festival, 2 = Yearly holiday) - //uint32 flags; // 54 m_flags (0 = Darkmoon Faire, Fishing Contest and Wotlk Launch, rest is 1) + uint32 ID; // 0 + uint32 Duration[MAX_HOLIDAY_DURATIONS]; // 1-10 + uint32 Date[MAX_HOLIDAY_DATES]; // 11-36 (dates in unix time starting at January, 1, 2000) + uint32 Region; // 37 (wow region) + uint32 Looping; // 38 + uint32 CalendarFlags[MAX_HOLIDAY_FLAGS]; // 39-48 + //uint32 HolidayNameID; // 49 (HolidayNames.dbc) + //uint32 HolidayDescriptionID; // 50 (HolidayDescriptions.dbc) + char* TextureFilename; // 51 + uint32 Priority; // 52 + int32 CalendarFilterType; // 53 (-1 = Fishing Contest, 0 = Unk, 1 = Darkmoon Festival, 2 = Yearly holiday) + //uint32 Flags; // 54 (0 = Darkmoon Faire, Fishing Contest and Wotlk Launch, rest is 1) }; // ImportPriceArmor.dbc struct ImportPriceArmorEntry { - uint32 InventoryType; // 1 Id/InventoryType - float ClothFactor; // 2 Price factor cloth - float LeatherFactor; // 3 Price factor leather - float MailFactor; // 4 Price factor mail - float PlateFactor; // 5 Price factor plate + uint32 ID; // 0 Id/InventoryType + float ClothModifier; // 1 Price factor cloth + float LeatherModifier; // 2 Price factor leather + float ChainModifier; // 3 Price factor mail + float PlateModifier; // 4 Price factor plate }; // ImportPriceQuality.dbc @@ -1392,32 +1380,33 @@ struct ImportPriceQualityEntry // ImportPriceShield.dbc struct ImportPriceShieldEntry { - uint32 Id; // 1 Unk id (only 1 and 2) - float Factor; // 2 Price factor + uint32 ID; // 1 + float Data; // 2 Price factor }; // ImportPriceWeapon.dbc struct ImportPriceWeaponEntry { - uint32 Id; // 1 Unk id (mainhand - 0, offhand - 1, weapon - 2, 2hweapon - 3, ranged/rangedright/relic - 4) - float Factor; // 2 Price factor + uint32 ID; // 1 Unk id (mainhand - 0, offhand - 1, weapon - 2, 2hweapon - 3, ranged/rangedright/relic - 4) + float Data; // 2 Price factor }; // ItemPriceBase.dbc struct ItemPriceBaseEntry { - uint32 ItemLevel; // 2 Item level (1 - 1000) - float ArmorFactor; // 3 Price factor for armor - float WeaponFactor; // 4 Price factor for weapons + // uint32 ID; // 0 + uint32 ItemLevel; // 1 Item level (1 - 1000) + float Armor; // 2 Price factor for armor + float Weapon; // 3 Price factor for weapons }; struct ItemReforgeEntry { - uint32 Id; - uint32 SourceStat; - float SourceMultiplier; - uint32 FinalStat; - float FinalMultiplier; + uint32 ID; // 0 + uint32 Source_stat; // 1 + float Source_multiplier; // 2 + uint32 Target_stat; // 3 + float Target_multiplier; // 4 }; // common struct for: @@ -1431,247 +1420,241 @@ struct ItemReforgeEntry // ItemDamageWand.dbc struct ItemDamageEntry { - uint32 Id; // 0 item level - float DPS[7]; // 1-7 multiplier for item quality - uint32 Id2; // 8 item level + uint32 ID; // 0 item level + float Quality[7]; // 1-7 multiplier for item quality + uint32 ItemLevel; // 8 item level }; struct ItemArmorQualityEntry { - uint32 Id; // 0 item level - float Value[7]; // 1-7 multiplier for item quality - uint32 Id2; // 8 item level + uint32 ID; // 0 + float Qualitymod[7]; // 1-7 multiplier for item quality + uint32 ItemLevel; // 8 item level }; struct ItemArmorShieldEntry { - uint32 Id; // 0 item level - uint32 Id2; // 1 item level - float Value[7]; // 2-8 multiplier for item quality + uint32 ID; // 0 + uint32 ItemLevel; // 1 item level + float Quality[7]; // 2-8 multiplier for item quality }; struct ItemArmorTotalEntry { - uint32 Id; // 0 item level - uint32 Id2; // 1 item level - float Value[4]; // 2-5 multiplier for armor types (cloth...plate) + uint32 ID; // 0 + uint32 ItemLevel; // 1 item level + float Value[4]; // 2-5 multiplier for armor types (cloth...plate) }; // ItemClass.dbc struct ItemClassEntry { - uint32 Class; // 1 item class id - //uint32 Unk; // 2 unk - //uint32 IsWeapon; // 3 1 for weapon, 0 for everything else - float PriceFactor; // 4 used to calculate certain prices - //char* Name; // class name + // uint32 ID; // 0 + uint32 ClassID; // 1 item class id + //uint32 SubclassMapID; // 2 + //uint32 Flags; // 3 1 for weapon, 0 for everything else + float PriceModifier; // 4 used to calculate certain prices + //char* ClassName; // 5 class name }; struct ItemBagFamilyEntry { - uint32 ID; // 0 - //char* name; // 1 m_name_lang + uint32 ID; // 0 + //char* Name; // 1 }; struct ItemDisplayInfoEntry { - uint32 ID; // 0 m_ID - // 1 m_modelName[2] - // 2 m_modelTexture[2] - // 3 m_inventoryIcon - // 4 m_geosetGroup[3] - // 5 m_flags - // 6 m_spellVisualID - // 7 m_groupSoundIndex - // 8 m_helmetGeosetVis[2] - // 9 m_texture[2] - // 10 m_itemVisual[8] - // 11 m_particleColorID + uint32 ID; // 0 + // char* ModelName[2]; // 1 - 2 + // char* ModelTexture[2]; // 3 - 4 + // char* InventoryIcon[2]; // 5 - 6 + // uint32 GeosetGroup[2]; // 7 - 8 + // uint32 Flags; // 9 + // uint32 SpellVisualID; // 10 + // uint32 GroupSoundIndex; // 11 + // uint32 HelmetGeosetVisID[2]; // 12 - 13 + // char* Texture[8] // 14 - 21 + // uint32 ItemVisual; // 22 + // uint32 ParticleColorID; // 23 }; struct ItemDisenchantLootEntry { - uint32 Id; - uint32 ItemClass; - int32 ItemSubClass; - uint32 ItemQuality; - uint32 MinItemLevel; - uint32 MaxItemLevel; - uint32 RequiredDisenchantSkill; + uint32 ID; // 0 + uint32 Class; // 1 + int32 Subclass; // 2 + uint32 Quality; // 3 + uint32 MinLevel; // 4 + uint32 MaxLevel; // 5 + uint32 SkillRequired; // 6 }; struct ItemLimitCategoryEntry { - uint32 ID; // 0 Id - //char* name; // 1 m_name_lang - uint32 maxCount; // 2, m_quantity max allowed equipped as item or in gem slot - uint32 mode; // 3, m_flags 0 = have, 1 = equip (enum ItemLimitCategoryMode) + uint32 ID; // 0 + //char* Name; // 1 + uint32 Quantity; // 2 max allowed equipped as item or in gem slot + uint32 Flags; // 3 0 = have, 1 = equip (enum ItemLimitCategoryMode) }; #define MAX_ITEM_ENCHANTMENT_EFFECTS 3 struct ItemRandomPropertiesEntry { - uint32 ID; // 0 m_ID - //char* internalName // 1 m_Name - uint32 enchant_id[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 2-4 m_Enchantment - // 5-6 unused - char* nameSuffix; // 7 m_name_lang + uint32 ID; // 0 + //char* Name // 1 + uint32 Enchantment[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 2 - 6 + char* Name; // 7 }; struct ItemRandomSuffixEntry { - uint32 ID; // 0 m_ID - char* nameSuffix; // 1 m_name_lang - // 2 m_internalName - uint32 enchant_id[5]; // 3-7 m_enchantment - uint32 prefix[5]; // 8-12 m_allocationPct + uint32 ID; // 0 + char* Name; // 1 + // char* InternalName // 2 + uint32 Enchantment[5]; // 3 - 7 + uint32 AllocationPct[5]; // 8 - 12 }; -#define MAX_ITEM_SET_ITEMS 10 +#define MAX_ITEM_SET_ITEMS 17 #define MAX_ITEM_SET_SPELLS 8 struct ItemSetEntry { - //uint32 id // 0 m_ID - char* name; // 1 m_name_lang - uint32 itemId[MAX_ITEM_SET_ITEMS]; // 2-18 m_itemID - uint32 spells[MAX_ITEM_SET_SPELLS]; // 19-26 m_setSpellID - uint32 items_to_triggerspell[MAX_ITEM_SET_SPELLS]; // 27-34 m_setThreshold - uint32 required_skill_id; // 35 m_requiredSkill - uint32 required_skill_value; // 36 m_requiredSkillRank + //uint32 ID // 0 + char* Name; // 1 + uint32 ItemID[MAX_ITEM_SET_ITEMS]; // 2-18 + uint32 SetSpellID[MAX_ITEM_SET_SPELLS]; // 19-26 + uint32 SetThreshold[MAX_ITEM_SET_SPELLS]; // 27-34 + uint32 RequiredSkill; // 35 + uint32 RequiredSkillRank; // 36 }; struct LFGDungeonEntry { uint32 ID; // 0 - char* name; // 1 - uint32 minlevel; // 2 - uint32 maxlevel; // 3 - uint32 reclevel; // 4 - uint32 recminlevel; // 5 - uint32 recmaxlevel; // 6 - int32 map; // 7 - uint32 difficulty; // 8 - uint32 flags; // 9 - uint32 type; // 10 - //uint32 unk2; // 11 - //char* iconname; // 12 - uint32 expansion; // 13 - //uint32 unk4; // 14 - uint32 grouptype; // 15 - //char* desc; // 16 Description - uint32 randomCategoryId; // 17 RandomDungeonID assigned for this dungeon - uint32 requiredTanks; // 18 - uint32 requiredHealers; // 19 - uint32 requiredDamageDealers; // 20 + char* Name; // 1 + uint32 MinLevel; // 2 + uint32 Maxlevel; // 3 + uint32 Target_level; // 4 + uint32 Target_level_min; // 5 + uint32 Target_level_max; // 6 + int32 MapID; // 7 + uint32 DifficultyID; // 8 + uint32 Flags; // 9 + uint32 TypeID; // 10 + //uint32 Faction; // 11 + //char* TextureFilename; // 12 + uint32 ExpansionLevel; // 13 + //uint32 Order_index; // 14 + uint32 Group_ID; // 15 + //char* Description; // 16 Description + uint32 Random_ID; // 17 RandomDungeonID assigned for this dungeon + uint32 Count_tank; // 18 + uint32 Count_healer; // 19 + uint32 Count_damage; // 20 + // Helpers - uint32 Entry() const { return ID + (type << 24); } + uint32 Entry() const { return ID + (TypeID << 24); } }; struct LFGDungeonsGroupingMapEntry { uint32 ID; // 0 - uint32 dungeonId; // 1 - uint32 randomLfgDungeonId; // 2 - uint32 groupId; // 3 + uint32 LfgDungeonsID; // 1 + uint32 Random_lfgDungeonsID; // 2 + uint32 Group_ID; // 3 }; struct LightEntry { - uint32 Id; - uint32 MapId; - float X; - float Y; - float Z; - //float FalloffStart; - //float FalloffEnd; - //uint32 SkyAndFog; - //uint32 WaterSettings; - //uint32 SunsetParams; - //uint32 OtherParams; - //uint32 DeathParams; - //uint32 Unknown; - //uint32 Unknown; - //uint32 Unknown; + uint32 ID; // 0 + uint32 ContinentID; // 1 + float X; // 2 + float Y; // 3 + float Z; // 4 + // float FalloffStart; // 5 + // float FalloffEnd; // 6 + // uint32 LightParamsID[8]; // 7 - 14 }; struct LiquidTypeEntry { - uint32 Id; - //char* Name; - //uint32 Flags; - uint32 Type; - //uint32 SoundId; - uint32 SpellId; - //float MaxDarkenDepth; - //float FogDarkenIntensity; - //float AmbDarkenIntensity; - //float DirDarkenIntensity; - //uint32 LightID; - //float ParticleScale; - //uint32 ParticleMovement; - //uint32 ParticleTexSlots; - //uint32 LiquidMaterialID; - //char* Texture[6]; - //uint32 Color[2]; - //float Unk1[18]; - //uint32 Unk2[4]; + uint32 ID; // 1 + //char* Name; // 2 + //uint32 Flags; // 3 + uint32 SoundBank; // 4 + //uint32 SoundID; // 5 + uint32 SpellID; // 6 + //float MaxDarkenDepth; // 7 + //float FogDarkenIntensity; // 8 + //float AmbDarkenIntensity; // 9 + //float DirDarkenIntensity; // 10 + //uint32 LightID; // 11 + //float ParticleScale; // 12 + //uint32 ParticleMovement; // 13 + //uint32 ParticleTexSlots; // 14 + //uint32 MaterialID; // 15 + //char* Texture[6]; // 16 - 20 + //uint32 Color[2]; // 21 - 22 + //float Float[18]; // 23 - 40 + //uint32 Int[4]; // 41 - 44 }; #define MAX_LOCK_CASE 8 struct LockEntry { - uint32 ID; // 0 m_ID - uint32 Type[MAX_LOCK_CASE]; // 1-8 m_Type - uint32 Index[MAX_LOCK_CASE]; // 9-16 m_Index - uint32 Skill[MAX_LOCK_CASE]; // 17-24 m_Skill - //uint32 Action[MAX_LOCK_CASE]; // 25-32 m_Action + uint32 ID; // 0 + uint32 Type[MAX_LOCK_CASE]; // 1-8 + uint32 Index[MAX_LOCK_CASE]; // 9-16 + uint32 Skill[MAX_LOCK_CASE]; // 17-24 + //uint32 Action[MAX_LOCK_CASE]; // 25-32 }; struct PhaseEntry { - uint32 ID; // 0 - char* Name; // 1 - uint32 Flags; // 2 + uint32 ID; // 0 + char* Name; // 1 + uint32 Flags; // 2 }; struct PhaseGroupEntry { - uint32 ID; - uint32 PhaseId; - uint32 GroupId; + uint32 ID; // 1 + uint32 PhaseID; // 2 + uint32 PhaseGroupID; // 3 }; struct MailTemplateEntry { - uint32 ID; // 0 - //char* subject; // 1 m_subject_lang - char* content; // 2 m_body_lang + uint32 ID; // 0 + //char* Subject; // 1 + char* Body; // 2 }; struct MapEntry { - uint32 ID; // 0 MapID - char const* Directory; // 1 m_internalName - uint32 MapType; // 2 m_mapType - uint32 Flags; // 3 m_mapFlags - uint32 InstanceType; // 4 instance_type - uint32 IsPvP; // 5 m_PVP 0 or 1 for battlegrounds (not arenas) - char const* Name; // 6 m_MapName_lang - uint32 AreaTableID; // 7 m_areaTableID - char const* MapDescription0; // 8 m_MapDescription0_lang Horde - char const* MapDescription1; // 9 m_MapDescription1_lang Alliance - uint32 LoadingScreenID; // 10 m_LoadingScreenID (LoadingScreens.dbc) - float MinimapIconScale; // 11 m_minimapIconScale - int32 CorpseMapID; // 12 m_corpseMapID map_id of entrance map in ghost mode (continent always and in most cases = normal entrance) + uint32 ID; // 0 + char const* Directory; // 1 + uint32 MapType; // 2 + uint32 Flags; // 3 + uint32 InstanceType; // 4 + uint32 PVP; // 5 0 or 1 for battlegrounds (not arenas) + char const* MapName; // 6 + uint32 AreaTableID; // 7 + char const* MapDescription0; // 8 Horde + char const* MapDescription1; // 9 Alliance + uint32 LoadingScreenID; // 10 (LoadingScreens.dbc) + float MinimapIconScale; // 11 + int32 CorpseMapID; // 12 map_id of entrance map in ghost mode (continent always and in most cases = normal entrance) DBCPosition2D Corpse; // 13 - 14 entrance coordinates in ghost mode (in most cases = normal entrance) - uint32 TimeOfDayOverride; // 15 m_timeOfDayOverride - uint32 ExpansionID; // 16 m_expansionID - uint32 RaidOffset; // 17 m_raidOffset - uint32 MaxPlayers; // 18 m_maxPlayers - int32 ParentMapID; // 19 + uint32 TimeOfDayOverride; // 15 + uint32 ExpansionID; // 16 + uint32 RaidOffset; // 17 + uint32 MaxPlayers; // 18 + int32 ParentMapID; // 19 // Helpers uint32 Expansion() const { return ExpansionID; } @@ -1706,67 +1689,67 @@ struct MapEntry struct MapDifficultyEntry { - //uint32 Id; // 0 - uint32 MapId; // 1 - uint32 Difficulty; // 2 (for arenas: arena slot) - char* areaTriggerText; // 3 m_message_lang (text showed when transfer to map failed) - uint32 resetTime; // 4, m_raidDuration in secs, 0 if no fixed reset time - uint32 maxPlayers; // 5, m_maxPlayers some heroic versions have 0 when expected same amount as in normal version - //char* difficultyString; // 6 m_difficultystring + //uint32 ID; // 0 + uint32 MapID; // 1 + uint32 Difficulty; // 2 (for arenas: arena slot) + char* Message; // 3 (text showed when transfer to map failed) + uint32 RaidDuration; // 4 in secs, 0 if no fixed reset time + uint32 MaxPlayers; // 5 some heroic versions have 0 when expected same amount as in normal version + //char* Difficultystring; // 6 }; struct MountCapabilityEntry { - uint32 Id; - uint32 Flags; - uint32 RequiredRidingSkill; - uint32 RequiredArea; - uint32 RequiredAura; - uint32 RequiredSpell; - uint32 SpeedModSpell; - int32 RequiredMap; + uint32 ID; // 1 + uint32 Flags; // 2 + uint32 ReqRidingSkill; // 3 + uint32 ReqAreaID; // 4 + uint32 ReqSpellAuraID; // 5 + uint32 ReqSpellKnownID; // 6 + uint32 ModSpellAuraID; // 7 + int32 ReqMapID; // 8 }; #define MAX_MOUNT_CAPABILITIES 24 struct MountTypeEntry { - uint32 Id; - uint32 MountCapability[MAX_MOUNT_CAPABILITIES]; + uint32 ID; + uint32 Capability[MAX_MOUNT_CAPABILITIES]; }; struct MovieEntry { - uint32 Id; // 0 index - //char* filename; // 1 - //uint32 unk1; // 2 m_volume - //uint32 unk2; // 3 4.0.0 + uint32 ID; // 0 index + //char* Filename; // 1 + //uint32 Volume; // 2 + //uint32 KeyID; // 3 }; struct NameGenEntry { - //uint32 id; - char* name; - uint32 race; - uint32 gender; + //uint32 ID; // 1 + char* Name; // 2 + uint32 RaceID; // 3 + uint32 Sex; // 4 }; struct NumTalentsAtLevelEntry { //uint32 Level; // 0 index - float Talents; // 1 talent count + float NumberOfTalents; // 1 talent count }; struct NamesProfanityEntry { - //uint32 ID; // 0 + // uint32 ID; // 0 char const* Name; // 1 int32 Language; // 2 }; struct NamesReservedEntry { - //uint32 ID; // 0 + // uint32 ID; // 0 char const* Name; // 1 int32 Language; // 2 }; @@ -1775,67 +1758,68 @@ struct NamesReservedEntry struct OverrideSpellDataEntry { - uint32 id; // 0 - uint32 spellId[MAX_OVERRIDE_SPELL]; // 1-10 - //uint32 unk0; // 11 - //char* SpellBarName; // 12 + uint32 ID; // 0 + uint32 Spells[MAX_OVERRIDE_SPELL]; // 1-10 + // uint32 Flags; // 11 + // char* PlayerActionbar; // 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 ActualType; // 1 + // char* GlobalStringBaseTag; // 2 + // uint8 Red; // 3 + // uint8 Green; // 4 + // uint8 Blue; // 5 + // uint8 Padding // 6 }; 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 RangeIndex; // 2 + uint32 MinLevel; // 3 + uint32 MaxLevel; // 4 + uint32 Difficulty; // 5 // helpers - BattlegroundBracketId GetBracketId() const { return BattlegroundBracketId(bracketId); } + BattlegroundBracketId GetBracketId() const { return BattlegroundBracketId(RangeIndex); } }; struct QuestSortEntry { - uint32 id; // 0 m_ID - //char* name; // 1 m_SortName_lang + uint32 ID; // 0 + //char* SortName; // 1 }; struct QuestXPEntry { - uint32 id; - uint32 Exp[10]; + uint32 ID; // 0 + uint32 Difficulty[10]; // 1 - 10 }; struct QuestFactionRewEntry { - uint32 id; - int32 QuestRewFactionValue[10]; + uint32 ID; // 0 + int32 Difficulty[10]; // 1 - 11 }; struct QuestPOIBlobEntry { - uint32 id; // 0 m_id - uint32 type; // 1 m_type - uint32 mapId; // 2 m_mapId - uint32 unk; // 3 m_unk + uint32 ID; // 0 + uint32 NumPoints; // 1 + uint32 MapID; // 2 + uint32 WorldMapAreaID; // 3 }; struct QuestPOIPointEntry { - uint32 id; // 0 m_id - int32 x; // 1 m_zoneX - int32 y; // 2 m_zoneY - uint32 blobId; // 3 m_blobId + uint32 ID; // 0 + int32 X; // 1 + int32 Y; // 2 + uint32 QuestPOIBlobID; // 3 }; struct RandomPropertiesPointsEntry @@ -1850,45 +1834,46 @@ struct RandomPropertiesPointsEntry // ResearchBranch.dbc struct ResearchBranchEntry { - uint32 ID; - char* Name; - uint32 FieldID; - uint32 CurrencyID; - char* Icon; - uint32 ItemID; + uint32 ID; // 0 + char* Name; // 1 + uint32 ResearchFieldID; // 2 + uint32 CurrencyID; // 3 + char* Texture; // 4 + uint32 ItemID; // 5 }; // ResearchField.dbc struct ResearchFieldEntry { - uint32 ID; - char* Name; - uint32 Unk3; //Unknown? + uint32 ID; // 0 + char* Name; // 1 + uint32 Slot; // 2 }; // ResearchProject.dbc struct ResearchProjectEntry { - uint32 ID; - char* Name; - char* Description; - uint32 hasReward; - uint32 ResearchBranchID; - uint32 ProjectSpell; - uint32 Complexity; - char* Path; - uint32 RequiredFragments; + uint32 ID; // 0 + char* Name; // 1 + char* Description; // 2 + uint32 Rarity; // 3 + uint32 ResearchBranchID; // 4 + uint32 SpellID; // 5 + uint32 NumSockets; // 6 + char* Texture; // 7 + uint32 RequiredWeight; // 8 }; // ResearchSite.dbc struct ResearchSiteEntry { - uint32 ID; - uint32 MapId; - uint32 QuestPOI; - char* Name; - char* Flags; + uint32 ID; // 1 + uint32 MapID; // 2 + uint32 QuestPOIBlobID; // 3 + char* Name; // 4 + char* AreaPOIIconEnum; // 5 + // Helpers bool IsValid() const { return ID != 140 && // template @@ -1902,21 +1887,21 @@ struct ResearchSiteEntry struct ScalingStatDistributionEntry { - uint32 Id; // 0 - int32 StatMod[10]; // 1-10 - uint32 Modifier[10]; // 11-20 - uint32 MinLevel; // 21 - uint32 MaxLevel; // 22 m_maxlevel + uint32 ID; // 0 + int32 StatID[10]; // 1 - 10 + uint32 Bonus[10]; // 11 - 20 + uint32 Minlevel; // 21 + uint32 Maxlevel; // 22 }; struct ScalingStatValuesEntry { - uint32 Id; // 0 - uint32 Level; // 1 - uint32 dpsMod[6]; // 2-7 DPS mod for level + 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 StatMultiplier[5]; // 9 - 13 Multiplier for ScalingStatDistribution + uint32 Armor[8][4]; // 14 - 46 Armor for level uint32 CloakArmor; // 47 armor for cloak uint32 GetStatMultiplier(uint32 inventoryType) const; @@ -1925,148 +1910,148 @@ struct ScalingStatValuesEntry }; //struct SkillLineCategoryEntry{ -// uint32 id; // 0 m_ID -// char* name[16]; // 1-17 m_name_lang -// // 18 string flag -// uint32 displayOrder; // 19 m_sortIndex +// uint32 id; // 0 +// char* name[16]; // 1 - 17 +// // 18 +// uint32 displayOrder; // 19 //}; 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 + int32 CategoryID; // 1 + char* DisplayName; // 3 + //char* Description; // 4 + uint32 SpellIconID; // 5 + //char* AlternateVerb; // 6 + uint32 CanLink; // 7 (prof. with recipe) }; 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; // 12 m_characterPoints - uint32 UniqueBits; // 13 + uint32 ID; // 0 + uint32 SkillLine; // 1 + uint32 Spell; // 2 + uint32 RaceMask; // 3 + uint32 ClassMask; // 4 + //uint32 ExcludeRace; // 5 + //uint32 ExcludeClass; // 6 + uint32 MinSkillLineRank; // 7 + uint32 SupercededBySpell; // 8 + uint32 AcquireMethod; // 9 + uint32 TrivialSkillLineRankHigh; // 10 + uint32 TrivialSkillLineRankLow; // 11 + uint32 NumSkillUps; // 12 + uint32 UniqueBit; // 13 }; 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 Availability; // 5 m_availability - //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 + //uint32 SkillCostIndex; // 8 }; #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 Cost[MAX_SKILL_STEP]; // 1-16 + uint32 Value[MAX_SKILL_STEP]; // 17-32 }; 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 + //char* File[10]; // 3 - 12 + //uint32 Freq[10]; // 13 - 22 + //char* DirectoryBase; // 23 + //float VolumeFloat; // 24 + //uint32 Flags; // 25 + //float MinDistance; // 26 + //float DistanceCutoff; // 27 + //uint32 EAXDef; // 28 + //uint32 SoundEntriesAdvancedID; // 29 + //float Volumevariationplus; // 30 + //float Volumevariationminus; // 31 + //float Pitchvariationplus; // 32 + //float Pitchvariationminus; // 33 + //float PitchAdjust; // 34 }; // SpellEffect.dbc struct SpellEffectEntry { - uint32 Id; // 0 m_ID - uint32 Effect; // 1 m_effect - float EffectValueMultiplier; // 2 m_effectAmplitude - uint32 EffectApplyAuraName; // 3 m_effectAura - uint32 EffectAmplitude; // 4 m_effectAuraPeriod - int32 EffectBasePoints; // 5 m_effectBasePoints (don't must be used in spell/auras explicitly, must be used cached Spell::m_currentBasePoints) - float EffectBonusMultiplier; // 6 m_effectBonus - float EffectDamageMultiplier; // 7 m_effectChainAmplitude - uint32 EffectChainTarget; // 8 m_effectChainTargets - int32 EffectDieSides; // 9 m_effectDieSides - uint32 EffectItemType; // 10 m_effectItemType - uint32 EffectMechanic; // 11 m_effectMechanic - int32 EffectMiscValue; // 12 m_effectMiscValue - int32 EffectMiscValueB; // 13 m_effectMiscValueB - float EffectPointsPerComboPoint; // 14 m_effectPointsPerCombo - uint32 EffectRadiusIndex; // 15 m_effectRadiusIndex - spellradius.dbc - uint32 EffectRadiusMaxIndex; // 16 4.0.0 - float EffectRealPointsPerLevel; // 17 m_effectRealPointsPerLevel - flag96 EffectSpellClassMask; // 18 19 20 m_effectSpellClassMask1(2/3), effect 0 - uint32 EffectTriggerSpell; // 21 m_effectTriggerSpell - uint32 EffectImplicitTargetA; // 22 m_implicitTargetA - uint32 EffectImplicitTargetB; // 23 m_implicitTargetB - uint32 EffectSpellId; // 24 new 4.0.0 - uint32 EffectIndex; // 25 new 4.0.0 - //uint32 Unk0 // 26 4.2.0 only 0 or 1 + uint32 ID; // 0 + uint32 Effect; // 1 + float EffectAmplitude; // 2 + uint32 EffectAura; // 3 + uint32 EffectAuraPeriod; // 4 + int32 EffectBasePoints; // 5 + float EffectBonusCoefficient; // 6 + float EffectChainAmplitude; // 7 + uint32 EffectChainTargets; // 8 + int32 EffectDieSides; // 9 + uint32 EffectItemType; // 10 + uint32 EffectMechanic; // 11 + int32 EffectMiscValue; // 12 + int32 EffectMiscValueB; // 13 + float EffectPointsPerResource; // 14 + uint32 EffectRadiusIndex; // 15 + uint32 EffectRadiusMaxIndex; // 16 + float EffectRealPointsPerLevel; // 17 + flag96 EffectSpellClassMask; // 18 - 20 + uint32 EffectTriggerSpell; // 21 + uint32 EffectImplicitTargetA; // 22 + uint32 EffectImplicitTargetB; // 23 + uint32 SpellID; // 24 + uint32 EffectIndex; // 25 + //uint32 EffectAttributes // 26 }; // SpellAuraOptions.dbc struct SpellAuraOptionsEntry { - uint32 Id; // 0 m_ID - uint32 StackAmount; // 1 m_cumulativeAura - uint32 procChance; // 2 m_procChance - uint32 procCharges; // 3 m_procCharges - uint32 procFlags; // 4 m_procTypeMask + uint32 ID; // 0 + uint32 CumulativeAura; // 1 + uint32 ProcChance; // 2 + uint32 ProcCharges; // 3 + uint32 ProcTypeMask; // 4 }; // SpellAuraRestrictions.dbc/ struct SpellAuraRestrictionsEntry { - //uint32 Id; // 0 m_ID - uint32 CasterAuraState; // 1 m_casterAuraState - uint32 TargetAuraState; // 2 m_targetAuraState - uint32 CasterAuraStateNot; // 3 m_excludeCasterAuraState - uint32 TargetAuraStateNot; // 4 m_excludeTargetAuraState - uint32 casterAuraSpell; // 5 m_casterAuraSpell - uint32 targetAuraSpell; // 6 m_targetAuraSpell - uint32 excludeCasterAuraSpell; // 7 m_excludeCasterAuraSpell - uint32 excludeTargetAuraSpell; // 8 m_excludeTargetAuraSpell + //uint32 ID; // 0 + uint32 CasterAuraState; // 1 + uint32 TargetAuraState; // 2 + uint32 ExcludeCasterAuraState; // 3 + uint32 ExcludeTargetAuraState; // 4 + uint32 CasterAuraSpell; // 5 + uint32 TargetAuraSpell; // 6 + uint32 ExcludeCasterAuraSpell; // 7 + uint32 ExcludeTargetAuraSpell; // 8 }; // SpellCastingRequirements.dbc struct SpellCastingRequirementsEntry { - //uint32 Id; // 0 m_ID - uint32 FacingCasterFlags; // 1 m_facingCasterFlags - //uint32 MinFactionId; // 2 m_minFactionID not used - //uint32 MinReputation; // 3 m_minReputation not used - int32 AreaGroupId; // 4 m_requiredAreaGroupId - //uint32 RequiredAuraVision; // 5 m_requiredAuraVision not used - uint32 RequiresSpellFocus; // 6 m_requiresSpellFocus + //uint32 ID; // 0 + uint32 FacingCasterFlags; // 1 + //uint32 MinFactionID; // 2 + //uint32 MinReputation; // 3 + int32 RequiredAreasID; // 4 + //uint32 RequiredAuraVision; // 5 + uint32 RequiresSpellFocus; // 6 }; #define MAX_SPELL_TOTEMS 2 @@ -2074,73 +2059,73 @@ struct SpellCastingRequirementsEntry // SpellTotems.dbc struct SpellTotemsEntry { - uint32 Id; // 0 m_ID - uint32 TotemCategory[MAX_SPELL_TOTEMS]; // 1 m_requiredTotemCategoryID - uint32 Totem[MAX_SPELL_TOTEMS]; // 2 m_totem + uint32 ID; // 0 + uint32 RequiredTotemCategoryID[MAX_SPELL_TOTEMS]; // 1 + uint32 Totem[MAX_SPELL_TOTEMS]; // 2 }; // Spell.dbc struct SpellEntry { - uint32 Id; // 0 m_ID - uint32 Attributes; // 1 m_attribute - uint32 AttributesEx; // 2 m_attributesEx - uint32 AttributesEx2; // 3 m_attributesExB - uint32 AttributesEx3; // 4 m_attributesExC - uint32 AttributesEx4; // 5 m_attributesExD - uint32 AttributesEx5; // 6 m_attributesExE - uint32 AttributesEx6; // 7 m_attributesExF - uint32 AttributesEx7; // 8 m_attributesExG - uint32 AttributesEx8; // 9 m_attributesExH - uint32 AttributesEx9; // 10 m_attributesExI - uint32 AttributesEx10; // 11 m_attributesExJ - uint32 CastingTimeIndex; // 12 m_castingTimeIndex - uint32 DurationIndex; // 13 m_durationIndex - uint32 powerType; // 14 m_powerType - uint32 rangeIndex; // 15 m_rangeIndex - float speed; // 16 m_speed - uint32 SpellVisual[2]; // 17-18 m_spellVisualID - uint32 SpellIconID; // 19 m_spellIconID - uint32 activeIconID; // 20 m_activeIconID - char* SpellName; // 21 m_name_lang - char* Rank; // 22 m_nameSubtext_lang - //char* Description; // 23 m_description_lang not used - //char* ToolTip; // 24 m_auraDescription_lang not used - uint32 SchoolMask; // 25 m_schoolMask - uint32 runeCostID; // 26 m_runeCostID - //uint32 spellMissileID; // 27 m_spellMissileID not used - //uint32 spellDescriptionVariableID; // 28 m_spellDescriptionVariableID, 3.2.0 - uint32 SpellDifficultyId; // 29 m_spellDifficultyID - id from SpellDifficulty.dbc - float SpellCoef; // 30 - uint32 SpellScalingId; // 31 SpellScaling.dbc - uint32 SpellAuraOptionsId; // 32 SpellAuraOptions.dbc - uint32 SpellAuraRestrictionsId; // 33 SpellAuraRestrictions.dbc - uint32 SpellCastingRequirementsId; // 34 SpellCastingRequirements.dbc - uint32 SpellCategoriesId; // 35 SpellCategories.dbc - uint32 SpellClassOptionsId; // 36 SpellClassOptions.dbc - uint32 SpellCooldownsId; // 37 SpellCooldowns.dbc - //uint32 unkIndex7; // 38 all zeros... - uint32 SpellEquippedItemsId; // 39 SpellEquippedItems.dbc - uint32 SpellInterruptsId; // 40 SpellInterrupts.dbc - uint32 SpellLevelsId; // 41 SpellLevels.dbc - uint32 SpellPowerId; // 42 SpellPower.dbc - uint32 SpellReagentsId; // 43 SpellReagents.dbc - uint32 SpellShapeshiftId; // 44 SpellShapeshift.dbc - uint32 SpellTargetRestrictionsId; // 45 SpellTargetRestrictions.dbc - uint32 SpellTotemsId; // 46 SpellTotems.dbc - uint32 ResearchProjectId; // 47 ResearchProject.dbc + uint32 ID; // 0 + uint32 Attributes; // 1 + uint32 AttributesEx; // 2 + uint32 AttributesEx2; // 3 + uint32 AttributesEx3; // 4 + uint32 AttributesEx4; // 5 + uint32 AttributesEx5; // 6 + uint32 AttributesEx6; // 7 + uint32 AttributesEx7; // 8 + uint32 AttributesEx8; // 9 + uint32 AttributesEx9; // 1 + uint32 AttributesEx10; // 1 + uint32 CastingTimeIndex; // 1 + uint32 DurationIndex; // 1 + uint32 PowerType; // 1 + uint32 RangeIndex; // 1 + float Speed; // 1 + uint32 SpellVisualID[2]; // 17 - 18 + uint32 SpellIconID; // 19 + uint32 ActiveIconID; // 20 + char* Name; // 21 + char* NameSubtext; // 22 + //char* Description; // 23 + //char* AuraDescription; // 24 + uint32 SchoolMask; // 25 + uint32 RuneCostID; // 26 + //uint32 SpellMissileID; // 27 + //uint32 DescriptionVariablesID; // 28 + uint32 Difficulty; // 29 + float SpellCoef; // 30 + uint32 ScalingID; // 31 + uint32 AuraOptionsID; // 32 + uint32 AuraRestrictionsID; // 33 + uint32 CastingRequirementsID; // 34 + uint32 CategoriesID; // 35 + uint32 ClassOptionsID; // 36 + uint32 CooldownsID; // 37 + //uint32 unkIndex7; // 38 + uint32 EquippedItemsID; // 39 + uint32 InterruptsID; // 40 + uint32 LevelsID; // 41 + uint32 PowerDisplayID; // 42 + uint32 ReagentsID; // 43 + uint32 ShapeshiftID; // 44 + uint32 TargetRestrictionsID; // 45 + uint32 TotemsID; // 46 + uint32 RequiredProjectID; // 47 }; // SpellCategories.dbc struct SpellCategoriesEntry { - //uint32 Id; // 0 m_ID - uint32 Category; // 1 m_category - uint32 DmgClass; // 153 m_defenseType - uint32 Dispel; // 2 m_dispelType - uint32 Mechanic; // 3 m_mechanic - uint32 PreventionType; // 154 m_preventionType - uint32 StartRecoveryCategory; // 145 m_startRecoveryCategory + //uint32 ID; // 0 + uint32 Category; // 1 + uint32 DefenseType; // 2 + uint32 DispelType; // 3 + uint32 Mechanic; // 4 + uint32 PreventionType; // 5 + uint32 StartRecoveryCategory; // 6 }; typedef std::set PetFamilySpellsSet; @@ -2148,210 +2133,204 @@ typedef std::map PetFamilySpellsStore; struct SpellCastTimesEntry { - uint32 ID; // 0 - int32 CastTime; // 1 - //float CastTimePerLevel; // 2 unsure / per skill? - //int32 MinCastTime; // 3 unsure + uint32 ID; // 0 + int32 Base; // 1 + //int32 PerLevel; // 2 + //int32 Minimum; // 3 }; struct SpellCategoryEntry { - uint32 Id; - uint32 Flags; - uint32 UsesPerWeek; - // char* Name; + uint32 ID; // 0 + uint32 Flags; // 1 + uint32 UsesPerWeek; // 2 + // char* Name; // 3 }; struct SpellDifficultyEntry { uint32 ID; // 0 - int32 SpellID[MAX_DIFFICULTY]; // 1-4 instance modes: 10N, 25N, 10H, 25H or Normal/Heroic if only 1-2 is set, if 3-4 is 0 then Mode-2 + int32 DifficultySpellID[MAX_DIFFICULTY]; // 1 - 4 instance modes: 10N, 25N, 10H, 25H or Normal/Heroic if only 1-2 is set, if 3-4 is 0 then Mode-2 }; struct SpellFocusObjectEntry { - uint32 ID; // 0 - //char* Name; // 1 m_name_lang + uint32 ID; // 0 + //char* Name; // 1 }; struct SpellRadiusEntry { - uint32 ID; - float RadiusMin; - float RadiusPerLevel; - float RadiusMax; + uint32 ID; // 0 + float RadiusMin; // 1 + float RadiusPerLevel; // 2 + float RadiusMax; // 3 }; struct SpellRangeEntry { - uint32 ID; - float minRangeHostile; - float minRangeFriend; - float maxRangeHostile; - float maxRangeFriend; //friend means unattackable unit here - uint32 type; - //char* Name; // 6-21 m_displayName_lang - //char* ShortName; // 23-38 m_displayNameShort_lang + uint32 ID; // 1 + float RangeMin[2]; // 2 - 3 + float RangeMax[2]; // 4 - 5 + uint32 Flags; // 6 + //char* DisplayName; // 7 + //char* DisplayNameShort; // 8 }; // SpellEquippedItems.dbc struct SpellEquippedItemsEntry { - //uint32 Id; // 0 m_ID - int32 EquippedItemClass; // 70 m_equippedItemClass (value) - int32 EquippedItemInventoryTypeMask; // 72 m_equippedItemInvTypes (mask) - int32 EquippedItemSubClassMask; // 71 m_equippedItemSubclass (mask) + //uint32 ID; // 1 + int32 EquippedItemClass; // 2 + int32 EquippedItemInvTypes; // 3 + int32 EquippedItemSubclass; // 4 }; // SpellCooldowns.dbc struct SpellCooldownsEntry { - //uint32 Id; // 0 m_ID - uint32 CategoryRecoveryTime; // 31 m_categoryRecoveryTime - uint32 RecoveryTime; // 30 m_recoveryTime - uint32 StartRecoveryTime; // 146 m_startRecoveryTime + //uint32 ID; // 0 + uint32 CategoryRecoveryTime; // 1 + uint32 RecoveryTime; // 2 + uint32 StartRecoveryTime; // 3 }; // SpellClassOptions.dbc struct SpellClassOptionsEntry { - //uint32 Id; // 0 m_ID - //uint32 modalNextSpell; // 1 m_modalNextSpell not used - flag96 SpellFamilyFlags; // 2-4 - uint32 SpellFamilyName; // 5 m_spellClassSet - //char* Description; // 6 4.0.0 + //uint32 ID; // 0 + //uint32 ModalNextSpell; // 1 + flag96 SpellFamilyMask; // 2-4 + uint32 SpellClassSet; // 5 + //char* Description; // 6 }; // SpellInterrupts.dbc struct SpellInterruptsEntry { - //uint32 Id; // 0 m_ID - uint32 AuraInterruptFlags; // 1 m_auraInterruptFlags - //uint32 // 2 4.0.0 - uint32 ChannelInterruptFlags; // 3 m_channelInterruptFlags - //uint32 // 4 4.0.0 - uint32 InterruptFlags; // 5 m_interruptFlags + //uint32 ID; // 0 + uint32 AuraInterruptFlags[2]; // 1 - 2 + uint32 ChannelInterruptFlags[2]; // 3 - 4 + uint32 InterruptFlags; // 5 }; // SpellLevels.dbc struct SpellLevelsEntry { - //uint32 Id; // 0 m_ID - uint32 baseLevel; // 1 m_baseLevel - uint32 maxLevel; // 2 m_maxLevel - uint32 spellLevel; // 3 m_spellLevel + //uint32 ID; // 0 + uint32 BaseLevel; // 1 + uint32 MaxLevel; // 2 + uint32 SpellLevel; // 3 }; // SpellPower.dbc struct SpellPowerEntry { - //uint32 Id; // 0 m_ID - uint32 manaCost; // 1 m_manaCost - uint32 manaCostPerlevel; // 2 m_manaCostPerLevel - uint32 ManaCostPercentage; // 3 m_manaCostPct - uint32 manaPerSecond; // 4 m_manaPerSecond - //uint32 PowerDisplayId; // 5 m_powerDisplayID - id from PowerDisplay.dbc, new in 3.1 - //uint32 UnitPowerBarId; // 6 m_unitPowerBarID - //float ManaCostPercentageFloat; // 7 4.3.0 + //uint32 ID; // 0 + uint32 ManaCost; // 1 + uint32 ManaCostPerLevel; // 2 + uint32 PowerCostPct; // 3 + uint32 ManaPerSecond; // 4 + //uint32 PowerDisplayID; // 5 + //uint32 AltPowerBarID; // 6 + //float PowerCostPct; // 7 }; struct SpellRuneCostEntry { uint32 ID; // 0 - uint32 RuneCost[3]; // 1-3 (0=blood, 1=frost, 2=unholy) - uint32 runePowerGain; // 4 + uint32 RuneCost[3]; // 1 - 3 (0 = blood, 1 = frost, 2 = unholy) + uint32 RunicPower; // 4 bool NoRuneCost() const { return RuneCost[0] == 0 && RuneCost[1] == 0 && RuneCost[2] == 0; } - bool NoRunicPowerGain() const { return runePowerGain == 0; } + bool NoRunicPowerGain() const { return RunicPower == 0; } }; #define MAX_SHAPESHIFT_SPELLS 8 struct SpellShapeshiftFormEntry { - uint32 ID; // 0 - //uint32 buttonPosition; // 1 unused - //char* Name; // 2 unused - uint32 flags1; // 3 - int32 creatureType; // 4 <=0 humanoid, other normal creature types - //uint32 spellIcon; // 5 unused, related to next field - uint32 attackSpeed; // 6 - // Models changed, 0 is main model, the rest 3 are unused. - uint32 modelID_A; // 7 alliance modelid (0 means no model) - uint32 modelID_H; // 8 horde modelid (but only for one form) - //uint32 unk3; // 9 unused always 0 - //uint32 unk4; // 10 unused always 0 - uint32 stanceSpell[MAX_SHAPESHIFT_SPELLS]; // 11-18 spells which appear in the bar after shapeshifting - uint32 MountTypeID; // 19 - //uint32 unk6; // 20 + uint32 ID; // 0 + //uint32 BonusActionBar; // 1 unused + //char* Name; // 2 unused + uint32 Flags; // 3 + int32 CreatureType; // 4 <= 0 humanoid, other normal creature types + //uint32 AttackIconID; // 5 unused, related to next field + uint32 CombatRoundTime; // 6 + uint32 CreatureDisplayID[4]; // 7 - 10 + uint32 PresetSpellID[MAX_SHAPESHIFT_SPELLS]; // 11 - 18 spells which appear in the bar after shapeshifting + uint32 MountTypeID; // 19 + //uint32 ExitSoundEntriesID; // 20 }; // SpellShapeshift.dbc struct SpellShapeshiftEntry { - uint32 Id; // 0 - m_ID - uint32 StancesNot[2]; // 1 - m_shapeshiftExclude - uint32 Stances[2]; // 3 - m_shapeshiftMask - // uint32 StanceBarOrder; // 5 - m_stanceBarOrder not used + uint32 ID; // 0 + uint32 ShapeshiftExclude[2]; // 1 + uint32 ShapeshiftMask[2]; // 3 + // uint32 StanceBarOrder; // 5 }; // SpellTargetRestrictions.dbc struct SpellTargetRestrictionsEntry { - uint32 Id; // 0 m_ID - float ConeAngle; // 1 m_coneAngel - uint32 MaxAffectedTargets; // 2 m_maxTargets - uint32 MaxTargetLevel; // 3 m_maxTargetLevel - uint32 TargetCreatureType; // 4 m_targetCreatureType - uint32 Targets; // 5 m_targets + uint32 ID; // 0 + float ConeAngle; // 1 + uint32 MaxTargets; // 2 + uint32 MaxTargetLevel; // 3 + uint32 TargetCreatureType; // 4 + uint32 Targets; // 5 }; // SpellReagents.dbc struct SpellReagentsEntry { - //uint32 Id; // 0 m_ID - int32 Reagent[MAX_SPELL_REAGENTS]; // 54-61 m_reagent - uint32 ReagentCount[MAX_SPELL_REAGENTS]; // 62-69 m_reagentCount + //uint32 ID; // 0 + int32 Reagents[MAX_SPELL_REAGENTS]; // 1 - 8 + uint32 ReagentCount[MAX_SPELL_REAGENTS]; // 9 - 16 }; // SpellScaling.dbc struct SpellScalingEntry { - //uint32 Id; // 0 m_ID - int32 CastTimeMin; // 1 - int32 CastTimeMax; // 2 - int32 CastTimeMaxLevel; // 3 - int32 ScalingClass; // 4 (index * 100) + charLevel - 1 => gtSpellScaling.dbc - float Multiplier[3]; // 5-7 - float RandomMultiplier[3]; // 8-10 - float OtherMultiplier[3]; // 11-13 - float CoefBase; // 14 some coefficient, mostly 1.0f - int32 CoefLevelBase; // 15 some level + //uint32 ID; // 0 m_ID + int32 CastTimeMin; // 1 + int32 CastTimeMax; // 2 + int32 CastTimeMaxLevel; // 3 + int32 Class; // 4 (index * 100) + charLevel - 1 => gtSpellScaling.dbc + float Coefficient[3]; // 5 - 7 + float Variance[3]; // 8 - 10 + float ComboPointsCoefficient[3]; // 11 - 13 + float NerfFactor; // 14 some coefficient, mostly 1.0f + int32 NerfMaxLevel; // 15 some level }; struct SpellDurationEntry { - uint32 ID; - int32 Duration[3]; + uint32 ID; // 0 + int32 Duration; // 1 + int32 DurationPerLevel; // 2 + int32 MaxDuration; // 3 }; struct SpellItemEnchantmentEntry { - uint32 ID; // 0 m_ID - //uint32 charges; // 1 m_charges - uint32 type[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 2-4 m_effect[MAX_ITEM_ENCHANTMENT_EFFECTS] - uint32 amount[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 5-7 m_effectPointsMin[MAX_ITEM_ENCHANTMENT_EFFECTS] - //uint32 amount2[MAX_ITEM_ENCHANTMENT_EFFECTS] // 8-10 m_effectPointsMax[MAX_ITEM_ENCHANTMENT_EFFECTS] - uint32 spellid[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 11-13 m_effectArg[MAX_ITEM_ENCHANTMENT_EFFECTS] - char* description; // 14 m_name_lang - uint32 aura_id; // 15 m_itemVisual - uint32 slot; // 16 m_flags - uint32 GemID; // 17 m_src_itemID - uint32 EnchantmentCondition; // 18 m_condition_id - uint32 requiredSkill; // 19 m_requiredSkillID - uint32 requiredSkillValue; // 20 m_requiredSkillRank - uint32 requiredLevel; // 21 new in 3.1 - // 22 new in 3.1 + uint32 ID; // 0 + //uint32 Charges; // 1 + uint32 Effect[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 2 - 4 + uint32 EffectPointsMin[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 5 - 7 + //uint32 EffectPointsMax[MAX_ITEM_ENCHANTMENT_EFFECTS];// 8 - 10 + uint32 EffectArg[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 11 - 13 + char* Name; // 14 + uint32 ItemVisual; // 15 + uint32 Flags; // 16 + uint32 Src_itemID; // 17 + uint32 Condition_ID; // 18 + uint32 RequiredSkillID; // 19 + uint32 RequiredSkillRank; // 20 + uint32 MinLevel; // 21 + //uint32 ItemLevel; // 22 }; struct SpellItemEnchantmentConditionEntry @@ -2371,122 +2350,111 @@ struct SpellItemEnchantmentConditionEntry struct SpellVisualEntry { - //uint32 Id; - //uint32 PrecastKit; - //uint32 CastingKit; - //uint32 ImpactKit; - //uint32 StateKit; - //uint32 StateDoneKit; - //uint32 ChannelKit; - uint32 HasMissile; - int32 MissileModel; - //uint32 MissilePathType; - //uint32 MissileDestinationAttachment; - //uint32 MissileSound; - //uint32 AnimEventSoundID; - //uint32 Flags; - //uint32 CasterImpactKit; - //uint32 TargetImpactKit; - //int32 MissileAttachment; - //uint32 MissileFollowGroundHeight; - //uint32 MissileFollowGroundDropSpeed; - //uint32 MissileFollowGroundApprach; - //uint32 MissileFollowGroundFlags; - //uint32 MissileMotionId; - //uint32 MissileTargetingKit; - //uint32 InstantAreaKit; - //uint32 ImpactAreaKit; - //uint32 PersistentAreaKit; + //uint32 ID; + //uint32 PrecastKit; + //uint32 CastKit; + //uint32 ImpactKit; + //uint32 StateKit; + //uint32 StateDoneKit; + //uint32 ChannelKit; + uint32 HasMissile; + int32 MissileModel; + //uint32 MissilePathType; + //uint32 MissileDestinationAttachment; + //uint32 MissileSound; + //uint32 AnimEventSoundID; + //uint32 Flags; + //uint32 CasterImpactKit; + //uint32 TargetImpactKit; + //int32 MissileAttachment; + //uint32 MissileFollowGroundHeight; + //uint32 MissileFollowGroundDropSpeed; + //uint32 MissileFollowGroundApprach; + //uint32 MissileFollowGroundFlags; + //uint32 MissileMotionId; + //uint32 MissileTargetingKit; + //uint32 InstantAreaKit; + //uint32 ImpactAreaKit; + //uint32 PersistentAreaKit; //DBCPosition3D MissileCastOffset; //DBCPosition3D MissileImpactOffset; uint32 AlternativeVisualID; }; -struct StableSlotPricesEntry -{ - uint32 Slot; - uint32 Price; -}; - struct SummonPropertiesEntry { - uint32 Id; // 0 - uint32 Category; // 1, 0 - can't be controlled?, 1 - something guardian?, 2 - pet?, 3 - something controllable?, 4 - taxi/mount? + uint32 ID; // 0 + uint32 Control; // 1, 0 - can't be controlled?, 1 - something guardian?, 2 - pet?, 3 - something controllable?, 4 - taxi/mount? uint32 Faction; // 2, 14 rows > 0 - uint32 Type; // 3, see enum + uint32 Title; // 3, see enum int32 Slot; // 4, 0-6 uint32 Flags; // 5 }; struct TalentEntry { - uint32 TalentID; // 0 - uint32 TalentTab; // 1 index in TalentTab.dbc (TalentTabEntry) - uint32 Row; // 2 - uint32 Col; // 3 - uint32 RankID[MAX_TALENT_RANK]; // 4-8 - uint32 DependsOn; // 9 m_prereqTalent (Talent.dbc) - // 10-11 part of prev field - uint32 DependsOnRank; // 12 m_prereqRank - // 13-14 part of prev field - //uint32 needAddInSpellBook; // 15 m_flags also need disable higest ranks on reset talent tree - //uint32 unk2; // 16 m_requiredSpellID - //uint64 allowForPet; // 17 m_categoryMask its a 64 bit mask for pet 1<ID), name(dbc->name), map(dbc->map), - type(dbc->type), expansion(dbc->expansion), group(dbc->grouptype), - minlevel(dbc->minlevel), maxlevel(dbc->maxlevel), difficulty(Difficulty(dbc->difficulty)), - seasonal((dbc->flags & LFG_FLAG_SEASONAL) != 0), x(0.0f), y(0.0f), z(0.0f), o(0.0f), - requiredItemLevel(0), requiredTanks(dbc->requiredTanks), requiredHealers(dbc->requiredHealers), - requiredDamageDealers(dbc->requiredDamageDealers) +LFGDungeonData::LFGDungeonData(LFGDungeonEntry const* dbc) : id(dbc->ID), name(dbc->Name), map(dbc->MapID), + type(dbc->TypeID), expansion(dbc->ExpansionLevel), group(dbc->Group_ID), + minlevel(dbc->MinLevel), maxlevel(dbc->Maxlevel), difficulty(Difficulty(dbc->DifficultyID)), + seasonal((dbc->Flags & LFG_FLAG_SEASONAL) != 0), x(0.0f), y(0.0f), z(0.0f), o(0.0f), + requiredItemLevel(0), requiredTanks(dbc->Count_tank), requiredHealers(dbc->Count_healer), + requiredDamageDealers(dbc->Count_damage) { } @@ -205,7 +205,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */) if (!dungeon) continue; - switch (dungeon->type) + switch (dungeon->TypeID) { case LFG_TYPE_DUNGEON: case LFG_TYPE_HEROIC: @@ -397,7 +397,7 @@ void LFGMgr::Update(uint32 diff) // Update shortages for (LFGDungeonEntry const* dungeon : sLFGDungeonStore) { - if (dungeon->type != LFG_TYPE_RANDOM) + if (dungeon->TypeID != LFG_TYPE_RANDOM) continue; uint32 dpsCount = 0; @@ -1053,7 +1053,7 @@ void LFGMgr::MakeNewGroup(LfgProposal const& proposal) { uint32 rDungeonId = (*dungeons.begin()); LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(rDungeonId); - if (dungeon && dungeon->type == LFG_TYPE_RANDOM) + if (dungeon && dungeon->TypeID == LFG_TYPE_RANDOM) player->CastSpell(player, LFG_SPELL_DUNGEON_COOLDOWN, false); } } @@ -2260,10 +2260,10 @@ void LFGMgr::AddDungeonsFromGroupingMap(LfgCachedDungeonContainer& container, ui // Check for grouped dungeons from grouping map for (auto itr : sLFGDungeonsGroupingMapStore) { - if (itr->randomLfgDungeonId == dungeonId) + if (itr->Random_lfgDungeonsID == dungeonId) { - if (container[groupId].find(itr->dungeonId) == container[groupId].end()) - container[groupId].insert(itr->dungeonId); + if (container[groupId].find(itr->LfgDungeonsID) == container[groupId].end()) + container[groupId].insert(itr->LfgDungeonsID); } } } diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index f94a6fadf0..d9bbe8cafe 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -548,7 +548,7 @@ bool Creature::UpdateEntry(uint32 entry, CreatureData const* data /*= nullptr*/, // checked and error show at loading templates if (FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(cInfo->faction)) - SetPvP((factionTemplate->factionFlags & FACTION_TEMPLATE_FLAG_PVP) != 0); + SetPvP((factionTemplate->Flags & FACTION_TEMPLATE_FLAG_PVP) != 0); // updates spell bars for vehicles and set player's faction - should be called here, to overwrite faction that is set from the new template if (IsVehicle()) diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp index b60ea20c6c..ae67969e4b 100644 --- a/src/server/game/Entities/Creature/TemporarySummon.cpp +++ b/src/server/game/Entities/Creature/TemporarySummon.cpp @@ -307,7 +307,7 @@ void Minion::RemoveFromWorld() bool Minion::IsGuardianPet() const { - return IsPet() || (m_Properties && m_Properties->Category == SUMMON_CATEGORY_PET); + return IsPet() || (m_Properties && m_Properties->Control == SUMMON_CATEGORY_PET); } bool Minion::IsWarlockMinion() const @@ -330,7 +330,7 @@ Guardian::Guardian(SummonPropertiesEntry const* properties, Unit* owner, bool is { memset(m_statFromOwner, 0, sizeof(float)*MAX_STATS); m_unitTypeMask |= UNIT_MASK_GUARDIAN; - if (properties && properties->Type == SUMMON_TYPE_PET) + if (properties && properties->Title == SUMMON_TYPE_PET) { m_unitTypeMask |= UNIT_MASK_CONTROLABLE_GUARDIAN; InitCharmInfo(); diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 8e19a6f6a1..4e2c2ddf53 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -2053,9 +2053,9 @@ bool GameObject::IsInRange(float x, float y, float z, float radius) const float cosB = dy / dist; dx = dist * (cosA * cosB + sinA * sinB); dy = dist * (cosA * sinB - sinA * cosB); - return dx < info->maxX + radius && dx > info->minX - radius - && dy < info->maxY + radius && dy > info->minY - radius - && dz < info->maxZ + radius && dz > info->minZ - radius; + return dx < info->GeoBoxMax.X + radius && dx > info->GeoBoxMin.X - radius + && dy < info->GeoBoxMax.Y + radius && dy > info->GeoBoxMin.Y - radius + && dz < info->GeoBoxMax.Z + radius && dz > info->GeoBoxMin.Z - radius; } void GameObject::EventInform(uint32 eventId, WorldObject* invoker /*= nullptr*/) @@ -2231,8 +2231,8 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* uint32 modelId = m_goInfo->displayId; if (DestructibleModelDataEntry const* modelData = sDestructibleModelDataStore.LookupEntry(m_goInfo->building.destructibleData)) - if (modelData->DamagedDisplayId) - modelId = modelData->DamagedDisplayId; + if (modelData->State0WMO) + modelId = modelData->State0WMO; SetDisplayId(modelId); if (setHealth) @@ -2260,8 +2260,8 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* uint32 modelId = m_goInfo->displayId; if (DestructibleModelDataEntry const* modelData = sDestructibleModelDataStore.LookupEntry(m_goInfo->building.destructibleData)) - if (modelData->DestroyedDisplayId) - modelId = modelData->DestroyedDisplayId; + if (modelData->State1WMO) + modelId = modelData->State1WMO; SetDisplayId(modelId); if (setHealth) @@ -2279,8 +2279,8 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* uint32 modelId = m_goInfo->displayId; if (DestructibleModelDataEntry const* modelData = sDestructibleModelDataStore.LookupEntry(m_goInfo->building.destructibleData)) - if (modelData->RebuildingDisplayId) - modelId = modelData->RebuildingDisplayId; + if (modelData->State2WMO) + modelId = modelData->State2WMO; SetDisplayId(modelId); // restores to full health @@ -2706,12 +2706,12 @@ bool GameObject::IsAtInteractDistance(Position const& pos, float radius) const { float scale = GetObjectScale(); - float minX = displayInfo->minX * scale - radius; - float minY = displayInfo->minY * scale - radius; - float minZ = displayInfo->minZ * scale - radius; - float maxX = displayInfo->maxX * scale + radius; - float maxY = displayInfo->maxY * scale + radius; - float maxZ = displayInfo->maxZ * scale + radius; + float minX = displayInfo->GeoBoxMin.X * scale - radius; + float minY = displayInfo->GeoBoxMin.Y * scale - radius; + float minZ = displayInfo->GeoBoxMin.Z * scale - radius; + float maxX = displayInfo->GeoBoxMax.X * scale + radius; + float maxY = displayInfo->GeoBoxMax.Y * scale + radius; + float maxZ = displayInfo->GeoBoxMax.Z * scale + radius; QuaternionData worldRotation = GetWorldRotation(); G3D::Quat worldRotationQuat(worldRotation.x, worldRotation.y, worldRotation.z, worldRotation.w); diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index 562134b26a..d25a3c2553 100644 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -50,7 +50,7 @@ void AddItemsSetItem(Player* player, Item* item) return; } - if (set->required_skill_id && player->GetSkillValue(set->required_skill_id) < set->required_skill_value) + if (set->RequiredSkill && player->GetSkillValue(set->RequiredSkill) < set->RequiredSkillRank) return; ItemSetEffect* eff = nullptr; @@ -84,15 +84,16 @@ void AddItemsSetItem(Player* player, Item* item) for (uint32 x = 0; x < MAX_ITEM_SET_SPELLS; ++x) { - if (!set->spells [x]) + if (!set->SetSpellID[x]) continue; + //not enough for spell - if (set->items_to_triggerspell[x] > eff->item_count) + if (set->SetThreshold[x] > eff->item_count) continue; uint32 z = 0; for (; z < MAX_ITEM_SET_SPELLS; ++z) - if (eff->spells[z] && eff->spells[z]->Id == set->spells[x]) + if (eff->spells[z] && eff->spells[z]->Id == set->SetSpellID[x]) break; if (z < MAX_ITEM_SET_SPELLS) @@ -103,10 +104,10 @@ void AddItemsSetItem(Player* player, Item* item) { if (!eff->spells[y]) // free slot { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(set->spells[x]); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(set->SetSpellID[x]); if (!spellInfo) { - TC_LOG_ERROR("entities.player.items", "WORLD: unknown spell id %u in items set %u effects", set->spells[x], setid); + TC_LOG_ERROR("entities.player.items", "WORLD: unknown spell id %u in items set %u effects", set->SetSpellID[x], setid); break; } @@ -150,16 +151,16 @@ void RemoveItemsSetItem(Player*player, ItemTemplate const* proto) for (uint32 x = 0; x < MAX_ITEM_SET_SPELLS; x++) { - if (!set->spells[x]) + if (!set->SetSpellID[x]) continue; // enough for spell - if (set->items_to_triggerspell[x] <= eff->item_count) + if (set->SetThreshold[x] <= eff->item_count) continue; for (uint32 z = 0; z < MAX_ITEM_SET_SPELLS; z++) { - if (eff->spells[z] && eff->spells[z]->Id == set->spells[x]) + if (eff->spells[z] && eff->spells[z]->Id == set->SetSpellID[x]) { // spell can be not active if not fit form requirement player->ApplyEquipSpell(eff->spells[z], nullptr, false); @@ -554,7 +555,7 @@ void Item::SetItemRandomProperties(int32 randomPropId) SetState(ITEM_CHANGED, GetOwner()); } for (uint32 i = PROP_ENCHANTMENT_SLOT_1; i < PROP_ENCHANTMENT_SLOT_1 + 3; ++i) - SetEnchantment(EnchantmentSlot(i), item_rand->enchant_id[i - PROP_ENCHANTMENT_SLOT_1], 0, 0); + SetEnchantment(EnchantmentSlot(i), item_rand->Enchantment[i - PROP_ENCHANTMENT_SLOT_1], 0, 0); } } else @@ -571,7 +572,7 @@ void Item::SetItemRandomProperties(int32 randomPropId) } for (uint32 i = PROP_ENCHANTMENT_SLOT_0; i <= PROP_ENCHANTMENT_SLOT_4; ++i) - SetEnchantment(EnchantmentSlot(i), item_rand->enchant_id[i - PROP_ENCHANTMENT_SLOT_0], 0, 0); + SetEnchantment(EnchantmentSlot(i), item_rand->Enchantment[i - PROP_ENCHANTMENT_SLOT_0], 0, 0); } } } @@ -702,7 +703,7 @@ bool Item::HasEnchantRequiredSkill(Player const* player) const if (uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot))) if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id)) - if (enchantEntry->requiredSkill && player->GetSkillValue(enchantEntry->requiredSkill) < enchantEntry->requiredSkillValue) + if (enchantEntry->RequiredSkillID && player->GetSkillValue(enchantEntry->RequiredSkillID) < enchantEntry->RequiredSkillRank) return false; } @@ -721,8 +722,8 @@ uint32 Item::GetEnchantRequiredLevel() const if (uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot))) if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id)) - if (enchantEntry->requiredLevel > level) - level = enchantEntry->requiredLevel; + if (enchantEntry->MinLevel > level) + level = enchantEntry->MinLevel; } return level; @@ -738,7 +739,7 @@ bool Item::IsBoundByEnchant() const if (uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot))) if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id)) - if (enchantEntry->slot & ENCHANTMENT_CAN_SOULBOUND) + if (enchantEntry->Flags & ENCHANTMENT_CAN_SOULBOUND) return true; } @@ -868,7 +869,7 @@ bool Item::GemsFitSockets() const uint8 GemColor = 0; - uint32 gemid = enchantEntry->GemID; + uint32 gemid = enchantEntry->Src_itemID; if (gemid) { ItemTemplate const* gemProto = sObjectMgr->GetItemTemplate(gemid); @@ -876,7 +877,7 @@ bool Item::GemsFitSockets() const { GemPropertiesEntry const* gemProperty = sGemPropertiesStore.LookupEntry(gemProto->GemProperties); if (gemProperty) - GemColor = gemProperty->color; + GemColor = gemProperty->Type; } } @@ -899,7 +900,7 @@ uint8 Item::GetGemCountWithID(uint32 GemID) const if (!enchantEntry) continue; - if (GemID == enchantEntry->GemID) + if (GemID == enchantEntry->Src_itemID) ++count; } return count; @@ -918,7 +919,7 @@ uint8 Item::GetGemCountWithLimitCategory(uint32 limitCategory) const if (!enchantEntry) continue; - ItemTemplate const* gemProto = sObjectMgr->GetItemTemplate(enchantEntry->GemID); + ItemTemplate const* gemProto = sObjectMgr->GetItemTemplate(enchantEntry->Src_itemID); if (!gemProto) continue; @@ -1272,9 +1273,9 @@ uint32 Item::GetSellPrice(ItemTemplate const* proto, bool& normalSellPrice) inventoryType == INVTYPE_RANGED || inventoryType == INVTYPE_THROWN || inventoryType == INVTYPE_RANGEDRIGHT) - baseFactor = basePrice->WeaponFactor; + baseFactor = basePrice->Weapon; else - baseFactor = basePrice->ArmorFactor; + baseFactor = basePrice->Armor; if (inventoryType == INVTYPE_ROBE) inventoryType = INVTYPE_CHEST; @@ -1302,16 +1303,16 @@ uint32 Item::GetSellPrice(ItemTemplate const* proto, bool& normalSellPrice) { case ITEM_SUBCLASS_ARMOR_MISCELLANEOUS: case ITEM_SUBCLASS_ARMOR_CLOTH: - typeFactor = armorPrice->ClothFactor; + typeFactor = armorPrice->ClothModifier; break; case ITEM_SUBCLASS_ARMOR_LEATHER: - typeFactor = armorPrice->LeatherFactor; + typeFactor = armorPrice->LeatherModifier; break; case ITEM_SUBCLASS_ARMOR_MAIL: - typeFactor = armorPrice->MailFactor; + typeFactor = armorPrice->ChainModifier; break; case ITEM_SUBCLASS_ARMOR_PLATE: - typeFactor = armorPrice->PlateFactor; + typeFactor = armorPrice->PlateModifier; break; default: return 0; @@ -1325,7 +1326,7 @@ uint32 Item::GetSellPrice(ItemTemplate const* proto, bool& normalSellPrice) if (!shieldPrice) return 0; - typeFactor = shieldPrice->Factor; + typeFactor = shieldPrice->Data; break; } case INVTYPE_WEAPONMAINHAND: @@ -1355,7 +1356,7 @@ uint32 Item::GetSellPrice(ItemTemplate const* proto, bool& normalSellPrice) if (!weaponPrice) return 0; - typeFactor = weaponPrice->Factor; + typeFactor = weaponPrice->Data; } normalSellPrice = false; @@ -1380,7 +1381,7 @@ uint32 Item::GetSpecialPrice(ItemTemplate const* proto, uint32 minimumPrice /*= { ItemClassEntry const* classEntry = sItemClassStore.LookupEntry(proto->Class); if (classEntry) - cost *= classEntry->PriceFactor; + cost *= classEntry->PriceModifier; else cost = 0; } @@ -1417,10 +1418,10 @@ int32 Item::GetReforgableStat(ItemModType statType) const for (uint32 e = PROP_ENCHANTMENT_SLOT_0; e <= PROP_ENCHANTMENT_SLOT_4; ++e) if (SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(GetEnchantmentId(EnchantmentSlot(e)))) for (uint32 f = 0; f < MAX_ITEM_ENCHANTMENT_EFFECTS; ++f) - if (enchant->type[f] == ITEM_ENCHANTMENT_TYPE_STAT && ItemModType(enchant->spellid[f]) == statType) + if (enchant->Effect[f] == ITEM_ENCHANTMENT_TYPE_STAT && ItemModType(enchant->EffectArg[f]) == statType) for (int k = 0; k < 5; ++k) - if (randomSuffix->enchant_id[k] == enchant->ID) - return int32((randomSuffix->prefix[k] * GetItemSuffixFactor()) / 10000); + if (randomSuffix->Enchantment[k] == enchant->ID) + return int32((randomSuffix->AllocationPct[k] * GetItemSuffixFactor()) / 10000); } else { @@ -1431,10 +1432,10 @@ int32 Item::GetReforgableStat(ItemModType statType) const for (uint32 e = PROP_ENCHANTMENT_SLOT_0; e <= PROP_ENCHANTMENT_SLOT_4; ++e) if (SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(GetEnchantmentId(EnchantmentSlot(e)))) for (uint32 f = 0; f < MAX_ITEM_ENCHANTMENT_EFFECTS; ++f) - if (enchant->type[f] == ITEM_ENCHANTMENT_TYPE_STAT && ItemModType(enchant->spellid[f]) == statType) + if (enchant->Effect[f] == ITEM_ENCHANTMENT_TYPE_STAT && ItemModType(enchant->EffectArg[f]) == statType) for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; ++k) - if (randomProp->enchant_id[k] == enchant->ID) - return int32(enchant->amount[k]); + if (randomProp->Enchantment[k] == enchant->ID) + return int32(enchant->EffectPointsMin[k]); } return 0; diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 88b0d90df4..b792f7e714 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -554,7 +554,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const if (flags & UPDATEFLAG_VEHICLE) { *data << float(self->GetTransport() ? self->GetTransOffsetO() : self->GetOrientation()); - *data << uint32(self->GetVehicleKit()->GetVehicleInfo()->m_ID); + *data << uint32(self->GetVehicleKit()->GetVehicleInfo()->ID); } if (flags & UPDATEFLAG_GO_TRANSPORT_POSITION) @@ -2041,7 +2041,7 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert uint32 mask = UNIT_MASK_SUMMON; if (properties) { - switch (properties->Category) + switch (properties->Control) { case SUMMON_CATEGORY_PET: mask = UNIT_MASK_GUARDIAN; @@ -2056,7 +2056,7 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert case SUMMON_CATEGORY_ALLY: case SUMMON_CATEGORY_UNK: { - switch (properties->Type) + switch (properties->Title) { case SUMMON_TYPE_MINION: case SUMMON_TYPE_GUARDIAN: diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 3d69de2292..80b42eb548 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -842,15 +842,15 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) //scale CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family); - if (cFamily && cFamily->minScale > 0.0f && petType == HUNTER_PET) + if (cFamily && cFamily->MinScale > 0.0f && petType == HUNTER_PET) { float scale; - if (getLevel() >= cFamily->maxScaleLevel) - scale = cFamily->maxScale; - else if (getLevel() <= cFamily->minScaleLevel) - scale = cFamily->minScale; + if (getLevel() >= cFamily->MaxScaleLevel) + scale = cFamily->MaxScale; + else if (getLevel() <= cFamily->MinScaleLevel) + scale = cFamily->MinScale; else - scale = cFamily->minScale + float(getLevel() - cFamily->minScaleLevel) / cFamily->maxScaleLevel * (cFamily->maxScale - cFamily->minScale); + scale = cFamily->MinScale + float(getLevel() - cFamily->MinScaleLevel) / cFamily->MaxScaleLevel * (cFamily->MaxScale - cFamily->MinScale); SetObjectScale(scale); } @@ -1080,7 +1080,7 @@ bool Pet::HaveInDiet(ItemTemplate const* item) const if (!cFamily) return false; - uint32 diet = cFamily->petFoodMask; + uint32 diet = cFamily->PetFoodMask; uint32 FoodMask = 1 << (item->FoodType-1); return (diet & FoodMask) != 0; } @@ -1378,7 +1378,7 @@ bool Pet::addSpell(uint32 spellId, ActiveStates active /*= ACT_DECIDE*/, PetSpel for (uint8 i = 0; i < MAX_TALENT_RANK; ++i) { // skip learning spell and no rank spell case - uint32 rankSpellId = talentInfo->RankID[i]; + uint32 rankSpellId = talentInfo->SpellRank[i]; if (!rankSpellId || rankSpellId == spellId) continue; @@ -1611,7 +1611,7 @@ bool Pet::resetTalents() return false; // Check pet talent type CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(ci->family); - if (!pet_family || pet_family->petTalentType < 0) + if (!pet_family || pet_family->PetTalentType < 0) return false; uint8 level = getLevel(); @@ -1630,13 +1630,13 @@ bool Pet::resetTalents() if (!talentInfo) continue; - TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TabID); if (!talentTabInfo) continue; // unlearn only talents for pets family talent type - if (!((1 << pet_family->petTalentType) & talentTabInfo->petTalentMask)) + if (!((1 << pet_family->PetTalentType) & talentTabInfo->CategoryEnumID)) continue; for (uint8 j = 0; j < MAX_TALENT_RANK; ++j) @@ -1652,7 +1652,7 @@ bool Pet::resetTalents() uint32 itrFirstId = sSpellMgr->GetFirstSpellInChain(itr->first); // unlearn if first rank is talent or learned by talent - if (itrFirstId == talentInfo->RankID[j] || sSpellMgr->IsSpellLearnToSpell(talentInfo->RankID[j], itrFirstId)) + if (itrFirstId == talentInfo->SpellRank[j] || sSpellMgr->IsSpellLearnToSpell(talentInfo->SpellRank[j], itrFirstId)) { unlearnSpell(itr->first, false); itr = m_spells.begin(); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 74b0199414..90cdfd0992 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -461,7 +461,7 @@ bool Player::Create(ObjectGuid::LowType guidlow, CharacterCreateInfo* createInfo SetMap(sMapMgr->CreateMap(info->mapId, this)); - uint8 powertype = cEntry->powerType; + uint8 powertype = cEntry->DisplayPower; SetObjectScale(1.0f); @@ -583,10 +583,10 @@ bool Player::Create(ObjectGuid::LowType guidlow, CharacterCreateInfo* createInfo { for (int j = 0; j < MAX_OUTFIT_ITEMS; ++j) { - if (oEntry->ItemId[j] <= 0) + if (oEntry->ItemID[j] <= 0) continue; - uint32 itemId = oEntry->ItemId[j]; + uint32 itemId = oEntry->ItemID[j]; // just skip, reported in ObjectMgr::LoadItemTemplates ItemTemplate const* iProto = sObjectMgr->GetItemTemplate(itemId); @@ -898,7 +898,7 @@ void Player::HandleDrowning(uint32 time_diff) SendMirrorTimer(FATIGUE_TIMER, DarkWaterTime, m_MirrorTimer[FATIGUE_TIMER], 10); } - if (m_MirrorTimerFlags & (UNDERWATER_INLAVA /*| UNDERWATER_INSLIME*/) && !(_lastLiquid && _lastLiquid->SpellId)) + if (m_MirrorTimerFlags & (UNDERWATER_INLAVA /*| UNDERWATER_INSLIME*/) && !(_lastLiquid && _lastLiquid->SpellID)) { // Breath timer not activated - activate it if (m_MirrorTimer[FIRE_TIMER] == DISABLED_MIRROR_TIMER) @@ -2271,24 +2271,24 @@ bool Player::IsInAreaTriggerRadius(AreaTriggerEntry const* trigger) const if (!trigger) return false; - if (GetMapId() != trigger->mapid && !GetPhaseShift().HasVisibleMapId(trigger->mapid)) + if (GetMapId() != trigger->ContinentID && !GetPhaseShift().HasVisibleMapId(trigger->ContinentID)) return false; if (trigger->PhaseID || trigger->PhaseGroupID || trigger->PhaseUseFlags) if (!PhasingHandler::InDbPhaseShift(this, trigger->PhaseUseFlags, trigger->PhaseID, trigger->PhaseGroupID)) return false; - if (trigger->radius > 0.f) + if (trigger->Radius > 0.f) { // if we have radius check it - float dist = GetDistance(trigger->x, trigger->y, trigger->z); - if (dist > trigger->radius) + float dist = GetDistance(trigger->Pos.X, trigger->Pos.Y, trigger->Pos.Z); + if (dist > trigger->Radius) return false; } else { - Position center(trigger->x, trigger->y, trigger->z, trigger->box_orientation); - if (!IsWithinBox(center, trigger->box_x / 2.f, trigger->box_y / 2.f, trigger->box_z / 2.f)) + Position center(trigger->Pos.X, trigger->Pos.Y, trigger->Pos.Z, trigger->Box_yaw); + if (!IsWithinBox(center, trigger->Box_height / 2.f, trigger->Box_length / 2.f, trigger->Box_height / 2.f)) return false; } @@ -2871,7 +2871,7 @@ void Player::SendUnlearnSpells() bool hasSupercededSpellInfoInClient = false; for (auto boundsItr = skillLineAbilities.first; boundsItr != skillLineAbilities.second; ++boundsItr) { - if (boundsItr->second->forward_spellid) + if (boundsItr->second->SupercededBySpell) { hasSupercededSpellInfoInClient = true; break; @@ -3021,7 +3021,7 @@ bool Player::AddTalent(uint32 spellId, uint8 spec, bool learning) for (uint8 rank = 0; rank < MAX_TALENT_RANK; ++rank) { // skip learning spell and no rank spell case - uint32 rankSpellId = talentInfo->RankID[rank]; + uint32 rankSpellId = talentInfo->SpellRank[rank]; if (!rankSpellId || rankSpellId == spellId) continue; @@ -3053,7 +3053,7 @@ static bool IsUnlearnSpellsPacketNeededForSpell(uint32 spellId) bool hasSupercededSpellInfoInClient = false; for (auto boundsItr = skillLineAbilities.first; boundsItr != skillLineAbilities.second; ++boundsItr) { - if (boundsItr->second->forward_spellid) + if (boundsItr->second->SupercededBySpell) { hasSupercededSpellInfoInClient = true; break; @@ -3222,7 +3222,7 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent for (uint8 rank = 0; rank < MAX_TALENT_RANK; ++rank) { // skip learning spell and no rank spell case - uint32 rankSpellId = talentInfo->RankID[rank]; + uint32 rankSpellId = talentInfo->SpellRank[rank]; if (!rankSpellId || rankSpellId == spellId) continue; @@ -3365,17 +3365,17 @@ 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; - if (pSkill->id == fromSkill) + if (pSkill->ID == fromSkill) continue; ///@todo: confirm if rogues start with lockpicking skill at level 1 but only receive the spell to use it at level 16 // Also added for runeforging. It's already confirmed this happens upon learning for Death Knights, not from character creation. - if ((_spell_idx->second->AutolearnType == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && !HasSkill(pSkill->id)) || ((pSkill->id == SKILL_LOCKPICKING || pSkill->id == SKILL_RUNEFORGING) && _spell_idx->second->max_value == 0)) - LearnDefaultSkill(pSkill->id, 0); + if ((_spell_idx->second->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && !HasSkill(pSkill->ID)) || ((pSkill->ID == SKILL_LOCKPICKING || pSkill->ID == SKILL_RUNEFORGING) && _spell_idx->second->TrivialSkillLineRankHigh == 0)) + LearnDefaultSkill(pSkill->ID, 0); } } @@ -3398,8 +3398,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); @@ -3469,7 +3469,7 @@ bool Player::HandlePassiveSpellLearn(SpellInfo const* spellInfo) bool Player::IsCurrentSpecMasterySpell(SpellInfo const* spellInfo) const { if (TalentTabEntry const* talentTab = sTalentTabStore.LookupEntry(GetPrimaryTalentTree(GetActiveSpec()))) - return spellInfo->Id == talentTab->MasterySpellId[0] || spellInfo->Id == talentTab->MasterySpellId[1]; + return spellInfo->Id == talentTab->MasterySpellID[0] || spellInfo->Id == talentTab->MasterySpellID[1]; return false; } @@ -3801,7 +3801,7 @@ bool Player::ResetTalents(bool no_cost) if (!talentInfo) continue; - TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TabID); if (!talentTabInfo) continue; @@ -3815,18 +3815,18 @@ bool Player::ResetTalents(bool no_cost) for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank) { // skip non-existing talent ranks - if (talentInfo->RankID[rank] == 0) + if (talentInfo->SpellRank[rank] == 0) continue; - SpellInfo const* _spellEntry = sSpellMgr->GetSpellInfo(talentInfo->RankID[rank]); + SpellInfo const* _spellEntry = sSpellMgr->GetSpellInfo(talentInfo->SpellRank[rank]); if (!_spellEntry) continue; - RemoveSpell(talentInfo->RankID[rank], true); + RemoveSpell(talentInfo->SpellRank[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); // if this talent rank can be found in the PlayerTalentMap, mark the talent as removed so it gets deleted - PlayerTalentMap::iterator plrTalent = GetTalentMap(GetActiveSpec())->find(talentInfo->RankID[rank]); + PlayerTalentMap::iterator plrTalent = GetTalentMap(GetActiveSpec())->find(talentInfo->SpellRank[rank]); if (plrTalent != GetTalentMap(GetActiveSpec())->end()) plrTalent->second->state = PLAYERSPELL_REMOVED; } @@ -3842,7 +3842,7 @@ bool Player::ResetTalents(bool no_cost) TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentTabs[i]); for (uint32 j = 0; j < MAX_MASTERY_SPELLS; ++j) - if (uint32 mastery = talentTabInfo->MasterySpellId[j]) + if (uint32 mastery = talentTabInfo->MasterySpellID[j]) RemoveAurasDueToSpell(mastery); } @@ -4813,8 +4813,8 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g return TotalCost; } - uint32 dmultiplier = dcost->multiplier[ItemSubClassToDurabilityMultiplierId(ditemProto->Class, ditemProto->SubClass)]; - uint32 costs = uint32(LostDurability*dmultiplier*double(dQualitymodEntry->quality_mod)); + uint32 dmultiplier = dcost->Multiplier[ItemSubClassToDurabilityMultiplierId(ditemProto->Class, ditemProto->SubClass)]; + uint32 costs = uint32(LostDurability*dmultiplier*double(dQualitymodEntry->Data)); costs = uint32(costs * discountMod * sWorld->getRate(RATE_REPAIRCOST)); @@ -4894,14 +4894,14 @@ void Player::RepopAtGraveyard() if (ClosestGrave) { float const* orientation = sObjectMgr->GetGraveyardOrientation(ClosestGrave->ID); - TeleportTo(ClosestGrave->map_id, ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, orientation ? *orientation : GetOrientation()); + TeleportTo(ClosestGrave->Continent, ClosestGrave->Loc.X, ClosestGrave->Loc.Y, ClosestGrave->Loc.Z, orientation ? *orientation : GetOrientation()); if (isDead()) // not send if alive, because it used in TeleportTo() { - WorldPacket data(SMSG_DEATH_RELEASE_LOC, 4*4); // show spirit healer position on minimap - data << ClosestGrave->map_id; - data << ClosestGrave->x; - data << ClosestGrave->y; - data << ClosestGrave->z; + WorldPacket data(SMSG_DEATH_RELEASE_LOC, 4 * 4); // show spirit healer position on minimap + data << ClosestGrave->Continent; + data << ClosestGrave->Loc.X; + data << ClosestGrave->Loc.Y; + data << ClosestGrave->Loc.Z; SendDirectMessage(&data); } } @@ -4913,13 +4913,13 @@ void Player::RepopAtGraveyard() bool Player::CanJoinConstantChannelInZone(ChatChannelsEntry const* channel, AreaTableEntry const* zone) const { - if (channel->flags & CHANNEL_DBC_FLAG_ZONE_DEP && zone->Flags & AREA_FLAG_ARENA_INSTANCE) + if (channel->Flags & CHANNEL_DBC_FLAG_ZONE_DEP && zone->Flags & AREA_FLAG_ARENA_INSTANCE) return false; - if ((channel->flags & CHANNEL_DBC_FLAG_CITY_ONLY) && (!(zone->Flags & AREA_FLAG_SLAVE_CAPITAL))) + if ((channel->Flags & CHANNEL_DBC_FLAG_CITY_ONLY) && (!(zone->Flags & AREA_FLAG_SLAVE_CAPITAL))) return false; - if ((channel->flags & CHANNEL_DBC_FLAG_GUILD_REQ) && GetGuildId()) + if ((channel->Flags & CHANNEL_DBC_FLAG_GUILD_REQ) && GetGuildId()) return false; return true; @@ -4990,12 +4990,12 @@ void Player::UpdateLocalChannels(uint32 newZone) if (CanJoinConstantChannelInZone(channelEntry, current_zone)) { - if (!(channelEntry->flags & CHANNEL_DBC_FLAG_GLOBAL)) + if (!(channelEntry->Flags & CHANNEL_DBC_FLAG_GLOBAL)) { - if (channelEntry->flags & CHANNEL_DBC_FLAG_CITY_ONLY && usedChannel) + if (channelEntry->Flags & CHANNEL_DBC_FLAG_CITY_ONLY && usedChannel) continue; // Already on the channel, as city channel names are not changing - joinChannel = cMgr->GetJoinChannel(channelEntry->ChannelID, std::string(), current_zone); + joinChannel = cMgr->GetJoinChannel(channelEntry->ID, std::string(), current_zone); if (usedChannel) { if (joinChannel != usedChannel) @@ -5008,7 +5008,7 @@ void Player::UpdateLocalChannels(uint32 newZone) } } else - joinChannel = cMgr->GetJoinChannel(channelEntry->ChannelID, std::string()); + joinChannel = cMgr->GetJoinChannel(channelEntry->ID, std::string()); } else removeChannel = usedChannel; @@ -5451,36 +5451,36 @@ 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); - uint32 craft_skill_points = _spell_idx->second->character_points; + uint32 craft_skill_points = _spell_idx->second->NumSkillUps; if (craft_skill_points) { craft_skill_points *= craft_skill_gain; - TC_LOG_INFO("entities.player", "craft_skill_points is %u, spellID: %u, skillID: %u", craft_skill_points, spellid, _spell_idx->second->skillId); - 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), + TC_LOG_INFO("entities.player", "craft_skill_points is %u, spellID: %u, skillID: %u", craft_skill_points, spellid, _spell_idx->second->SkillLine); + 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_points); } - 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); } } @@ -5563,7 +5563,7 @@ void Player::GiveXpForGather(uint32 const& skillId) if (!areaEntry) return; - uint8 levelDiff = std::abs(int32(areaEntry->maxRecommendedLevel - getLevel())); + uint8 levelDiff = std::abs(int32(areaEntry->LevelRangeMax - getLevel())); uint8 level = 0; if (levelDiff >= 10 && levelDiff < 20) @@ -5573,7 +5573,7 @@ void Player::GiveXpForGather(uint32 const& skillId) else level = getLevel() + 3; - uint32 xp = Trinity::XP::BaseGain(level, areaEntry->maxRecommendedLevel, GetContentLevelsForMapAndZone(GetMapId(), zoneId)) * 2; + uint32 xp = Trinity::XP::BaseGain(level, areaEntry->LevelRangeMax, GetContentLevelsForMapAndZone(GetMapId(), zoneId)) * 2; if (!xp || levelDiff >= 20) return; @@ -5711,7 +5711,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; @@ -5742,10 +5742,10 @@ void Player::UpdateWeaponsSkillsToMaxSkillsForLevel() 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; @@ -5768,10 +5768,10 @@ void Player::InitializeSkillFields() uint32 i = 0; for (SkillLineEntry const* skillLine : sSkillLineStore) { - if (GetSkillRaceClassInfo(skillLine->id, getRace(), getClass())) + if (GetSkillRaceClassInfo(skillLine->ID, getRace(), getClass())) { - SetSkillLineId(i, skillLine->id); - mSkillStatus.insert(SkillStatusMap::value_type(skillLine->id, SkillStatusData(i, SKILL_UNCHANGED))); + SetSkillLineId(i, skillLine->ID); + mSkillStatus.insert(SkillStatusMap::value_type(skillLine->ID, SkillStatusData(i, SKILL_UNCHANGED))); if (++i >= PLAYER_MAX_SKILLS) break; } @@ -5836,8 +5836,8 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal) // remove all spells that related to this skill for (SkillLineAbilityEntry const* skillLineAbilities : sSkillLineAbilityStore) - if (skillLineAbilities->skillId == id) - RemoveSpell(sSpellMgr->GetFirstSpellInChain(skillLineAbilities->spellId)); + if (skillLineAbilities->SkillLine == id) + RemoveSpell(sSpellMgr->GetFirstSpellInChain(skillLineAbilities->Spell)); // Clear profession lines if (GetUInt32Value(PLAYER_PROFESSION_SKILL_LINE_1) == id) @@ -5879,7 +5879,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal) return; } - 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); @@ -6262,7 +6262,7 @@ void Player::SendCinematicStart(uint32 CinematicSequenceId) const data << uint32(CinematicSequenceId); SendDirectMessage(&data); if (CinematicSequencesEntry const* sequence = sCinematicSequencesStore.LookupEntry(CinematicSequenceId)) - _cinematicMgr->SetActiveCinematicCamera(sequence->cinematicCamera); + _cinematicMgr->SetActiveCinematicCamera(sequence->Camera[0]); } void Player::SendMovieStart(uint32 MovieId) const @@ -6356,12 +6356,12 @@ uint32 Player::TeamForRace(uint8 race) { if (ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(race)) { - switch (rEntry->TeamID) + switch (rEntry->BaseLanguage) { case 1: return HORDE; case 7: return ALLIANCE; } - TC_LOG_ERROR("entities.player", "Race (%u) has wrong teamid (%u) in DBC: wrong DBC files?", uint32(race), rEntry->TeamID); + TC_LOG_ERROR("entities.player", "Race (%u) has wrong teamid (%u) in DBC: wrong DBC files?", uint32(race), rEntry->BaseLanguage); } else TC_LOG_ERROR("entities.player", "Race (%u) not found in DBC: wrong DBC files?", uint32(race)); @@ -6489,9 +6489,9 @@ void Player::RewardOnKill(Unit* victim, float rate) { // WotLK and Cataclysm dungeons only grant championing reputation when being in max level dungeons and fighting for a expansion related faction uint8 expansion = GetExpansionForFaction(GetChampioningFaction()); - if (dungeon->reclevel == GetMaxLevelForExpansion(dungeon->expansion) && expansion) + if (dungeon->Target_level == GetMaxLevelForExpansion(dungeon->ExpansionLevel) && expansion) { - if (expansion == dungeon->expansion) + if (expansion == dungeon->ExpansionLevel) ChampioningFaction = GetChampioningFaction(); } else @@ -6515,11 +6515,11 @@ void Player::RewardOnKill(Unit* victim, float rate) Note: retail tests have shown that burning crusade dungeons are the only kind of dungeons that grant championing and usual reputation at the same time which is why we duplicate the reward and modify the 2nd */ - bool secondaryReputationReward1 = (GetExpansionForFaction(rewFactionEntry1->team) == EXPANSION_THE_BURNING_CRUSADE + bool secondaryReputationReward1 = (GetExpansionForFaction(rewFactionEntry1->ParentFactionID) == EXPANSION_THE_BURNING_CRUSADE || GetExpansionForFaction(Rew->RepFaction1) == EXPANSION_THE_BURNING_CRUSADE); uint32 factionId1 = (ChampioningFaction && !secondaryReputationReward1) ? ChampioningFaction : Rew->RepFaction1; - if (rewFactionEntry1->GroupExpansion && !ChampioningFaction) + if (rewFactionEntry1->Expansion && !ChampioningFaction) factionId1 = 0; int32 donerep1 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->getLevel(), Rew->RepValue1, factionId1); @@ -6545,11 +6545,11 @@ void Player::RewardOnKill(Unit* victim, float rate) { if (FactionEntry const* rewFactionEntry2 = sFactionStore.LookupEntry(Rew->RepFaction2)) { - bool secondaryReputationReward2 = (GetExpansionForFaction(rewFactionEntry2->team) == EXPANSION_THE_BURNING_CRUSADE + bool secondaryReputationReward2 = (GetExpansionForFaction(rewFactionEntry2->ParentFactionID) == EXPANSION_THE_BURNING_CRUSADE || GetExpansionForFaction(Rew->RepFaction1) == EXPANSION_THE_BURNING_CRUSADE); uint32 factionId2 = (ChampioningFaction && secondaryReputationReward2) ? ChampioningFaction : Rew->RepFaction2; - if (rewFactionEntry2->GroupExpansion && !ChampioningFaction) + if (rewFactionEntry2->Expansion && !ChampioningFaction) factionId2 = 0; int32 donerep2 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->getLevel(), Rew->RepValue2, factionId2); @@ -6615,7 +6615,7 @@ void Player::RewardReputation(Quest const* quest) if (QuestFactionRewEntry const* questFactionRewEntry = sQuestFactionRewardStore.LookupEntry(row)) { uint32 field = abs(quest->RewardFactionValueId[i]); - rep = questFactionRewEntry->QuestRewFactionValue[field]; + rep = questFactionRewEntry->Difficulty[field]; } } @@ -6928,7 +6928,7 @@ void Player::SendCurrencies() const CurrencyTypesEntry const* entry = sCurrencyTypesStore.LookupEntry(itr->first); // not send init meta currencies. - if (!entry || entry->Category == CURRENCY_CATEGORY_META_CONQUEST) + if (!entry || entry->CategoryID == CURRENCY_CATEGORY_META_CONQUEST) continue; uint32 precision = (entry->Flags & CURRENCY_FLAG_HIGH_PRECISION) ? CURRENCY_PRECISION : 1; @@ -7101,7 +7101,7 @@ void Player::ModifyCurrency(uint32 id, int32 count, bool printLog/* = true*/, bo itr->second.TrackedQuantity = oldTrackedCount; } - if (currency->Category == CURRENCY_CATEGORY_META_CONQUEST) + if (currency->CategoryID == CURRENCY_CATEGORY_META_CONQUEST) { // count was changed to week limit, now we can modify original points. ModifyCurrency(CURRENCY_TYPE_CONQUEST_POINTS, count, printLog); @@ -7109,7 +7109,7 @@ void Player::ModifyCurrency(uint32 id, int32 count, bool printLog/* = true*/, bo } if (itr->second.state == PLAYERCURRENCY_NEW && HasSkill(SKILL_ARCHAEOLOGY) && - currency->Category == CURRENCY_CATEGORY_ARCHAEOLOGY) + currency->CategoryID == CURRENCY_CATEGORY_ARCHAEOLOGY) _archaeology->ActivateBranch(sArchaeologyMgr->Currency2BranchId(currency->ID)); WorldPacket packet(SMSG_UPDATE_CURRENCY, 12); @@ -7194,12 +7194,12 @@ uint32 Player::GetCurrencyWeekCap(CurrencyTypesEntry const* currency) const return Trinity::Currency::BgConquestRatingCalculator(GetRBGPersonalRating()) * CURRENCY_PRECISION; } - return currency->WeekCap; + return currency->MaxEarnablePerWeek; } uint32 Player::GetCurrencyTotalCap(CurrencyTypesEntry const* currency) const { - uint32 cap = currency->TotalCap; + uint32 cap = currency->MaxQty; switch (currency->ID) { @@ -7648,8 +7648,8 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply // req. check at equip, but allow use for extended range if range limit max level, set proper level uint32 ssd_level = getLevel(); - if (ssd && ssd_level > ssd->MaxLevel) - ssd_level = ssd->MaxLevel; + if (ssd && ssd_level > ssd->Maxlevel) + ssd_level = ssd->Maxlevel; ScalingStatValuesEntry const* ssv = ssd ? sScalingStatValuesStore.LookupEntry(ssd_level) : nullptr; if (only_level_scale && !ssv) @@ -7659,7 +7659,7 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply { int32 val = proto->GetStatValue(i, this); // If set ScalingStatDistribution need get stats and values from it - if (ssd && ssd->StatMod[i] < 0) + if (ssd && ssd->StatID[i] < 0) continue; uint32 statType = proto->ItemStat[i].ItemStatType; @@ -8206,7 +8206,7 @@ void Player::CastItemCombatSpell(DamageInfo const& damageInfo, Item* item, ItemT for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s) { - if (pEnchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL) + if (pEnchant->Effect[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL) continue; SpellEnchantProcEntry const* entry = sSpellMgr->GetSpellEnchantProcEvent(enchant_id); @@ -8224,15 +8224,15 @@ void Player::CastItemCombatSpell(DamageInfo const& damageInfo, Item* item, ItemT continue; } - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->EffectArg[s]); if (!spellInfo) { TC_LOG_ERROR("entities.player.items", "Player::CastItemCombatSpell: Player '%s' (%s) cast unknown spell (EnchantID: %u, SpellID: %i), ignoring", - GetName().c_str(), GetGUID().ToString().c_str(), pEnchant->ID, pEnchant->spellid[s]); + GetName().c_str(), GetGUID().ToString().c_str(), pEnchant->ID, pEnchant->EffectArg[s]); continue; } - float chance = pEnchant->amount[s] != 0 ? float(pEnchant->amount[s]) : GetWeaponProcChance(); + float chance = pEnchant->EffectPointsMin[s] != 0 ? float(pEnchant->EffectPointsMin[s]) : GetWeaponProcChance(); if (entry) { if (entry->PPMChance) @@ -8242,7 +8242,7 @@ void Player::CastItemCombatSpell(DamageInfo const& damageInfo, Item* item, ItemT } // Apply spell mods - ApplySpellMod(pEnchant->spellid[s], SPELLMOD_CHANCE_OF_SUCCESS, chance); + ApplySpellMod(pEnchant->EffectArg[s], SPELLMOD_CHANCE_OF_SUCCESS, chance); // Shiv has 100% chance to apply the poison if (FindCurrentSpellBySpellId(5938) && e_slot == TEMP_ENCHANTMENT_SLOT) @@ -8324,13 +8324,13 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8 continue; for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s) { - if (pEnchant->type[s] != ITEM_ENCHANTMENT_TYPE_USE_SPELL) + if (pEnchant->Effect[s] != ITEM_ENCHANTMENT_TYPE_USE_SPELL) continue; - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->EffectArg[s]); if (!spellInfo) { - TC_LOG_ERROR("entities.player", "Player::CastItemUseSpell: Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]); + TC_LOG_ERROR("entities.player", "Player::CastItemUseSpell: Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->EffectArg[s]); continue; } @@ -9544,12 +9544,12 @@ void Player::SendBGWeekendWorldStates() const for (uint32 i = 1; i < sBattlemasterListStore.GetNumRows(); ++i) { BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(i); - if (bl && bl->HolidayWorldStateId) + if (bl && bl->HolidayWorldState) { - if (BattlegroundMgr::IsBGWeekend((BattlegroundTypeId)bl->id)) - SendUpdateWorldState(bl->HolidayWorldStateId, 1); + if (BattlegroundMgr::IsBGWeekend((BattlegroundTypeId)bl->ID)) + SendUpdateWorldState(bl->HolidayWorldState, 1); else - SendUpdateWorldState(bl->HolidayWorldStateId, 0); + SendUpdateWorldState(bl->HolidayWorldState, 0); } } } @@ -10357,13 +10357,13 @@ InventoryResult Player::CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item return EQUIP_ERR_NOT_EQUIPPABLE; } - if (limitEntry->mode == ITEM_LIMIT_CATEGORY_MODE_HAVE) + if (limitEntry->Flags == ITEM_LIMIT_CATEGORY_MODE_HAVE) { uint32 curcount = GetItemCountWithLimitCategory(pProto->ItemLimitCategory, pItem); - if (curcount + count > uint32(limitEntry->maxCount)) + if (curcount + count > uint32(limitEntry->Quantity)) { if (no_space_count) - *no_space_count = count + curcount - limitEntry->maxCount; + *no_space_count = count + curcount - limitEntry->Quantity; if (itemLimitCategory) *itemLimitCategory = pProto->ItemLimitCategory; return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS; @@ -11147,7 +11147,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool ScalingStatDistributionEntry const* ssd = pProto->ScalingStatDistribution ? sScalingStatDistributionStore.LookupEntry(pProto->ScalingStatDistribution) : 0; // check allowed level (extend range to upper values if MaxLevel more or equal max player level, this let GM set high level with 1...max range items) - if (ssd && ssd->MaxLevel < DEFAULT_MAX_LEVEL && ssd->MaxLevel < getLevel()) + if (ssd && ssd->Maxlevel < DEFAULT_MAX_LEVEL && ssd->Maxlevel < getLevel()) return EQUIP_ERR_NOT_EQUIPPABLE; uint8 eslot = FindEquipSlot(pProto, slot, swap); @@ -13360,10 +13360,10 @@ void Player::ApplyReforgeEnchantment(Item* item, bool apply) if (!reforge) return; - float removeValue = item->GetReforgableStat(ItemModType(reforge->SourceStat)) * reforge->SourceMultiplier; - float addValue = removeValue * reforge->FinalMultiplier; + float removeValue = item->GetReforgableStat(ItemModType(reforge->Source_stat)) * reforge->Source_multiplier; + float addValue = removeValue * reforge->Target_multiplier; - switch (reforge->SourceStat) + switch (reforge->Source_stat) { case ITEM_MOD_MANA: HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, -removeValue, apply); @@ -13476,7 +13476,7 @@ void Player::ApplyReforgeEnchantment(Item* item, bool apply) break; } - switch (reforge->FinalStat) + switch (reforge->Target_stat) { case ITEM_MOD_MANA: HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, addValue, apply); @@ -13629,17 +13629,17 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool if (!pEnchant) return; - if (!ignore_condition && pEnchant->EnchantmentCondition && !EnchantmentFitsRequirements(pEnchant->EnchantmentCondition, -1)) + if (!ignore_condition && pEnchant->Condition_ID && !EnchantmentFitsRequirements(pEnchant->Condition_ID, -1)) return; - if (pEnchant->requiredLevel > getLevel()) + if (pEnchant->MinLevel > getLevel()) return; - if (pEnchant->requiredSkill > 0 && pEnchant->requiredSkillValue > GetSkillValue(pEnchant->requiredSkill)) + if (pEnchant->RequiredSkillID > 0 && pEnchant->RequiredSkillRank > GetSkillValue(pEnchant->RequiredSkillID)) return; // Cogwheel gems dont have requirement data set in SpellItemEnchantment.dbc, but they do have it in Item-sparse.db2 - if (ItemTemplate const* gem = sObjectMgr->GetItemTemplate(pEnchant->GemID)) + if (ItemTemplate const* gem = sObjectMgr->GetItemTemplate(pEnchant->Src_itemID)) if (gem->RequiredSkill && GetSkillValue(gem->RequiredSkill) < gem->RequiredSkillRank) return; @@ -13650,7 +13650,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool { // Check if the requirements for the prismatic socket are met before applying the gem stats SpellItemEnchantmentEntry const* pPrismaticEnchant = sSpellItemEnchantmentStore.LookupEntry(item->GetEnchantmentId(PRISMATIC_ENCHANTMENT_SLOT)); - if (!pPrismaticEnchant || (pPrismaticEnchant->requiredSkill > 0 && pPrismaticEnchant->requiredSkillValue > GetSkillValue(pPrismaticEnchant->requiredSkill))) + if (!pPrismaticEnchant || (pPrismaticEnchant->RequiredSkillID > 0 && pPrismaticEnchant->RequiredSkillRank > GetSkillValue(pPrismaticEnchant->RequiredSkillID))) return; } @@ -13658,9 +13658,9 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool { for (int s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s) { - uint32 enchant_display_type = pEnchant->type[s]; - uint32 enchant_amount = pEnchant->amount[s]; - uint32 enchant_spell_id = pEnchant->spellid[s]; + uint32 enchant_display_type = pEnchant->Effect[s]; + uint32 enchant_amount = pEnchant->EffectPointsMin[s]; + uint32 enchant_spell_id = pEnchant->EffectArg[s]; switch (enchant_display_type) { @@ -13692,9 +13692,9 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool // Search enchant_amount for (int k = 0; k < 5; ++k) { - if (item_rand->enchant_id[k] == enchant_id) + if (item_rand->Enchantment[k] == enchant_id) { - basepoints = int32((item_rand->prefix[k] * item->GetItemSuffixFactor()) / 10000); + basepoints = int32((item_rand->AllocationPct[k] * item->GetItemSuffixFactor()) / 10000); break; } } @@ -13718,9 +13718,9 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool { for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; ++k) { - if (item_rand->enchant_id[k] == enchant_id) + if (item_rand->Enchantment[k] == enchant_id) { - enchant_amount = uint32((item_rand->prefix[k] * item->GetItemSuffixFactor()) / 10000); + enchant_amount = uint32((item_rand->AllocationPct[k] * item->GetItemSuffixFactor()) / 10000); break; } } @@ -13738,9 +13738,9 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool { for (int k = 0; k < 5; ++k) { - if (item_rand_suffix->enchant_id[k] == enchant_id) + if (item_rand_suffix->Enchantment[k] == enchant_id) { - enchant_amount = uint32((item_rand_suffix->prefix[k] * item->GetItemSuffixFactor()) / 10000); + enchant_amount = uint32((item_rand_suffix->AllocationPct[k] * item->GetItemSuffixFactor()) / 10000); break; } } @@ -14005,12 +14005,12 @@ void Player::UpdateSkillEnchantments(uint16 skill_id, uint16 curr_value, uint16 if (!Enchant) return; - if (Enchant->requiredSkill == skill_id) + if (Enchant->RequiredSkillID == skill_id) { // Checks if the enchantment needs to be applied or removed - if (curr_value < Enchant->requiredSkillValue && new_value >= Enchant->requiredSkillValue) + if (curr_value < Enchant->RequiredSkillRank && new_value >= Enchant->RequiredSkillRank) ApplyEnchantment(m_items[i], EnchantmentSlot(slot), true); - else if (new_value < Enchant->requiredSkillValue && curr_value >= Enchant->requiredSkillValue) + else if (new_value < Enchant->RequiredSkillRank && curr_value >= Enchant->RequiredSkillRank) ApplyEnchantment(m_items[i], EnchantmentSlot(slot), false); } @@ -14021,11 +14021,11 @@ void Player::UpdateSkillEnchantments(uint16 skill_id, uint16 curr_value, uint16 { SpellItemEnchantmentEntry const* pPrismaticEnchant = sSpellItemEnchantmentStore.LookupEntry(m_items[i]->GetEnchantmentId(PRISMATIC_ENCHANTMENT_SLOT)); - if (pPrismaticEnchant && pPrismaticEnchant->requiredSkill == skill_id) + if (pPrismaticEnchant && pPrismaticEnchant->RequiredSkillID == skill_id) { - if (curr_value < pPrismaticEnchant->requiredSkillValue && new_value >= pPrismaticEnchant->requiredSkillValue) + if (curr_value < pPrismaticEnchant->RequiredSkillRank && new_value >= pPrismaticEnchant->RequiredSkillRank) ApplyEnchantment(m_items[i], EnchantmentSlot(slot), true); - else if (new_value < pPrismaticEnchant->requiredSkillValue && curr_value >= pPrismaticEnchant->requiredSkillValue) + else if (new_value < pPrismaticEnchant->RequiredSkillRank && curr_value >= pPrismaticEnchant->RequiredSkillRank) ApplyEnchantment(m_items[i], EnchantmentSlot(slot), false); } } @@ -17539,8 +17539,8 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder* holder) else // has start node, teleport to it { TC_LOG_ERROR("entities.player", "Player::LoadFromDB: Player (%s) has too short taxi destination list, teleport to original node.", GetGUID().ToString().c_str()); - mapId = nodeEntry->map_id; - Relocate(nodeEntry->x, nodeEntry->y, nodeEntry->z, 0.0f); + mapId = nodeEntry->ContinentID; + Relocate(nodeEntry->Pos.X, nodeEntry->Pos.Y, nodeEntry->Pos.Z, 0.0f); } m_taxi.ClearTaxiDestinations(); } @@ -17549,11 +17549,11 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder* holder) { // save source node as recall coord to prevent recall and fall from sky TaxiNodesEntry const* nodeEntry = sTaxiNodesStore.LookupEntry(node_id); - if (nodeEntry && nodeEntry->map_id == GetMapId()) + if (nodeEntry && nodeEntry->ContinentID == GetMapId()) { ASSERT(nodeEntry); // checked in m_taxi.LoadTaxiDestinationsFromString - mapId = nodeEntry->map_id; - Relocate(nodeEntry->x, nodeEntry->y, nodeEntry->z, 0.0f); + mapId = nodeEntry->ContinentID; + Relocate(nodeEntry->Pos.X, nodeEntry->Pos.Y, nodeEntry->Pos.Z, 0.0f); } // flight will started later @@ -18180,13 +18180,13 @@ void Player::_LoadGlyphAuras() { if (GlyphSlotEntry const* gs = sGlyphSlotStore.LookupEntry(GetGlyphSlot(i))) { - if (gp->TypeFlags == gs->TypeFlags) + if (gp->GlyphSlotFlags == gs->Type) { - CastSpell(this, gp->SpellId, true); + CastSpell(this, gp->SpellID, true); continue; } else - TC_LOG_ERROR("entities.player", "Player::_LoadGlyphAuras: Player '%s' (%s) has glyph with typeflags %u in slot with typeflags %u, removing.", GetName().c_str(), GetGUID().ToString().c_str(), gp->TypeFlags, gs->TypeFlags); + TC_LOG_ERROR("entities.player", "Player::_LoadGlyphAuras: Player '%s' (%s) has glyph with typeflags %u in slot with typeflags %u, removing.", GetName().c_str(), GetGUID().ToString().c_str(), gp->GlyphSlotFlags, gs->Type); } else TC_LOG_ERROR("entities.player", "Player::_LoadGlyphAuras: Player '%s' (%s) has not existing glyph slot entry %u on index %u", GetName().c_str(), GetGUID().ToString().c_str(), GetGlyphSlot(i), i); @@ -18793,14 +18793,14 @@ void Player::UpdateMountCapabilities() AuraEffect* mountEffect = auraList.front(); if (MountCapabilityEntry const* mountCapability = mountEffect->GetBase()->GetUnitOwner()->GetMountCapability(uint32(mountEffect->GetMiscValueB()))) { - if (mountCapability->Id != uint32(mountEffect->GetAmount())) + if (mountCapability->ID != uint32(mountEffect->GetAmount())) { Unit* target = mountEffect->GetBase()->GetApplicationOfTarget(GetGUID())->GetTarget(); if (MountCapabilityEntry const* oldMountCapability = sMountCapabilityStore.LookupEntry(mountEffect->GetAmount())) - RemoveAurasDueToSpell(oldMountCapability->SpeedModSpell, target->GetGUID()); + RemoveAurasDueToSpell(oldMountCapability->ModSpellAuraID, target->GetGUID()); - CastSpell(target, mountCapability->SpeedModSpell, true); - mountEffect->SetAmount(mountCapability->Id); + CastSpell(target, mountCapability->ModSpellAuraID, true); + mountEffect->SetAmount(mountCapability->ID); } } } @@ -19136,7 +19136,7 @@ void Player::_LoadBoundInstances(PreparedQueryResult result) bool deleteInstance = false; MapEntry const* mapEntry = sMapStore.LookupEntry(mapId); - std::string mapname = mapEntry ? mapEntry->Name : "Unknown"; + std::string mapname = mapEntry ? mapEntry->MapName : "Unknown"; if (!mapEntry || !mapEntry->IsDungeon()) { @@ -22040,7 +22040,7 @@ bool Player::ActivateTaxiPathTo(std::vector const& nodes, Creature* npc m_taxi.ClearTaxiDestinations(); ModifyMoney(-(int64)totalcost); UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TRAVELLING, totalcost); - TeleportTo(lastPathNode->map_id, lastPathNode->x, lastPathNode->y, lastPathNode->z, GetOrientation()); + TeleportTo(lastPathNode->ContinentID, lastPathNode->Pos.X, lastPathNode->Pos.Y, lastPathNode->Pos.Z, GetOrientation()); return false; } else @@ -22062,8 +22062,8 @@ bool Player::ActivateTaxiPathTo(uint32 taxi_path_id, uint32 spellid /*= 0*/) std::vector nodes; nodes.resize(2); - nodes[0] = entry->from; - nodes[1] = entry->to; + nodes[0] = entry->FromTaxiNode; + nodes[1] = entry->ToTaxiNode; return ActivateTaxiPathTo(nodes, nullptr, spellid); } @@ -22096,7 +22096,7 @@ void Player::ContinueTaxiFlight() const TaxiPathNodeList const& nodeList = sTaxiPathNodesByPath[path]; float distPrev; - float distNext = GetExactDistSq(nodeList[0]->LocX, nodeList[0]->LocY, nodeList[0]->LocZ); + float distNext = GetExactDistSq(nodeList[0]->Loc.X, nodeList[0]->Loc.Y, nodeList[0]->Loc.Z); for (uint32 i = 1; i < nodeList.size(); ++i) { @@ -22104,17 +22104,17 @@ void Player::ContinueTaxiFlight() const TaxiPathNodeEntry const* prevNode = nodeList[i-1]; // skip nodes at another map - if (node->MapID != GetMapId()) + if (node->ContinentID != GetMapId()) continue; distPrev = distNext; - distNext = GetExactDistSq(node->LocX, node->LocY, node->LocZ); + distNext = GetExactDistSq(node->Loc.X, node->Loc.Y, node->Loc.Z); float distNodes = - (node->LocX - prevNode->LocX)*(node->LocX - prevNode->LocX) + - (node->LocY - prevNode->LocY)*(node->LocY - prevNode->LocY) + - (node->LocZ - prevNode->LocZ)*(node->LocZ - prevNode->LocZ); + (node->Loc.X - prevNode->Loc.X)*(node->Loc.X - prevNode->Loc.X) + + (node->Loc.Y - prevNode->Loc.Y)*(node->Loc.Y - prevNode->Loc.Y) + + (node->Loc.Z - prevNode->Loc.Z)*(node->Loc.Z - prevNode->Loc.Z); if (distNext + distPrev < distNodes) { @@ -22152,10 +22152,10 @@ void Player::InitDataForForm(bool reapplyMods) ShapeshiftForm form = GetShapeshiftForm(); SpellShapeshiftFormEntry const* ssEntry = sSpellShapeshiftFormStore.LookupEntry(form); - if (ssEntry && ssEntry->attackSpeed) + if (ssEntry && ssEntry->CombatRoundTime) { - SetAttackTime(BASE_ATTACK, ssEntry->attackSpeed); - SetAttackTime(OFF_ATTACK, ssEntry->attackSpeed); + SetAttackTime(BASE_ATTACK, ssEntry->CombatRoundTime); + SetAttackTime(OFF_ATTACK, ssEntry->CombatRoundTime); SetAttackTime(RANGED_ATTACK, BASE_ATTACK_TIME); } else @@ -22179,8 +22179,8 @@ void Player::InitDataForForm(bool reapplyMods) default: // 0, for example { ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(getClass()); - if (cEntry && cEntry->powerType < MAX_POWERS && uint32(getPowerType()) != cEntry->powerType) - setPowerType(Powers(cEntry->powerType)); + if (cEntry && cEntry->DisplayPower < MAX_POWERS && uint32(getPowerType()) != cEntry->DisplayPower) + setPowerType(Powers(cEntry->DisplayPower)); break; } } @@ -22864,7 +22864,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot) if (!enchantEntry) continue; - uint32 gemid = enchantEntry->GemID; + uint32 gemid = enchantEntry->Src_itemID; if (!gemid) continue; @@ -22876,7 +22876,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot) if (!gemProperty) continue; - uint8 GemColor = gemProperty->color; + uint8 GemColor = gemProperty->Type; for (uint8 b = 0, tmpcolormask = 1; b < 4; b++, tmpcolormask <<= 1) { @@ -22943,7 +22943,7 @@ void Player::CorrectMetaGemEnchants(uint8 exceptslot, bool apply) if (!enchantEntry) continue; - uint32 condition = enchantEntry->EnchantmentCondition; + uint32 condition = enchantEntry->Condition_ID; if (condition) { //was enchant active with/without item? @@ -22987,7 +22987,7 @@ void Player::ToggleMetaGemsActive(uint8 exceptslot, bool apply) continue; //only metagems to be (de)activated, so only enchants with condition - uint32 condition = enchantEntry->EnchantmentCondition; + uint32 condition = enchantEntry->Condition_ID; if (condition) ApplyEnchantment(pItem, EnchantmentSlot(enchant_slot), apply); } @@ -23024,7 +23024,7 @@ void Player::SetBattlegroundEntryPoint() if (GetMap()->IsDungeon()) { if (const WorldSafeLocsEntry* entry = sObjectMgr->GetClosestGraveyard(*this, GetTeam(), this)) - m_bgData.joinPos = WorldLocation(entry->map_id, entry->x, entry->y, entry->z, 0.0f); + m_bgData.joinPos = WorldLocation(entry->Continent, entry->Loc.X, entry->Loc.Y, entry->Loc.Z, 0.0f); else TC_LOG_ERROR("entities.player", "Player::SetBattlegroundEntryPoint: Dungeon (MapID: %u) has no linked graveyard, setting home location as entry point.", GetMapId()); } @@ -23825,7 +23825,7 @@ void Player::ResetSpells(bool myClassOnly) ChrClassesEntry const* clsEntry = sChrClassesStore.LookupEntry(getClass()); if (!clsEntry) return; - family = clsEntry->spellfamily; + family = clsEntry->SpellClassSet; for (PlayerSpellMap::const_iterator iter = smap.begin(); iter != smap.end(); ++iter) { @@ -23937,8 +23937,8 @@ void Player::LearnDefaultSkill(uint32 skillId, uint16 rank) if (!rank) break; - SkillTiersEntry const* tier = sSkillTiersStore.LookupEntry(rcInfo->SkillTier); - uint16 maxValue = tier->MaxSkill[std::max(rank - 1, 0)]; + SkillTiersEntry const* tier = sSkillTiersStore.LookupEntry(rcInfo->SkillTierID); + uint16 maxValue = tier->Value[std::max(rank - 1, 0)]; uint16 skillValue = 1; if (rcInfo->Flags & SKILL_FLAG_ALWAYS_MAX_VALUE) skillValue = maxValue; @@ -24028,10 +24028,10 @@ 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; - SpellInfo const* spell = sSpellMgr->GetSpellInfo(ability->spellId); + SpellInfo const* spell = sSpellMgr->GetSpellInfo(ability->Spell); if (!spell) continue; @@ -24039,31 +24039,31 @@ void Player::LearnSkillRewardedSpells(uint32 skillId, uint32 skillValue) if (getLevel() < spell->SpellLevel) continue; - if (ability->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE && ability->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) + if (ability->AcquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE && ability->AcquireMethod != 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->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE) + RemoveSpell(ability->Spell); // need learn else { // used to avoid double Seal of Righteousness on paladins, it's the only player spell which has both spell and forward spell in auto learn - if (ability->AutolearnType == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && ability->forward_spellid) + if (ability->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && ability->SupercededBySpell) { bool skipCurrent = false; - auto bounds = sSpellMgr->GetSkillLineAbilityMapBounds(ability->forward_spellid); + auto bounds = sSpellMgr->GetSkillLineAbilityMapBounds(ability->SupercededBySpell); for (auto itr = bounds.first; itr != bounds.second; ++itr) { - if (itr->second->AutolearnType == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && skillValue >= itr->second->req_skill_value) + if (itr->second->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && skillValue >= itr->second->MinSkillLineRank) { skipCurrent = true; break; @@ -24075,9 +24075,9 @@ void Player::LearnSkillRewardedSpells(uint32 skillId, uint32 skillValue) } if (!IsInWorld()) - AddSpell(ability->spellId, true, true, true, false, false, ability->skillId); + AddSpell(ability->Spell, true, true, true, false, false, ability->SkillLine); else - LearnSpell(ability->spellId, true, ability->skillId); + LearnSpell(ability->Spell, true, ability->SkillLine); } } } @@ -24431,10 +24431,10 @@ bool Player::GetBGAccessByLevel(BattlegroundTypeId bgTypeId) const float Player::GetReputationPriceDiscount(Creature const* creature) const { FactionTemplateEntry const* vendor_faction = creature->GetFactionTemplateEntry(); - if (!vendor_faction || !vendor_faction->faction) + if (!vendor_faction || !vendor_faction->Faction) return 1.0f; - ReputationRank rank = GetReputationRank(vendor_faction->faction); + ReputationRank rank = GetReputationRank(vendor_faction->Faction); if (rank <= REP_NEUTRAL) return 1.0f; @@ -24458,15 +24458,15 @@ 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; // skip wrong class and race skill saved in SkillRaceClassInfo.dbc - if (!GetSkillRaceClassInfo(_spell_idx->second->skillId, getRace(), getClass())) + if (!GetSkillRaceClassInfo(_spell_idx->second->SkillLine, getRace(), getClass())) continue; return true; @@ -25450,7 +25450,7 @@ uint32 Player::GetBarberShopCost(uint8 newhairstyle, uint8 newhaircolor, uint8 n uint8 facialhair = GetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_FACIAL_STYLE); uint8 skincolor = GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_SKIN_ID); - if ((hairstyle == newhairstyle) && (haircolor == newhaircolor) && (facialhair == newfacialhair) && (!newSkin || (newSkin->hair_id == skincolor))) + if ((hairstyle == newhairstyle) && (haircolor == newhaircolor) && (facialhair == newfacialhair) && (!newSkin || (newSkin->Data == skincolor))) return 0; GtBarberShopCostBaseEntry const* bsc = sGtBarberShopCostBaseStore.LookupEntry(level - 1); @@ -25469,7 +25469,7 @@ uint32 Player::GetBarberShopCost(uint8 newhairstyle, uint8 newhaircolor, uint8 n if (facialhair != newfacialhair) cost += bsc->cost * 0.75f; // +3/4 of price - if (newSkin && skincolor != newSkin->hair_id) + if (newSkin && skincolor != newSkin->Data) cost += bsc->cost * 0.75f; // +5/6 of price return uint32(cost); @@ -25480,7 +25480,7 @@ void Player::InitGlyphsForLevel() uint32 slot = 0; for (uint32 i = 0; i < sGlyphSlotStore.GetNumRows() && slot < MAX_GLYPH_SLOT_INDEX; ++i) if (GlyphSlotEntry const* gs = sGlyphSlotStore.LookupEntry(i)) - SetGlyphSlot(slot++, gs->Id); + SetGlyphSlot(slot++, gs->ID); uint8 level = getLevel(); uint32 slotMask = 0; @@ -25527,13 +25527,13 @@ bool Player::HasTitle(uint32 bitIndex) const bool Player::HasTitle(CharTitlesEntry const* title) const { - return HasTitle(title->bit_index); + return HasTitle(title->Mask_ID); } void Player::SetTitle(CharTitlesEntry const* title, bool lost) { - uint32 fieldIndexOffset = title->bit_index / 32; - uint32 flag = 1 << (title->bit_index % 32); + uint32 fieldIndexOffset = title->Mask_ID / 32; + uint32 flag = 1 << (title->Mask_ID % 32); if (lost) { @@ -25551,7 +25551,7 @@ void Player::SetTitle(CharTitlesEntry const* title, bool lost) } WorldPacket data(SMSG_TITLE_EARNED, 4 + 4); - data << uint32(title->bit_index); + data << uint32(title->Mask_ID); data << uint32(lost ? 0 : 1); // 1 - earned, 0 - lost SendDirectMessage(&data); } @@ -25844,7 +25844,7 @@ uint32 Player::CalculateTalentsPoints() const if (!count) return 0; - float baseForLevel = count->Talents; + float baseForLevel = count->NumberOfTalents; if (getClass() != CLASS_DEATH_KNIGHT || GetMapId() != 609) return uint32(baseForLevel * sWorld->getRate(RATE_TALENT)); @@ -25858,7 +25858,7 @@ uint32 Player::CalculateTalentsPoints() const if (!dkBase) return 0; - float talentPointsForLevel = count->Talents - dkBase->Talents; + float talentPointsForLevel = count->NumberOfTalents - dkBase->NumberOfTalents; talentPointsForLevel += float(GetQuestRewardedTalentCount()); if (talentPointsForLevel > baseForLevel) @@ -25929,12 +25929,12 @@ void Player::_LoadSkills(PreparedQueryResult result) uint16 step = 0; - if (SkillLineEntry const* skillLine = sSkillLineStore.LookupEntry(rcEntry->SkillId)) + if (SkillLineEntry const* skillLine = sSkillLineStore.LookupEntry(rcEntry->SkillID)) { - 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; @@ -25984,7 +25984,7 @@ InventoryResult Player::CanEquipUniqueItem(Item* pItem, uint8 eslot, uint32 limi if (!enchantEntry) continue; - ItemTemplate const* pGem = sObjectMgr->GetItemTemplate(enchantEntry->GemID); + ItemTemplate const* pGem = sObjectMgr->GetItemTemplate(enchantEntry->Src_itemID); if (!pGem) continue; @@ -26018,13 +26018,13 @@ InventoryResult Player::CanEquipUniqueItem(ItemTemplate const* itemProto, uint8 // NOTE: limitEntry->mode not checked because if item have have-limit then it applied and to equip case - if (limit_count > limitEntry->maxCount) + if (limit_count > limitEntry->Quantity) return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS; // there is an equip limit on this item - if (HasItemWithLimitCategoryEquipped(itemProto->ItemLimitCategory, limitEntry->maxCount - limit_count + 1, except_slot)) + if (HasItemWithLimitCategoryEquipped(itemProto->ItemLimitCategory, limitEntry->Quantity - limit_count + 1, except_slot)) return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS; - else if (HasGemWithLimitCategoryEquipped(itemProto->ItemLimitCategory, limitEntry->maxCount - limit_count + 1, except_slot)) + else if (HasGemWithLimitCategoryEquipped(itemProto->ItemLimitCategory, limitEntry->Quantity - limit_count + 1, except_slot)) return EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED; } @@ -26158,7 +26158,7 @@ bool Player::LearnTalent(uint32 talentId, uint32 talentRank) if (!talentInfo) return false; - TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TabID); if (!talentTabInfo) return false; @@ -26171,7 +26171,7 @@ bool Player::LearnTalent(uint32 talentId, uint32 talentRank) uint8 curtalent_maxrank = 0; // 0 = not learned any rank for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank) { - if (talentInfo->RankID[rank] && HasSpell(talentInfo->RankID[rank])) + if (talentInfo->SpellRank[rank] && HasSpell(talentInfo->SpellRank[rank])) { curtalent_maxrank = (rank + 1); break; @@ -26187,15 +26187,15 @@ bool Player::LearnTalent(uint32 talentId, uint32 talentRank) return false; // Check if it requires another talent - if (talentInfo->DependsOn > 0) + if (talentInfo->PrereqTalent[0] > 0) { - if (TalentEntry const* depTalentInfo = sTalentStore.LookupEntry(talentInfo->DependsOn)) + if (TalentEntry const* depTalentInfo = sTalentStore.LookupEntry(talentInfo->PrereqTalent[0])) { bool hasEnoughRank = false; - for (uint8 rank = talentInfo->DependsOnRank; rank < MAX_TALENT_RANK; rank++) + for (uint8 rank = talentInfo->PrereqRank[0]; rank < MAX_TALENT_RANK; rank++) { - if (depTalentInfo->RankID[rank] != 0) - if (HasSpell(depTalentInfo->RankID[rank])) + if (depTalentInfo->SpellRank[rank] != 0) + if (HasSpell(depTalentInfo->SpellRank[rank])) hasEnoughRank = true; } if (!hasEnoughRank) @@ -26207,9 +26207,9 @@ bool Player::LearnTalent(uint32 talentId, uint32 talentRank) uint32 spentPoints = 0; uint32 primaryTreeTalents = 0; uint32 primaryTreeId = GetPrimaryTalentTree(GetActiveSpec()); - bool isMainTree = primaryTreeId == talentInfo->TalentTab || !primaryTreeId; + bool isMainTree = primaryTreeId == talentInfo->TabID || !primaryTreeId; - if (talentInfo->Row > 0 || !isMainTree) + if (talentInfo->TierID > 0 || !isMainTree) { for (uint32 i = 0; i < sTalentStore.GetNumRows(); i++) // Loop through all talents. { @@ -26217,13 +26217,13 @@ bool Player::LearnTalent(uint32 talentId, uint32 talentRank) { for (uint8 rank = 0; rank < MAX_TALENT_RANK; ++rank) { - if (tmpTalent->RankID[rank] != 0) + if (tmpTalent->SpellRank[rank] != 0) { - if (HasSpell(tmpTalent->RankID[rank])) + if (HasSpell(tmpTalent->SpellRank[rank])) { - if (tmpTalent->TalentTab == talentInfo->TalentTab) + if (tmpTalent->TabID == talentInfo->TabID) spentPoints += (rank + 1); - if (tmpTalent->TalentTab == primaryTreeId) + if (tmpTalent->TabID == primaryTreeId) primaryTreeTalents += (rank + 1); } } @@ -26233,7 +26233,7 @@ bool Player::LearnTalent(uint32 talentId, uint32 talentRank) } // not have required min points spent in talent tree - if (spentPoints < (talentInfo->Row * MAX_TALENT_RANK)) + if (spentPoints < (talentInfo->TierID * MAX_TALENT_RANK)) return false; // player has not spent 31 talents in main tree before attempting to learn other tree's talents @@ -26241,7 +26241,7 @@ bool Player::LearnTalent(uint32 talentId, uint32 talentRank) return false; // spell not set in talent.dbc - uint32 spellid = talentInfo->RankID[talentRank]; + uint32 spellid = talentInfo->SpellRank[talentRank]; if (spellid == 0) { TC_LOG_ERROR("entities.player", "Player::LearnTalent: Talent.dbc has no spellInfo for talent: %u (spell id = 0)", talentId); @@ -26261,15 +26261,15 @@ bool Player::LearnTalent(uint32 talentId, uint32 talentRank) // set talent tree for player if (!GetPrimaryTalentTree(GetActiveSpec())) { - SetPrimaryTalentTree(GetActiveSpec(), talentInfo->TalentTab); - std::vector const* specSpells = GetTalentTreePrimarySpells(talentInfo->TalentTab); + SetPrimaryTalentTree(GetActiveSpec(), talentInfo->TabID); + std::vector const* specSpells = GetTalentTreePrimarySpells(talentInfo->TabID); if (specSpells) for (size_t i = 0; i < specSpells->size(); ++i) LearnSpell(specSpells->at(i), false); if (CanUseMastery()) for (uint32 i = 0; i < MAX_MASTERY_SPELLS; ++i) - if (SpellInfo const* masterySpell = sSpellMgr->GetSpellInfo(talentTabInfo->MasterySpellId[i])) + if (SpellInfo const* masterySpell = sSpellMgr->GetSpellInfo(talentTabInfo->MasterySpellID[i])) if (masterySpell->IsPassive() && HandlePassiveSpellLearn(masterySpell)) CastSpell(this, masterySpell->Id, true); } @@ -26302,7 +26302,7 @@ void Player::LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRa if (!talentInfo) return; - TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TabID); if (!talentTabInfo) return; @@ -26317,18 +26317,18 @@ void Player::LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRa if (!pet_family) return; - if (pet_family->petTalentType < 0) // not hunter pet + if (pet_family->PetTalentType < 0) // not hunter pet return; // prevent learn talent for different family (cheating) - if (!((1 << pet_family->petTalentType) & talentTabInfo->petTalentMask)) + if (!((1 << pet_family->PetTalentType) & talentTabInfo->CategoryEnumID)) return; // find current max talent rank (0~5) uint8 curtalent_maxrank = 0; // 0 = not learned any rank for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank) { - if (talentInfo->RankID[rank] && pet->HasSpell(talentInfo->RankID[rank])) + if (talentInfo->SpellRank[rank] && pet->HasSpell(talentInfo->SpellRank[rank])) { curtalent_maxrank = (rank + 1); break; @@ -26344,15 +26344,15 @@ void Player::LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRa return; // Check if it requires another talent - if (talentInfo->DependsOn > 0) + if (talentInfo->PrereqTalent[0] > 0) { - if (TalentEntry const* depTalentInfo = sTalentStore.LookupEntry(talentInfo->DependsOn)) + if (TalentEntry const* depTalentInfo = sTalentStore.LookupEntry(talentInfo->PrereqTalent[0])) { bool hasEnoughRank = false; - for (uint8 rank = talentInfo->DependsOnRank; rank < MAX_TALENT_RANK; rank++) + for (uint8 rank = talentInfo->PrereqRank[0]; rank < MAX_TALENT_RANK; rank++) { - if (depTalentInfo->RankID[rank] != 0) - if (pet->HasSpell(depTalentInfo->RankID[rank])) + if (depTalentInfo->SpellRank[rank] != 0) + if (pet->HasSpell(depTalentInfo->SpellRank[rank])) hasEnoughRank = true; } if (!hasEnoughRank) @@ -26363,8 +26363,8 @@ void Player::LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRa // Find out how many points we have in this field uint32 spentPoints = 0; - uint32 tTab = talentInfo->TalentTab; - if (talentInfo->Row > 0) + uint32 tTab = talentInfo->TabID; + if (talentInfo->TierID > 0) { uint32 numRows = sTalentStore.GetNumRows(); for (uint32 i = 0; i < numRows; ++i) // Loop through all talents. @@ -26373,13 +26373,13 @@ void Player::LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRa TalentEntry const* tmpTalent = sTalentStore.LookupEntry(i); if (tmpTalent) // the way talents are tracked { - if (tmpTalent->TalentTab == tTab) + if (tmpTalent->TabID == tTab) { for (uint8 rank = 0; rank < MAX_TALENT_RANK; rank++) { - if (tmpTalent->RankID[rank] != 0) + if (tmpTalent->SpellRank[rank] != 0) { - if (pet->HasSpell(tmpTalent->RankID[rank])) + if (pet->HasSpell(tmpTalent->SpellRank[rank])) { spentPoints += (rank + 1); } @@ -26391,11 +26391,11 @@ void Player::LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRa } // not have required min points spent in talent tree - if (spentPoints < (talentInfo->Row * MAX_PET_TALENT_RANK)) + if (spentPoints < (talentInfo->TierID * MAX_PET_TALENT_RANK)) return; // spell not set in talent.dbc - uint32 spellid = talentInfo->RankID[talentRank]; + uint32 spellid = talentInfo->SpellRank[talentRank]; if (spellid == 0) { TC_LOG_ERROR("entities.player", "Talent.dbc contains talent: %u Rank: %u spell id = 0", talentId, talentRank); @@ -26489,14 +26489,14 @@ bool Player::CanSeeSpellClickOn(Creature const* c) const uint8 Player::GetExpansionForFaction(uint32 faction) const { FactionEntry const* baseFaction = sFactionStore.LookupEntry(faction); - if (!baseFaction || !baseFaction->team) + if (!baseFaction || !baseFaction->ParentFactionID) return 0; - FactionEntry const* expansionFaction = sFactionStore.LookupEntry(baseFaction->team); + FactionEntry const* expansionFaction = sFactionStore.LookupEntry(baseFaction->ParentFactionID); if (!expansionFaction) return 0; - return expansionFaction->GroupExpansion; + return expansionFaction->Expansion; } void Player::BuildPlayerTalentsInfoData(WorldPacket* data) @@ -26532,14 +26532,14 @@ void Player::BuildPlayerTalentsInfoData(WorldPacket* data) continue; // skip another tab talents - if (talentInfo->TalentTab != talentTabId) + if (talentInfo->TabID != talentTabId) continue; // find max talent rank (0~4) int8 curtalent_maxrank = -1; for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank) { - if (talentInfo->RankID[rank] && HasTalent(talentInfo->RankID[rank], specIdx)) + if (talentInfo->SpellRank[rank] && HasTalent(talentInfo->SpellRank[rank], specIdx)) { curtalent_maxrank = rank; break; @@ -26550,7 +26550,7 @@ void Player::BuildPlayerTalentsInfoData(WorldPacket* data) if (curtalent_maxrank < 0) continue; - *data << uint32(talentInfo->TalentID); // Talent.dbc + *data << uint32(talentInfo->ID); // Talent.dbc *data << uint8(curtalent_maxrank); // talentMaxRank (0-4) ++talentIdCount; @@ -26590,7 +26590,7 @@ void Player::BuildPetTalentsInfoData(WorldPacket* data) return; CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(ci->family); - if (!pet_family || pet_family->petTalentType < 0) + if (!pet_family || pet_family->PetTalentType < 0) return; for (uint32 talentTabId = 1; talentTabId < sTalentTabStore.GetNumRows(); ++talentTabId) @@ -26599,7 +26599,7 @@ void Player::BuildPetTalentsInfoData(WorldPacket* data) if (!talentTabInfo) continue; - if (!((1 << pet_family->petTalentType) & talentTabInfo->petTalentMask)) + if (!((1 << pet_family->PetTalentType) & talentTabInfo->CategoryEnumID)) continue; for (uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId) @@ -26609,14 +26609,14 @@ void Player::BuildPetTalentsInfoData(WorldPacket* data) continue; // skip another tab talents - if (talentInfo->TalentTab != talentTabId) + if (talentInfo->TabID != talentTabId) continue; // find max talent rank (0~4) int8 curtalent_maxrank = -1; for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank) { - if (talentInfo->RankID[rank] && pet->HasSpell(talentInfo->RankID[rank])) + if (talentInfo->SpellRank[rank] && pet->HasSpell(talentInfo->SpellRank[rank])) { curtalent_maxrank = rank; break; @@ -26627,7 +26627,7 @@ void Player::BuildPetTalentsInfoData(WorldPacket* data) if (curtalent_maxrank < 0) continue; - *data << uint32(talentInfo->TalentID); // Talent.dbc + *data << uint32(talentInfo->ID); // Talent.dbc *data << uint8(curtalent_maxrank); // talentMaxRank (0-4) ++talentIdCount; @@ -27074,7 +27074,7 @@ void Player::ActivateSpec(uint8 spec) if (!talentInfo) continue; - TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TabID); if (!talentTabInfo) continue; @@ -27088,10 +27088,10 @@ void Player::ActivateSpec(uint8 spec) for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank) { // skip non-existing talent ranks - if (talentInfo->RankID[rank] == 0) + if (talentInfo->SpellRank[rank] == 0) continue; - RemoveSpell(talentInfo->RankID[rank], true); // removes the talent, and all dependant, learned, and chained spells.. - if (SpellInfo const* _spellEntry = sSpellMgr->GetSpellInfo(talentInfo->RankID[rank])) + RemoveSpell(talentInfo->SpellRank[rank], true); // removes the talent, and all dependant, learned, and chained spells.. + if (SpellInfo const* _spellEntry = sSpellMgr->GetSpellInfo(talentInfo->SpellRank[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 @@ -27113,7 +27113,7 @@ void Player::ActivateSpec(uint8 spec) TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentTabs[i]); for (uint32 i = 0; i < MAX_MASTERY_SPELLS; ++i) - if (uint32 mastery = talentTabInfo->MasterySpellId[i]) + if (uint32 mastery = talentTabInfo->MasterySpellID[i]) RemoveSpell(mastery, true); } @@ -27122,7 +27122,7 @@ void Player::ActivateSpec(uint8 spec) // remove secondary glyph if (uint32 oldglyph = GetGlyph(GetActiveSpec(), slot)) if (GlyphPropertiesEntry const* old_gp = sGlyphPropertiesStore.LookupEntry(oldglyph)) - RemoveAurasDueToSpell(old_gp->SpellId); + RemoveAurasDueToSpell(old_gp->SpellID); SetActiveSpec(spec); uint32 spentTalents = 0; @@ -27134,7 +27134,7 @@ void Player::ActivateSpec(uint8 spec) if (!talentInfo) continue; - TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TabID); if (!talentTabInfo) continue; @@ -27147,12 +27147,12 @@ void Player::ActivateSpec(uint8 spec) for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank) { // skip non-existing talent ranks - if (talentInfo->RankID[rank] == 0) + if (talentInfo->SpellRank[rank] == 0) continue; // if the talent can be found in the newly activated PlayerTalentMap - if (HasTalent(talentInfo->RankID[rank], GetActiveSpec())) + if (HasTalent(talentInfo->SpellRank[rank], GetActiveSpec())) { - LearnSpell(talentInfo->RankID[rank], false); // add the talent to the PlayerSpellMap + LearnSpell(talentInfo->SpellRank[rank], false); // add the talent to the PlayerSpellMap spentTalents += (rank + 1); // increment the spentTalents count } } @@ -27166,7 +27166,7 @@ void Player::ActivateSpec(uint8 spec) if (CanUseMastery()) if (TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(GetPrimaryTalentTree(GetActiveSpec()))) for (uint32 i = 0; i < MAX_MASTERY_SPELLS; ++i) - if (uint32 mastery = talentTabInfo->MasterySpellId[i]) + if (uint32 mastery = talentTabInfo->MasterySpellID[i]) LearnSpell(mastery, false); // set glyphs @@ -27177,7 +27177,7 @@ void Player::ActivateSpec(uint8 spec) // apply primary glyph if (glyph) if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph)) - CastSpell(this, gp->SpellId, true); + CastSpell(this, gp->SpellID, true); SetGlyph(slot, glyph); } diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp index 5b004725b7..e2204ff28c 100644 --- a/src/server/game/Entities/Totem/Totem.cpp +++ b/src/server/game/Entities/Totem/Totem.cpp @@ -65,7 +65,7 @@ void Totem::InitStats(uint32 duration) GetOwner()->ToPlayer()->SendDirectMessage(&data); // set display id depending on caster's race - SetDisplayId(GetOwner()->GetModelForTotem(PlayerTotemType(m_Properties->Id))); + SetDisplayId(GetOwner()->GetModelForTotem(PlayerTotemType(m_Properties->ID))); } Minion::InitStats(duration); @@ -89,7 +89,7 @@ void Totem::InitSummon() if (GetSpell(1)) CastSpell(this, GetSpell(1), true); - if (m_Properties->Id == SUMMON_TYPE_TOTEM_FIRE && GetOwner()->HasAura(SPELL_TOTEMIC_WRATH_TALENT)) + if (m_Properties->ID == SUMMON_TYPE_TOTEM_FIRE && GetOwner()->HasAura(SPELL_TOTEMIC_WRATH_TALENT)) CastSpell(this, SPELL_TOTEMIC_WRATH, true); } diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index e1810a29b6..887a522497 100644 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -213,11 +213,11 @@ bool Transport::Create(ObjectGuid::LowType guidlow, uint32 entry, Map* map, uint uint32 finalStopFrameTime = 0; for (TransportAnimationEntry const* animation : sTransportAnimationStore) { - if (animation->TransportEntry != entry) + if (animation->TransportID != entry) continue; - if (animation->TimeSeg > finalStopFrameTime) - finalStopFrameTime = animation->TimeSeg; + if (animation->TimeIndex > finalStopFrameTime) + finalStopFrameTime = animation->TimeIndex; } _finalStopFrameTime = finalStopFrameTime; @@ -378,10 +378,10 @@ void Transport::RelocateToProgress(uint32 progress) if (m_goValue.Transport.AnimationInfo->GetAnimNode(progress, curr, next, percPos)) { // curr node offset - G3D::Vector3 pos = G3D::Vector3(curr->X, curr->Y, curr->Z); + G3D::Vector3 pos = G3D::Vector3(curr->Pos.X, curr->Pos.Y, curr->Pos.Z); // move by percentage of segment already passed - pos += G3D::Vector3(percPos * (next->X - curr->X), percPos * (next->Y - curr->Y), percPos * (next->Z - curr->Z)); + pos += G3D::Vector3(percPos * (next->Pos.X - curr->Pos.X), percPos * (next->Pos.Y - curr->Pos.Y), percPos * (next->Pos.Z - curr->Pos.Z)); // rotate path by PathRotation // PathRotation in db is only simple orientation rotation, so don't use sophisticated and not working code @@ -641,13 +641,13 @@ void MapTransport::Update(uint32 diff) MoveToNextWaypoint(); - sScriptMgr->OnRelocate(this, _currentFrame->Node->NodeIndex, _currentFrame->Node->MapID, _currentFrame->Node->LocX, _currentFrame->Node->LocY, _currentFrame->Node->LocZ); + sScriptMgr->OnRelocate(this, _currentFrame->Node->NodeIndex, _currentFrame->Node->ContinentID, _currentFrame->Node->Loc.X, _currentFrame->Node->Loc.Y, _currentFrame->Node->Loc.Z); - TC_LOG_DEBUG("entities.transport", "Transport %u (%s) moved to node %u %u %f %f %f", GetEntry(), GetName().c_str(), _currentFrame->Node->NodeIndex, _currentFrame->Node->MapID, _currentFrame->Node->LocX, _currentFrame->Node->LocY, _currentFrame->Node->LocZ); + TC_LOG_DEBUG("entities.transport", "Transport %u (%s) moved to node %u %u %f %f %f", GetEntry(), GetName().c_str(), _currentFrame->Node->NodeIndex, _currentFrame->Node->ContinentID, _currentFrame->Node->Loc.X, _currentFrame->Node->Loc.Y, _currentFrame->Node->Loc.Z); // Departure event if (_currentFrame->IsTeleportFrame()) - if (TeleportTransport(_nextFrame->Node->MapID, _nextFrame->Node->LocX, _nextFrame->Node->LocY, _nextFrame->Node->LocZ, _nextFrame->InitialOrientation)) + if (TeleportTransport(_nextFrame->Node->ContinentID, _nextFrame->Node->Loc.X, _nextFrame->Node->Loc.Y, _nextFrame->Node->Loc.Z, _nextFrame->InitialOrientation)) return; // Update more in new map thread } @@ -673,7 +673,7 @@ void MapTransport::Update(uint32 diff) UpdatePosition(pos.x, pos.y, pos.z, std::atan2(dir.y, dir.x) + float(M_PI)); } else if (justStopped) - UpdatePosition(_currentFrame->Node->LocX, _currentFrame->Node->LocY, _currentFrame->Node->LocZ, _currentFrame->InitialOrientation); + UpdatePosition(_currentFrame->Node->Loc.X, _currentFrame->Node->Loc.Y, _currentFrame->Node->Loc.Z, _currentFrame->InitialOrientation); else { /* There are four possible scenarios that trigger loading/unloading passengers: @@ -855,7 +855,7 @@ TempSummon* MapTransport::SummonPassenger(uint32 entry, Position const& pos, Tem uint32 mask = UNIT_MASK_SUMMON; if (properties) { - switch (properties->Category) + switch (properties->Control) { case SUMMON_CATEGORY_PET: mask = UNIT_MASK_GUARDIAN; @@ -870,7 +870,7 @@ TempSummon* MapTransport::SummonPassenger(uint32 entry, Position const& pos, Tem case SUMMON_CATEGORY_ALLY: case SUMMON_CATEGORY_UNK: { - switch (properties->Type) + switch (properties->Title) { case SUMMON_TYPE_MINION: case SUMMON_TYPE_GUARDIAN: @@ -1090,13 +1090,13 @@ void MapTransport::DelayedTeleportTransport() return; _delayedTeleport = false; - Map* newMap = sMapMgr->CreateBaseMap(_nextFrame->Node->MapID); + Map* newMap = sMapMgr->CreateBaseMap(_nextFrame->Node->ContinentID); GetMap()->RemoveFromMap(this, false); SetMap(newMap); - float x = _nextFrame->Node->LocX, - y = _nextFrame->Node->LocY, - z = _nextFrame->Node->LocZ, + float x = _nextFrame->Node->Loc.X, + y = _nextFrame->Node->Loc.Y, + z = _nextFrame->Node->Loc.Z, o =_nextFrame->InitialOrientation; for (_passengerTeleportItr = _passengers.begin(); _passengerTeleportItr != _passengers.end();) @@ -1110,7 +1110,7 @@ void MapTransport::DelayedTeleportTransport() switch (obj->GetTypeId()) { case TYPEID_PLAYER: - if (!obj->ToPlayer()->TeleportTo(_nextFrame->Node->MapID, destX, destY, destZ, destO, TELE_TO_NOT_LEAVE_TRANSPORT)) + if (!obj->ToPlayer()->TeleportTo(_nextFrame->Node->ContinentID, destX, destY, destZ, destO, TELE_TO_NOT_LEAVE_TRANSPORT)) RemovePassenger(obj); break; case TYPEID_DYNAMICOBJECT: diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index b58b94b5d2..7140b08cb6 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -334,11 +334,11 @@ void Player::UpdateAttackPowerAndDamage(bool ranged) uint16 index_mult = ranged ? UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER : UNIT_FIELD_ATTACK_POWER_MULTIPLIER; if (ranged) - val2 = (level + std::max(GetStat(STAT_AGILITY) - 10.0f, 0.0f)) * entry->RAPPerAgility; + val2 = (level + std::max(GetStat(STAT_AGILITY) - 10.0f, 0.0f)) * entry->RangedAttackPowerPerAgility; else { - float strengthValue = std::max((GetStat(STAT_STRENGTH) - 10.0f) * entry->APPerStrength, 0.0f); - float agilityValue = std::max((GetStat(STAT_AGILITY) - 10.0f) * entry->APPerAgility, 0.0f); + float strengthValue = std::max((GetStat(STAT_STRENGTH) - 10.0f) * entry->AttackPowerPerStrength, 0.0f); + float agilityValue = std::max((GetStat(STAT_AGILITY) - 10.0f) * entry->AttackPowerPerAgility, 0.0f); // Druids in Bear and Cat form get two points attack power per agility point if (GetShapeshiftForm() == FORM_BEAR || GetShapeshiftForm() == FORM_CAT) @@ -539,10 +539,10 @@ void Player::UpdateMastery() for (uint32 i = 0; i < MAX_MASTERY_SPELLS; ++i) { - if (!talentTab->MasterySpellId[i]) + if (!talentTab->MasterySpellID[i]) continue; - if (Aura* aura = GetAura(talentTab->MasterySpellId[i])) + if (Aura* aura = GetAura(talentTab->MasterySpellID[i])) { for (uint32 j = 0; j < MAX_SPELL_EFFECTS; ++j) { diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index c82584c489..042fec8ec1 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3303,15 +3303,15 @@ void Unit::ProcessTerrainStatusUpdate(ZLiquidStatus status, Optional curLiquid = sLiquidTypeStore.LookupEntry(liquidData->entry); if (curLiquid != _lastLiquid) { - if (_lastLiquid && _lastLiquid->SpellId) - RemoveAurasDueToSpell(_lastLiquid->SpellId); + if (_lastLiquid && _lastLiquid->SpellID) + RemoveAurasDueToSpell(_lastLiquid->SpellID); Player* player = GetCharmerOrOwnerPlayerOrPlayerItself(); // Set _lastLiquid before casting liquid spell to avoid infinite loops _lastLiquid = curLiquid; - if (curLiquid && curLiquid->SpellId && (!player || !player->IsGameMaster())) - CastSpell(this, curLiquid->SpellId, true); + if (curLiquid && curLiquid->SpellID && (!player || !player->IsGameMaster())) + CastSpell(this, curLiquid->SpellID, true); // Update mount capabilities when changing liquidstatus (enabling / disabling flight auras for example) if (player) @@ -5515,12 +5515,12 @@ ReputationRank Unit::GetReactionTo(Unit const* target) const return *repRank; if (!selfPlayerOwner->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_IGNORE_REPUTATION)) { - if (FactionEntry const* targetFactionEntry = sFactionStore.LookupEntry(targetFactionTemplateEntry->faction)) + if (FactionEntry const* targetFactionEntry = sFactionStore.LookupEntry(targetFactionTemplateEntry->Faction)) { if (targetFactionEntry->CanHaveReputation()) { // check contested flags - if (targetFactionTemplateEntry->factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD + if (targetFactionTemplateEntry->Flags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD && selfPlayerOwner->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP)) return REP_HOSTILE; @@ -5550,14 +5550,14 @@ ReputationRank Unit::GetFactionReactionTo(FactionTemplateEntry const* factionTem if (Player const* targetPlayerOwner = target->GetAffectingPlayer()) { // check contested flags - if (factionTemplateEntry->factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD + if (factionTemplateEntry->Flags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD && targetPlayerOwner->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP)) return REP_HOSTILE; if (ReputationRank const* repRank = targetPlayerOwner->GetReputationMgr().GetForcedRankIfAny(factionTemplateEntry)) return *repRank; if (!target->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_IGNORE_REPUTATION)) { - if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionTemplateEntry->faction)) + if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionTemplateEntry->Faction)) { if (factionEntry->CanHaveReputation()) { @@ -5578,7 +5578,7 @@ ReputationRank Unit::GetFactionReactionTo(FactionTemplateEntry const* factionTem return REP_FRIENDLY; if (targetFactionTemplateEntry->IsFriendlyTo(*factionTemplateEntry)) return REP_FRIENDLY; - if (factionTemplateEntry->factionFlags & FACTION_TEMPLATE_FLAG_HOSTILE_BY_DEFAULT) + if (factionTemplateEntry->Flags & FACTION_TEMPLATE_FLAG_HOSTILE_BY_DEFAULT) return REP_HOSTILE; // neutral by default return REP_NEUTRAL; @@ -5597,11 +5597,11 @@ bool Unit::IsFriendlyTo(Unit const* unit) const bool Unit::IsHostileToPlayers() const { FactionTemplateEntry const* my_faction = GetFactionTemplateEntry(); - if (!my_faction->faction) + if (!my_faction->Faction) return false; - FactionEntry const* raw_faction = sFactionStore.LookupEntry(my_faction->faction); - if (raw_faction && raw_faction->reputationListID >= 0) + FactionEntry const* raw_faction = sFactionStore.LookupEntry(my_faction->Faction); + if (raw_faction && raw_faction->ReputationIndex >= 0) return false; return my_faction->IsHostileToPlayers(); @@ -5610,11 +5610,11 @@ bool Unit::IsHostileToPlayers() const bool Unit::IsNeutralToAll() const { FactionTemplateEntry const* my_faction = GetFactionTemplateEntry(); - if (!my_faction->faction) + if (!my_faction->Faction) return true; - FactionEntry const* raw_faction = sFactionStore.LookupEntry(my_faction->faction); - if (raw_faction && raw_faction->reputationListID >= 0) + FactionEntry const* raw_faction = sFactionStore.LookupEntry(my_faction->Faction); + if (raw_faction && raw_faction->ReputationIndex >= 0) return false; return my_faction->IsNeutralToAll(); @@ -6116,7 +6116,7 @@ void Unit::SetMinion(Minion *minion, bool apply) } } - if (minion->m_Properties && minion->m_Properties->Type == SUMMON_TYPE_MINIPET) + if (minion->m_Properties && minion->m_Properties->Title == SUMMON_TYPE_MINIPET) SetCritterGUID(minion->GetGUID()); // PvP, FFAPvP @@ -6147,7 +6147,7 @@ void Unit::SetMinion(Minion *minion, bool apply) m_Controlled.erase(minion); - if (minion->m_Properties && minion->m_Properties->Type == SUMMON_TYPE_MINIPET) + if (minion->m_Properties && minion->m_Properties->Title == SUMMON_TYPE_MINIPET) if (GetCritterGUID() == minion->GetGUID()) SetCritterGUID(ObjectGuid::Empty); @@ -8306,11 +8306,11 @@ MountCapabilityEntry const* Unit::GetMountCapability(uint32 mountType) const for (uint32 i = MAX_MOUNT_CAPABILITIES; i > 0; --i) { - MountCapabilityEntry const* mountCapability = sMountCapabilityStore.LookupEntry(mountTypeEntry->MountCapability[i - 1]); + MountCapabilityEntry const* mountCapability = sMountCapabilityStore.LookupEntry(mountTypeEntry->Capability[i - 1]); if (!mountCapability) continue; - if (ridingSkill < mountCapability->RequiredRidingSkill) + if (ridingSkill < mountCapability->ReqRidingSkill) continue; if (!(mountCapability->Flags & MOUNT_CAPABIILTY_FLAG_IGNORE_RESTRICTIONS)) @@ -8344,18 +8344,18 @@ MountCapabilityEntry const* Unit::GetMountCapability(uint32 mountType) const else if (!(mountCapability->Flags & MOUNT_CAPABILITY_FLAG_FLOAT)) continue; - if (mountCapability->RequiredMap != -1 && - int32(GetMapId()) != mountCapability->RequiredMap && - GetMap()->GetEntry()->ParentMapID != mountCapability->RequiredMap) + if (mountCapability->ReqMapID != -1 && + int32(GetMapId()) != mountCapability->ReqMapID && + GetMap()->GetEntry()->ParentMapID != mountCapability->ReqMapID) continue; - if (mountCapability->RequiredArea && !IsInArea(areaId, mountCapability->RequiredArea)) + if (mountCapability->ReqAreaID && !IsInArea(areaId, mountCapability->ReqAreaID)) continue; - if (mountCapability->RequiredAura && !HasAura(mountCapability->RequiredAura)) + if (mountCapability->ReqSpellAuraID && !HasAura(mountCapability->ReqSpellAuraID)) continue; - if (mountCapability->RequiredSpell && !HasSpell(mountCapability->RequiredSpell)) + if (mountCapability->ReqSpellKnownID && !HasSpell(mountCapability->ReqSpellKnownID)) continue; return mountCapability; @@ -8628,7 +8628,7 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, Wo if (FactionTemplateEntry const* factionTemplate = creature->GetFactionTemplateEntry()) { if (!(player->GetReputationMgr().GetForcedRankIfAny(factionTemplate))) - if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionTemplate->faction)) + if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionTemplate->Faction)) if (FactionState const* repState = player->GetReputationMgr().GetState(factionEntry)) if (!(repState->Flags & FACTION_FLAG_AT_WAR)) return false; @@ -9713,7 +9713,7 @@ float Unit::GetSpellMaxRangeForTarget(Unit const* target, SpellInfo const* spell { if (!spellInfo->RangeEntry) return 0; - if (spellInfo->RangeEntry->maxRangeFriend == spellInfo->RangeEntry->maxRangeHostile) + if (spellInfo->RangeEntry->RangeMax[1] == spellInfo->RangeEntry->RangeMax[0]) return spellInfo->GetMaxRange(); if (!target) return spellInfo->GetMaxRange(true); @@ -9724,7 +9724,7 @@ float Unit::GetSpellMinRangeForTarget(Unit const* target, SpellInfo const* spell { if (!spellInfo->RangeEntry) return 0; - if (spellInfo->RangeEntry->minRangeFriend == spellInfo->RangeEntry->minRangeHostile) + if (spellInfo->RangeEntry->RangeMin[1] == spellInfo->RangeEntry->RangeMin[0]) return spellInfo->GetMinRange(); if (!target) return spellInfo->GetMinRange(true); @@ -9737,8 +9737,8 @@ uint32 Unit::GetCreatureType() const { ShapeshiftForm form = GetShapeshiftForm(); SpellShapeshiftFormEntry const* ssEntry = sSpellShapeshiftFormStore.LookupEntry(form); - if (ssEntry && ssEntry->creatureType > 0) - return ssEntry->creatureType; + if (ssEntry && ssEntry->CreatureType > 0) + return ssEntry->CreatureType; else return CREATURE_TYPE_HUMANOID; } @@ -9771,7 +9771,7 @@ bool Unit::IsInDisallowedMountForm() const if (!shapeshift) return true; - if (!(shapeshift->flags1 & 0x1)) + if (!(shapeshift->Flags & 0x1)) return true; } @@ -9782,12 +9782,12 @@ bool Unit::IsInDisallowedMountForm() const if (!display) return true; - CreatureDisplayInfoExtraEntry const* displayExtra = sCreatureDisplayInfoExtraStore.LookupEntry(display->ExtraId); + CreatureDisplayInfoExtraEntry const* displayExtra = sCreatureDisplayInfoExtraStore.LookupEntry(display->ExtendedDisplayInfoID); if (!displayExtra) return true; - CreatureModelDataEntry const* model = sCreatureModelDataStore.LookupEntry(display->ModelId); - ChrRacesEntry const* race = sChrRacesStore.LookupEntry(displayExtra->Race); + CreatureModelDataEntry const* model = sCreatureModelDataStore.LookupEntry(display->ModelID); + ChrRacesEntry const* race = sChrRacesStore.LookupEntry(displayExtra->DisplayRaceID); if (model && !(model->Flags & 0x80)) if (race && !(race->Flags & 0x4)) @@ -13137,21 +13137,21 @@ uint32 Unit::GetModelForForm(ShapeshiftForm form, uint32 spellId) const uint32 modelid = 0; SpellShapeshiftFormEntry const* formEntry = sSpellShapeshiftFormStore.LookupEntry(form); - if (formEntry && formEntry->modelID_A) + if (formEntry && formEntry->CreatureDisplayID[0]) { // Take the alliance modelid as default if (GetTypeId() != TYPEID_PLAYER) - return formEntry->modelID_A; + return formEntry->CreatureDisplayID[0]; else { if (Player::TeamForRace(getRace()) == ALLIANCE) - modelid = formEntry->modelID_A; + modelid = formEntry->CreatureDisplayID[0]; else - modelid = formEntry->modelID_H; + modelid = formEntry->CreatureDisplayID[1]; // If the player is horde but there are no values for the horde modelid - take the alliance modelid if (!modelid && Player::TeamForRace(getRace()) == HORDE) - modelid = formEntry->modelID_A; + modelid = formEntry->CreatureDisplayID[0]; } } @@ -13402,7 +13402,7 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a // If vehicle flag for fixed position set (cannons), or if the following hardcoded units, then set state rooted // 30236 | Argent Cannon // 39759 | Tankbuster Cannon - if ((vehicle->GetVehicleInfo()->m_flags & VEHICLE_FLAG_FIXED_POSITION) || vehicle->GetBase()->GetEntry() == 30236 || vehicle->GetBase()->GetEntry() == 39759) + if ((vehicle->GetVehicleInfo()->Flags & VEHICLE_FLAG_FIXED_POSITION) || vehicle->GetBase()->GetEntry() == 30236 || vehicle->GetBase()->GetEntry() == 39759) SetControlled(true, UNIT_STATE_ROOT); ASSERT(!m_vehicle); @@ -14008,7 +14008,7 @@ void Unit::StopAttackFaction(uint32 faction_id) { if (Unit* victim = GetVictim()) { - if (victim->GetFactionTemplateEntry()->faction == faction_id) + if (victim->GetFactionTemplateEntry()->Faction == faction_id) { AttackStop(); if (IsNonMeleeSpellCast(false)) @@ -14023,7 +14023,7 @@ void Unit::StopAttackFaction(uint32 faction_id) AttackerSet const& attackers = getAttackers(); for (AttackerSet::const_iterator itr = attackers.begin(); itr != attackers.end();) { - if ((*itr)->GetFactionTemplateEntry()->faction == faction_id) + if ((*itr)->GetFactionTemplateEntry()->Faction == faction_id) { (*itr)->AttackStop(); itr = attackers.begin(); @@ -14812,11 +14812,11 @@ float Unit::GetCollisionHeight() const { if (CreatureDisplayInfoEntry const* mountDisplayInfo = sCreatureDisplayInfoStore.LookupEntry(GetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID))) { - if (CreatureModelDataEntry const* mountModelData = sCreatureModelDataStore.LookupEntry(mountDisplayInfo->ModelId)) + if (CreatureModelDataEntry const* mountModelData = sCreatureModelDataStore.LookupEntry(mountDisplayInfo->ModelID)) { CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.AssertEntry(GetNativeDisplayId()); - CreatureModelDataEntry const* modelData = sCreatureModelDataStore.AssertEntry(displayInfo->ModelId); - float const collisionHeight = scaleMod * (mountModelData->MountHeight + modelData->CollisionHeight * modelData->Scale * displayInfo->scale * 0.5f); + CreatureModelDataEntry const* modelData = sCreatureModelDataStore.AssertEntry(displayInfo->ModelID); + float const collisionHeight = scaleMod * (mountModelData->MountHeight + modelData->CollisionHeight * modelData->ModelScale * displayInfo->CreatureModelScale * 0.5f); return collisionHeight == 0.0f ? DEFAULT_COLLISION_HEIGHT : collisionHeight; } } @@ -14824,9 +14824,9 @@ float Unit::GetCollisionHeight() const //! Dismounting case - use basic default model data CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.AssertEntry(GetNativeDisplayId()); - CreatureModelDataEntry const* modelData = sCreatureModelDataStore.AssertEntry(displayInfo->ModelId); + CreatureModelDataEntry const* modelData = sCreatureModelDataStore.AssertEntry(displayInfo->ModelID); - float const collisionHeight = scaleMod * modelData->CollisionHeight * modelData->Scale * displayInfo->scale; + float const collisionHeight = scaleMod * modelData->CollisionHeight * modelData->ModelScale * displayInfo->CreatureModelScale; return collisionHeight == 0.0f ? DEFAULT_COLLISION_HEIGHT : collisionHeight; } diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index e09d92fbf9..50a51b7ac9 100644 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -38,7 +38,7 @@ UsableSeatNum(0), _me(unit), _vehicleInfo(vehInfo), _creatureEntry(creatureEntry { for (uint32 i = 0; i < MAX_VEHICLE_SEATS; ++i) { - if (uint32 seatId = _vehicleInfo->m_seatID[i]) + if (uint32 seatId = _vehicleInfo->SeatID[i]) if (VehicleSeatEntry const* veSeat = sVehicleSeatStore.LookupEntry(seatId)) { Seats.insert(std::make_pair(i, VehicleSeat(veSeat))); @@ -77,15 +77,15 @@ void Vehicle::Install() { if (_me->GetTypeId() == TYPEID_UNIT) { - if (PowerDisplayEntry const* powerDisplay = sPowerDisplayStore.LookupEntry(_vehicleInfo->m_powerDisplayId)) - _me->setPowerType(Powers(powerDisplay->PowerType)); + if (PowerDisplayEntry const* powerDisplay = sPowerDisplayStore.LookupEntry(_vehicleInfo->PowerDisplayID[0])) + _me->setPowerType(Powers(powerDisplay->ActualType)); else if (_me->getClass() == CLASS_ROGUE) _me->setPowerType(POWER_ENERGY); } if (Creature* creature = _me->ToCreature()) { - switch (_vehicleInfo->m_powerDisplayId) + switch (_vehicleInfo->PowerDisplayID[0]) { case POWER_STEAM: case POWER_HEAT: @@ -244,11 +244,11 @@ void Vehicle::ApplyAllImmunities() // If vehicle flag for fixed position set (cannons), or if the following hardcoded units, then set state rooted // 30236 | Argent Cannon // 39759 | Tankbuster Cannon - if ((GetVehicleInfo()->m_flags & VEHICLE_FLAG_FIXED_POSITION) || GetBase()->GetEntry() == 30236 || GetBase()->GetEntry() == 39759) + if ((GetVehicleInfo()->Flags & VEHICLE_FLAG_FIXED_POSITION) || GetBase()->GetEntry() == 30236 || GetBase()->GetEntry() == 39759) _me->SetControlled(true, UNIT_STATE_ROOT); // Different immunities for vehicles goes below - switch (GetVehicleInfo()->m_ID) + switch (GetVehicleInfo()->ID) { // code below prevents a bug with movable cannons case 160: // Strand of the Ancients @@ -464,7 +464,7 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId) } TC_LOG_DEBUG("entities.vehicle", "Unit %s scheduling enter vehicle (entry: %u, vehicleId: %u, guid: %u (dbguid: %u) on seat %d", - unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUID().GetCounter(), + unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->ID, _me->GetGUID().GetCounter(), (_me->GetTypeId() == TYPEID_UNIT ? _me->ToCreature()->GetSpawnId() : 0), (int32)seatId); // The seat selection code may kick other passengers off the vehicle. @@ -534,7 +534,7 @@ Vehicle* Vehicle::RemovePassenger(Unit* unit) ASSERT(seat != Seats.end()); TC_LOG_DEBUG("entities.vehicle", "Unit %s exit vehicle entry %u id %u dbguid %u seat %d", - unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUID().GetCounter(), (int32)seat->first); + unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->ID, _me->GetGUID().GetCounter(), (int32)seat->first); if (seat->second.SeatInfo->CanEnterOrExit() && ++UsableSeatNum) _me->SetFlag(UNIT_NPC_FLAGS, (_me->GetTypeId() == TYPEID_PLAYER ? UNIT_NPC_FLAG_PLAYER_VEHICLE : UNIT_NPC_FLAG_SPELLCLICK)); @@ -549,7 +549,7 @@ Vehicle* Vehicle::RemovePassenger(Unit* unit) seat->second.Passenger.Reset(); - if (_me->GetTypeId() == TYPEID_UNIT && unit->GetTypeId() == TYPEID_PLAYER && seat->second.SeatInfo->m_flags & VEHICLE_SEAT_FLAG_CAN_CONTROL) + if (_me->GetTypeId() == TYPEID_UNIT && unit->GetTypeId() == TYPEID_PLAYER && seat->second.SeatInfo->Flags & VEHICLE_SEAT_FLAG_CAN_CONTROL) _me->RemoveCharmedBy(unit); if (_me->IsInWorld()) @@ -635,7 +635,7 @@ bool Vehicle::IsVehicleInUse() const void Vehicle::InitMovementInfoForBase() { - uint32 vehicleFlags = GetVehicleInfo()->m_flags; + uint32 vehicleFlags = GetVehicleInfo()->Flags; if (vehicleFlags & VEHICLE_FLAG_NO_STRAFE) _me->AddExtraUnitMovementFlag(MOVEMENTFLAG2_NO_STRAFE); @@ -882,17 +882,17 @@ bool VehicleJoinEvent::Execute(uint64, uint32) if (veSeat->HasFlag(VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE)) Passenger->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - float o = sObjectMgr->GetVehicleSeatOrientationOffset(veSeat->m_ID); + float o = sObjectMgr->GetVehicleSeatOrientationOffset(veSeat->ID); - float x = veSeat->m_attachmentOffsetX; - float y = veSeat->m_attachmentOffsetY; - float z = veSeat->m_attachmentOffsetZ; + float x = veSeat->AttachmentOffset.X; + float y = veSeat->AttachmentOffset.Y; + float z = veSeat->AttachmentOffset.Z; Passenger->m_movementInfo.transport.pos.Relocate(x, y, z, o); Passenger->m_movementInfo.transport.time = 0; Passenger->m_movementInfo.transport.seat = Seat->first; Passenger->m_movementInfo.transport.guid = Target->GetBase()->GetGUID(); - Passenger->m_movementInfo.transport.vehicleId = Target->GetVehicleInfo()->m_ID; + Passenger->m_movementInfo.transport.vehicleId = Target->GetVehicleInfo()->ID; if (Target->GetBase()->GetTypeId() == TYPEID_UNIT && Passenger->GetTypeId() == TYPEID_PLAYER && veSeat->HasFlag(VEHICLE_SEAT_FLAG_CAN_CONTROL)) diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index 7add6c2f42..6cf15112c1 100644 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -975,9 +975,9 @@ void GameEventMgr::LoadHolidayDates() if (uint32 duration = fields[3].GetUInt32()) entry->Duration[0] = duration; - auto itr = std::lower_bound(modifiedHolidays.begin(), modifiedHolidays.end(), entry->Id); - if (itr == modifiedHolidays.end() || *itr != entry->Id) - modifiedHolidays.insert(itr, entry->Id); + auto itr = std::lower_bound(modifiedHolidays.begin(), modifiedHolidays.end(), entry->ID); + if (itr == modifiedHolidays.end() || *itr != entry->ID) + modifiedHolidays.insert(itr, entry->ID); ++count; } while (result->NextRow()); @@ -1581,10 +1581,10 @@ void GameEventMgr::UpdateWorldStates(uint16 event_id, bool Activate) if (bgTypeId != BATTLEGROUND_TYPE_NONE) { BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId); - if (bl && bl->HolidayWorldStateId) + if (bl && bl->HolidayWorldState) { WorldPacket data; - sBattlegroundMgr->BuildUpdateWorldStatePacket(&data, bl->HolidayWorldStateId, Activate ? 1 : 0); + sBattlegroundMgr->BuildUpdateWorldStatePacket(&data, bl->HolidayWorldState, Activate ? 1 : 0); sWorld->SendGlobalMessage(&data); } } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index c07ad0f059..fff7f26665 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1093,7 +1093,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) if (cInfo->scale <= 0.0f) { if (displayScaleEntry) - const_cast(cInfo)->scale = displayScaleEntry->scale; + const_cast(cInfo)->scale = displayScaleEntry->CreatureModelScale; else const_cast(cInfo)->scale = 1.0f; } @@ -1593,8 +1593,8 @@ void ObjectMgr::LoadCreatureModelInfo() modelInfo.modelid_other_gender = 0; } - if (CreatureModelDataEntry const* modelData = sCreatureModelDataStore.LookupEntry(creatureDisplay->ModelId)) - modelInfo.is_trigger = strstr(modelData->ModelPath, "INVISIBLESTALKER"); + if (CreatureModelDataEntry const* modelData = sCreatureModelDataStore.LookupEntry(creatureDisplay->ModelID)) + modelInfo.is_trigger = strstr(modelData->ModelName, "INVISIBLESTALKER"); ++count; } @@ -2862,24 +2862,24 @@ void FillDisenchantFields(uint32* disenchantID, uint32* requiredDisenchantSkill, if (!disenchant) continue; - if (disenchant->ItemClass == itemTemplate.Class && - disenchant->ItemQuality == itemTemplate.Quality && - disenchant->MinItemLevel <= itemTemplate.ItemLevel && - disenchant->MaxItemLevel >= itemTemplate.ItemLevel) + if (disenchant->Class == itemTemplate.Class && + disenchant->Quality == itemTemplate.Quality && + disenchant->MinLevel <= itemTemplate.ItemLevel && + disenchant->MaxLevel >= itemTemplate.ItemLevel) { - if (disenchant->Id == 60 || disenchant->Id == 61) // epic item disenchant ilvl range 66-99 (classic) + if (disenchant->ID == 60 || disenchant->ID == 61) // epic item disenchant ilvl range 66-99 (classic) { if (itemTemplate.RequiredLevel > 60 || itemTemplate.RequiredSkillRank > 300) continue; // skip to epic item disenchant ilvl range 90-199 (TBC) } - else if (disenchant->Id == 66 || disenchant->Id == 67) // epic item disenchant ilvl range 90-199 (TBC) + else if (disenchant->ID == 66 || disenchant->ID == 67) // epic item disenchant ilvl range 90-199 (TBC) { if (itemTemplate.RequiredLevel <= 60 || (itemTemplate.RequiredSkill && itemTemplate.RequiredSkillRank <= 300)) continue; } - *disenchantID = disenchant->Id; - *requiredDisenchantSkill = disenchant->RequiredDisenchantSkill; + *disenchantID = disenchant->ID; + *requiredDisenchantSkill = disenchant->SkillRequired; return; } } @@ -3155,10 +3155,10 @@ void ObjectMgr::LoadItemTemplates() for (int j = 0; j < MAX_OUTFIT_ITEMS; ++j) { - if (entry->ItemId[j] <= 0) + if (entry->ItemID[j] <= 0) continue; - uint32 item_id = entry->ItemId[j]; + uint32 item_id = entry->ItemID[j]; if (!GetItemTemplate(item_id)) notFoundOutfit.insert(item_id); @@ -3507,10 +3507,10 @@ void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint3 bool found = false; for (uint8 x = 0; x < MAX_OUTFIT_ITEMS; ++x) { - if (entry->ItemId[x] > 0 && uint32(entry->ItemId[x]) == itemId) + if (entry->ItemID[x] > 0 && uint32(entry->ItemID[x]) == itemId) { found = true; - const_cast(entry)->ItemId[x] = 0; + const_cast(entry)->ItemID[x] = 0; break; } } @@ -3597,8 +3597,8 @@ void ObjectMgr::LoadPlayerInfo() info->positionY = positionY; info->positionZ = positionZ; info->orientation = orientation; - info->displayId_m = rEntry->model_m; - info->displayId_f = rEntry->model_f; + info->displayId_m = rEntry->MaleDisplayID; + info->displayId_f = rEntry->FemaleDisplayID; _playerInfo[current_race][current_class] = info; ++count; @@ -5835,7 +5835,7 @@ void ObjectMgr::LoadInstanceEncounters() if (lastEncounterDungeon && !sLFGMgr->GetLFGDungeonEntry(lastEncounterDungeon)) { - TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an encounter %u (%s) marked as final for invalid dungeon id %u, skipped!", entry, dungeonEncounter->encounterName, lastEncounterDungeon); + TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an encounter %u (%s) marked as final for invalid dungeon id %u, skipped!", entry, dungeonEncounter->Name, lastEncounterDungeon); continue; } @@ -5844,7 +5844,7 @@ void ObjectMgr::LoadInstanceEncounters() { if (itr != dungeonLastBosses.end()) { - TC_LOG_ERROR("sql.sql", "Table `instance_encounters` specified encounter %u (%s) as last encounter but %u (%s) is already marked as one, skipped!", entry, dungeonEncounter->encounterName, itr->second->id, itr->second->encounterName); + TC_LOG_ERROR("sql.sql", "Table `instance_encounters` specified encounter %u (%s) as last encounter but %u (%s) is already marked as one, skipped!", entry, dungeonEncounter->Name, itr->second->ID, itr->second->Name); continue; } @@ -5858,12 +5858,12 @@ void ObjectMgr::LoadInstanceEncounters() CreatureTemplate const* creatureInfo = GetCreatureTemplate(creditEntry); if (!creatureInfo) { - TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid creature (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->encounterName); + TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid creature (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->Name); continue; } const_cast(creatureInfo)->flags_extra |= CREATURE_FLAG_EXTRA_DUNGEON_BOSS; - if (dungeonEncounter->difficulty == -1) + if (dungeonEncounter->DifficultyID == -1) { for (uint8 i = 0; i < 3; i++) { @@ -5877,29 +5877,29 @@ void ObjectMgr::LoadInstanceEncounters() case ENCOUNTER_CREDIT_CAST_SPELL: if (!sSpellMgr->GetSpellInfo(creditEntry)) { - TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid spell (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->encounterName); + TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid spell (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->Name); continue; } break; default: - TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid credit type (%u) for encounter %u (%s), skipped!", creditType, entry, dungeonEncounter->encounterName); + TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid credit type (%u) for encounter %u (%s), skipped!", creditType, entry, dungeonEncounter->Name); continue; } - if (dungeonEncounter->difficulty == -1) + if (dungeonEncounter->DifficultyID == -1) { for (uint32 i = 0; i < MAX_DIFFICULTY; ++i) { - if (GetMapDifficultyData(dungeonEncounter->mapId, Difficulty(i))) + if (GetMapDifficultyData(dungeonEncounter->MapID, Difficulty(i))) { - DungeonEncounterList& encounters = _dungeonEncounterStore[MAKE_PAIR32(dungeonEncounter->mapId, i)]; + DungeonEncounterList& encounters = _dungeonEncounterStore[MAKE_PAIR32(dungeonEncounter->MapID, i)]; encounters.push_back(new DungeonEncounter(dungeonEncounter, EncounterCreditType(creditType), creditEntry, lastEncounterDungeon)); } } } else { - DungeonEncounterList& encounters = _dungeonEncounterStore[MAKE_PAIR32(dungeonEncounter->mapId, dungeonEncounter->difficulty)]; + DungeonEncounterList& encounters = _dungeonEncounterStore[MAKE_PAIR32(dungeonEncounter->MapID, dungeonEncounter->DifficultyID)]; encounters.push_back(new DungeonEncounter(dungeonEncounter, EncounterCreditType(creditType), creditEntry, lastEncounterDungeon)); } @@ -6436,7 +6436,7 @@ uint32 ObjectMgr::GetNearestTaxiNode(float x, float y, float z, uint32 mapid, ui { TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(i); - if (!node || node->map_id != mapid || (!node->MountCreatureID[team == ALLIANCE ? 1 : 0] && node->MountCreatureID[0] != 32981)) // dk flight + if (!node || node->ContinentID != mapid || (!node->MountCreatureID[team == ALLIANCE ? 1 : 0] && node->MountCreatureID[0] != 32981)) // dk flight continue; uint8 field = (uint8)((i - 1) / 8); @@ -6446,7 +6446,7 @@ uint32 ObjectMgr::GetNearestTaxiNode(float x, float y, float z, uint32 mapid, ui if ((sTaxiNodesMask[field] & submask) == 0) continue; - float dist2 = (node->x - x)*(node->x - x)+(node->y - y)*(node->y - y)+(node->z - z)*(node->z - z); + float dist2 = (node->Pos.X - x)*(node->Pos.X - x)+(node->Pos.Y - y)*(node->Pos.Y - y)+(node->Pos.Z - z)*(node->Pos.Z - z); if (found) { if (dist2 < dist) @@ -6674,17 +6674,17 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveyard(WorldLocation const& lo if (!sConditionMgr->IsObjectMeetingNotGroupedConditions(CONDITION_SOURCE_TYPE_GRAVEYARD, data.safeLocId, conditionSource)) continue; - if (int16(entry->map_id) == mapEntry->ParentMapID && !conditionObject->GetPhaseShift().HasVisibleMapId(entry->map_id)) + if (int16(entry->Continent) == mapEntry->ParentMapID && !conditionObject->GetPhaseShift().HasVisibleMapId(entry->Continent)) continue; } // find now nearest graveyard at other map - if (MapId != entry->map_id && int16(entry->map_id) != mapEntry->ParentMapID) + if (MapId != entry->Continent && int16(entry->Continent) != mapEntry->ParentMapID) { // if find graveyard at different map from where entrance placed (or no entrance data), use any first if (!mapEntry || mapEntry->CorpseMapID < 0 - || uint32(mapEntry->CorpseMapID) != entry->map_id + || uint32(mapEntry->CorpseMapID) != entry->Continent || (mapEntry->Corpse.X == 0 && mapEntry->Corpse.Y == 0)) { // not have any corrdinates for check distance anyway @@ -6693,8 +6693,8 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveyard(WorldLocation const& lo } // at entrance map calculate distance (2D); - float dist2 = (entry->x - mapEntry->Corpse.X)*(entry->x - mapEntry->Corpse.X) - +(entry->y - mapEntry->Corpse.Y)*(entry->y - mapEntry->Corpse.Y); + float dist2 = (entry->Loc.X - mapEntry->Corpse.X)*(entry->Loc.X - mapEntry->Corpse.X) + +(entry->Loc.Y - mapEntry->Corpse.Y)*(entry->Loc.Y - mapEntry->Corpse.Y); if (foundEntr) { if (dist2 < distEntr) @@ -6713,7 +6713,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveyard(WorldLocation const& lo // find now nearest graveyard at same map else { - float dist2 = (entry->x - x)*(entry->x - x)+(entry->y - y)*(entry->y - y)+(entry->z - z)*(entry->z - z); + float dist2 = (entry->Loc.X - x)*(entry->Loc.X - x)+(entry->Loc.Y - y)*(entry->Loc.Y - y)+(entry->Loc.Z - z)*(entry->Loc.Z - z); if (foundNear) { if (dist2 < distNear) @@ -7020,7 +7020,7 @@ AreaTriggerStruct const* ObjectMgr::GetGoBackTrigger(uint32 Map) const if ((!useParentDbValue && itr->second.target_mapId == entrance_map) || (useParentDbValue && itr->second.target_mapId == parentId)) { AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(itr->first); - if (atEntry && atEntry->mapid == Map) + if (atEntry && atEntry->ContinentID == Map) return &itr->second; } return nullptr; @@ -7885,7 +7885,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate() continue; } - if (factionEntry->team == 0) + if (factionEntry->ParentFactionID == 0) { TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u in `reputation_spillover_template` does not belong to any team, skipping", factionId); continue; @@ -7905,7 +7905,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate() break; } - if (factionSpillover->reputationListID < 0) + if (factionSpillover->ReputationIndex < 0) { TC_LOG_ERROR("sql.sql", "Spillover faction (faction.dbc) %u for faction %u in `reputation_spillover_template` can not be listed for client, and then useless, skipping", repTemplate.faction[i], factionId); invalidSpilloverFaction = true; @@ -8644,11 +8644,11 @@ int32 ObjectMgr::GetBaseReputationOf(FactionEntry const* factionEntry, uint8 rac for (int i = 0; i < 4; i++) { - if ((!factionEntry->BaseRepClassMask[i] || - factionEntry->BaseRepClassMask[i] & classMask) && - (!factionEntry->BaseRepRaceMask[i] || - factionEntry->BaseRepRaceMask[i] & raceMask)) - return factionEntry->BaseRepValue[i]; + if ((!factionEntry->ReputationClassMask[i] || + factionEntry->ReputationClassMask[i] & classMask) && + (!factionEntry->ReputationRaceMask[i] || + factionEntry->ReputationRaceMask[i] & raceMask)) + return factionEntry->ReputationBase[i]; } return 0; @@ -8656,17 +8656,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 f18fc822db..b99acb4ac5 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -2153,7 +2153,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* // check for min / max count uint32 memberscount = GetMembersCount(); - if (memberscount > bgEntry->maxGroupSize) // no MinPlayerCount for battlegrounds + if (memberscount > bgEntry->MaxGroupSize) // no MinPlayerCount for battlegrounds return ERR_BATTLEGROUND_NONE; // ERR_GROUP_JOIN_BATTLEGROUND_TOO_MANY handled on client side // get a player as reference, to compare other players' stats to (arena team id, queue id based on level, etc.) @@ -2183,7 +2183,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 @@ -2366,7 +2366,7 @@ void Group::ResetInstances(uint8 method, bool isRaid, Player* SendMsgTo) { WorldLocation graveyard = WorldLocation(instanceEntrance->target_mapId, instanceEntrance->target_X, instanceEntrance->target_Y, instanceEntrance->target_Z); WorldSafeLocsEntry const* graveyardLocation = sObjectMgr->GetClosestGraveyard(graveyard, SendMsgTo->GetTeam(), nullptr); - uint32 const zoneId = sMapMgr->GetZoneId(PhasingHandler::GetEmptyPhaseShift(), graveyardLocation->map_id, graveyardLocation->x, graveyardLocation->y, graveyardLocation->z); + uint32 const zoneId = sMapMgr->GetZoneId(PhasingHandler::GetEmptyPhaseShift(), graveyardLocation->Continent, graveyardLocation->Loc.X, graveyardLocation->Loc.Y, graveyardLocation->Loc.Z); for (const MemberSlot &member : this->GetMemberSlots()) { @@ -2374,11 +2374,11 @@ void Group::ResetInstances(uint8 method, bool isRaid, Player* SendMsgTo) { PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHARACTER_POSITION_BY_MAPID); - stmt->setFloat(0, graveyardLocation->x); - stmt->setFloat(1, graveyardLocation->y); - stmt->setFloat(2, graveyardLocation->z); + stmt->setFloat(0, graveyardLocation->Loc.X); + stmt->setFloat(1, graveyardLocation->Loc.Y); + stmt->setFloat(2, graveyardLocation->Loc.Z); stmt->setFloat(3, instanceEntrance->target_Orientation); - stmt->setUInt32(4, graveyardLocation->map_id); + stmt->setUInt32(4, graveyardLocation->Continent); stmt->setUInt32(5, zoneId); stmt->setUInt32(6, member.guid); stmt->setUInt32(7, map->GetId()); diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 227cd43e85..65aa9f48f2 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -829,7 +829,7 @@ void Guild::Member::LoadProfessionDataFromDB(ObjectGuid guid) uint16 max = fields[2].GetUInt16(); SkillLineEntry const* skillLine = sSkillLineStore.LookupEntry(skill); - if (!skillLine || skillLine->categoryId != SKILL_CATEGORY_PROFESSION) + if (!skillLine || skillLine->CategoryID != SKILL_CATEGORY_PROFESSION) continue; GuildMemberProfessionData profession; @@ -2604,8 +2604,8 @@ void Guild::SendLoginInfo(WorldSession* session) for (uint32 i = 0; i < sGuildPerkSpellsStore.GetNumRows(); ++i) if (GuildPerkSpellsEntry const* entry = sGuildPerkSpellsStore.LookupEntry(i)) - if (entry->Level <= GetLevel()) - player->LearnSpell(entry->SpellId, true); + if (entry->GuildLevel <= GetLevel()) + player->LearnSpell(entry->SpellID, true); SendGuildReputationWeeklyCap(session, member->GetWeekReputation()); @@ -3165,8 +3165,8 @@ void Guild::DeleteMember(SQLTransaction& trans, ObjectGuid guid, bool isDisbandi for (uint32 i = 0; i < sGuildPerkSpellsStore.GetNumRows(); ++i) if (GuildPerkSpellsEntry const* entry = sGuildPerkSpellsStore.LookupEntry(i)) - if (entry->Level <= GetLevel()) - player->RemoveSpell(entry->SpellId, false, false); + if (entry->GuildLevel <= GetLevel()) + player->RemoveSpell(entry->SpellID, false, false); // Update GuildId in group if (Group* group = player->GetGroup()) @@ -3990,8 +3990,8 @@ void Guild::GiveXP(uint32 xp, Player* source, bool rewardedByChallenge) std::vector perksToLearn; for (uint32 i = 0; i < sGuildPerkSpellsStore.GetNumRows(); ++i) if (GuildPerkSpellsEntry const* entry = sGuildPerkSpellsStore.LookupEntry(i)) - if (entry->Level > oldLevel && entry->Level <= GetLevel()) - perksToLearn.push_back(entry->SpellId); + if (entry->GuildLevel > oldLevel && entry->GuildLevel <= GetLevel()) + perksToLearn.push_back(entry->SpellID); // Notify all online players that guild level changed and learn perks for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr) diff --git a/src/server/game/Guilds/GuildFinderMgr.cpp b/src/server/game/Guilds/GuildFinderMgr.cpp index ec5370302f..c2dedf087d 100644 --- a/src/server/game/Guilds/GuildFinderMgr.cpp +++ b/src/server/game/Guilds/GuildFinderMgr.cpp @@ -95,7 +95,7 @@ void GuildFinderMgr::LoadGuildSettings() TeamId guildTeam = TEAM_ALLIANCE; if (ChrRacesEntry const* raceEntry = sChrRacesStore.LookupEntry(fields[7].GetUInt8())) - if (raceEntry->TeamID == 1) + if (raceEntry->BaseLanguage == 1) guildTeam = TEAM_HORDE; LFGuildSettings settings(listed, guildTeam, guildId, classRoles, availability, interests, level, comment); diff --git a/src/server/game/Guilds/GuildMgr.cpp b/src/server/game/Guilds/GuildMgr.cpp index 066f44bf2d..70e49d3045 100644 --- a/src/server/game/Guilds/GuildMgr.cpp +++ b/src/server/game/Guilds/GuildMgr.cpp @@ -585,15 +585,15 @@ void GuildMgr::LoadGuildProfessionData() { for (SkillLineAbilityEntry const* entry : sSkillLineAbilityStore) { - SkillLineEntry const* skill = sSkillLineStore.LookupEntry(entry->skillId); - if (!skill || skill->categoryId != SKILL_CATEGORY_PROFESSION) + SkillLineEntry const* skill = sSkillLineStore.LookupEntry(entry->SkillLine); + if (!skill || skill->CategoryID != SKILL_CATEGORY_PROFESSION) continue; GuildProfession prof; - prof.SpellId = entry->spellId; - prof.UniqueBits = entry->UniqueBits; - prof.AutoLearn = entry->AutolearnType == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE; - GuildProfessionStore[skill->id].push_back(prof); + prof.SpellId = entry->Spell; + prof.UniqueBits = entry->UniqueBit; + prof.AutoLearn = entry->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE; + GuildProfessionStore[skill->ID].push_back(prof); } } diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp index 17a7d9b653..305038ba5c 100644 --- a/src/server/game/Handlers/AuctionHouseHandler.cpp +++ b/src/server/game/Handlers/AuctionHouseHandler.cpp @@ -70,7 +70,7 @@ void WorldSession::SendAuctionHello(ObjectGuid guid, Creature* unit) WorldPacket data(MSG_AUCTION_HELLO, 12); data << uint64(guid); - data << uint32(ahEntry->houseId); + data << uint32(ahEntry->ID); data << uint8(1); // 3.3.3: 1 - AH enabled, 0 - AH disabled SendPacket(&data); } @@ -311,7 +311,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData) } AuctionHouseEntry const* AHEntry = sAuctionMgr->GetAuctionHouseEntry(auctioneerInfo->faction); - AH->houseId = AHEntry->houseId; + AH->houseId = AHEntry->ID; } // Required stack size of auction matches to current item stack size, just move item to auctionhouse diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp index 38452dccb9..f5b355d4e3 100644 --- a/src/server/game/Handlers/CalendarHandler.cpp +++ b/src/server/game/Handlers/CalendarHandler.cpp @@ -160,7 +160,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/) { HolidaysEntry const* holiday = sHolidaysStore.LookupEntry(entry); - data << uint32(holiday->Id); // m_ID + data << uint32(holiday->ID); // m_ID data << uint32(holiday->Region); // m_region, might be looping data << uint32(holiday->Looping); // m_looping, might be region data << uint32(holiday->Priority); // m_priority diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index fc8742b83f..ccc2c020cf 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -367,17 +367,17 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData) } // prevent character creating Expansion race without Expansion account - if (raceEntry->expansion > Expansion()) + if (raceEntry->Race_related > Expansion()) { - TC_LOG_ERROR("entities.player.cheat", "Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->expansion, createInfo->Race); + TC_LOG_ERROR("entities.player.cheat", "Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->Race_related, createInfo->Race); SendCharCreate(CHAR_CREATE_EXPANSION); return; } // prevent character creating Expansion class without Expansion account - if (classEntry->expansion > Expansion()) + if (classEntry->Required_expansion > Expansion()) { - TC_LOG_ERROR("entities.player.cheat", "Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->expansion, createInfo->Class); + TC_LOG_ERROR("entities.player.cheat", "Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->Required_expansion, createInfo->Class); SendCharCreate(CHAR_CREATE_EXPANSION_CLASS); return; } @@ -942,10 +942,10 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) if (ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(pCurrChar->getClass())) { - if (cEntry->CinematicSequence) - pCurrChar->SendCinematicStart(cEntry->CinematicSequence); + if (cEntry->CinematicSequenceID) + pCurrChar->SendCinematicStart(cEntry->CinematicSequenceID); else if (ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(pCurrChar->getRace())) - pCurrChar->SendCinematicStart(rEntry->CinematicSequence); + pCurrChar->SendCinematicStart(rEntry->CinematicSequenceID); // send new char string if not empty if (!sWorld->GetNewCharString().empty()) @@ -1441,25 +1441,25 @@ void WorldSession::HandleAlterAppearance(WorldPacket& recvData) BarberShopStyleEntry const* bs_hair = sBarberShopStyleStore.LookupEntry(Hair); - if (!bs_hair || bs_hair->type != 0 || bs_hair->race != _player->getRace() || bs_hair->gender != _player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER)) + if (!bs_hair || bs_hair->Type != 0 || bs_hair->Race != _player->getRace() || bs_hair->Sex != _player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER)) return; BarberShopStyleEntry const* bs_facialHair = sBarberShopStyleStore.LookupEntry(FacialHair); - if (!bs_facialHair || bs_facialHair->type != 2 || bs_facialHair->race != _player->getRace() || bs_facialHair->gender != _player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER)) + if (!bs_facialHair || bs_facialHair->Type != 2 || bs_facialHair->Race != _player->getRace() || bs_facialHair->Sex != _player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER)) return; BarberShopStyleEntry const* bs_skinColor = sBarberShopStyleStore.LookupEntry(SkinColor); - if (bs_skinColor && (bs_skinColor->type != 3 || bs_skinColor->race != _player->getRace() || bs_skinColor->gender != _player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER))) + if (bs_skinColor && (bs_skinColor->Type != 3 || bs_skinColor->Race != _player->getRace() || bs_skinColor->Sex != _player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER))) return; if (!Player::ValidateAppearance(_player->getRace(), _player->getClass(), _player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER), - bs_hair->hair_id, + bs_hair->Data, Color, _player->GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_FACE_ID), - bs_facialHair->hair_id, - bs_skinColor ? bs_skinColor->hair_id : _player->GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_SKIN_ID))) + bs_facialHair->Data, + bs_skinColor ? bs_skinColor->Data : _player->GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_SKIN_ID))) return; @@ -1476,7 +1476,7 @@ void WorldSession::HandleAlterAppearance(WorldPacket& recvData) return; } - uint32 cost = _player->GetBarberShopCost(bs_hair->hair_id, Color, bs_facialHair->hair_id, bs_skinColor); + uint32 cost = _player->GetBarberShopCost(bs_hair->Data, Color, bs_facialHair->Data, bs_skinColor); // 0 - ok // 1, 3 - not enough money @@ -1492,11 +1492,11 @@ void WorldSession::HandleAlterAppearance(WorldPacket& recvData) _player->ModifyMoney(-int64(cost)); // it isn't free _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_AT_BARBER, cost); - _player->SetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_STYLE_ID, uint8(bs_hair->hair_id)); + _player->SetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_STYLE_ID, uint8(bs_hair->Data)); _player->SetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_COLOR_ID, uint8(Color)); - _player->SetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_FACIAL_STYLE, uint8(bs_facialHair->hair_id)); + _player->SetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_FACIAL_STYLE, uint8(bs_facialHair->Data)); if (bs_skinColor) - _player->SetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_SKIN_ID, uint8(bs_skinColor->hair_id)); + _player->SetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_SKIN_ID, uint8(bs_skinColor->Data)); _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP, 1); @@ -1518,7 +1518,7 @@ void WorldSession::HandleRemoveGlyph(WorldPacket& recvData) { if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph)) { - _player->RemoveAurasDueToSpell(gp->SpellId); + _player->RemoveAurasDueToSpell(gp->SpellID); _player->SetGlyph(slot, 0); _player->SendTalentsInfoData(false); } @@ -2259,28 +2259,28 @@ void WorldSession::HandleCharFactionOrRaceChangeCallback(std::shared_ptrbit_index; + uint32 bitIndex = htitleInfo->Mask_ID; uint32 index = bitIndex / 32; uint32 old_flag = 1 << (bitIndex % 32); - uint32 new_flag = 1 << (atitleInfo->bit_index % 32); + uint32 new_flag = 1 << (atitleInfo->Mask_ID % 32); if (knownTitles[index] & old_flag) { knownTitles[index] &= ~old_flag; // use index of the new title - knownTitles[atitleInfo->bit_index / 32] |= new_flag; + knownTitles[atitleInfo->Mask_ID / 32] |= new_flag; } } else { - uint32 bitIndex = atitleInfo->bit_index; + uint32 bitIndex = atitleInfo->Mask_ID; uint32 index = bitIndex / 32; uint32 old_flag = 1 << (bitIndex % 32); - uint32 new_flag = 1 << (htitleInfo->bit_index % 32); + uint32 new_flag = 1 << (htitleInfo->Mask_ID % 32); if (knownTitles[index] & old_flag) { knownTitles[index] &= ~old_flag; // use index of the new title - knownTitles[htitleInfo->bit_index / 32] |= new_flag; + knownTitles[htitleInfo->Mask_ID / 32] |= new_flag; } } @@ -2465,9 +2465,9 @@ void WorldSession::HandleOpeningCinematic(WorldPacket& /*recvData*/) if (ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(_player->getClass())) { - if (classEntry->CinematicSequence) - _player->SendCinematicStart(classEntry->CinematicSequence); + if (classEntry->CinematicSequenceID) + _player->SendCinematicStart(classEntry->CinematicSequenceID); else if (ChrRacesEntry const* raceEntry = sChrRacesStore.LookupEntry(_player->getRace())) - _player->SendCinematicStart(raceEntry->CinematicSequence); + _player->SendCinematicStart(raceEntry->CinematicSequenceID); } } diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp index 3b8ffd11ea..54558845dc 100644 --- a/src/server/game/Handlers/ChatHandler.cpp +++ b/src/server/game/Handlers/ChatHandler.cpp @@ -778,7 +778,7 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket& recvData) if (!em) return; - uint32 emote_anim = em->textid; + uint32 emote_anim = em->EmoteID; switch (emote_anim) { diff --git a/src/server/game/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp index 59535cb239..40512481e3 100644 --- a/src/server/game/Handlers/CombatHandler.cpp +++ b/src/server/game/Handlers/CombatHandler.cpp @@ -55,7 +55,7 @@ void WorldSession::HandleAttackSwingOpcode(WorldPacket& recvData) { VehicleSeatEntry const* seat = vehicle->GetSeatForPassenger(_player); ASSERT(seat); - if (!(seat->m_flags & VEHICLE_SEAT_FLAG_CAN_ATTACK)) + if (!(seat->Flags & VEHICLE_SEAT_FLAG_CAN_ATTACK)) { SendAttackStop(pEnemy); return; diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp index 443faa9c7d..bafa9c71df 100644 --- a/src/server/game/Handlers/GroupHandler.cpp +++ b/src/server/game/Handlers/GroupHandler.cpp @@ -1203,7 +1203,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacke if (mask & GROUP_UPDATE_FLAG_VEHICLE_SEAT) { if (Vehicle* veh = player->GetVehicle()) - *data << int32(veh->GetVehicleInfo()->m_seatID[player->m_movementInfo.transport.seat]); + *data << int32(veh->GetVehicleInfo()->SeatID[player->m_movementInfo.transport.seat]); else *data << int32(0); } @@ -1378,7 +1378,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket& recvData) data.put(maskPos, petAuraMask); // GROUP_UPDATE_FLAG_PET_AURAS if (updateFlags & GROUP_UPDATE_FLAG_VEHICLE_SEAT) - data << uint32(player->GetVehicle()->GetVehicleInfo()->m_seatID[player->m_movementInfo.transport.seat]); + data << uint32(player->GetVehicle()->GetVehicleInfo()->SeatID[player->m_movementInfo.transport.seat]); if (updateFlags & GROUP_UPDATE_FLAG_PHASE) PhasingHandler::FillPartyMemberPhase(&data, player->GetPhaseShift()); diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index 87ef484467..bc9a8aee79 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -848,7 +848,7 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket) return; } - uint32 price = slotEntry->price; + uint32 price = slotEntry->Cost; if (!_player->HasEnoughMoney(uint64(price))) { @@ -1142,19 +1142,19 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData) } // tried to put normal gem in meta socket - if (itemProto->Socket[i].Color == SOCKET_COLOR_META && GemProps[i]->color != SOCKET_COLOR_META) + if (itemProto->Socket[i].Color == SOCKET_COLOR_META && GemProps[i]->Type != SOCKET_COLOR_META) return; // tried to put meta gem in normal socket - if (itemProto->Socket[i].Color != SOCKET_COLOR_META && GemProps[i]->color == SOCKET_COLOR_META) + if (itemProto->Socket[i].Color != SOCKET_COLOR_META && GemProps[i]->Type == SOCKET_COLOR_META) return; // tried to put normal gem in cogwheel socket - if (itemProto->Socket[i].Color == SOCKET_COLOR_COGWHEEL && GemProps[i]->color != SOCKET_COLOR_COGWHEEL) + if (itemProto->Socket[i].Color == SOCKET_COLOR_COGWHEEL && GemProps[i]->Type != SOCKET_COLOR_COGWHEEL) return; // tried to put cogwheel gem in normal socket - if (itemProto->Socket[i].Color != SOCKET_COLOR_COGWHEEL && GemProps[i]->color == SOCKET_COLOR_COGWHEEL) + if (itemProto->Socket[i].Color != SOCKET_COLOR_COGWHEEL && GemProps[i]->Type == SOCKET_COLOR_COGWHEEL) return; } @@ -1162,7 +1162,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData) uint32 OldEnchants[MAX_GEM_SOCKETS]; for (int i = 0; i < MAX_GEM_SOCKETS; ++i) //get new and old enchantments { - GemEnchants[i] = (GemProps[i]) ? GemProps[i]->spellitemenchantement : 0; + GemEnchants[i] = (GemProps[i]) ? GemProps[i]->Enchant_ID : 0; OldEnchants[i] = itemTarget->GetEnchantmentId(EnchantmentSlot(SOCK_ENCHANTMENT_SLOT+i)); } @@ -1195,7 +1195,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData) { if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(OldEnchants[j])) { - if (iGemProto->ItemId == enchantEntry->GemID) + if (iGemProto->ItemId == enchantEntry->Src_itemID) { _player->SendEquipError(EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED, itemTarget, nullptr); return; @@ -1224,13 +1224,13 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData) { // existing gem if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(OldEnchants[j])) - if (ItemTemplate const* jProto = sObjectMgr->GetItemTemplate(enchantEntry->GemID)) + if (ItemTemplate const* jProto = sObjectMgr->GetItemTemplate(enchantEntry->Src_itemID)) if (iGemProto->ItemLimitCategory == jProto->ItemLimitCategory) ++limit_newcount; } } - if (limit_newcount > 0 && uint32(limit_newcount) > limitEntry->maxCount) + if (limit_newcount > 0 && uint32(limit_newcount) > limitEntry->Quantity) { _player->SendEquipError(EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED, itemTarget, nullptr); return; @@ -1641,7 +1641,7 @@ void WorldSession::HandleReforgeItemOpcode(WorldPacket& recvData) return; } - if (!item->GetReforgableStat(ItemModType(stats->SourceStat)) || item->GetReforgableStat(ItemModType(stats->FinalStat))) // Cheating, you cant reforge to a stat that the item already has, nor reforge from a stat that the item does not have + if (!item->GetReforgableStat(ItemModType(stats->Source_stat)) || item->GetReforgableStat(ItemModType(stats->Target_stat))) // Cheating, you cant reforge to a stat that the item already has, nor reforge from a stat that the item does not have { SendReforgeResult(false); return; diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp index 4b207d5f2c..8c83728bb0 100644 --- a/src/server/game/Handlers/MailHandler.cpp +++ b/src/server/game/Handlers/MailHandler.cpp @@ -809,7 +809,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket& recvData) { MailTemplateEntry const* mailTemplateEntry = sMailTemplateStore.LookupEntry(m->mailTemplateId); ASSERT(mailTemplateEntry); - bodyItem->SetText(mailTemplateEntry->content); + bodyItem->SetText(mailTemplateEntry->Body); } else bodyItem->SetText(m->body); diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 8fba604b69..c780ae3bdb 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -712,7 +712,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData) if (sObjectMgr->IsTavernAreaTrigger(triggerId)) { // set resting flag we are in the inn - player->SetRestFlag(REST_FLAG_IN_TAVERN, atEntry->id); + player->SetRestFlag(REST_FLAG_IN_TAVERN, atEntry->ID); if (sWorld->IsFFAPvPRealm()) player->RemoveByteFlag(UNIT_FIELD_BYTES_2, UNIT_BYTES_2_OFFSET_PVP_FLAG, UNIT_BYTE2_FLAG_FFA_PVP); @@ -771,7 +771,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData) case Map::CANNOT_ENTER_INSTANCE_BIND_MISMATCH: if (MapEntry const* entry = sMapStore.LookupEntry(at->target_mapId)) { - char const* mapName = entry->Name; + char const* mapName = entry->MapName; TC_LOG_DEBUG("maps", "MAP: Player '%s' cannot enter instance map '%s' because their permanent bind is incompatible with their group's", player->GetName().c_str(), mapName); player->SendTransferAborted(entry->ID, TRANSFER_ABORT_LOCKED_TO_DIFFERENT_INSTANCE, player->GetDifficulty(entry->IsRaid())); } diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index 958d569e38..2079bebb3b 100644 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -411,7 +411,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvPacket) { if (VehicleSeatEntry const* seat = vehicle->GetSeatForPassenger(mover)) { - if (seat->m_flags & VEHICLE_SEAT_FLAG_ALLOW_TURNING) + if (seat->Flags & VEHICLE_SEAT_FLAG_ALLOW_TURNING) { if (movementInfo.pos.GetOrientation() != mover->GetOrientation()) { diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp index dfb75f42bb..e62b219394 100644 --- a/src/server/game/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -279,7 +279,7 @@ void WorldSession::SendSpiritResurrect() WorldSafeLocsEntry const* ghostGrave = sObjectMgr->GetClosestGraveyard(*_player, _player->GetTeam(), _player); if (corpseGrave != ghostGrave) - _player->TeleportTo(corpseGrave->map_id, corpseGrave->x, corpseGrave->y, corpseGrave->z, _player->GetOrientation()); + _player->TeleportTo(corpseGrave->Continent, corpseGrave->Loc.X, corpseGrave->Loc.Y, corpseGrave->Loc.Z, _player->GetOrientation()); } } diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp index b5f49196a1..9f31643fda 100644 --- a/src/server/game/Handlers/SkillHandler.cpp +++ b/src/server/game/Handlers/SkillHandler.cpp @@ -46,7 +46,7 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket) { if (TalentTabEntry const* talentTabEntry = sTalentTabStore.LookupEntry(_player->GetPrimaryTalentTree(_player->GetActiveSpec()))) { - if (talentTabEntry->tabpage != uint32(tabPage)) + if (talentTabEntry->OrderIndex != uint32(tabPage)) { recvPacket.rfinish(); return; diff --git a/src/server/game/Handlers/TaxiHandler.cpp b/src/server/game/Handlers/TaxiHandler.cpp index d13c1bfd05..9dbccdd157 100644 --- a/src/server/game/Handlers/TaxiHandler.cpp +++ b/src/server/game/Handlers/TaxiHandler.cpp @@ -221,7 +221,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData) TaxiNodesEntry const* curDestNode = sTaxiNodesStore.LookupEntry(curDest); // far teleport case - if (curDestNode && curDestNode->map_id != GetPlayer()->GetMapId()) + if (curDestNode && curDestNode->ContinentID != GetPlayer()->GetMapId()) { if (GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE) { @@ -232,7 +232,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData) TaxiPathNodeEntry const* node = flight->GetPath()[flight->GetCurrentNode()]; flight->SkipCurrentNode(); - GetPlayer()->TeleportTo(curDestNode->map_id, node->LocX, node->LocY, node->LocZ, GetPlayer()->GetOrientation()); + GetPlayer()->TeleportTo(curDestNode->ContinentID, node->Loc.X, node->Loc.Y, node->Loc.Z, GetPlayer()->GetOrientation()); } } diff --git a/src/server/game/Handlers/VehicleHandler.cpp b/src/server/game/Handlers/VehicleHandler.cpp index 89b991fd3a..c2486ae4be 100644 --- a/src/server/game/Handlers/VehicleHandler.cpp +++ b/src/server/game/Handlers/VehicleHandler.cpp @@ -61,7 +61,7 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket& recvData) { recvData.rfinish(); // prevent warnings spam TC_LOG_ERROR("network", "HandleChangeSeatsOnControlledVehicle, Opcode: %u, Player %u tried to switch seats but current seatflags %u don't permit that.", - recvData.GetOpcode(), GetPlayer()->GetGUID().GetCounter(), seat->m_flags); + recvData.GetOpcode(), GetPlayer()->GetGUID().GetCounter(), seat->Flags); return; } @@ -211,7 +211,7 @@ void WorldSession::HandleRequestVehicleExit(WorldPacket& /*recvData*/) GetPlayer()->ExitVehicle(); else TC_LOG_ERROR("network", "Player %u tried to exit vehicle, but seatflags %u (ID: %u) don't permit that.", - GetPlayer()->GetGUID().GetCounter(), seat->m_ID, seat->m_flags); + GetPlayer()->GetGUID().GetCounter(), seat->ID, seat->Flags); } } } diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index 974fa44004..5b488864b3 100644 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -630,7 +630,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b MapEntry const* mapEntry = sMapStore.LookupEntry(mapid); if (!mapEntry->Instanceable()) return; - TC_LOG_DEBUG("misc", "InstanceSaveManager::ResetOrWarnAll: Processing map %s (%u) on difficulty %u (warn? %u)", mapEntry->Name, mapid, uint8(difficulty), warn); + TC_LOG_DEBUG("misc", "InstanceSaveManager::ResetOrWarnAll: Processing map %s (%u) on difficulty %u (warn? %u)", mapEntry->MapName, mapid, uint8(difficulty), warn); time_t now = GameTime::GetGameTime(); diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index cc8403f1f3..8c45c18942 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -743,16 +743,16 @@ void InstanceScript::UpdateEncounterState(EncounterCreditType type, uint32 credi DungeonEncounter const* encounter = *itr; if (encounter->creditType == type && encounter->creditEntry == creditEntry) { - completedEncounters |= 1 << encounter->dbcEntry->encounterIndex; - encounterId = encounter->dbcEntry->id; + completedEncounters |= 1 << encounter->dbcEntry->Bit; + encounterId = encounter->dbcEntry->ID; if (encounter->lastEncounterDungeon) { - if (instance->GetDifficulty() != sLFGDungeonStore.LookupEntry(encounter->lastEncounterDungeon)->difficulty) + if (instance->GetDifficulty() != sLFGDungeonStore.LookupEntry(encounter->lastEncounterDungeon)->DifficultyID) dungeonId = sLFGMgr->GetDungeonIdForDifficulty(encounter->lastEncounterDungeon, instance->GetDifficulty()); else dungeonId = encounter->lastEncounterDungeon; - TC_LOG_DEBUG("lfg", "UpdateEncounterState: Instance %s (instanceId %u) completed encounter %s. Credit Dungeon: %u", instance->GetMapName(), instance->GetInstanceId(), encounter->dbcEntry->encounterName, dungeonId); + TC_LOG_DEBUG("lfg", "UpdateEncounterState: Instance %s (instanceId %u) completed encounter %s. Credit Dungeon: %u", instance->GetMapName(), instance->GetInstanceId(), encounter->dbcEntry->Name, dungeonId); break; } } @@ -779,7 +779,7 @@ void InstanceScript::UpdateEncounterState(EncounterCreditType type, uint32 credi { if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId)) { - if (grp->MemberLevelIsInRange(dungeon->minlevel, dungeon->maxlevel)) + if (grp->MemberLevelIsInRange(dungeon->MinLevel, dungeon->Maxlevel)) { if (dungeonId) guild->CompleteChallenge(instance->IsNonRaidDungeon() ? GUILD_CHALLENGE_TYPE_DUNGEON : GUILD_CHALLENGE_TYPE_RAID, player); diff --git a/src/server/game/Loot/Loot.cpp b/src/server/game/Loot/Loot.cpp index 2e91eb3383..121c71bac8 100644 --- a/src/server/game/Loot/Loot.cpp +++ b/src/server/game/Loot/Loot.cpp @@ -121,16 +121,16 @@ void Loot::AddItem(LootStoreItem const& item) if (!currency) return; - uint32 totalCap = currency->TotalCap > 0 ? currency->TotalCap : 1; + uint32 totalCap = currency->MaxQty > 0 ? currency->MaxQty : 1; uint32 count = urand(item.mincount, item.maxcount); uint32 stacks = count / totalCap + ((count % totalCap) ? 1 : 0); for (uint32 i = 0; i < stacks && lootItems.size() < limit; ++i) { LootItem generatedLoot(item); - generatedLoot.count = std::min(count, currency->TotalCap); + generatedLoot.count = std::min(count, currency->MaxQty); lootItems.push_back(generatedLoot); - count -= currency->TotalCap; + count -= currency->MaxQty; // Never seen a currency that needs a quest but just in case if (!item.needs_quest) diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 1fd1207d64..8ef56142a2 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -846,7 +846,7 @@ void LoadLootTemplates_Disenchant() if (!disenchant) continue; - uint32 lootid = disenchant->Id; + uint32 lootid = disenchant->ID; if (lootIdSet.find(lootid) == lootIdSet.end()) LootTemplates_Disenchant.ReportNonExistingId(lootid); else diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index fc19ed95ef..c3c1c601de 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2388,23 +2388,23 @@ inline ZLiquidStatus GridMap::GetLiquidStatus(float x, float y, float z, uint8 R if (LiquidTypeEntry const* liquidEntry = sLiquidTypeStore.LookupEntry(entry)) { type &= MAP_LIQUID_TYPE_DARK_WATER; - uint32 liqTypeIdx = liquidEntry->Type; + uint32 liqTypeIdx = liquidEntry->SoundBank; if (entry < 21) { if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(getArea(x, y))) { - uint32 overrideLiquid = area->LiquidTypeID[liquidEntry->Type]; + uint32 overrideLiquid = area->LiquidTypeID[liquidEntry->SoundBank]; if (!overrideLiquid && area->ParentAreaID) { area = sAreaTableStore.LookupEntry(area->ParentAreaID); if (area) - overrideLiquid = area->LiquidTypeID[liquidEntry->Type]; + overrideLiquid = area->LiquidTypeID[liquidEntry->SoundBank]; } if (LiquidTypeEntry const* liq = sLiquidTypeStore.LookupEntry(overrideLiquid)) { entry = overrideLiquid; - liqTypeIdx = liq->Type; + liqTypeIdx = liq->SoundBank; } } } @@ -2607,7 +2607,7 @@ uint32 Map::GetAreaId(PhaseShift const& phaseShift, float x, float y, float z) c { // wmo found if (WMOAreaTableEntry const* wmoEntry = GetWMOAreaTableEntryByTripple(rootId, adtId, groupId)) - areaId = wmoEntry->areaId; + areaId = wmoEntry->AreaTableID; if (!areaId) areaId = gridAreaId; @@ -2665,7 +2665,7 @@ ZLiquidStatus Map::GetLiquidStatus(PhaseShift const& phaseShift, float x, float uint32 liquidFlagType = 0; if (LiquidTypeEntry const* liq = sLiquidTypeStore.LookupEntry(liquid_type)) - liquidFlagType = liq->Type; + liquidFlagType = liq->SoundBank; if (liquid_type && liquid_type < 21) { @@ -2682,7 +2682,7 @@ ZLiquidStatus Map::GetLiquidStatus(PhaseShift const& phaseShift, float x, float if (LiquidTypeEntry const* liq = sLiquidTypeStore.LookupEntry(overrideLiquid)) { liquid_type = overrideLiquid; - liquidFlagType = liq->Type; + liquidFlagType = liq->SoundBank; } } } @@ -2772,7 +2772,7 @@ void Map::GetFullTerrainStatusForPosition(PhaseShift const& phaseShift, float x, data.outdoors = (vmapData.areaInfo->mogpFlags & 0x8) != 0; if (wmoEntry) { - data.areaId = wmoEntry->areaId; + data.areaId = wmoEntry->AreaTableID; if (wmoEntry->Flags & 4) data.outdoors = true; else if (wmoEntry->Flags & 2) @@ -2808,7 +2808,7 @@ void Map::GetFullTerrainStatusForPosition(PhaseShift const& phaseShift, float x, uint32 liquidFlagType = 0; if (LiquidTypeEntry const* liquidData = sLiquidTypeStore.LookupEntry(liquidType)) - liquidFlagType = liquidData->Type; + liquidFlagType = liquidData->SoundBank; if (liquidType && liquidType < 21 && areaEntry) { @@ -2823,7 +2823,7 @@ void Map::GetFullTerrainStatusForPosition(PhaseShift const& phaseShift, float x, if (LiquidTypeEntry const* overrideData = sLiquidTypeStore.LookupEntry(overrideLiquid)) { liquidType = overrideLiquid; - liquidFlagType = overrideData->Type; + liquidFlagType = overrideData->SoundBank; } } @@ -2922,7 +2922,7 @@ bool Map::CheckGridIntegrity(Creature* c, bool moved) const char const* Map::GetMapName() const { - return i_mapEntry ? i_mapEntry->Name : "UNNAMEDMAP\x0"; + return i_mapEntry ? i_mapEntry->MapName : "UNNAMEDMAP\x0"; } void Map::SendInitSelf(Player* player) diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index 9d8c167dd7..74ac78c7ca 100644 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -250,7 +250,7 @@ BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battlegroun uint8 spawnMode; if (bracketEntry) - spawnMode = bracketEntry->difficulty; + spawnMode = bracketEntry->Difficulty; else spawnMode = REGULAR_DIFFICULTY; diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index 308ebe4aa8..8c4f218737 100644 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -176,7 +176,7 @@ Map::EnterState MapManager::PlayerCannotEnter(uint32 mapid, Player* player, bool if (player->IsGameMaster()) return Map::CAN_ENTER; - char const* mapName = entry->Name; + char const* mapName = entry->MapName; Group* group = player->GetGroup(); // Cannot enter raid maps when not in a raid-group. Ignore rule when CONFIG_INSTANCE_IGNORE_RAID = true diff --git a/src/server/game/Maps/TransportMgr.cpp b/src/server/game/Maps/TransportMgr.cpp index 4bc9ed46ef..b0338b2143 100644 --- a/src/server/game/Maps/TransportMgr.cpp +++ b/src/server/game/Maps/TransportMgr.cpp @@ -95,10 +95,10 @@ void TransportMgr::LoadTransportTemplates() void TransportMgr::LoadTransportAnimationAndRotation() { for (TransportAnimationEntry const* anim : sTransportAnimationStore) - AddPathNodeToTransport(anim->TransportEntry, anim->TimeSeg, anim); + AddPathNodeToTransport(anim->TransportID, anim->TimeIndex, anim); for (TransportRotationEntry const* rot : sTransportRotationStore) - AddPathRotationToTransport(rot->TransportEntry, rot->TimeSeg, rot); + AddPathRotationToTransport(rot->GameObjectsID, rot->TimeIndex, rot); } class SplineRawInitializer @@ -126,7 +126,7 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl Movement::PointsArray splinePath, allPoints; bool mapChange = false; for (size_t i = 0; i < path.size(); ++i) - allPoints.push_back(G3D::Vector3(path[i]->LocX, path[i]->LocY, path[i]->LocZ)); + allPoints.push_back(G3D::Vector3(path[i]->Loc.X, path[i]->Loc.Y, path[i]->Loc.Z)); // Add extra points to allow derivative calculations for all path nodes allPoints.insert(allPoints.begin(), allPoints.front().lerp(allPoints[1], -0.2f)); @@ -143,7 +143,7 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl if (!mapChange) { TaxiPathNodeEntry const* node_i = path[i]; - if (i != path.size() - 1 && (node_i->Flags & 1 || node_i->MapID != path[i + 1]->MapID)) + if (i != path.size() - 1 && (node_i->Flags & 1 || node_i->ContinentID != path[i + 1]->ContinentID)) { keyFrames.back().Teleport = true; mapChange = true; @@ -156,8 +156,8 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl k.InitialOrientation = Position::NormalizeOrientation(std::atan2(h.y, h.x) + float(M_PI)); keyFrames.push_back(k); - splinePath.push_back(G3D::Vector3(node_i->LocX, node_i->LocY, node_i->LocZ)); - transport->mapsUsed.insert(k.Node->MapID); + splinePath.push_back(G3D::Vector3(node_i->Loc.X, node_i->Loc.Y, node_i->Loc.Z)); + transport->mapsUsed.insert(k.Node->ContinentID); } } else @@ -388,10 +388,10 @@ MapTransport* TransportMgr::CreateTransport(uint32 entry, ObjectGuid::LowType gu // ...at first waypoint TaxiPathNodeEntry const* startNode = tInfo->keyFrames.begin()->Node; - uint32 mapId = startNode->MapID; - float x = startNode->LocX; - float y = startNode->LocY; - float z = startNode->LocZ; + uint32 mapId = startNode->ContinentID; + float x = startNode->Loc.X; + float y = startNode->Loc.Y; + float z = startNode->Loc.Z; float o = tInfo->keyFrames.begin()->InitialOrientation; // initialize the gameobject base @@ -522,7 +522,7 @@ bool TransportAnimation::GetAnimNode(uint32 time, TransportAnimationEntry const* --itr; next = itr->second; - percPos = float(time - curr->TimeSeg) / float(next->TimeSeg - curr->TimeSeg); + percPos = float(time - curr->TimeIndex) / float(next->TimeIndex - curr->TimeIndex); return true; } @@ -543,7 +543,7 @@ void TransportAnimation::GetAnimRotation(uint32 time, QuaternionData& curr, Quat for (TransportPathRotationContainer::const_reverse_iterator itr = Rotations.rbegin(); itr != Rotations.rend(); ++itr) if (time >= itr->first) { - uint32 currSeg = itr->second->TimeSeg; + uint32 currSeg = itr->second->TimeIndex; uint32 nextSeg = 0; curr = QuaternionData(itr->second->X, itr->second->Y, itr->second->Z, itr->second->W); @@ -551,7 +551,7 @@ void TransportAnimation::GetAnimRotation(uint32 time, QuaternionData& curr, Quat { --itr; next = QuaternionData(itr->second->X, itr->second->Y, itr->second->Z, itr->second->W); - nextSeg = itr->second->TimeSeg; + nextSeg = itr->second->TimeIndex; } else { diff --git a/src/server/game/Movement/MovementGenerators/FlightPathMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FlightPathMovementGenerator.cpp index e133e2434a..9efda1ff35 100644 --- a/src/server/game/Movement/MovementGenerators/FlightPathMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/FlightPathMovementGenerator.cpp @@ -45,9 +45,9 @@ uint32 FlightPathMovementGenerator::GetPathAtMapEnd() const if (_currentNode >= _path.size()) return _path.size(); - uint32 curMapId = _path[_currentNode]->MapID; + uint32 curMapId = _path[_currentNode]->ContinentID; for (uint32 itr = _currentNode; itr < _path.size(); ++itr) - if (_path[itr]->MapID != curMapId) + if (_path[itr]->ContinentID != curMapId) return itr; return _path.size(); @@ -55,7 +55,7 @@ uint32 FlightPathMovementGenerator::GetPathAtMapEnd() const bool IsNodeIncludedInShortenedPath(TaxiPathNodeEntry const* p1, TaxiPathNodeEntry const* p2) { - return p1->MapID != p2->MapID || std::pow(p1->LocX - p2->LocX, 2) + std::pow(p1->LocY - p2->LocY, 2) > SKIP_SPLINE_POINT_DISTANCE_SQ; + return p1->ContinentID != p2->ContinentID || std::pow(p1->Loc.X - p2->Loc.X, 2) + std::pow(p1->Loc.Y - p2->Loc.Y, 2) > SKIP_SPLINE_POINT_DISTANCE_SQ; } void FlightPathMovementGenerator::LoadPath(Player* player) @@ -125,8 +125,8 @@ void FlightPathMovementGenerator::DoFinalize(Player* player) // When the player reaches the last flight point, teleport to taxi node location if (TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(taxiNodeId)) { - player->SetFallInformation(0, node->z); - player->TeleportTo(node->map_id, node->x, node->y, node->z, player->GetOrientation()); + player->SetFallInformation(0, node->Pos.Z); + player->TeleportTo(node->ContinentID, node->Pos.X, node->Pos.Y, node->Pos.Z, player->GetOrientation()); } } @@ -145,7 +145,7 @@ void FlightPathMovementGenerator::DoReset(Player* player) uint32 end = GetPathAtMapEnd(); for (uint32 i = GetCurrentNode(); i != end; ++i) { - G3D::Vector3 vertice(_path[i]->LocX, _path[i]->LocY, _path[i]->LocZ); + G3D::Vector3 vertice(_path[i]->Loc.X, _path[i]->Loc.Y, _path[i]->Loc.Z); init.Path().push_back(vertice); } init.SetFirstPointId(GetCurrentNode()); @@ -196,10 +196,10 @@ void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport() if (_path.empty() || _currentNode >= _path.size()) return; - uint32 map0 = _path[_currentNode]->MapID; + uint32 map0 = _path[_currentNode]->ContinentID; for (size_t i = _currentNode + 1; i < _path.size(); ++i) { - if (_path[i]->MapID != map0) + if (_path[i]->ContinentID != map0) { _currentNode = i; return; @@ -219,9 +219,9 @@ void FlightPathMovementGenerator::DoEventIfAny(Player* player, TaxiPathNodeEntry bool FlightPathMovementGenerator::GetResetPos(Player*, float& x, float& y, float& z) { TaxiPathNodeEntry const* node = _path[_currentNode]; - x = node->LocX; - y = node->LocY; - z = node->LocZ; + x = node->Loc.X; + y = node->Loc.Y; + z = node->Loc.Z; return true; } @@ -230,10 +230,10 @@ void FlightPathMovementGenerator::InitEndGridInfo() /*! Storage to preload flightmaster grid at end of flight. For multi-stop flights, this will be reinitialized for each flightmaster at the end of each spline (or stop) in the flight. */ uint32 nodeCount = _path.size(); //! Number of nodes in path. - _endMapId = _path[nodeCount - 1]->MapID; //! MapId of last node + _endMapId = _path[nodeCount - 1]->ContinentID; //! MapId of last node _preloadTargetNode = nodeCount - 3; - _endGridX = _path[nodeCount - 1]->LocX; - _endGridY = _path[nodeCount - 1]->LocY; + _endGridX = _path[nodeCount - 1]->Loc.X; + _endGridY = _path[nodeCount - 1]->Loc.Y; } void FlightPathMovementGenerator::PreloadEndGrid() diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index e5ab68279c..4b8d92b5e9 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -259,10 +259,10 @@ uint32 Quest::GetXPReward(Player const* player) const else if (diffFactor > 10) diffFactor = 10; - uint32 xp = RoundXPValue(diffFactor * xpentry->Exp[RewardXPDifficulty] / 10); + uint32 xp = RoundXPValue(diffFactor * xpentry->Difficulty[RewardXPDifficulty] / 10); if (sWorld->getIntConfig(CONFIG_MIN_QUEST_SCALED_XP_RATIO)) { - uint32 minScaledXP = RoundXPValue(xpentry->Exp[RewardXPDifficulty]) * sWorld->getIntConfig(CONFIG_MIN_QUEST_SCALED_XP_RATIO) / 100; + uint32 minScaledXP = RoundXPValue(xpentry->Difficulty[RewardXPDifficulty]) * sWorld->getIntConfig(CONFIG_MIN_QUEST_SCALED_XP_RATIO) / 100; xp = std::max(minScaledXP, xp); } diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index 5a1bf56ed3..33c9c8ccfd 100644 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -89,14 +89,14 @@ int32 ReputationMgr::GetBaseReputation(FactionEntry const* factionEntry) const uint32 classMask = _player->getClassMask(); for (int i=0; i < 4; i++) { - if ((factionEntry->BaseRepRaceMask[i] & raceMask || - (factionEntry->BaseRepRaceMask[i] == 0 && - factionEntry->BaseRepClassMask[i] != 0)) && - (factionEntry->BaseRepClassMask[i] & classMask || - (factionEntry->BaseRepClassMask[i] == 0 && - factionEntry->BaseRepValue[i] != 0))) + if ((factionEntry->ReputationRaceMask[i] & raceMask || + (factionEntry->ReputationRaceMask[i] == 0 && + factionEntry->ReputationClassMask[i] != 0)) && + (factionEntry->ReputationClassMask[i] & classMask || + (factionEntry->ReputationClassMask[i] == 0 && + factionEntry->ReputationBase[i] != 0))) - return factionEntry->BaseRepValue[i]; + return factionEntry->ReputationBase[i]; } // in faction.dbc exist factions with (RepListId >=0, listed in character reputation list) with all BaseRepRaceMask[i] == 0 @@ -144,11 +144,11 @@ uint32 ReputationMgr::GetDefaultStateFlags(FactionEntry const* factionEntry) con uint32 classMask = _player->getClassMask(); for (int i=0; i < 4; i++) { - if ((factionEntry->BaseRepRaceMask[i] & raceMask || - (factionEntry->BaseRepRaceMask[i] == 0 && - factionEntry->BaseRepClassMask[i] != 0)) && - (factionEntry->BaseRepClassMask[i] & classMask || - factionEntry->BaseRepClassMask[i] == 0)) + if ((factionEntry->ReputationRaceMask[i] & raceMask || + (factionEntry->ReputationRaceMask[i] == 0 && + factionEntry->ReputationClassMask[i] != 0)) && + (factionEntry->ReputationClassMask[i] & classMask || + factionEntry->ReputationClassMask[i] == 0)) return factionEntry->ReputationFlags[i]; } @@ -264,11 +264,11 @@ void ReputationMgr::Initialize() { FactionEntry const* factionEntry = sFactionStore.LookupEntry(i); - if (factionEntry && (factionEntry->reputationListID >= 0)) + if (factionEntry && (factionEntry->ReputationIndex >= 0)) { FactionState newFaction; newFaction.ID = factionEntry->ID; - newFaction.ReputationListID = factionEntry->reputationListID; + newFaction.ReputationListID = factionEntry->ReputationIndex; newFaction.Standing = 0; newFaction.Flags = GetDefaultStateFlags(factionEntry); newFaction.needSend = true; @@ -310,12 +310,12 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi // check for sub-factions that receive spillover SimpleFactionsList const* flist = GetFactionTeamList(factionEntry->ID); // if has no sub-factions, check for factions with same parent - if (!flist && factionEntry->team && factionEntry->spilloverRateOut != 0.0f) + if (!flist && factionEntry->ParentFactionID && factionEntry->ParentFactionMod[1] != 0.0f) { - spillOverRepOut *= factionEntry->spilloverRateOut; - if (FactionEntry const* parent = sFactionStore.LookupEntry(factionEntry->team)) + spillOverRepOut *= factionEntry->ParentFactionMod[1]; + if (FactionEntry const* parent = sFactionStore.LookupEntry(factionEntry->ParentFactionID)) { - FactionStateList::iterator parentState = _factions.find(parent->reputationListID); + FactionStateList::iterator parentState = _factions.find(parent->ReputationIndex); // some team factions have own reputation standing, in this case do not spill to other sub-factions if (parentState != _factions.end() && (parentState->second.Flags & FACTION_FLAG_SPECIAL)) { @@ -323,7 +323,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi } else // spill to "sister" factions { - flist = GetFactionTeamList(factionEntry->team); + flist = GetFactionTeamList(factionEntry->ParentFactionID); } } } @@ -334,9 +334,9 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi { if (FactionEntry const* factionEntryCalc = sFactionStore.LookupEntry(*itr)) { - if (factionEntryCalc == factionEntry || GetRank(factionEntryCalc) > ReputationRank(factionEntryCalc->spilloverMaxRankIn)) + if (factionEntryCalc == factionEntry || GetRank(factionEntryCalc) > ReputationRank(factionEntryCalc->ParentFactionCap[0])) continue; - int32 spilloverRep = int32(spillOverRepOut * factionEntryCalc->spilloverRateIn); + int32 spilloverRep = int32(spillOverRepOut * factionEntryCalc->ParentFactionCap[0]); if (spilloverRep != 0 || !incremental) res = SetOneFactionReputation(factionEntryCalc, spilloverRep, incremental); } @@ -345,7 +345,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi } // spillover done, update faction itself - FactionStateList::iterator faction = _factions.find(factionEntry->reputationListID); + FactionStateList::iterator faction = _factions.find(factionEntry->ReputationIndex); if (faction != _factions.end()) { // if we update spillover only, do not update main reputation (rank exceeds creature reward rate) @@ -360,7 +360,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, int32 standing, bool incremental) { - FactionStateList::iterator itr = _factions.find(factionEntry->reputationListID); + FactionStateList::iterator itr = _factions.find(factionEntry->ReputationIndex); if (itr != _factions.end()) { int32 BaseRep = GetBaseReputation(factionEntry); @@ -408,21 +408,21 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in void ReputationMgr::SetVisible(FactionTemplateEntry const*factionTemplateEntry) { - if (!factionTemplateEntry->faction) + if (!factionTemplateEntry->Faction) return; - if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionTemplateEntry->faction)) + if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionTemplateEntry->Faction)) // Never show factions of the opposing team - if (!(factionEntry->BaseRepRaceMask[1] & _player->getRaceMask() && factionEntry->BaseRepValue[1] == Reputation_Bottom)) + if (!(factionEntry->ReputationRaceMask[1] & _player->getRaceMask() && factionEntry->ReputationBase[1] == Reputation_Bottom)) SetVisible(factionEntry); } void ReputationMgr::SetVisible(FactionEntry const* factionEntry) { - if (factionEntry->reputationListID < 0) + if (factionEntry->ReputationIndex < 0) return; - FactionStateList::iterator itr = _factions.find(factionEntry->reputationListID); + FactionStateList::iterator itr = _factions.find(factionEntry->ReputationIndex); if (itr == _factions.end()) return; @@ -523,9 +523,9 @@ void ReputationMgr::LoadFromDB(PreparedQueryResult result) Field* fields = result->Fetch(); FactionEntry const* factionEntry = sFactionStore.LookupEntry(fields[0].GetUInt16()); - if (factionEntry && (factionEntry->reputationListID >= 0)) + if (factionEntry && (factionEntry->ReputationIndex >= 0)) { - FactionState* faction = &_factions[factionEntry->reputationListID]; + FactionState* faction = &_factions[factionEntry->ReputationIndex]; // update standing to current faction->Standing = fields[1].GetInt32(); diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h index 45ba5c7348..1f5507dff6 100644 --- a/src/server/game/Reputation/ReputationMgr.h +++ b/src/server/game/Reputation/ReputationMgr.h @@ -85,7 +85,7 @@ class TC_GAME_API ReputationMgr FactionState const* GetState(FactionEntry const* factionEntry) const { - return factionEntry->CanHaveReputation() ? GetState(factionEntry->reputationListID) : nullptr; + return factionEntry->CanHaveReputation() ? GetState(factionEntry->ReputationIndex) : nullptr; } FactionState const* GetState(RepListID id) const @@ -110,7 +110,7 @@ class TC_GAME_API ReputationMgr ReputationRank const* GetForcedRankIfAny(FactionTemplateEntry const* factionTemplateEntry) const { - ForcedReactions::const_iterator forceItr = _forcedReactions.find(factionTemplateEntry->faction); + ForcedReactions::const_iterator forceItr = _forcedReactions.find(factionTemplateEntry->Faction); return forceItr != _forcedReactions.end() ? &forceItr->second : nullptr; } diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 4c7c531280..85a73be671 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -1590,7 +1590,7 @@ bool ScriptMgr::OnAreaTrigger(Player* player, AreaTriggerEntry const* trigger) ASSERT(player); ASSERT(trigger); - GET_SCRIPT_RET(AreaTriggerScript, sObjectMgr->GetAreaTriggerScriptId(trigger->id), tmpscript, false); + GET_SCRIPT_RET(AreaTriggerScript, sObjectMgr->GetAreaTriggerScriptId(trigger->ID), tmpscript, false); return tmpscript->OnTrigger(player, trigger); } @@ -2211,7 +2211,7 @@ AreaTriggerScript::AreaTriggerScript(char const* name) bool OnlyOnceAreaTriggerScript::OnTrigger(Player* player, AreaTriggerEntry const* trigger) { - uint32 const triggerId = trigger->id; + uint32 const triggerId = trigger->ID; if (InstanceScript* instance = player->GetInstanceScript()) { if (instance->IsAreaTriggerDone(triggerId)) @@ -2222,7 +2222,7 @@ bool OnlyOnceAreaTriggerScript::OnTrigger(Player* player, AreaTriggerEntry const return _OnTrigger(player, trigger); } void OnlyOnceAreaTriggerScript::ResetAreaTriggerDone(InstanceScript* script, uint32 triggerId) { script->ResetAreaTriggerDone(triggerId); } -void OnlyOnceAreaTriggerScript::ResetAreaTriggerDone(Player const* player, AreaTriggerEntry const* trigger) { if (InstanceScript* instance = player->GetInstanceScript()) ResetAreaTriggerDone(instance, trigger->id); } +void OnlyOnceAreaTriggerScript::ResetAreaTriggerDone(Player const* player, AreaTriggerEntry const* trigger) { if (InstanceScript* instance = player->GetInstanceScript()) ResetAreaTriggerDone(instance, trigger->ID); } BattlegroundScript::BattlegroundScript(char const* name) diff --git a/src/server/game/Server/Packets/CharacterPackets.cpp b/src/server/game/Server/Packets/CharacterPackets.cpp index 6ee8f6b9a9..4c897a55f9 100644 --- a/src/server/game/Server/Packets/CharacterPackets.cpp +++ b/src/server/game/Server/Packets/CharacterPackets.cpp @@ -116,7 +116,7 @@ WorldPackets::Character::EnumCharactersResult::CharacterInfo::CharacterInfo(Fiel VisualItems[slot].InvType = proto->InventoryType; VisualItems[slot].DisplayID = proto->DisplayInfoID; - VisualItems[slot].DisplayEnchantID = enchant ? enchant->aura_id : 0; + VisualItems[slot].DisplayEnchantID = enchant ? enchant->ItemVisual : 0; } } diff --git a/src/server/game/Skills/Archaeology/ArchaeologyMgr.cpp b/src/server/game/Skills/Archaeology/ArchaeologyMgr.cpp index ae6bd0e60c..959c10c6c1 100644 --- a/src/server/game/Skills/Archaeology/ArchaeologyMgr.cpp +++ b/src/server/game/Skills/Archaeology/ArchaeologyMgr.cpp @@ -103,7 +103,7 @@ void ArchaeologyMgr::LoadData() for (std::list >::iterator itr = sites.begin(); itr != sites.end();) { - if (itr->second == entry->blobId) + if (itr->second == entry->QuestPOIBlobID) { uint16 site = itr->first; uint16 poiRel = itr->second; @@ -116,19 +116,19 @@ void ArchaeologyMgr::LoadData() // Create Site Polygon _polygonMap[site] = new SitePolygonGraph(); - _polygonMap[site]->add_node(entry->x, entry->y); + _polygonMap[site]->add_node(entry->X, entry->Y); for (uint32 j = 1; j < 12; j++) { entry = sQuestPOIPointStore.LookupEntry(++i); - if (poiRel != entry->blobId) + if (poiRel != entry->QuestPOIBlobID) { - TC_LOG_ERROR("server.loading", "Archaeology: Tried to use POI %u not related to site %u", entry->id, poiRel); + TC_LOG_ERROR("server.loading", "Archaeology: Tried to use POI %u not related to site %u", entry->ID, poiRel); break; } // Add new perimeter point - _polygonMap[site]->add_node(entry->x, entry->y); + _polygonMap[site]->add_node(entry->X, entry->Y); } // Generate ALL inscribed and boundary geometries for the polygon! diff --git a/src/server/game/Skills/SkillDiscovery.cpp b/src/server/game/Skills/SkillDiscovery.cpp index f60ee7287d..34a05f6a20 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 e9d6225679..2c9f04a6b5 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -499,13 +499,13 @@ int32 AuraEffect::CalculateAmount(Unit* caster) { for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; k++) { - SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(item_rand_suffix->enchant_id[k]); + SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(item_rand_suffix->Enchantment[k]); if (pEnchant) { for (int t = 0; t < MAX_ITEM_ENCHANTMENT_EFFECTS; t++) - if (pEnchant->spellid[t] == m_spellInfo->Id) + if (pEnchant->EffectArg[t] == m_spellInfo->Id) { - amount = uint32((item_rand_suffix->prefix[k]*castItem->GetItemSuffixFactor()) / 10000); + amount = uint32((item_rand_suffix->AllocationPct[k]*castItem->GetItemSuffixFactor()) / 10000); break; } } @@ -554,7 +554,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster) case SPELL_AURA_MOUNTED: if (MountCapabilityEntry const* mountCapability = GetBase()->GetUnitOwner()->GetMountCapability(uint32(GetMiscValueB()))) { - amount = mountCapability->Id; + amount = mountCapability->ID; m_canBeRecalculated = true; } break; @@ -1319,12 +1319,12 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const { if (GlyphPropertiesEntry const* glyph = sGlyphPropertiesStore.LookupEntry(glyphId)) { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(glyph->SpellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(glyph->SpellID); if (!spellInfo || !(spellInfo->HasAttribute(SPELL_ATTR0_PASSIVE) || spellInfo->HasAttribute(SPELL_ATTR0_HIDDEN_CLIENTSIDE))) continue; if (spellInfo->Stances & (UI64LIT(1) << (GetMiscValue() - 1))) - target->CastSpell(target, glyph->SpellId, true, nullptr, this); + target->CastSpell(target, glyph->SpellID, true, nullptr, this); } } } @@ -1962,12 +1962,12 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo // Learn spells for shapeshift form - no need to send action bars or add spells to spellbook for (uint8 i = 0; i < MAX_SHAPESHIFT_SPELLS; ++i) { - if (!shapeInfo->stanceSpell[i]) + if (!shapeInfo->PresetSpellID[i]) continue; if (apply) - target->ToPlayer()->AddTemporarySpell(shapeInfo->stanceSpell[i]); + target->ToPlayer()->AddTemporarySpell(shapeInfo->PresetSpellID[i]); else - target->ToPlayer()->RemoveTemporarySpell(shapeInfo->stanceSpell[i]); + target->ToPlayer()->RemoveTemporarySpell(shapeInfo->PresetSpellID[i]); } } } @@ -2697,7 +2697,7 @@ void AuraEffect::HandleAuraMounted(AuraApplication const* aurApp, uint8 mode, bo // cast speed aura if (mode & AURA_EFFECT_HANDLE_REAL) if (MountCapabilityEntry const* mountCapability = sMountCapabilityStore.LookupEntry(GetAmount())) - target->CastSpell(target, mountCapability->SpeedModSpell, true); + target->CastSpell(target, mountCapability->ModSpellAuraID, true); } else { @@ -2711,7 +2711,7 @@ void AuraEffect::HandleAuraMounted(AuraApplication const* aurApp, uint8 mode, bo // remove speed aura if (MountCapabilityEntry const* mountCapability = sMountCapabilityStore.LookupEntry(GetAmount())) - target->RemoveAurasDueToSpell(mountCapability->SpeedModSpell, target->GetGUID()); + target->RemoveAurasDueToSpell(mountCapability->ModSpellAuraID, target->GetGUID()); } } } @@ -5059,7 +5059,7 @@ void AuraEffect::HandleAuraOverrideSpells(AuraApplication const* aurApp, uint8 m target->SetUInt16Value(PLAYER_FIELD_BYTES2, PLAYER_BYTES_2_OVERRIDE_SPELLS_UINT16_OFFSET, 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->Spells[i]) target->AddTemporarySpell(spellId); } else @@ -5067,7 +5067,7 @@ void AuraEffect::HandleAuraOverrideSpells(AuraApplication const* aurApp, uint8 m target->SetUInt16Value(PLAYER_FIELD_BYTES2, PLAYER_BYTES_2_OVERRIDE_SPELLS_UINT16_OFFSET, 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->Spells[i]) target->RemoveTemporarySpell(spellId); } } diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 2a14bfe7f1..9fce890e63 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4986,7 +4986,7 @@ void Spell::TakeRunePower(SpellMissInfo hitInfo) player->ClearLastUsedRuneMask(); int32 runeCost[NUM_RUNE_TYPES]; // blood, frost, unholy, death - int32 runicPowerGain = runeCostData->runePowerGain * sWorld->getRate(RATE_POWER_RUNICPOWER_INCOME); + int32 runicPowerGain = runeCostData->RunicPower * sWorld->getRate(RATE_POWER_RUNICPOWER_INCOME); // Apply rune cost modifiers for (uint32 i = 0; i < RUNE_DEATH; ++i) @@ -5634,7 +5634,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint { uint32 glyphId = m_spellInfo->Effects[i].MiscValue; if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyphId)) - if (m_caster->HasAura(gp->SpellId)) + if (m_caster->HasAura(gp->SpellID)) return SPELL_FAILED_UNIQUE_GLYPH; break; } @@ -5823,7 +5823,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint SummonPropertiesEntry const* SummonProperties = sSummonPropertiesStore.LookupEntry(m_spellInfo->Effects[i].MiscValueB); if (!SummonProperties) break; - switch (SummonProperties->Category) + switch (SummonProperties->Control) { case SUMMON_CATEGORY_PET: if (!m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET) && m_caster->GetPetGUID()) @@ -6442,7 +6442,7 @@ SpellCastResult Spell::CheckRange(bool strict) const std::tie(minRange, maxRange) = GetMinMaxRange(strict); // dont check max_range to strictly after cast - if (m_spellInfo->RangeEntry && m_spellInfo->RangeEntry->type != SPELL_RANGE_MELEE && !strict) + if (m_spellInfo->RangeEntry && m_spellInfo->RangeEntry->Flags != SPELL_RANGE_MELEE && !strict) maxRange += std::min(MAX_SPELL_RANGE_TOLERANCE, maxRange*0.1f); // 10% but no more than MAX_SPELL_RANGE_TOLERANCE // get square values for sqr distance checks @@ -6495,14 +6495,14 @@ std::pair Spell::GetMinMaxRange(bool strict) const if (m_spellInfo->RangeEntry) { Unit* target = m_targets.GetUnitTarget(); - if (m_spellInfo->RangeEntry->type & SPELL_RANGE_MELEE) + if (m_spellInfo->RangeEntry->Flags & SPELL_RANGE_MELEE) { rangeMod = m_caster->GetMeleeRange(target ? target : m_caster); // when the target is not a unit, take the caster's combat reach as the target's combat reach. } else { float meleeRange = 0.0f; - if (m_spellInfo->RangeEntry->type & SPELL_RANGE_RANGED) + if (m_spellInfo->RangeEntry->Flags & SPELL_RANGE_RANGED) meleeRange = m_caster->GetMeleeRange(target ? target : m_caster); // when the target is not a unit, take the caster's combat reach as the target's combat reach. minRange = m_caster->GetSpellMinRangeForTarget(target, m_spellInfo) + meleeRange; @@ -6512,13 +6512,13 @@ std::pair Spell::GetMinMaxRange(bool strict) const { rangeMod = m_caster->GetCombatReach() + (target ? target->GetCombatReach() : m_caster->GetCombatReach()); - if (minRange > 0.0f && !(m_spellInfo->RangeEntry->type & SPELL_RANGE_RANGED)) + if (minRange > 0.0f && !(m_spellInfo->RangeEntry->Flags & SPELL_RANGE_RANGED)) minRange += rangeMod; } } if (target && m_caster->isMoving() && target->isMoving() && !m_caster->IsWalking() && !target->IsWalking() && - (m_spellInfo->RangeEntry->type & SPELL_RANGE_MELEE || target->GetTypeId() == TYPEID_PLAYER)) + (m_spellInfo->RangeEntry->Flags & SPELL_RANGE_MELEE || target->GetTypeId() == TYPEID_PLAYER)) rangeMod += 8.0f / 3.0f; } @@ -6803,7 +6803,7 @@ SpellCastResult Spell::CheckItems(uint32* param1 /*= nullptr*/, uint32* param2 / { for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s) { - switch (enchantEntry->type[s]) + switch (enchantEntry->Effect[s]) { case ITEM_ENCHANTMENT_TYPE_USE_SPELL: if (isItemUsable) @@ -6829,7 +6829,7 @@ SpellCastResult Spell::CheckItems(uint32* param1 /*= nullptr*/, uint32* param2 / { if (!enchantEntry) return SPELL_FAILED_ERROR; - if (enchantEntry->slot & ENCHANTMENT_CAN_SOULBOUND) + if (enchantEntry->Flags & ENCHANTMENT_CAN_SOULBOUND) return SPELL_FAILED_NOT_TRADEABLE; } break; @@ -6846,7 +6846,7 @@ SpellCastResult Spell::CheckItems(uint32* param1 /*= nullptr*/, uint32* param2 / SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!pEnchant) return SPELL_FAILED_ERROR; - if (pEnchant->slot & ENCHANTMENT_CAN_SOULBOUND) + if (pEnchant->Flags & ENCHANTMENT_CAN_SOULBOUND) return SPELL_FAILED_NOT_TRADEABLE; } diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index ac3527f58b..67ff0db992 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1852,7 +1852,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) // however so far noone found a generic check to find all of those (there's no related data in summonproperties.dbc // and in spell attributes, possibly we need to add a table for those) // so here's a list of MiscValueB values, which is currently most generic check - switch (properties->Id) + switch (properties->ID) { case 64: case 61: @@ -1878,7 +1878,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) break; } - switch (properties->Category) + switch (properties->Control) { case SUMMON_CATEGORY_WILD: case SUMMON_CATEGORY_ALLY: @@ -1888,7 +1888,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) SummonGuardian(effIndex, entry, properties, numSummons); break; } - switch (properties->Type) + switch (properties->Title) { case SUMMON_TYPE_PET: case SUMMON_TYPE_GUARDIAN: @@ -1952,7 +1952,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) if (!summon) continue; - if (properties->Category == SUMMON_CATEGORY_ALLY) + if (properties->Control == SUMMON_CATEGORY_ALLY) { summon->SetOwnerGUID(m_originalCaster->GetGUID()); summon->SetFaction(m_originalCaster->GetFaction()); @@ -2266,12 +2266,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(skillval, 1), tier->MaxSkill[damage - 1]); + unitTarget->ToPlayer()->SetSkill(skillid, m_spellInfo->Effects[effIndex].CalcValue(), std::max(skillval, 1), tier->Value[damage - 1]); } void Spell::EffectPlayMovie(SpellEffIndex effIndex) @@ -2390,7 +2390,7 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex) bool add_socket = false; for (uint8 i = 0; i < MAX_ITEM_ENCHANTMENT_EFFECTS; ++i) { - if (enchant->type[i] == ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET) + if (enchant->Effect[i] == ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET) { add_socket = true; break; @@ -3877,7 +3877,7 @@ void Spell::EffectApplyGlyph(SpellEffIndex effIndex) { if (GlyphSlotEntry const* newGlyphSlot = sGlyphSlotStore.LookupEntry(player->GetGlyphSlot(m_glyphIndex))) { - if (newGlyphProperties->TypeFlags != newGlyphSlot->TypeFlags) + if (newGlyphProperties->GlyphSlotFlags != newGlyphSlot->Type) { SendCastResult(SPELL_FAILED_INVALID_GLYPH); return; // glyph slot mismatch @@ -3889,12 +3889,12 @@ void Spell::EffectApplyGlyph(SpellEffIndex effIndex) { if (GlyphPropertiesEntry const* oldGlyphProperties = sGlyphPropertiesStore.LookupEntry(oldGlyph)) { - player->RemoveAurasDueToSpell(oldGlyphProperties->SpellId); + player->RemoveAurasDueToSpell(oldGlyphProperties->SpellID); player->SetGlyph(m_glyphIndex, 0); } } - player->CastSpell(m_caster, newGlyphProperties->SpellId, true); + player->CastSpell(m_caster, newGlyphProperties->SpellID, true); player->SetGlyph(m_glyphIndex, newGlyph); player->SendTalentsInfoData(false); } @@ -3903,7 +3903,7 @@ void Spell::EffectApplyGlyph(SpellEffIndex effIndex) { if (GlyphPropertiesEntry const* oldGlyphProperties = sGlyphPropertiesStore.LookupEntry(oldGlyph)) { - player->RemoveAurasDueToSpell(oldGlyphProperties->SpellId); + player->RemoveAurasDueToSpell(oldGlyphProperties->SpellID); player->SetGlyph(m_glyphIndex, 0); player->SendTalentsInfoData(false); } @@ -5366,7 +5366,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* summon->SetFullHealth(); } - if (properties && properties->Category == SUMMON_CATEGORY_ALLY) + if (properties && properties->Control == SUMMON_CATEGORY_ALLY) summon->SetFaction(caster->GetFaction()); if (summon->HasUnitTypeMask(UNIT_MASK_MINION) && m_targets.HasDst()) diff --git a/src/server/game/Spells/SpellHistory.cpp b/src/server/game/Spells/SpellHistory.cpp index cc7de959ae..98463bcd06 100644 --- a/src/server/game/Spells/SpellHistory.cpp +++ b/src/server/game/Spells/SpellHistory.cpp @@ -351,7 +351,7 @@ void SpellHistory::StartCooldown(SpellInfo const* spellInfo, uint32 itemId, Spel SpellCategoryEntry const* categoryEntry = sSpellCategoryStore.AssertEntry(categoryId); if (categoryEntry->Flags & SPELL_CATEGORY_FLAG_COOLDOWN_EXPIRES_AT_DAILY_RESET) { - uint32 parentCategoryId = GetParentSpellCategoryId(categoryEntry->Id); + uint32 parentCategoryId = GetParentSpellCategoryId(categoryEntry->ID); SpellCategoryEntry const* parentCategory = sSpellCategoryStore.LookupEntry(parentCategoryId); if (parentCategory && parentCategory->UsesPerWeek) diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index c394519bd3..9cce6d552e 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -353,15 +353,15 @@ SpellEffectInfo::SpellEffectInfo(SpellEntry const* /*spellEntry*/, SpellInfo con _spellInfo = spellInfo; _effIndex = _effect ? _effect->EffectIndex : effIndex; Effect = _effect ? _effect->Effect : 0; - ApplyAuraName = _effect ? _effect->EffectApplyAuraName : 0; - Amplitude = _effect ? _effect->EffectAmplitude : 0; + ApplyAuraName = _effect ? _effect->EffectAura : 0; + Amplitude = _effect ? _effect->EffectAuraPeriod : 0; DieSides = _effect ? _effect->EffectDieSides : 0; RealPointsPerLevel = _effect ? _effect->EffectRealPointsPerLevel : 0.0f; BasePoints = _effect ? _effect->EffectBasePoints : 0; - PointsPerComboPoint = _effect ? _effect->EffectPointsPerComboPoint : 0.0f; - ValueMultiplier = _effect ? _effect->EffectValueMultiplier : 0.0f; - DamageMultiplier = _effect ? _effect->EffectDamageMultiplier : 0.0f; - BonusMultiplier = _effect ? _effect->EffectBonusMultiplier : 0.0f; + PointsPerComboPoint = _effect ? _effect->EffectPointsPerResource : 0.0f; + ValueMultiplier = _effect ? _effect->EffectAmplitude : 0.0f; + DamageMultiplier = _effect ? _effect->EffectChainAmplitude : 0.0f; + BonusMultiplier = _effect ? _effect->EffectBonusCoefficient : 0.0f; MiscValue = _effect ? _effect->EffectMiscValue : 0; MiscValueB = _effect ? _effect->EffectMiscValueB : 0; Mechanic = Mechanics(_effect ? _effect->EffectMechanic : 0); @@ -369,14 +369,14 @@ SpellEffectInfo::SpellEffectInfo(SpellEntry const* /*spellEntry*/, SpellInfo con TargetB = SpellImplicitTargetInfo(_effect ? _effect->EffectImplicitTargetB : 0); RadiusEntry = _effect && _effect->EffectRadiusIndex ? sSpellRadiusStore.LookupEntry(_effect->EffectRadiusIndex) : nullptr; MaxRadiusEntry = _effect && _effect->EffectRadiusMaxIndex ? sSpellRadiusStore.LookupEntry(_effect->EffectRadiusMaxIndex) : nullptr; - ChainTarget = _effect ? _effect->EffectChainTarget : 0; + ChainTarget = _effect ? _effect->EffectChainTargets : 0; ItemType = _effect ? _effect->EffectItemType : 0; TriggerSpell = _effect ? _effect->EffectTriggerSpell : 0; SpellClassMask = _effect ? _effect->EffectSpellClassMask : flag96(0); ImplicitTargetConditions = nullptr; - ScalingMultiplier = scaling ? scaling->Multiplier[_effIndex] : 0.0f; - DeltaScalingMultiplier = scaling ? scaling->RandomMultiplier[_effIndex] : 0.0f; - ComboScalingMultiplier = scaling ? scaling->OtherMultiplier[_effIndex] : 0.0f; + ScalingMultiplier = scaling ? scaling->Coefficient[_effIndex] : 0.0f; + DeltaScalingMultiplier = scaling ? scaling->Variance[_effIndex] : 0.0f; + ComboScalingMultiplier = scaling ? scaling->ComboPointsCoefficient[_effIndex] : 0.0f; } bool SpellEffectInfo::IsEffect() const @@ -854,7 +854,7 @@ SpellEffectInfo::StaticData SpellEffectInfo::_data[TOTAL_SPELL_EFFECTS] = SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntry const** effects) { - Id = spellEntry->Id; + Id = spellEntry->ID; Attributes = spellEntry->Attributes; AttributesEx = spellEntry->AttributesEx; AttributesEx2 = spellEntry->AttributesEx2; @@ -869,36 +869,36 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntry const** effe AttributesCu = 0; CastTimeEntry = spellEntry->CastingTimeIndex ? sSpellCastTimesStore.LookupEntry(spellEntry->CastingTimeIndex) : nullptr; DurationEntry = spellEntry->DurationIndex ? sSpellDurationStore.LookupEntry(spellEntry->DurationIndex) : nullptr; - PowerType = spellEntry->powerType; - RangeEntry = spellEntry->rangeIndex ? sSpellRangeStore.LookupEntry(spellEntry->rangeIndex) : nullptr; - Speed = spellEntry->speed; + PowerType = spellEntry->PowerType; + RangeEntry = spellEntry->RangeIndex ? sSpellRangeStore.LookupEntry(spellEntry->RangeIndex) : nullptr; + Speed = spellEntry->Speed; for (uint8 i = 0; i < 2; ++i) - SpellVisual[i] = spellEntry->SpellVisual[i]; + SpellVisual[i] = spellEntry->SpellVisualID[i]; SpellIconID = spellEntry->SpellIconID; - ActiveIconID = spellEntry->activeIconID; - SpellName = spellEntry->SpellName; - Rank = spellEntry->Rank; + ActiveIconID = spellEntry->ActiveIconID; + SpellName = spellEntry->Name; + Rank = spellEntry->NameSubtext; SchoolMask = spellEntry->SchoolMask; - RuneCostID = spellEntry->runeCostID; - SpellDifficultyId = spellEntry->SpellDifficultyId; - SpellScalingId = spellEntry->SpellScalingId; - SpellAuraOptionsId = spellEntry->SpellAuraOptionsId; - SpellAuraRestrictionsId = spellEntry->SpellAuraRestrictionsId; - SpellCastingRequirementsId = spellEntry->SpellCastingRequirementsId; - SpellCategoriesId = spellEntry->SpellCategoriesId; - SpellClassOptionsId = spellEntry->SpellClassOptionsId; - SpellCooldownsId = spellEntry->SpellCooldownsId; - SpellEquippedItemsId = spellEntry->SpellEquippedItemsId; - SpellInterruptsId = spellEntry->SpellInterruptsId; - SpellLevelsId = spellEntry->SpellLevelsId; - SpellPowerId = spellEntry->SpellPowerId; - SpellReagentsId = spellEntry->SpellReagentsId; - SpellShapeshiftId = spellEntry->SpellShapeshiftId; - SpellTargetRestrictionsId = spellEntry->SpellTargetRestrictionsId; - SpellTotemsId = spellEntry->SpellTotemsId; - ResearchProjectId = spellEntry->ResearchProjectId; + RuneCostID = spellEntry->RuneCostID; + SpellDifficultyId = spellEntry->Difficulty; + SpellScalingId = spellEntry->ScalingID; + SpellAuraOptionsId = spellEntry->AuraOptionsID; + SpellAuraRestrictionsId = spellEntry->AuraRestrictionsID; + SpellCastingRequirementsId = spellEntry->CastingRequirementsID; + SpellCategoriesId = spellEntry->CategoriesID; + SpellClassOptionsId = spellEntry->ClassOptionsID; + SpellCooldownsId = spellEntry->CooldownsID; + SpellEquippedItemsId = spellEntry->EquippedItemsID; + SpellInterruptsId = spellEntry->InterruptsID; + SpellLevelsId = spellEntry->LevelsID; + SpellPowerId = spellEntry->PowerDisplayID; + SpellReagentsId = spellEntry->ReagentsID; + SpellShapeshiftId = spellEntry->ShapeshiftID; + SpellTargetRestrictionsId = spellEntry->TargetRestrictionsID; + SpellTotemsId = spellEntry->TotemsID; + ResearchProjectId = spellEntry->RequiredProjectID; // SpellDifficultyEntry for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) @@ -909,47 +909,47 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntry const** effe CastTimeMin = _scaling ? _scaling->CastTimeMin : 0; CastTimeMax = _scaling ?_scaling->CastTimeMax : 0; CastTimeMaxLevel = _scaling ? _scaling->CastTimeMaxLevel : 0; - ScalingClass = _scaling ? _scaling->ScalingClass : 0; - CoefBase = _scaling ? _scaling->CoefBase : 0; - CoefLevelBase = _scaling ? _scaling->CoefLevelBase : 0; + ScalingClass = _scaling ? _scaling->Class : 0; + CoefBase = _scaling ? _scaling->NerfFactor : 0; + CoefLevelBase = _scaling ? _scaling->NerfMaxLevel : 0; // SpellAuraOptionsEntry SpellAuraOptionsEntry const* _options = GetSpellAuraOptions(); - ProcFlags = _options ? _options->procFlags : 0; - ProcChance = _options ? _options->procChance : 0; - ProcCharges = _options ? _options->procCharges : 0; - StackAmount = _options ? _options->StackAmount : 0; + ProcFlags = _options ? _options->ProcTypeMask : 0; + ProcChance = _options ? _options->ProcChance : 0; + ProcCharges = _options ? _options->ProcCharges : 0; + StackAmount = _options ? _options->CumulativeAura : 0; // SpellAuraRestrictionsEntry SpellAuraRestrictionsEntry const* _aura = GetSpellAuraRestrictions(); CasterAuraState = _aura ? _aura->CasterAuraState : 0; TargetAuraState = _aura ? _aura->TargetAuraState : 0; - CasterAuraStateNot = _aura ? _aura->CasterAuraStateNot : 0; - TargetAuraStateNot = _aura ? _aura->TargetAuraStateNot : 0; - CasterAuraSpell = _aura ? _aura->casterAuraSpell : 0; - TargetAuraSpell = _aura ? _aura->targetAuraSpell : 0; - ExcludeCasterAuraSpell = _aura ? _aura->excludeCasterAuraSpell : 0; - ExcludeTargetAuraSpell = _aura ? _aura->excludeTargetAuraSpell : 0; + CasterAuraStateNot = _aura ? _aura->ExcludeCasterAuraState : 0; + TargetAuraStateNot = _aura ? _aura->ExcludeTargetAuraState : 0; + CasterAuraSpell = _aura ? _aura->CasterAuraSpell : 0; + TargetAuraSpell = _aura ? _aura->TargetAuraSpell : 0; + ExcludeCasterAuraSpell = _aura ? _aura->ExcludeCasterAuraSpell : 0; + ExcludeTargetAuraSpell = _aura ? _aura->ExcludeTargetAuraSpell : 0; // SpellCastingRequirementsEntry SpellCastingRequirementsEntry const* _castreq = GetSpellCastingRequirements(); RequiresSpellFocus = _castreq ? _castreq->RequiresSpellFocus : 0; FacingCasterFlags = _castreq ? _castreq->FacingCasterFlags : 0; - AreaGroupId = _castreq ? _castreq->AreaGroupId : -1; + AreaGroupId = _castreq ? _castreq->RequiredAreasID : -1; // SpellCategoriesEntry SpellCategoriesEntry const* _categorie = GetSpellCategories(); CategoryEntry = _categorie ? sSpellCategoryStore.LookupEntry(_categorie->Category) : nullptr; - Dispel = _categorie ? _categorie->Dispel : 0; + Dispel = _categorie ? _categorie->DispelType : 0; Mechanic = _categorie ? _categorie->Mechanic : 0; StartRecoveryCategory = _categorie ? _categorie->StartRecoveryCategory : 0; - DmgClass = _categorie ? _categorie->DmgClass : 0; + DmgClass = _categorie ? _categorie->DefenseType : 0; PreventionType = _categorie ? _categorie->PreventionType : 0; // SpellClassOptionsEntry SpellClassOptionsEntry const* _class = GetSpellClassOptions(); - SpellFamilyName = _class ? _class->SpellFamilyName : 0; - SpellFamilyFlags = _class ? _class->SpellFamilyFlags : flag96(0); + SpellFamilyName = _class ? _class->SpellClassSet : 0; + SpellFamilyFlags = _class ? _class->SpellFamilyMask : flag96(0); // SpellCooldownsEntry SpellCooldownsEntry const* _cooldowns = GetSpellCooldowns(); @@ -960,40 +960,40 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntry const** effe // SpellEquippedItemsEntry SpellEquippedItemsEntry const* _equipped = GetSpellEquippedItems(); EquippedItemClass = _equipped ? _equipped->EquippedItemClass : -1; - EquippedItemSubClassMask = _equipped ?_equipped->EquippedItemSubClassMask : -1; - EquippedItemInventoryTypeMask = _equipped ? _equipped->EquippedItemInventoryTypeMask : -1; + EquippedItemSubClassMask = _equipped ?_equipped->EquippedItemSubclass : -1; + EquippedItemInventoryTypeMask = _equipped ? _equipped->EquippedItemInvTypes : -1; // SpellInterruptsEntry SpellInterruptsEntry const* _interrupt = GetSpellInterrupts(); InterruptFlags = _interrupt ? _interrupt->InterruptFlags : 0; - AuraInterruptFlags = _interrupt ? _interrupt->AuraInterruptFlags : 0; - ChannelInterruptFlags = _interrupt ? _interrupt->ChannelInterruptFlags : 0; + AuraInterruptFlags = _interrupt ? _interrupt->AuraInterruptFlags[0] : 0; + ChannelInterruptFlags = _interrupt ? _interrupt->ChannelInterruptFlags[0] : 0; // SpellLevelsEntry SpellLevelsEntry const* _levels = GetSpellLevels(); - MaxLevel = _levels ? _levels->maxLevel : 0; - BaseLevel = _levels ? _levels->baseLevel : 0; - SpellLevel = _levels ? _levels->spellLevel : 0; + MaxLevel = _levels ? _levels->MaxLevel : 0; + BaseLevel = _levels ? _levels->BaseLevel : 0; + SpellLevel = _levels ? _levels->SpellLevel : 0; // SpellPowerEntry SpellPowerEntry const* _power = GetSpellPower(); - ManaCost = _power ? _power->manaCost : 0; - ManaCostPerlevel = _power ? _power->manaCostPerlevel : 0; - ManaCostPercentage = _power ? _power->ManaCostPercentage : 0; - ManaPerSecond = _power ? _power->manaPerSecond : 0; + ManaCost = _power ? _power->ManaCost : 0; + ManaCostPerlevel = _power ? _power->ManaCostPerLevel : 0; + ManaCostPercentage = _power ? _power->PowerCostPct : 0; + ManaPerSecond = _power ? _power->ManaPerSecond : 0; // SpellReagentsEntry SpellReagentsEntry const* _reagents = GetSpellReagents(); for (uint8 i = 0; i < MAX_SPELL_REAGENTS; ++i) - Reagent[i] = _reagents ? _reagents->Reagent[i] : 0; + Reagent[i] = _reagents ? _reagents->Reagents[i] : 0; for (uint8 i = 0; i < MAX_SPELL_REAGENTS; ++i) ReagentCount[i] = _reagents ? _reagents->ReagentCount[i] : 0; // SpellShapeshiftEntry if (SpellShapeshiftEntry const* _shapeshift = GetSpellShapeshift()) { - Stances = MAKE_PAIR64(_shapeshift->Stances[0], _shapeshift->Stances[1]); - StancesNot = MAKE_PAIR64(_shapeshift->StancesNot[0], _shapeshift->StancesNot[1]); + Stances = MAKE_PAIR64(_shapeshift->ShapeshiftMask[0], _shapeshift->ShapeshiftMask[1]); + StancesNot = MAKE_PAIR64(_shapeshift->ShapeshiftExclude[0], _shapeshift->ShapeshiftExclude[1]); } else { @@ -1006,13 +1006,13 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntry const** effe ConeAngle = _target ? _target->ConeAngle : 0.f; Targets = _target ? _target->Targets : 0; TargetCreatureType = _target ? _target->TargetCreatureType : 0; - MaxAffectedTargets = _target ? _target->MaxAffectedTargets : 0; + MaxAffectedTargets = _target ? _target->MaxTargets : 0; MaxTargetLevel = _target ? _target->MaxTargetLevel : 0; // SpellTotemsEntry SpellTotemsEntry const* _totem = GetSpellTotems(); for (uint8 i = 0; i < 2; ++i) - TotemCategory[i] = _totem ? _totem->TotemCategory[i] : 0; + TotemCategory[i] = _totem ? _totem->RequiredTotemCategoryID[i] : 0; for (uint8 i = 0; i < 2; ++i) Totem[i] = _totem ? _totem->Totem[i] : 0; @@ -1033,7 +1033,7 @@ SpellInfo::~SpellInfo() uint32 SpellInfo::GetCategory() const { - return CategoryEntry ? CategoryEntry->Id : 0; + return CategoryEntry ? CategoryEntry->ID : 0; } bool SpellInfo::HasEffect(SpellEffects effect) const @@ -1163,10 +1163,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->AcquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE) continue; - if (pAbility->req_skill_value > 0) + if (pAbility->MinSkillLineRank > 0) return true; } @@ -1178,7 +1178,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; @@ -1599,7 +1599,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const TC_LOG_ERROR("spells", "GetErrorAtShapeshiftedCast: unknown shapeshift %u", form); return SPELL_CAST_OK; } - actAsShifted = !(shapeInfo->flags1 & 1); // shapeshift acts as normal form for spells + actAsShifted = !(shapeInfo->Flags & 1); // shapeshift acts as normal form for spells } if (actAsShifted) @@ -1619,7 +1619,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const // Check if stance disables cast of not-stance spells // Example: cannot cast any other spells in zombie or ghoul form /// @todo Find a way to disable use of these spells clientside - if (shapeInfo && shapeInfo->flags1 & 0x400) + if (shapeInfo && shapeInfo->Flags & 0x400) { if (!(stanceMask & Stances)) return SPELL_FAILED_ONLY_SHAPESHIFT; @@ -1638,12 +1638,12 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a while (groupEntry) { for (uint8 i = 0; i < MAX_GROUP_AREA_IDS; ++i) - if (groupEntry->AreaId[i] == zone_id || groupEntry->AreaId[i] == area_id) + if (groupEntry->AreaID[i] == zone_id || groupEntry->AreaID[i] == area_id) found = true; - if (found || !groupEntry->nextGroup) + if (found || !groupEntry->NextAreaID) break; // Try search in next group - groupEntry = sAreaGroupStore.LookupEntry(groupEntry->nextGroup); + groupEntry = sAreaGroupStore.LookupEntry(groupEntry->NextAreaID); } if (!found) @@ -1980,7 +1980,7 @@ SpellCastResult SpellInfo::CheckVehicle(Unit const* caster) const if (Effects[effIndex].ApplyAuraName == SPELL_AURA_MOD_SHAPESHIFT) { SpellShapeshiftFormEntry const* shapeShiftFromEntry = sSpellShapeshiftFormStore.LookupEntry(Effects[effIndex].MiscValue); - if (shapeShiftFromEntry && (shapeShiftFromEntry->flags1 & 1) == 0) // unk flag + if (shapeShiftFromEntry && (shapeShiftFromEntry->Flags & 1) == 0) // unk flag checkMask |= VEHICLE_SEAT_FLAG_UNCONTROLLED; break; } @@ -1997,11 +1997,11 @@ SpellCastResult SpellInfo::CheckVehicle(Unit const* caster) const return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; if (!HasAttribute(SPELL_ATTR6_CASTABLE_WHILE_ON_VEHICLE) && !HasAttribute(SPELL_ATTR0_CASTABLE_WHILE_MOUNTED) - && (vehicleSeat->m_flags & checkMask) != checkMask) + && (vehicleSeat->Flags & checkMask) != checkMask) return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; // Can only summon uncontrolled minions/guardians when on controlled vehicle - if (vehicleSeat->m_flags & (VEHICLE_SEAT_FLAG_CAN_CONTROL | VEHICLE_SEAT_FLAG_UNK2)) + if (vehicleSeat->Flags & (VEHICLE_SEAT_FLAG_CAN_CONTROL | VEHICLE_SEAT_FLAG_UNK2)) { for (uint32 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i) { @@ -2009,7 +2009,7 @@ SpellCastResult SpellInfo::CheckVehicle(Unit const* caster) const continue; SummonPropertiesEntry const* props = sSummonPropertiesStore.LookupEntry(Effects[i].MiscValueB); - if (props && props->Category != SUMMON_CATEGORY_WILD) + if (props && props->Control != SUMMON_CATEGORY_WILD) return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; } } @@ -3192,8 +3192,8 @@ float SpellInfo::GetMinRange(bool positive) const if (!RangeEntry) return 0.0f; if (positive) - return RangeEntry->minRangeFriend; - return RangeEntry->minRangeHostile; + return RangeEntry->RangeMin[1]; + return RangeEntry->RangeMin[0]; } float SpellInfo::GetMaxRange(bool positive, Unit* caster, Spell* spell) const @@ -3202,9 +3202,9 @@ float SpellInfo::GetMaxRange(bool positive, Unit* caster, Spell* spell) const return 0.0f; float range; if (positive) - range = RangeEntry->maxRangeFriend; + range = RangeEntry->RangeMax[1]; else - range = RangeEntry->maxRangeHostile; + range = RangeEntry->RangeMax[0]; if (caster) if (Player* modOwner = caster->GetSpellModOwner()) modOwner->ApplySpellMod(Id, SPELLMOD_RANGE, range, spell); @@ -3215,14 +3215,14 @@ int32 SpellInfo::GetDuration() const { if (!DurationEntry) return 0; - return (DurationEntry->Duration[0] == -1) ? -1 : abs(DurationEntry->Duration[0]); + return (DurationEntry->Duration == -1) ? -1 : abs(DurationEntry->Duration); } int32 SpellInfo::GetMaxDuration() const { if (!DurationEntry) return 0; - return (DurationEntry->Duration[2] == -1) ? -1 : abs(DurationEntry->Duration[2]); + return (DurationEntry->MaxDuration == -1) ? -1 : abs(DurationEntry->MaxDuration); } uint32 SpellInfo::CalcCastTime(uint8 level, Spell* spell /*= nullptr*/) const @@ -3239,7 +3239,7 @@ uint32 SpellInfo::CalcCastTime(uint8 level, Spell* spell /*= nullptr*/) const castTime = CastTimeMin + int32(level - 1) * (CastTimeMax - CastTimeMin) / (CastTimeMaxLevel - 1); } else if (CastTimeEntry) - castTime = CastTimeEntry->CastTime; + castTime = CastTimeEntry->Base; if (!castTime) return 0; diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index c8f970eb45..c809a647f6 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -36,20 +36,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; @@ -200,20 +200,20 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con return spellId; //return source spell } - if (difficultyEntry->SpellID[mode] <= 0 && mode > DUNGEON_DIFFICULTY_HEROIC) + if (difficultyEntry->DifficultySpellID[mode] <= 0 && mode > DUNGEON_DIFFICULTY_HEROIC) { TC_LOG_DEBUG("spells", "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is nullptr, using mode %u", spellId, mode, mode - 2); mode -= 2; } - if (difficultyEntry->SpellID[mode] <= 0) + if (difficultyEntry->DifficultySpellID[mode] <= 0) { TC_LOG_ERROR("sql.sql", "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is 0. Check spelldifficulty_dbc!", spellId, mode); return spellId; } - TC_LOG_DEBUG("spells", "SpellMgr::GetSpellIdForDifficulty: spellid for spell %u in mode %u is %d", spellId, mode, difficultyEntry->SpellID[mode]); - return uint32(difficultyEntry->SpellID[mode]); + TC_LOG_DEBUG("spells", "SpellMgr::GetSpellIdForDifficulty: spellid for spell %u in mode %u is %d", spellId, mode, difficultyEntry->DifficultySpellID[mode]); + return uint32(difficultyEntry->DifficultySpellID[mode]); } SpellInfo const* SpellMgr::GetSpellForDifficultyFromSpell(SpellInfo const* spell, Unit const* caster) const @@ -805,9 +805,9 @@ void SpellMgr::LoadSpellTalentRanks() SpellInfo const* lastSpell = nullptr; for (uint8 rank = MAX_TALENT_RANK - 1; rank > 0; --rank) { - if (talentInfo->RankID[rank]) + if (talentInfo->SpellRank[rank]) { - lastSpell = GetSpellInfo(talentInfo->RankID[rank]); + lastSpell = GetSpellInfo(talentInfo->SpellRank[rank]); break; } } @@ -815,17 +815,17 @@ void SpellMgr::LoadSpellTalentRanks() if (!lastSpell) continue; - SpellInfo const* firstSpell = GetSpellInfo(talentInfo->RankID[0]); + SpellInfo const* firstSpell = GetSpellInfo(talentInfo->SpellRank[0]); if (!firstSpell) { - TC_LOG_ERROR("spells", "SpellMgr::LoadSpellTalentRanks: First Rank Spell %u for TalentEntry %u does not exist.", talentInfo->RankID[0], i); + TC_LOG_ERROR("spells", "SpellMgr::LoadSpellTalentRanks: First Rank Spell %u for TalentEntry %u does not exist.", talentInfo->SpellRank[0], i); continue; } SpellInfo const* prevSpell = nullptr; for (uint8 rank = 0; rank < MAX_TALENT_RANK; ++rank) { - uint32 spellId = talentInfo->RankID[rank]; + uint32 spellId = talentInfo->SpellRank[rank]; if (!spellId) break; @@ -842,7 +842,7 @@ void SpellMgr::LoadSpellTalentRanks() node.rank = rank + 1; node.prev = prevSpell; - node.next = node.rank < MAX_TALENT_RANK ? GetSpellInfo(talentInfo->RankID[node.rank]) : nullptr; + node.next = node.rank < MAX_TALENT_RANK ? GetSpellInfo(talentInfo->SpellRank[node.rank]) : nullptr; mSpellChains[spellId] = node; mSpellInfoMap[spellId]->ChainEntry = &mSpellChains[spellId]; @@ -1192,7 +1192,7 @@ void SpellMgr::LoadSpellLearnSpells() for (uint32 m = 0; m < MAX_MASTERY_SPELLS; ++m) { - uint32 mastery = talentTab->MasterySpellId[m]; + uint32 mastery = talentTab->MasterySpellID[m]; if (!mastery) continue; @@ -2028,11 +2028,11 @@ void SpellMgr::LoadSkillLineAbilityMap() for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); ++i) { - SkillLineAbilityEntry const* SkillInfo = sSkillLineAbilityStore.LookupEntry(i); - if (!SkillInfo) + SkillLineAbilityEntry const* skillInfo = sSkillLineAbilityStore.LookupEntry(i); + if (!skillInfo) continue; - mSkillLineAbilityMap.insert(SkillLineAbilityMap::value_type(SkillInfo->spellId, SkillInfo)); + mSkillLineAbilityMap.insert(SkillLineAbilityMap::value_type(skillInfo->Spell, skillInfo)); ++count; } @@ -2257,7 +2257,7 @@ void SpellMgr::LoadPetLevelupSpellMap() for (uint8 j = 0; j < 2; ++j) { - if (!creatureFamily->skillLine[j]) + if (!creatureFamily->SkillLine[j]) continue; for (uint32 k = 0; k < sSkillLineAbilityStore.GetNumRows(); ++k) @@ -2270,13 +2270,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->AcquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) continue; - SpellInfo const* spell = GetSpellInfo(skillLine->spellId); + SpellInfo const* spell = GetSpellInfo(skillLine->Spell); if (!spell) // not exist or triggered or talent continue; @@ -2368,7 +2368,7 @@ void SpellMgr::LoadPetDefaultSpells() int32 petSpellsId = -int32(itr->second.PetSpellDataId); PetDefaultSpellsEntry petDefSpells; for (uint8 j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j) - petDefSpells.spellid[j] = spellDataEntry->spellId[j]; + petDefSpells.spellid[j] = spellDataEntry->Spells[j]; if (LoadPetDefaultSpells_helper(&itr->second, petDefSpells)) { @@ -2633,10 +2633,10 @@ void SpellMgr::LoadSpellInfoStore() std::unordered_map effectsBySpell; for (SpellEffectEntry const* effect : sSpellEffectStore) - effectsBySpell[effect->EffectSpellId].effects[effect->EffectIndex] = effect; + effectsBySpell[effect->SpellID].effects[effect->EffectIndex] = effect; for (SpellEntry const* spellEntry : sSpellStore) - mSpellInfoMap[spellEntry->Id] = new SpellInfo(spellEntry, effectsBySpell[spellEntry->Id].effects); + mSpellInfoMap[spellEntry->ID] = new SpellInfo(spellEntry, effectsBySpell[spellEntry->ID].effects); for (uint32 spellIndex = 0; spellIndex < GetSpellInfoStoreSize(); ++spellIndex) { @@ -2777,10 +2777,10 @@ void SpellMgr::LoadSpellInfoCustomAttributes() for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s) { - if (enchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL) + if (enchant->Effect[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL) continue; - SpellInfo* procInfo = _GetSpellInfo(enchant->spellid[s]); + SpellInfo* procInfo = _GetSpellInfo(enchant->EffectArg[s]); if (!procInfo) continue; @@ -2813,9 +2813,9 @@ void SpellMgr::LoadSpellInfoCustomAttributes() // add custom attribute to liquid auras for (LiquidTypeEntry const* liquid : sLiquidTypeStore) { - if (liquid->SpellId) + if (liquid->SpellID) { - spellInfo = _GetSpellInfo(liquid->SpellId); + spellInfo = _GetSpellInfo(liquid->SpellID); if (spellInfo) spellInfo->AttributesCu |= SPELL_ATTR0_CU_LIQUID_AURA; } @@ -5692,13 +5692,13 @@ void SpellMgr::LoadSpellInfoCorrections() } if (SummonPropertiesEntry* properties = const_cast(sSummonPropertiesStore.LookupEntry(121))) - properties->Type = SUMMON_TYPE_TOTEM; + properties->Title = SUMMON_TYPE_TOTEM; if (SummonPropertiesEntry* properties = const_cast(sSummonPropertiesStore.LookupEntry(647))) // 52893 - properties->Type = SUMMON_TYPE_TOTEM; + properties->Title = SUMMON_TYPE_TOTEM; if (SummonPropertiesEntry* properties = const_cast(sSummonPropertiesStore.LookupEntry(3069))) // Wild Mushroom - properties->Type = SUMMON_TYPE_MINION; + properties->Title = SUMMON_TYPE_MINION; if (SummonPropertiesEntry* properties = const_cast(sSummonPropertiesStore.LookupEntry(628))) // Hungry Plaguehound - properties->Category = SUMMON_CATEGORY_PET; + properties->Control = SUMMON_CATEGORY_PET; if (LockEntry* entry = const_cast(sLockStore.LookupEntry(36))) // 3366 Opening, allows to open without proper key entry->Type[2] = LOCK_KEY_NONE; diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp index 559bb84fce..89f6b5a87b 100644 --- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp +++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp @@ -142,7 +142,7 @@ bool CharacterDatabaseCleaner::TalentCheck(uint32 talent_id) if (!talentInfo) return false; - return sTalentTabStore.LookupEntry(talentInfo->TalentTab) != nullptr; + return sTalentTabStore.LookupEntry(talentInfo->TabID) != nullptr; } void CharacterDatabaseCleaner::CleanCharacterTalent() diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index 58a170540d..f1252bcf40 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -280,11 +280,11 @@ public: { if (target->HasTitle(titleInfo)) { - std::string name = target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale; + std::string name = target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1; if (name.empty()) continue; - char const* activeStr = target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->bit_index + char const* activeStr = target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->Mask_ID ? handler->GetTrinityString(LANG_ACTIVE) : ""; @@ -293,9 +293,9 @@ public: // send title in "id (idx:idx) - [namedlink locale]" format if (handler->GetSession()) - handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, titleInfo->ID, titleInfo->bit_index, titleInfo->ID, titleNameStr, localeNames[loc], knownStr, activeStr); + handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, titleInfo->ID, titleInfo->Mask_ID, titleInfo->ID, titleNameStr, localeNames[loc], knownStr, activeStr); else - handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, titleInfo->ID, titleInfo->bit_index, name.c_str(), localeNames[loc], knownStr, activeStr); + handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, titleInfo->ID, titleInfo->Mask_ID, name.c_str(), localeNames[loc], knownStr, activeStr); } } @@ -649,7 +649,7 @@ public: { FactionState const& faction = itr->second; FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction.ID); - char const* factionName = factionEntry ? factionEntry->name : "#Not found#"; + char const* factionName = factionEntry ? factionEntry->Name : "#Not found#"; ReputationRank rank = target->GetReputationMgr().GetRank(factionEntry); std::string rankName = handler->GetTrinityString(ReputationRankStrIndex[rank]); std::ostringstream ss; diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index dfa3e3907a..9661b582a4 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -136,9 +136,9 @@ public: } // Dump camera locations - if (std::vector const* flyByCameras = GetFlyByCameras(cineSeq->cinematicCamera)) + if (std::vector const* flyByCameras = GetFlyByCameras(cineSeq->Camera[0])) { - handler->PSendSysMessage("Waypoints for sequence %u, camera %u", cinematicId, cineSeq->cinematicCamera); + handler->PSendSysMessage("Waypoints for sequence %u, camera %u", cinematicId, cineSeq->Camera[0]); uint32 count = 1; for (FlyByCamera const& cam : *flyByCameras) { @@ -1530,7 +1530,7 @@ public: } if (!mEntry->IsDungeon()) { - handler->PSendSysMessage("'%s' is not a dungeon map.", mEntry->Name[LOCALE_enUS]); + handler->PSendSysMessage("'%s' is not a dungeon map.", mEntry->MapName[LOCALE_enUS]); return true; } int32 difficulty = difficulty_str ? atoi(difficulty_str) : -1; @@ -1541,29 +1541,29 @@ public: } if (difficulty >= 0 && !GetMapDifficultyData(mEntry->ID, Difficulty(difficulty))) { - handler->PSendSysMessage("Difficulty %d is not valid for '%s'.", difficulty, mEntry->Name[LOCALE_enUS]); + handler->PSendSysMessage("Difficulty %d is not valid for '%s'.", difficulty, mEntry->MapName[LOCALE_enUS]); return true; } if (difficulty == -1) { - handler->PSendSysMessage("Resetting all difficulties for '%s'.", mEntry->Name[LOCALE_enUS]); + handler->PSendSysMessage("Resetting all difficulties for '%s'.", mEntry->MapName[LOCALE_enUS]); for (uint8 diff = (mEntry->IsRaid() ? 0 : 1); diff < (mEntry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY); ++diff) { if (GetMapDifficultyData(mEntry->ID, Difficulty(diff))) { - handler->PSendSysMessage("Resetting difficulty %d for '%s'.", diff, mEntry->Name[LOCALE_enUS]); + handler->PSendSysMessage("Resetting difficulty %d for '%s'.", diff, mEntry->MapName[LOCALE_enUS]); sInstanceSaveMgr->ForceGlobalReset(mEntry->ID, Difficulty(diff)); } } } else if (mEntry->IsNonRaidDungeon() && difficulty == DUNGEON_DIFFICULTY_NORMAL) { - handler->PSendSysMessage("'%s' does not have any permanent saves for difficulty %d.", mEntry->Name[LOCALE_enUS], difficulty); + handler->PSendSysMessage("'%s' does not have any permanent saves for difficulty %d.", mEntry->MapName[LOCALE_enUS], difficulty); } else { - handler->PSendSysMessage("Resetting difficulty %d for '%s'.", difficulty, mEntry->Name[LOCALE_enUS]); + handler->PSendSysMessage("Resetting difficulty %d for '%s'.", difficulty, mEntry->MapName[LOCALE_enUS]); sInstanceSaveMgr->ForceGlobalReset(mEntry->ID, Difficulty(difficulty)); } return true; @@ -1596,9 +1596,9 @@ public: for (uint32 i = 0; i < sWorldSafeLocsStore.GetNumRows(); ++i) { WorldSafeLocsEntry const* loc = sWorldSafeLocsStore.LookupEntry(i); - if (loc && loc->map_id == player->GetMapId()) + if (loc && loc->Continent == player->GetMapId()) { - float dist = (loc->x - x) * (loc->x - x) + (loc->y - y) * (loc->y - y) + (loc->z - z) * (loc->z - z); + float dist = (loc->Loc.X - x) * (loc->Loc.X - x) + (loc->Loc.Y - y) * (loc->Loc.Y - y) + (loc->Loc.Z - z) * (loc->Loc.Z - z); if (dist < distNearest) { distNearest = dist; @@ -1609,7 +1609,7 @@ public: } if (nearestLoc) - handler->PSendSysMessage(LANG_COMMAND_NEARGRAVEYARD, nearestLoc->ID, nearestLoc->x, nearestLoc->y, nearestLoc->z); + handler->PSendSysMessage(LANG_COMMAND_NEARGRAVEYARD, nearestLoc->ID, nearestLoc->Loc.X, nearestLoc->Loc.Y, nearestLoc->Loc.Z); else handler->PSendSysMessage(LANG_COMMAND_NEARGRAVEYARD_NOTFOUND); diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index b5292923b0..c5abfe0009 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -192,9 +192,9 @@ public: return false; } - if (!MapManager::IsValidMapCoord(gy->map_id, gy->x, gy->y, gy->z)) + if (!MapManager::IsValidMapCoord(gy->Continent, gy->Loc.X, gy->Loc.Y, gy->Loc.Z)) { - handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, gy->x, gy->y, gy->map_id); + handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, gy->Loc.X, gy->Loc.Y, gy->Continent); handler->SetSentErrorMessage(true); return false; } @@ -210,7 +210,7 @@ public: else player->SaveRecallPosition(); - player->TeleportTo(gy->map_id, gy->x, gy->y, gy->z, player->GetOrientation()); + player->TeleportTo(gy->Continent, gy->Loc.X, gy->Loc.Y, gy->Loc.Z, player->GetOrientation()); return true; } @@ -259,7 +259,7 @@ public: return false; } - return DoTeleport(handler, { node->map_id, { node->x, node->y, node->z } }); + return DoTeleport(handler, { node->ContinentID, { node->Pos.X, node->Pos.Y, node->Pos.Z } }); } static bool HandleGoAreaTriggerCommand(ChatHandler* handler, Variant, uint32> areaTriggerId) @@ -272,7 +272,7 @@ public: return false; } - return DoTeleport(handler, { at->mapid, { at->x, at->y, at->z } }); + return DoTeleport(handler, { at->ContinentID, { at->Pos.X, at->Pos.Y, at->Pos.Z } }); } //teleport at coordinates diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index 3721e807ea..7565281564 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -672,7 +672,7 @@ public: handler->PSendSysMessage(LANG_OBJECTINFO_AIINFO, gameObjectInfo->AIName.c_str(), sObjectMgr->GetScriptName(gameObjectInfo->ScriptId).c_str()); if (GameObjectDisplayInfoEntry const* modelInfo = sGameObjectDisplayInfoStore.LookupEntry(displayId)) - handler->PSendSysMessage(LANG_GOINFO_MODEL, modelInfo->maxX, modelInfo->maxY, modelInfo->maxZ, modelInfo->minX, modelInfo->minY, modelInfo->minZ); + handler->PSendSysMessage(LANG_GOINFO_MODEL, modelInfo->GeoBoxMax.X, modelInfo->GeoBoxMax.X, modelInfo->GeoBoxMax.Z, modelInfo->GeoBoxMin.X, modelInfo->GeoBoxMin.Y, modelInfo->GeoBoxMin.Z); return true; } diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index ae62815d87..4de63cfe8e 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -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); } } diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 9d2a0f0cd0..72dba94077 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -296,7 +296,7 @@ public: { FactionState const* factionState = target ? target->GetReputationMgr().GetState(factionEntry) : nullptr; - std::string name = factionEntry->name; + std::string name = factionEntry->Name; if (name.empty()) continue; @@ -458,7 +458,7 @@ public: ItemSetEntry const* set = sItemSetStore.LookupEntry(id); if (set) { - std::string name = set->name; + std::string name = set->Name; if (name.empty()) continue; @@ -721,7 +721,7 @@ public: SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(id); if (skillInfo) { - std::string name = skillInfo->name; + std::string name = skillInfo->DisplayName; if (name.empty()) continue; @@ -950,7 +950,7 @@ public: TaxiNodesEntry const* nodeEntry = sTaxiNodesStore.LookupEntry(id); if (nodeEntry) { - std::string name = nodeEntry->name; + std::string name = nodeEntry->Name; if (name.empty()) continue; @@ -966,10 +966,10 @@ public: // send taxinode in "id - [name] (Map:m X:x Y:y Z:z)" format if (handler->GetSession()) handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CHAT, id, id, name.c_str(), "", - nodeEntry->map_id, nodeEntry->x, nodeEntry->y, nodeEntry->z); + nodeEntry->ContinentID, nodeEntry->Pos.X, nodeEntry->Pos.Y, nodeEntry->Pos.Z); else handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CONSOLE, id, name.c_str(), "", - nodeEntry->map_id, nodeEntry->x, nodeEntry->y, nodeEntry->z); + nodeEntry->ContinentID, nodeEntry->Pos.X, nodeEntry->Pos.Y, nodeEntry->Pos.Z); if (!found) found = true; @@ -1069,7 +1069,7 @@ public: CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id); if (titleInfo) { - std::string name = target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale; + std::string name = target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1; if (name.empty()) continue; @@ -1085,7 +1085,7 @@ public: char const* knownStr = target && target->HasTitle(titleInfo) ? handler->GetTrinityString(LANG_KNOWN) : ""; - char const* activeStr = target && target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->bit_index + char const* activeStr = target && target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->Mask_ID ? handler->GetTrinityString(LANG_ACTIVE) : ""; @@ -1094,9 +1094,9 @@ public: // send title in "id (idx:idx) - [namedlink locale]" format if (handler->GetSession()) - handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->bit_index, id, titleNameStr, "", knownStr, activeStr); + handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->Mask_ID, id, titleNameStr, "", knownStr, activeStr); else - handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, id, titleInfo->bit_index, titleNameStr, "", knownStr, activeStr); + handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, id, titleInfo->Mask_ID, titleNameStr, "", knownStr, activeStr); ++counter; } @@ -1129,7 +1129,7 @@ public: { if (MapEntry const* mapInfo = sMapStore.LookupEntry(id)) { - std::string name = mapInfo->Name; + std::string name = mapInfo->MapName; if (name.empty()) continue; diff --git a/src/server/scripts/Commands/cs_message.cpp b/src/server/scripts/Commands/cs_message.cpp index 0197ebc615..3e99d449a8 100644 --- a/src/server/scripts/Commands/cs_message.cpp +++ b/src/server/scripts/Commands/cs_message.cpp @@ -78,9 +78,9 @@ public: uint32 channelId = 0; for (ChatChannelsEntry const* entry : sChatChannelsStore) { - if (strstr(entry->pattern, channelStr)) + if (strstr(entry->Name, channelStr)) { - channelId = entry->ChannelID; + channelId = entry->ID; break; } } diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index ab139faf77..b6dac13c32 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -277,7 +277,7 @@ public: char const* unknown = handler->GetTrinityString(LANG_UNKNOWN); handler->PSendSysMessage(LANG_MAP_POSITION, - mapId, (mapEntry ? mapEntry->Name : unknown), + mapId, (mapEntry ? mapEntry->MapName : unknown), zoneId, (zoneEntry ? zoneEntry->AreaName : unknown), areaId, (areaEntry ? areaEntry->AreaName : unknown), object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), object->GetOrientation()); @@ -1500,7 +1500,7 @@ public: // add the skill to the player's book with step 1 (which is the first rank, in most cases something // like 'Apprentice '. 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, handler->GetNameLink(target).c_str(), level, max); return true; } @@ -1848,7 +1848,7 @@ public: } if (target) - handler->PSendSysMessage(LANG_PINFO_CHR_MAP, map->Name, + handler->PSendSysMessage(LANG_PINFO_CHR_MAP, map->MapName, (!zoneName.empty() ? zoneName.c_str() : handler->GetTrinityString(LANG_UNKNOWN)), (!areaName.empty() ? areaName.c_str() : handler->GetTrinityString(LANG_UNKNOWN))); diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 2152111c98..d127ba3721 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -789,16 +789,16 @@ public: return false; } - if (factionEntry->reputationListID < 0) + if (factionEntry->ReputationIndex < 0) { - handler->PSendSysMessage(LANG_COMMAND_FACTION_NOREP_ERROR, factionEntry->name, factionId); + handler->PSendSysMessage(LANG_COMMAND_FACTION_NOREP_ERROR, factionEntry->Name, factionId); handler->SetSentErrorMessage(true); return false; } target->GetReputationMgr().SetOneFactionReputation(factionEntry, amount, false); target->GetReputationMgr().SendState(target->GetReputationMgr().GetState(factionEntry)); - handler->PSendSysMessage(LANG_COMMAND_MODIFY_REP, factionEntry->name, factionId, + handler->PSendSysMessage(LANG_COMMAND_MODIFY_REP, factionEntry->Name, factionId, handler->GetNameLink(target).c_str(), target->GetReputationMgr().GetReputation(factionEntry)); return true; } diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index 0455f7593b..b867450923 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -98,7 +98,7 @@ public: return false; } - uint8 powerType = classEntry->powerType; + uint8 powerType = classEntry->DisplayPower; // reset m_form if no aura if (!player->HasAuraType(SPELL_AURA_MOD_SHAPESHIFT)) diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp index 3bf99df4a4..f24d82f689 100644 --- a/src/server/scripts/Commands/cs_titles.cpp +++ b/src/server/scripts/Commands/cs_titles.cpp @@ -93,9 +93,9 @@ public: std::string tNameLink = handler->GetNameLink(target); target->SetTitle(titleInfo); // to be sure that title now known - target->SetUInt32Value(PLAYER_CHOSEN_TITLE, titleInfo->bit_index); + target->SetUInt32Value(PLAYER_CHOSEN_TITLE, titleInfo->Mask_ID); - handler->PSendSysMessage(LANG_TITLE_CURRENT_RES, id, target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale, tNameLink.c_str()); + handler->PSendSysMessage(LANG_TITLE_CURRENT_RES, id, target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1, tNameLink.c_str()); return true; } @@ -135,7 +135,7 @@ public: } std::string tNameLink = handler->GetNameLink(target); - std::string titleNameStr = Trinity::StringFormat(target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale, target->GetName().c_str()); + std::string titleNameStr = Trinity::StringFormat(target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1, target->GetName().c_str()); target->SetTitle(titleInfo); handler->PSendSysMessage(LANG_TITLE_ADD_RES, id, titleNameStr.c_str(), tNameLink.c_str()); @@ -183,7 +183,7 @@ public: std::string tNameLink = handler->GetNameLink(target); char titleNameStr[80]; - snprintf(titleNameStr, 80, target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale, target->GetName().c_str()); + snprintf(titleNameStr, 80, target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1, target->GetName().c_str()); handler->PSendSysMessage(LANG_TITLE_REMOVE_RES, id, titleNameStr, tNameLink.c_str()); @@ -218,7 +218,7 @@ public: uint64 allValidTitleMask = 0; for (CharTitlesEntry const* tEntry : sCharTitlesStore) - allValidTitleMask |= (uint64(1) << tEntry->bit_index); + allValidTitleMask |= (uint64(1) << tEntry->Mask_ID); titles &= allValidTitleMask; // remove non-existing titles diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_maloriak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_maloriak.cpp index 874f6e47ac..8ce2b6c950 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_maloriak.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_maloriak.cpp @@ -1213,7 +1213,7 @@ class spell_maloriak_master_adventurer_award : public AuraScript return; player->SetTitle(titleInfo); - player->SetUInt32Value(PLAYER_CHOSEN_TITLE, titleInfo->bit_index); + player->SetUInt32Value(PLAYER_CHOSEN_TITLE, titleInfo->Mask_ID); } void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) diff --git a/src/server/scripts/EasternKingdoms/zone_tol_barad.cpp b/src/server/scripts/EasternKingdoms/zone_tol_barad.cpp index 3102a00029..dec7fcd921 100644 --- a/src/server/scripts/EasternKingdoms/zone_tol_barad.cpp +++ b/src/server/scripts/EasternKingdoms/zone_tol_barad.cpp @@ -80,7 +80,7 @@ class npc_tb_spirit_guide : public CreatureScript } if (WorldSafeLocsEntry const* safeLoc = sWorldSafeLocsStore.LookupEntry(areaId)) - player->TeleportTo(safeLoc->map_id, safeLoc->x, safeLoc->y, safeLoc->z, 0); + player->TeleportTo(safeLoc->Continent, safeLoc->Loc.X, safeLoc->Loc.Y, safeLoc->Loc.Z, 0); return true; } }; diff --git a/src/server/scripts/Events/childrens_week.cpp b/src/server/scripts/Events/childrens_week.cpp index 6197c8f53b..48733f2b7c 100644 --- a/src/server/scripts/Events/childrens_week.cpp +++ b/src/server/scripts/Events/childrens_week.cpp @@ -947,7 +947,7 @@ class at_bring_your_orphan_to : public AreaTriggerScript uint32 questId = 0; uint32 orphanId = 0; - switch (trigger->id) + switch (trigger->ID) { case AT_DOWN_AT_THE_DOCKS: questId = QUEST_DOWN_AT_THE_DOCKS; diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp index 0ae16d051d..9df65867d7 100644 --- a/src/server/scripts/Northrend/zone_wintergrasp.cpp +++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp @@ -240,7 +240,7 @@ class npc_wg_spirit_guide : public CreatureScript for (uint8 i = 0; i < gy.size(); i++) if (action - GOSSIP_ACTION_INFO_DEF == i && gy[i]->GetControlTeamId() == player->GetTeamId()) if (WorldSafeLocsEntry const* safeLoc = sWorldSafeLocsStore.LookupEntry(gy[i]->GetGraveyardId())) - player->TeleportTo(safeLoc->map_id, safeLoc->x, safeLoc->y, safeLoc->z, 0); + player->TeleportTo(safeLoc->Continent, safeLoc->Loc.X, safeLoc->Loc.Y, safeLoc->Loc.Z, 0); } return true; } @@ -506,7 +506,7 @@ class achievement_wg_didnt_stand_a_chance : public AchievementCriteriaScript return false; if (Vehicle* vehicle = source->GetVehicle()) - if (vehicle->GetVehicleInfo()->m_ID == 244) // Wintergrasp Tower Cannon + if (vehicle->GetVehicleInfo()->ID == 244) // Wintergrasp Tower Cannon return true; } diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp index 2517b1833a..da7c628ef7 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp @@ -172,7 +172,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId) if (atEntry) { // 5.0f is safe-distance - if (player->GetDistance(atEntry->x, atEntry->y, atEntry->z) > 5.0f + atEntry->radius) + if (player->GetDistance(atEntry->Pos.X, atEntry->Pos.Y, atEntry->Pos.Z) > 5.0f + atEntry->Radius) { // he dropped it further, summon mound GameObject* go = new GameObject; @@ -202,7 +202,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId) if (atEntry) { // 5.0f is safe-distance - if (player->GetDistance(atEntry->x, atEntry->y, atEntry->z) > 5.0f + atEntry->radius) + if (player->GetDistance(atEntry->Pos.X, atEntry->Pos.Y, atEntry->Pos.Z) > 5.0f + atEntry->Radius) { // he dropped it further, summon mound GameObject* go = new GameObject; diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 8e547262b8..a1976ed2fb 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -3021,7 +3021,7 @@ class spell_gen_running_wild : public SpellScriptLoader // cast speed aura if (MountCapabilityEntry const* mountCapability = sMountCapabilityStore.LookupEntry(aurEff->GetAmount())) - target->CastSpell(target, mountCapability->SpeedModSpell, TRIGGERED_FULL_MASK); + target->CastSpell(target, mountCapability->ModSpellAuraID, TRIGGERED_FULL_MASK); } void Register() override diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 55d1e6f920..aa45941ad0 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -3960,7 +3960,7 @@ public: { target->HandleEmoteCommand(EMOTE_ONESHOT_TRAIN); if (EmotesTextSoundEntry const* soundEntry = FindTextSoundEmoteFor(TEXT_EMOTE_TRAIN, target->getRace(), target->getGender())) - target->PlayDistanceSound(soundEntry->SoundId); + target->PlayDistanceSound(soundEntry->ID); } } diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index 8c9b9b0595..97c8adc30d 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -286,13 +286,13 @@ class spell_rog_deadly_poison : public SpellScriptLoader for (uint8 s = 0; s < 3; ++s) { - if (enchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL) + if (enchant->Effect[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL) continue; - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->spellid[s]); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->EffectArg[s]); if (!spellInfo) { - TC_LOG_ERROR("spells", "Player::CastItemCombatSpell Enchant %i, player (Name: %s, GUID: %u) cast unknown spell %i", enchant->ID, player->GetName().c_str(), player->GetGUID().GetCounter(), enchant->spellid[s]); + TC_LOG_ERROR("spells", "Player::CastItemCombatSpell Enchant %i, player (Name: %s, GUID: %u) cast unknown spell %i", enchant->ID, player->GetName().c_str(), player->GetGUID().GetCounter(), enchant->EffectArg[s]); continue; } @@ -305,9 +305,9 @@ class spell_rog_deadly_poison : public SpellScriptLoader continue; if (spellInfo->IsPositive()) - player->CastSpell(player, enchant->spellid[s], true, item); + player->CastSpell(player, enchant->EffectArg[s], true, item); else - player->CastSpell(target, enchant->spellid[s], true, item); + player->CastSpell(target, enchant->EffectArg[s], true, item); } } } diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index 621d0a2675..573925e629 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -187,7 +187,7 @@ class AreaTrigger_at_sholazar_waygate : public AreaTriggerScript if (!player->isDead() && (player->GetQuestStatus(QUEST_MEETING_A_GREAT_ONE) != QUEST_STATUS_NONE || (player->GetQuestStatus(QUEST_THE_MAKERS_OVERLOOK) == QUEST_STATUS_REWARDED && player->GetQuestStatus(QUEST_THE_MAKERS_PERCH) == QUEST_STATUS_REWARDED))) { - switch (trigger->id) + switch (trigger->ID) { case AT_SHOLAZAR: player->CastSpell(player, SPELL_SHOLAZAR_TO_UNGORO_TELEPORT, true); @@ -266,7 +266,7 @@ class AreaTrigger_at_brewfest : public AreaTriggerScript bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) override { - uint32 triggerId = trigger->id; + uint32 triggerId = trigger->ID; // Second trigger happened too early after first, skip for now if (GameTime::GetGameTime() - _triggerTimes[triggerId] < AREATRIGGER_TALK_COOLDOWN) return false; @@ -324,8 +324,8 @@ class AreaTrigger_at_area_52_entrance : public AreaTriggerScript if (!player->IsAlive()) return false; - uint32 triggerId = trigger->id; - if (GameTime::GetGameTime() - _triggerTimes[trigger->id] < SUMMON_COOLDOWN) + uint32 triggerId = trigger->ID; + if (GameTime::GetGameTime() - _triggerTimes[trigger->ID] < SUMMON_COOLDOWN) return false; switch (triggerId) @@ -354,7 +354,7 @@ class AreaTrigger_at_area_52_entrance : public AreaTriggerScript player->SummonCreature(NPC_SPOTLIGHT, x, y, z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000); player->AddAura(SPELL_A52_NEURALYZER, player); - _triggerTimes[trigger->id] = GameTime::GetGameTime(); + _triggerTimes[trigger->ID] = GameTime::GetGameTime(); return false; } diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 8f675f9c59..59db602cbe 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -316,7 +316,7 @@ class go_ethereum_prison : public GameObjectScript { uint32 Spell = 0; - switch (pFaction->faction) + switch (pFaction->Faction) { case 1011: Spell = SPELL_REP_LC; break; case 935: Spell = SPELL_REP_SHAT; break;