diff options
Diffstat (limited to 'src')
26 files changed, 7 insertions, 541 deletions
diff --git a/src/server/database/Database/Implementation/CharacterDatabase.cpp b/src/server/database/Database/Implementation/CharacterDatabase.cpp index 4bfe2a327a1..cc3bebcf537 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/database/Database/Implementation/CharacterDatabase.cpp @@ -151,7 +151,6 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_SEL_CHARACTER_BGDATA, "SELECT instanceId, team, joinX, joinY, joinZ, joinO, joinMapId, taxiStart, taxiEnd, mountSpell, queueId FROM character_battleground_data WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_GLYPHS, "SELECT talentGroup, glyphId FROM character_glyphs WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_TALENTS, "SELECT talentId, talentGroup FROM character_talent WHERE guid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_SEL_CHARACTER_PVP_TALENTS, "SELECT talentId0, talentId1, talentId2, talentId3, talentGroup FROM character_pvp_talent WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_SKILLS, "SELECT skill, value, max, professionSlot FROM character_skills WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_RANDOMBG, "SELECT guid FROM character_battleground_random WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_BANNED, "SELECT guid FROM character_banned WHERE guid = ? AND active = 1", CONNECTION_ASYNC); @@ -589,7 +588,6 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_DEL_GUILD_BANK_EVENTLOG_BY_PLAYER, "DELETE FROM guild_bank_eventlog WHERE PlayerGuid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_GLYPHS, "DELETE FROM character_glyphs WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_TALENT, "DELETE FROM character_talent WHERE guid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_DEL_CHAR_PVP_TALENT, "DELETE FROM character_pvp_talent WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_SKILLS, "DELETE FROM character_skills WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_CHAR_MONEY, "UPDATE characters SET money = ? WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_CHAR_ACTION, "INSERT INTO character_action (guid, spec, traitConfigId, button, action, type) VALUES (?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); @@ -626,7 +624,6 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_DEL_PETITION_SIGNATURE_BY_OWNER, "DELETE FROM petition_sign WHERE ownerguid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_CHAR_GLYPHS, "INSERT INTO character_glyphs VALUES(?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_CHAR_TALENT, "INSERT INTO character_talent (guid, talentId, talentGroup) VALUES (?, ?, ?)", CONNECTION_ASYNC); - PrepareStatement(CHAR_INS_CHAR_PVP_TALENT, "INSERT INTO character_pvp_talent (guid, talentId0, talentId1, talentId2, talentId3, talentGroup) VALUES (?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_CHAR_LIST_SLOT, "UPDATE characters SET slot = ? WHERE guid = ? AND account = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_CHAR_FISHINGSTEPS, "INSERT INTO character_fishingsteps (guid, fishingSteps) VALUES (?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_FISHINGSTEPS, "DELETE FROM character_fishingsteps WHERE guid = ?", CONNECTION_ASYNC); diff --git a/src/server/database/Database/Implementation/CharacterDatabase.h b/src/server/database/Database/Implementation/CharacterDatabase.h index dfdf5d27ad4..f704c821dc5 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.h +++ b/src/server/database/Database/Implementation/CharacterDatabase.h @@ -109,7 +109,6 @@ enum CharacterDatabaseStatements : uint32 CHAR_SEL_CHARACTER_BGDATA, CHAR_SEL_CHARACTER_GLYPHS, CHAR_SEL_CHARACTER_TALENTS, - CHAR_SEL_CHARACTER_PVP_TALENTS, CHAR_SEL_CHARACTER_SKILLS, CHAR_SEL_CHARACTER_RANDOMBG, CHAR_SEL_CHARACTER_BANNED, @@ -475,7 +474,6 @@ enum CharacterDatabaseStatements : uint32 CHAR_DEL_GUILD_BANK_EVENTLOG_BY_PLAYER, CHAR_DEL_CHAR_GLYPHS, CHAR_DEL_CHAR_TALENT, - CHAR_DEL_CHAR_PVP_TALENT, CHAR_DEL_CHAR_SKILLS, CHAR_UPD_CHAR_MONEY, CHAR_INS_CHAR_ACTION, @@ -510,7 +508,6 @@ enum CharacterDatabaseStatements : uint32 CHAR_DEL_PETITION_SIGNATURE_BY_OWNER, CHAR_INS_CHAR_GLYPHS, CHAR_INS_CHAR_TALENT, - CHAR_INS_CHAR_PVP_TALENT, CHAR_UPD_CHAR_LIST_SLOT, CHAR_INS_CHAR_FISHINGSTEPS, CHAR_DEL_CHAR_FISHINGSTEPS, diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp index 5d12b9a8a73..6bf63927877 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp @@ -1235,21 +1235,6 @@ void HotfixDatabaseConnection::DoPrepareStatements() " WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); PREPARE_MAX_ID_STMT(HOTFIX_SEL_PVP_SEASON, "SELECT MAX(ID) + 1 FROM pvp_season", CONNECTION_SYNCH); - // PvpTalent.db2 - PrepareStatement(HOTFIX_SEL_PVP_TALENT, "SELECT Description, ID, SpecID, SpellID, OverridesSpellID, Flags, ActionBarSpellID, PvpTalentCategoryID, " - "LevelRequired FROM pvp_talent WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); - PREPARE_MAX_ID_STMT(HOTFIX_SEL_PVP_TALENT, "SELECT MAX(ID) + 1 FROM pvp_talent", CONNECTION_SYNCH); - PREPARE_LOCALE_STMT(HOTFIX_SEL_PVP_TALENT, "SELECT ID, Description_lang FROM pvp_talent_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH); - - // PvpTalentCategory.db2 - PrepareStatement(HOTFIX_SEL_PVP_TALENT_CATEGORY, "SELECT ID, TalentSlotMask FROM pvp_talent_category WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); - PREPARE_MAX_ID_STMT(HOTFIX_SEL_PVP_TALENT_CATEGORY, "SELECT MAX(ID) + 1 FROM pvp_talent_category", CONNECTION_SYNCH); - - // PvpTalentSlotUnlock.db2 - PrepareStatement(HOTFIX_SEL_PVP_TALENT_SLOT_UNLOCK, "SELECT ID, Slot, LevelRequired, DeathKnightLevelRequired, DemonHunterLevelRequired" - " FROM pvp_talent_slot_unlock WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); - PREPARE_MAX_ID_STMT(HOTFIX_SEL_PVP_TALENT_SLOT_UNLOCK, "SELECT MAX(ID) + 1 FROM pvp_talent_slot_unlock", CONNECTION_SYNCH); - // PvpTier.db2 PrepareStatement(HOTFIX_SEL_PVP_TIER, "SELECT ID, Name, MinRating, MaxRating, PrevTier, NextTier, BracketID, `Rank`, RankIconFileDataID" " FROM pvp_tier WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h index 5b3487d6f2c..b03e4f4f1db 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.h +++ b/src/server/database/Database/Implementation/HotfixDatabase.h @@ -706,16 +706,6 @@ enum HotfixDatabaseStatements : uint32 HOTFIX_SEL_PVP_SEASON, HOTFIX_SEL_PVP_SEASON_MAX_ID, - HOTFIX_SEL_PVP_TALENT, - HOTFIX_SEL_PVP_TALENT_MAX_ID, - HOTFIX_SEL_PVP_TALENT_LOCALE, - - HOTFIX_SEL_PVP_TALENT_CATEGORY, - HOTFIX_SEL_PVP_TALENT_CATEGORY_MAX_ID, - - HOTFIX_SEL_PVP_TALENT_SLOT_UNLOCK, - HOTFIX_SEL_PVP_TALENT_SLOT_UNLOCK_MAX_ID, - HOTFIX_SEL_PVP_TIER, HOTFIX_SEL_PVP_TIER_MAX_ID, HOTFIX_SEL_PVP_TIER_LOCALE, diff --git a/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp b/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp index 562e688dd24..69283d82e5e 100644 --- a/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp +++ b/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp @@ -117,7 +117,6 @@ struct SpellInfoVisitor value_type operator()(Hyperlink<apower> artifactPower) const { return operator()(artifactPower->ArtifactPower->SpellID); } value_type operator()(Hyperlink<enchant> enchant) const { return enchant; } value_type operator()(Hyperlink<mount> const& mount) const { return mount->Spell; } - value_type operator()(Hyperlink<pvptal> pvpTalent) const { return operator()((*pvpTalent)->SpellID); } value_type operator()(Hyperlink<spell> spell) const { return spell->Spell; } value_type operator()(Hyperlink<talent> talent) const { return operator()((*talent)->SpellID); } value_type operator()(Hyperlink<trade> trade) const { return trade->Spell; } @@ -126,7 +125,7 @@ struct SpellInfoVisitor }; ChatCommandResult Trinity::Impl::ChatCommands::ArgInfo<SpellInfo const*>::TryConsume(SpellInfo const*& data, ChatHandler const* handler, std::string_view args) { - Variant<Hyperlink<apower>, Hyperlink<enchant>, Hyperlink<mount>, Hyperlink<pvptal>, Hyperlink<spell>, Hyperlink<talent>, Hyperlink<trade>, uint32> val; + Variant<Hyperlink<apower>, Hyperlink<enchant>, Hyperlink<mount>, Hyperlink<spell>, Hyperlink<talent>, Hyperlink<trade>, uint32> val; ChatCommandResult result = ArgInfo<decltype(val)>::TryConsume(val, handler, args); if (!result || (data = val.visit(SpellInfoVisitor()))) return result; diff --git a/src/server/game/Chat/HyperlinkTags.cpp b/src/server/game/Chat/HyperlinkTags.cpp index 58a16880de7..91f35b95314 100644 --- a/src/server/game/Chat/HyperlinkTags.cpp +++ b/src/server/game/Chat/HyperlinkTags.cpp @@ -408,17 +408,6 @@ bool Trinity::Hyperlinks::LinkTags::mount::StoreTo(MountLinkData& val, std::stri return t.TryConsumeTo(val.Customizations) && t.IsEmpty(); } -bool Trinity::Hyperlinks::LinkTags::pvptal::StoreTo(PvpTalentEntry const*& val, std::string_view text) -{ - HyperlinkDataTokenizer t(text); - uint32 pvpTalentId; - if (!(t.TryConsumeTo(pvpTalentId) && t.IsEmpty())) - return false; - if (!(val = sPvpTalentStore.LookupEntry(pvpTalentId))) - return false; - return true; -} - bool Trinity::Hyperlinks::LinkTags::quest::StoreTo(QuestLinkData& val, std::string_view text) { HyperlinkDataTokenizer t(text); diff --git a/src/server/game/Chat/Hyperlinks.cpp b/src/server/game/Chat/Hyperlinks.cpp index d15a17f2c6d..771c1fe59e4 100644 --- a/src/server/game/Chat/Hyperlinks.cpp +++ b/src/server/game/Chat/Hyperlinks.cpp @@ -510,22 +510,6 @@ struct LinkValidator<LinkTags::outfit> }; template <> -struct LinkValidator<LinkTags::pvptal> -{ - static bool IsTextValid(PvpTalentEntry const* pvpTalent, std::string_view text) - { - if (SpellInfo const* info = sSpellMgr->GetSpellInfo(pvpTalent->SpellID, DIFFICULTY_NONE)) - return LinkValidator<LinkTags::spell>::IsTextValid(info, text); - return false; - } - - static bool IsColorValid(PvpTalentEntry const*, HyperlinkColor c) - { - return c == CHAT_LINK_COLOR_TALENT; - } -}; - -template <> struct LinkValidator<LinkTags::talent> { static bool IsTextValid(TalentEntry const* talent, std::string_view text) @@ -665,7 +649,6 @@ static bool ValidateLinkInfo(HyperlinkInfo const& info) TryValidateAs(mount); TryValidateAs(outfit); TryValidateAs(player); - TryValidateAs(pvptal); TryValidateAs(quest); TryValidateAs(skill); TryValidateAs(spell); diff --git a/src/server/game/Chat/Hyperlinks.h b/src/server/game/Chat/Hyperlinks.h index d25d796b55a..db9e63063b4 100644 --- a/src/server/game/Chat/Hyperlinks.h +++ b/src/server/game/Chat/Hyperlinks.h @@ -42,7 +42,6 @@ struct ItemTemplate; struct LocalizedString; struct MapEntry; struct MapChallengeModeEntry; -struct PvpTalentEntry; class Quest; struct SkillLineEntry; class SpellInfo; @@ -443,13 +442,6 @@ namespace Trinity::Hyperlinks static bool StoreTo(MountLinkData& val, std::string_view text); }; - struct TC_GAME_API pvptal - { - using value_type = PvpTalentEntry const*; - static constexpr std::string_view tag() { return "pvptal"; } - static bool StoreTo(PvpTalentEntry const*& val, std::string_view text); - }; - struct TC_GAME_API quest { using value_type = QuestLinkData const&; diff --git a/src/server/game/DataStores/DB2LoadInfo.h b/src/server/game/DataStores/DB2LoadInfo.h index 9f0a4f684ee..0f1c240e7dc 100644 --- a/src/server/game/DataStores/DB2LoadInfo.h +++ b/src/server/game/DataStores/DB2LoadInfo.h @@ -4108,49 +4108,6 @@ struct PvpSeasonLoadInfo static constexpr DB2LoadInfo Instance{ Fields, 4, &PvpSeasonMeta::Instance, HOTFIX_SEL_PVP_SEASON }; }; -struct PvpTalentLoadInfo -{ - static constexpr DB2FieldMeta Fields[9] = - { - { false, FT_STRING, "Description" }, - { false, FT_INT, "ID" }, - { false, FT_INT, "SpecID" }, - { true, FT_INT, "SpellID" }, - { true, FT_INT, "OverridesSpellID" }, - { true, FT_INT, "Flags" }, - { true, FT_INT, "ActionBarSpellID" }, - { true, FT_INT, "PvpTalentCategoryID" }, - { true, FT_INT, "LevelRequired" }, - }; - - static constexpr DB2LoadInfo Instance{ Fields, 9, &PvpTalentMeta::Instance, HOTFIX_SEL_PVP_TALENT }; -}; - -struct PvpTalentCategoryLoadInfo -{ - static constexpr DB2FieldMeta Fields[2] = - { - { false, FT_INT, "ID" }, - { false, FT_BYTE, "TalentSlotMask" }, - }; - - static constexpr DB2LoadInfo Instance{ Fields, 2, &PvpTalentCategoryMeta::Instance, HOTFIX_SEL_PVP_TALENT_CATEGORY }; -}; - -struct PvpTalentSlotUnlockLoadInfo -{ - static constexpr DB2FieldMeta Fields[5] = - { - { false, FT_INT, "ID" }, - { true, FT_BYTE, "Slot" }, - { true, FT_INT, "LevelRequired" }, - { true, FT_INT, "DeathKnightLevelRequired" }, - { true, FT_INT, "DemonHunterLevelRequired" }, - }; - - static constexpr DB2LoadInfo Instance{ Fields, 5, &PvpTalentSlotUnlockMeta::Instance, HOTFIX_SEL_PVP_TALENT_SLOT_UNLOCK }; -}; - struct PvpTierLoadInfo { static constexpr DB2FieldMeta Fields[9] = diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index 2dcf5334799..4f381a79b5f 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -244,9 +244,6 @@ DB2Storage<PrestigeLevelInfoEntry> sPrestigeLevelInfoStore("Prestig DB2Storage<PVPDifficultyEntry> sPVPDifficultyStore("PVPDifficulty.db2", &PvpDifficultyLoadInfo::Instance); DB2Storage<PVPItemEntry> sPVPItemStore("PVPItem.db2", &PvpItemLoadInfo::Instance); DB2Storage<PvpSeasonEntry> sPvpSeasonStore("PvpSeason.db2", &PvpSeasonLoadInfo::Instance); -DB2Storage<PvpTalentEntry> sPvpTalentStore("PvpTalent.db2", &PvpTalentLoadInfo::Instance); -DB2Storage<PvpTalentCategoryEntry> sPvpTalentCategoryStore("PvpTalentCategory.db2", &PvpTalentCategoryLoadInfo::Instance); -DB2Storage<PvpTalentSlotUnlockEntry> sPvpTalentSlotUnlockStore("PvpTalentSlotUnlock.db2", &PvpTalentSlotUnlockLoadInfo::Instance); DB2Storage<PvpTierEntry> sPvpTierStore("PvpTier.db2", &PvpTierLoadInfo::Instance); DB2Storage<QuestFactionRewardEntry> sQuestFactionRewardStore("QuestFactionReward.db2", &QuestFactionRewardLoadInfo::Instance); DB2Storage<QuestInfoEntry> sQuestInfoStore("QuestInfo.db2", &QuestInfoLoadInfo::Instance); @@ -477,7 +474,6 @@ namespace PhaseGroupContainer _phasesByGroup; PowerTypesContainer _powerTypes; std::unordered_map<uint32, uint8> _pvpItemBonus; - PvpTalentSlotUnlockEntry const* _pvpTalentSlotUnlock[MAX_PVP_TALENT_SLOTS]; std::unordered_map<uint32, std::vector<QuestLineXQuestEntry const*>> _questsByQuestLine; QuestPackageItemContainer _questPackages; std::unordered_map<uint32, std::vector<RewardPackXCurrencyTypeEntry const*>> _rewardPackCurrencyTypes; @@ -827,9 +823,6 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul LOAD_DB2(sPVPDifficultyStore); LOAD_DB2(sPVPItemStore); LOAD_DB2(sPvpSeasonStore); - LOAD_DB2(sPvpTalentStore); - LOAD_DB2(sPvpTalentCategoryStore); - LOAD_DB2(sPvpTalentSlotUnlockStore); LOAD_DB2(sPvpTierStore); LOAD_DB2(sQuestFactionRewardStore); LOAD_DB2(sQuestInfoStore); @@ -1362,19 +1355,6 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul for (PVPItemEntry const* pvpItem : sPVPItemStore) _pvpItemBonus[pvpItem->ItemID] = pvpItem->ItemLevelDelta; - for (PvpTalentSlotUnlockEntry const* talentUnlock : sPvpTalentSlotUnlockStore) - { - ASSERT(talentUnlock->Slot < (1 << MAX_PVP_TALENT_SLOTS)); - for (int8 i = 0; i < MAX_PVP_TALENT_SLOTS; ++i) - { - if (talentUnlock->Slot & (1 << i)) - { - ASSERT(!_pvpTalentSlotUnlock[i]); - _pvpTalentSlotUnlock[i] = talentUnlock; - } - } - } - for (QuestLineXQuestEntry const* questLineQuest : sQuestLineXQuestStore) _questsByQuestLine[questLineQuest->QuestLineID].push_back(questLineQuest); @@ -2556,36 +2536,6 @@ PVPDifficultyEntry const* DB2Manager::GetBattlegroundBracketById(uint32 mapid, B return nullptr; } -uint32 DB2Manager::GetRequiredLevelForPvpTalentSlot(uint8 slot, Classes class_) const -{ - ASSERT(slot < MAX_PVP_TALENT_SLOTS); - if (_pvpTalentSlotUnlock[slot]) - { - switch (class_) - { - case CLASS_DEATH_KNIGHT: - return _pvpTalentSlotUnlock[slot]->DeathKnightLevelRequired; - case CLASS_DEMON_HUNTER: - return _pvpTalentSlotUnlock[slot]->DemonHunterLevelRequired; - default: - break; - } - return _pvpTalentSlotUnlock[slot]->LevelRequired; - } - - return 0; -} - -int32 DB2Manager::GetPvpTalentNumSlotsAtLevel(uint32 level, Classes class_) const -{ - int32 slots = 0; - for (uint8 slot = 0; slot < MAX_PVP_TALENT_SLOTS; ++slot) - if (level >= GetRequiredLevelForPvpTalentSlot(slot, class_)) - ++slots; - - return slots; -} - std::vector<QuestLineXQuestEntry const*> const* DB2Manager::GetQuestsForQuestLine(uint32 questLineId) const { return Trinity::Containers::MapGetValuePtr(_questsByQuestLine, questLineId); diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h index 704aa304cbb..6cdd7cfb4c8 100644 --- a/src/server/game/DataStores/DB2Stores.h +++ b/src/server/game/DataStores/DB2Stores.h @@ -194,9 +194,6 @@ TC_GAME_API extern DB2Storage<PlayerConditionEntry> sPlayerCondi TC_GAME_API extern DB2Storage<PowerDisplayEntry> sPowerDisplayStore; TC_GAME_API extern DB2Storage<PowerTypeEntry> sPowerTypeStore; TC_GAME_API extern DB2Storage<PvpSeasonEntry> sPvpSeasonStore; -TC_GAME_API extern DB2Storage<PvpTalentEntry> sPvpTalentStore; -TC_GAME_API extern DB2Storage<PvpTalentCategoryEntry> sPvpTalentCategoryStore; -TC_GAME_API extern DB2Storage<PvpTalentSlotUnlockEntry> sPvpTalentSlotUnlockStore; TC_GAME_API extern DB2Storage<PvpTierEntry> sPvpTierStore; TC_GAME_API extern DB2Storage<QuestFactionRewardEntry> sQuestFactionRewardStore; TC_GAME_API extern DB2Storage<QuestInfoEntry> sQuestInfoStore; @@ -489,8 +486,6 @@ public: uint8 GetPvpItemLevelBonus(uint32 itemId) const; static PVPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level); static PVPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id); - uint32 GetRequiredLevelForPvpTalentSlot(uint8 slot, Classes class_) const; - int32 GetPvpTalentNumSlotsAtLevel(uint32 level, Classes class_) const; std::vector<QuestLineXQuestEntry const*> const* GetQuestsForQuestLine(uint32 questLineId) const; std::vector<QuestPackageItemEntry const*> const* GetQuestPackageItems(uint32 questPackageID) const; std::vector<QuestPackageItemEntry const*> const* GetQuestPackageItemsFallback(uint32 questPackageID) const; diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index cd7d178d1e3..111b4f42e51 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -2131,7 +2131,6 @@ DEFINE_ENUM_FLAG(SummonPropertiesFlags); #define MAX_TALENT_TIERS 11 #define MAX_TALENT_COLUMNS 4 -#define MAX_PVP_TALENT_SLOTS 4 enum class TaxiNodeFlags : int32 { diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index f9f79fd32d4..cd3eabd9566 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -957,11 +957,6 @@ void Player::Update(uint32 p_time) UpdateAfkReport(now); - if (GetCombatManager().HasPvPCombat()) - if (Aura* aura = GetAura(SPELL_PVP_RULES_ENABLED)) - if (!aura->IsPermanent()) - aura->SetDuration(aura->GetSpellInfo()->GetMaxDuration()); - Unit::AIUpdateTick(p_time); // Update items that have just a limited lifetime @@ -3553,14 +3548,6 @@ bool Player::ResetTalents(bool noCost) return true; } -void Player::ResetPvpTalents() -{ - for (uint8 spec = 0; spec < MAX_SPECIALIZATIONS; ++spec) - for (uint32 talentId : GetPvpTalentMap(spec)) - if (PvpTalentEntry const* talentInfo = sPvpTalentStore.LookupEntry(talentId)) - RemovePvpTalent(talentInfo, spec); -} - Mail* Player::GetMail(uint64 id) { for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr) @@ -7334,11 +7321,6 @@ void Player::UpdateArea(uint32 newArea) PhasingHandler::OnAreaChange(this); UpdateAreaDependentAuras(newArea); - if (IsAreaThatActivatesPvpTalents(newArea)) - EnablePvpRules(); - else - DisablePvpRules(); - // previously this was in UpdateZone (but after UpdateArea) so nothing will break pvpInfo.IsInNoPvPArea = false; if (area && area->IsSanctuary()) // in sanctuary @@ -7599,9 +7581,6 @@ void Player::DuelComplete(DuelCompleteType type) SendMessageToSet(duelWinner.Write(), true); } - opponent->DisablePvpRules(); - DisablePvpRules(); - sScriptMgr->OnPlayerDuelEnd(opponent, this, type); switch (type) @@ -17689,7 +17668,6 @@ bool Player::LoadFromDB(ObjectGuid guid, CharacterDatabaseQueryHolder const& hol UpdateDisplayPower(); _LoadTalents(holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_TALENTS)); - _LoadPvpTalents(holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_PVP_TALENTS)); _LoadSpells(holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_SPELLS), holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_SPELL_FAVORITES)); GetSession()->GetCollectionMgr()->LoadToys(); GetSession()->GetCollectionMgr()->LoadHeirlooms(); @@ -25433,8 +25411,6 @@ void Player::ProcessTerrainStatusUpdate(ZLiquidStatus oldLiquidStatus, Optional< void Player::AtEnterCombat() { Unit::AtEnterCombat(); - if (GetCombatManager().HasPvPCombat()) - EnablePvpRules(true); } void Player::AtExitCombat() @@ -26291,163 +26267,6 @@ void Player::InitGlyphsForLevel() SetGlyphsEnabled(slotMask); } -TalentLearnResult Player::LearnPvpTalent(uint32 /*talentID*/, uint8 /*slot*/, int32* /*spellOnCooldown*/) -{ - return TALENT_FAILED_UNKNOWN; -} - -bool Player::AddPvpTalent(PvpTalentEntry const* talent, uint8 activeTalentGroup, uint8 slot) -{ - ASSERT(talent); - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(talent->SpellID, DIFFICULTY_NONE); - if (!spellInfo) - { - TC_LOG_ERROR("spells", "Player::AddTalent: Spell (ID: {}) does not exist.", talent->SpellID); - return false; - } - - if (!SpellMgr::IsSpellValid(spellInfo, this, false)) - { - TC_LOG_ERROR("spells", "Player::AddTalent: Spell (ID: {}) is invalid", talent->SpellID); - return false; - } - - if (activeTalentGroup == GetActiveTalentGroup() && HasAuraType(SPELL_AURA_PVP_TALENTS)) - { - LearnSpell(talent->SpellID, true); - - // Move this to toggle ? - if (talent->OverridesSpellID) - AddOverrideSpell(talent->OverridesSpellID, talent->SpellID); - } - - GetPvpTalentMap(activeTalentGroup)[slot] = talent->ID; - - return true; -} - -void Player::RemovePvpTalent(PvpTalentEntry const* talent, uint8 activeTalentGroup) -{ - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(talent->SpellID, DIFFICULTY_NONE); - if (!spellInfo) - return; - - RemoveSpell(talent->SpellID, true); - - // Move this to toggle ? - if (talent->OverridesSpellID) - RemoveOverrideSpell(talent->OverridesSpellID, talent->SpellID); - - // if this talent rank can be found in the PlayerTalentMap, mark the talent as removed so it gets deleted - auto plrPvpTalent = std::find(GetPvpTalentMap(activeTalentGroup).begin(), GetPvpTalentMap(activeTalentGroup).end(), talent->ID); - if (plrPvpTalent != GetPvpTalentMap(activeTalentGroup).end()) - *plrPvpTalent = 0; -} - -void Player::TogglePvpTalents(bool enable) -{ - PlayerPvpTalentMap const& pvpTalents = GetPvpTalentMap(GetActiveTalentGroup()); - for (uint32 pvpTalentId : pvpTalents) - { - if (PvpTalentEntry const* pvpTalentInfo = sPvpTalentStore.LookupEntry(pvpTalentId)) - { - if (enable) - { - LearnSpell(pvpTalentInfo->SpellID, false); - if (pvpTalentInfo->OverridesSpellID) - AddOverrideSpell(pvpTalentInfo->OverridesSpellID, pvpTalentInfo->SpellID); - } - else - { - if (pvpTalentInfo->OverridesSpellID) - RemoveOverrideSpell(pvpTalentInfo->OverridesSpellID, pvpTalentInfo->SpellID); - RemoveSpell(pvpTalentInfo->SpellID, true); - } - } - } -} - -bool Player::HasPvpTalent(uint32 talentID, uint8 activeTalentGroup) const -{ - return std::find(GetPvpTalentMap(activeTalentGroup).begin(), GetPvpTalentMap(activeTalentGroup).end(), talentID) != GetPvpTalentMap(activeTalentGroup).end(); -} - -void Player::EnablePvpRules(bool dueToCombat /*= false*/) -{ - if (!HasPvpRulesEnabled()) - { - if (!HasSpell(195710)) // Honorable Medallion - CastSpell(this, 208682, true); // Learn Gladiator's Medallion - - CastSpell(this, SPELL_PVP_RULES_ENABLED, true); - } - - if (!dueToCombat) - { - if (Aura* aura = GetAura(SPELL_PVP_RULES_ENABLED)) - { - if (!aura->IsPermanent()) - { - aura->SetMaxDuration(-1); - aura->SetDuration(-1); - } - } - } - - UpdateItemLevelAreaBasedScaling(); -} - -void Player::DisablePvpRules() -{ - // Don't disable pvp rules when in pvp zone. - if (IsInAreaThatActivatesPvpTalents()) - return; - - if (!GetCombatManager().HasPvPCombat()) - { - RemoveAurasDueToSpell(SPELL_PVP_RULES_ENABLED); - UpdateItemLevelAreaBasedScaling(); - } - else if (Aura* aura = GetAura(SPELL_PVP_RULES_ENABLED)) - aura->SetDuration(aura->GetSpellInfo()->GetMaxDuration()); -} - -bool Player::HasPvpRulesEnabled() const -{ - return HasAura(SPELL_PVP_RULES_ENABLED); -} - -bool Player::IsInAreaThatActivatesPvpTalents() const -{ - return IsAreaThatActivatesPvpTalents(GetAreaId()); -} - -bool Player::IsAreaThatActivatesPvpTalents(uint32 areaID) const -{ - if (InBattleground()) - return true; - - if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaID)) - { - do - { - if (area->IsSanctuary()) - return false; - - if (area->GetFlags().HasFlag(AreaFlags::FreeForAllPvP)) - return true; - - if (sBattlefieldMgr->IsWorldPvpArea(area->ID)) - return true; - - area = sAreaTableStore.LookupEntry(area->ParentAreaID); - - } while (area); - } - - return false; -} - void Player::UpdateFallInformationIfNeed(MovementInfo const& minfo, uint16 opcode) { if (m_lastFallTime >= minfo.jump.fallTime || m_lastFallZ <= minfo.pos.GetPositionZ() || opcode == CMSG_MOVE_FALL_LAND) @@ -26900,19 +26719,6 @@ void Player::_LoadTalents(PreparedQueryResult result) } } -void Player::_LoadPvpTalents(PreparedQueryResult result) -{ - // "SELECT talentID0, talentID1, talentID2, talentID3, talentGroup FROM character_pvp_talent WHERE guid = ?" - if (result) - { - do - for (uint8 slot = 0; slot < MAX_PVP_TALENT_SLOTS; ++slot) - if (PvpTalentEntry const* talent = sPvpTalentStore.LookupEntry((*result)[slot].GetUInt32())) - AddPvpTalent(talent, (*result)[4].GetUInt8(), slot); - while (result->NextRow()); - } -} - void Player::_LoadTraits(PreparedQueryResult configsResult, PreparedQueryResult entriesResult) { std::unordered_multimap<int32, WorldPackets::Traits::TraitEntry> traitEntriesByConfig; @@ -27078,23 +26884,6 @@ void Player::_SaveTalents(CharacterDatabaseTransaction trans) ++itr; } } - - stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_PVP_TALENT); - stmt->setUInt64(0, GetGUID().GetCounter()); - trans->Append(stmt); - - for (uint8 group = 0; group < MAX_SPECIALIZATIONS; ++group) - { - PlayerPvpTalentMap const& talents = GetPvpTalentMap(group); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_PVP_TALENT); - stmt->setUInt64(0, GetGUID().GetCounter()); - stmt->setUInt32(1, talents[0]); - stmt->setUInt32(2, talents[1]); - stmt->setUInt32(3, talents[2]); - stmt->setUInt32(4, talents[3]); - stmt->setUInt8(5, group); - trans->Append(stmt); - } } void Player::_SaveTraits(CharacterDatabaseTransaction trans) @@ -27264,27 +27053,6 @@ void Player::ActivateTalentGroup(ChrSpecializationEntry const* spec) RemoveOverrideSpell(talentInfo->OverridesSpellID, talentInfo->SpellID); } - for (uint32 pvpTalentID = 0; pvpTalentID < sPvpTalentStore.GetNumRows(); ++pvpTalentID) - { - PvpTalentEntry const* talentInfo = sPvpTalentStore.LookupEntry(pvpTalentID); - if (!talentInfo) - continue; - - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(talentInfo->SpellID, DIFFICULTY_NONE); - if (!spellInfo) - continue; - - RemoveSpell(talentInfo->SpellID, true); - - // search for spells that the talent teaches and unlearn them - for (SpellEffectInfo const& spellEffectInfo : spellInfo->GetEffects()) - if (spellEffectInfo.IsEffect(SPELL_EFFECT_LEARN_SPELL) && spellEffectInfo.TriggerSpell > 0) - RemoveSpell(spellEffectInfo.TriggerSpell, true); - - if (talentInfo->OverridesSpellID) - RemoveOverrideSpell(talentInfo->OverridesSpellID, talentInfo->SpellID); - } - ApplyTraitConfig(m_activePlayerData->ActiveCombatTraitConfigID, false); // Remove spec specific spells @@ -27328,18 +27096,6 @@ void Player::ActivateTalentGroup(ChrSpecializationEntry const* spec) } } - for (uint8 slot = 0; slot < MAX_PVP_TALENT_SLOTS; ++slot) - { - PvpTalentEntry const* talentInfo = sPvpTalentStore.LookupEntry(GetPvpTalentMap(GetActiveTalentGroup())[slot]); - if (!talentInfo) - continue; - - if (!talentInfo->SpellID) - continue; - - AddPvpTalent(talentInfo, GetActiveTalentGroup(), slot); - } - LearnSpecializationSpells(); if (CanUseMastery()) @@ -29088,7 +28844,7 @@ void Player::UpdateItemLevelAreaBasedScaling() { // @todo Activate pvp item levels during world pvp Map* map = GetMap(); - bool pvpActivity = map->IsBattlegroundOrArena() || map->GetEntry()->Flags[1] & 0x40 || HasPvpRulesEnabled(); + bool pvpActivity = map->IsBattlegroundOrArena() || map->GetEntry()->Flags[1] & 0x40; if (_usePvpItemLevels != pvpActivity) { @@ -29256,10 +29012,6 @@ void Player::SetWarModeDesired(bool enabled) if (enabled && !CanEnableWarModeInArea()) return; - // Don't allow to chang when aura SPELL_PVP_RULES_ENABLED is on - if (HasAura(SPELL_PVP_RULES_ENABLED)) - return; - if (enabled) { SetPlayerFlag(PLAYER_FLAGS_WAR_MODE_DESIRED); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 522c58ddb43..6a225b07f82 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -58,7 +58,6 @@ struct ItemTemplate; struct Loot; struct Mail; struct MapEntry; -struct PvpTalentEntry; struct QuestPackageItemEntry; struct RewardPackEntry; struct SkillRaceClassInfoEntry; @@ -278,7 +277,6 @@ struct PlayerCurrency }; typedef std::unordered_map<uint32, PlayerSpellState> PlayerTalentMap; -typedef std::array<uint32, MAX_PVP_TALENT_SLOTS> PlayerPvpTalentMap; typedef std::unordered_map<uint32, PlayerSpell> PlayerSpellMap; typedef std::unordered_set<SpellModifier*> SpellModContainer; typedef std::unordered_map<uint32, PlayerCurrency> PlayerCurrenciesMap; @@ -872,7 +870,6 @@ enum PlayerLoginQueryIndex PLAYER_LOGIN_QUERY_LOAD_BG_DATA, PLAYER_LOGIN_QUERY_LOAD_GLYPHS, PLAYER_LOGIN_QUERY_LOAD_TALENTS, - PLAYER_LOGIN_QUERY_LOAD_PVP_TALENTS, PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA, PLAYER_LOGIN_QUERY_LOAD_SKILLS, PLAYER_LOGIN_QUERY_LOAD_WEEKLY_QUEST_STATUS, @@ -1065,14 +1062,11 @@ enum TalentLearnResult : int32 struct TC_GAME_API SpecializationInfo { - SpecializationInfo() : PvpTalents(), ResetTalentsCost(0), ResetTalentsTime(0), ActiveGroup(0) + SpecializationInfo() : ResetTalentsCost(0), ResetTalentsTime(0), ActiveGroup(0) { - for (PlayerPvpTalentMap& pvpTalents : PvpTalents) - pvpTalents.fill(0); } PlayerTalentMap Talents[MAX_SPECIALIZATIONS]; - PlayerPvpTalentMap PvpTalents[MAX_SPECIALIZATIONS]; std::vector<uint32> Glyphs[MAX_SPECIALIZATIONS]; uint32 ResetTalentsCost; time_t ResetTalentsTime; @@ -1085,7 +1079,6 @@ private: uint32 constexpr PLAYER_MAX_HONOR_LEVEL = 500; uint8 constexpr PLAYER_LEVEL_MIN_HONOR = 10; -uint32 constexpr SPELL_PVP_RULES_ENABLED = 134735; float constexpr MAX_AREA_SPIRIT_HEALER_RANGE = 20.0f; enum class ZonePVPTypeOverride : uint32 @@ -1838,7 +1831,6 @@ class TC_GAME_API Player final : public Unit, public GridObject<Player> ChrSpecializationEntry const* GetPrimarySpecializationEntry() const; bool ResetTalents(bool noCost = false); - void ResetPvpTalents(); uint32 GetNextResetTalentsCost() const; void InitTalentForLevel(); void SendTalentsInfoData(); @@ -1853,24 +1845,11 @@ class TC_GAME_API Player final : public Unit, public GridObject<Player> void SetGlyphSlot(uint8 index, uint32 glyphSlotRecId) { SetUpdateFieldValue(m_values.ModifyValue(&Player::m_activePlayerData).ModifyValue(&UF::ActivePlayerData::GlyphSlots, index), glyphSlotRecId); } void SetGlyphsEnabled(uint32 slotMask) { SetUpdateFieldValue(m_values.ModifyValue(&Player::m_activePlayerData).ModifyValue(&UF::ActivePlayerData::GlyphsEnabled), slotMask); } - TalentLearnResult LearnPvpTalent(uint32 talentID, uint8 slot, int32* spellOnCooldown); - bool AddPvpTalent(PvpTalentEntry const* talent, uint8 activeTalentGroup, uint8 slot); - void RemovePvpTalent(PvpTalentEntry const* talent, uint8 activeTalentGroup); - void TogglePvpTalents(bool enable); - bool HasPvpTalent(uint32 talentID, uint8 activeTalentGroup) const; - void EnablePvpRules(bool dueToCombat = false); - void DisablePvpRules(); - bool HasPvpRulesEnabled() const; - bool IsInAreaThatActivatesPvpTalents() const; - bool IsAreaThatActivatesPvpTalents(uint32 areaID) const; - // Dual Spec void ActivateTalentGroup(ChrSpecializationEntry const* spec); PlayerTalentMap const* GetTalentMap(uint8 spec) const { return &_specializationInfo.Talents[spec]; } PlayerTalentMap* GetTalentMap(uint8 spec) { return &_specializationInfo.Talents[spec]; } - PlayerPvpTalentMap const& GetPvpTalentMap(uint8 spec) const { return _specializationInfo.PvpTalents[spec]; } - PlayerPvpTalentMap& GetPvpTalentMap(uint8 spec) { return _specializationInfo.PvpTalents[spec]; } std::vector<uint32> const& GetGlyphs(uint8 spec) const { return _specializationInfo.Glyphs[spec]; } std::vector<uint32>& GetGlyphs(uint8 spec) { return _specializationInfo.Glyphs[spec]; } ActionButtonList const& GetActionButtons() const { return m_actionButtons; } @@ -2921,7 +2900,6 @@ class TC_GAME_API Player final : public Unit, public GridObject<Player> void _LoadBGData(PreparedQueryResult result); void _LoadGlyphs(PreparedQueryResult result); void _LoadTalents(PreparedQueryResult result); - void _LoadPvpTalents(PreparedQueryResult result); void _LoadTraits(PreparedQueryResult configsResult, PreparedQueryResult entriesResult); void _LoadInstanceTimeRestrictions(PreparedQueryResult result); void _LoadPetStable(uint32 summonedPetNumber, PreparedQueryResult result); diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 99c44062021..ee0f97fc179 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -240,10 +240,6 @@ bool LoginQueryHolder::Initialize() stmt->setUInt64(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_TALENTS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_PVP_TALENTS); - stmt->setUInt64(0, lowGuid); - res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_PVP_TALENTS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PLAYER_ACCOUNT_DATA); stmt->setUInt64(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA, stmt); diff --git a/src/server/game/Handlers/DuelHandler.cpp b/src/server/game/Handlers/DuelHandler.cpp index 90b9ec31347..04d1f24fff8 100644 --- a/src/server/game/Handlers/DuelHandler.cpp +++ b/src/server/game/Handlers/DuelHandler.cpp @@ -79,8 +79,6 @@ void WorldSession::HandleDuelAccepted(ObjectGuid arbiterGuid) WorldPacket const* worldPacket = packet.Write(); player->GetSession()->SendPacket(worldPacket); target->GetSession()->SendPacket(worldPacket); - player->EnablePvpRules(); - target->EnablePvpRules(); } void WorldSession::HandleDuelCancelled() diff --git a/src/server/game/Handlers/InspectHandler.cpp b/src/server/game/Handlers/InspectHandler.cpp index a6a664fee14..865dcc25152 100644 --- a/src/server/game/Handlers/InspectHandler.cpp +++ b/src/server/game/Handlers/InspectHandler.cpp @@ -52,10 +52,6 @@ void WorldSession::HandleInspectOpcode(WorldPackets::Inspect::Inspect& inspect) if (v.second != PLAYERSPELL_REMOVED) inspectResult.Talents.push_back(v.first); - PlayerPvpTalentMap const& pvpTalents = player->GetPvpTalentMap(player->GetActiveTalentGroup()); - for (std::size_t i = 0; i < pvpTalents.size(); ++i) - inspectResult.PvpTalents[i] = pvpTalents[i]; - inspectResult.TalentTraits.Level = player->GetLevel(); inspectResult.TalentTraits.ChrSpecializationID = AsUnderlyingType(player->GetPrimarySpecialization()); if (UF::TraitConfig const* traitConfig = player->GetTraitConfig(player->m_activePlayerData->ActiveCombatTraitConfigID)) diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp index c0076810310..61ae29e8ab4 100644 --- a/src/server/game/Handlers/SkillHandler.cpp +++ b/src/server/game/Handlers/SkillHandler.cpp @@ -50,32 +50,6 @@ void WorldSession::HandleLearnTalentsOpcode(WorldPackets::Talent::LearnTalents& _player->SendTalentsInfoData(); } -void WorldSession::HandleLearnPvpTalentsOpcode(WorldPackets::Talent::LearnPvpTalents& /*packet*/) -{ - /* - WorldPackets::Talent::LearnPvpTalentFailed learnPvpTalentFailed; - bool anythingLearned = false; - for (WorldPackets::Talent::PvPTalent pvpTalent : packet.Talents) - { - if (TalentLearnResult result = _player->LearnPvpTalent(pvpTalent.PvPTalentID, pvpTalent.Slot, &learnPvpTalentFailed.SpellID)) - { - if (!learnPvpTalentFailed.Reason) - learnPvpTalentFailed.Reason = result; - - learnPvpTalentFailed.Talents.push_back(pvpTalent); - } - else - anythingLearned = true; - } - - if (learnPvpTalentFailed.Reason) - SendPacket(learnPvpTalentFailed.Write()); - - if (anythingLearned) - _player->SendTalentsInfoData(); - */ -} - void WorldSession::HandleConfirmRespecWipeOpcode(WorldPackets::Talent::ConfirmRespecWipe& confirmRespecWipe) { Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(confirmRespecWipe.RespecMaster, UNIT_NPC_FLAG_TRAINER, UNIT_NPC_FLAG_2_NONE); diff --git a/src/server/game/Server/Packets/InspectPackets.h b/src/server/game/Server/Packets/InspectPackets.h index 48d008de22f..12dafef3aad 100644 --- a/src/server/game/Server/Packets/InspectPackets.h +++ b/src/server/game/Server/Packets/InspectPackets.h @@ -137,7 +137,7 @@ namespace WorldPackets PlayerModelDisplayInfo DisplayInfo; std::vector<uint16> Glyphs; std::vector<uint16> Talents; - std::array<uint16, MAX_PVP_TALENT_SLOTS> PvpTalents; + std::array<uint16, 3> PvpTalents; Optional<InspectGuildData> GuildData; std::array<PVPBracketData, 9> Bracket; Optional<int32> AzeriteLevel; diff --git a/src/server/game/Server/Packets/TalentPackets.cpp b/src/server/game/Server/Packets/TalentPackets.cpp index c5103732977..20753c7de5d 100644 --- a/src/server/game/Server/Packets/TalentPackets.cpp +++ b/src/server/game/Server/Packets/TalentPackets.cpp @@ -103,22 +103,3 @@ WorldPacket const* WorldPackets::Talent::ActiveGlyphs::Write() return &_worldPacket; } - -void WorldPackets::Talent::LearnPvpTalents::Read() -{ - /* - Talents.resize(_worldPacket.read<uint32>()); - for (uint32 i = 0; i < Talents.size(); ++i) - _worldPacket >> Talents[i]; - */ -} - -WorldPacket const* WorldPackets::Talent::LearnPvpTalentFailed::Write() -{ - /* - _worldPacket.WriteBits(Reason, 4); - _worldPacket << int32(SpellID); - _worldPacket << uint32(Talents.size()); - */ - return &_worldPacket; -} diff --git a/src/server/game/Server/Packets/TalentPackets.h b/src/server/game/Server/Packets/TalentPackets.h index e1a11e88170..dee21268b70 100644 --- a/src/server/game/Server/Packets/TalentPackets.h +++ b/src/server/game/Server/Packets/TalentPackets.h @@ -122,28 +122,6 @@ namespace WorldPackets std::vector<GlyphBinding> Glyphs; bool IsFullUpdate = false; }; - - class LearnPvpTalents final : public ClientPacket - { - public: - LearnPvpTalents(WorldPacket&& packet) : ClientPacket(CMSG_LEARN_PVP_TALENTS, std::move(packet)) { } - - void Read() override; - - //Array<PvPTalent, 4> Talents; - }; - - class LearnPvpTalentFailed final : public ServerPacket - { - public: - LearnPvpTalentFailed() : ServerPacket(SMSG_LEARN_PVP_TALENT_FAILED, 1 + 4 + 4 + (2 + 1) * MAX_PVP_TALENT_SLOTS) { } - - WorldPacket const* Write() override; - - uint32 Reason = 0; - int32 SpellID = 0; - //std::vector<PvPTalent> Talents; - }; } } diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index 3a8ba9966ea..64b9ffb6e54 100644 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -548,7 +548,7 @@ void OpcodeTable::InitializeClientOpcodes() DEFINE_HANDLER(CMSG_KEEP_ALIVE, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_EarlyProccess); DEFINE_HANDLER(CMSG_KEYBOUND_OVERRIDE, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleKeyboundOverride); DEFINE_HANDLER(CMSG_LATENCY_REPORT, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_LEARN_PVP_TALENTS, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleLearnPvpTalentsOpcode); + DEFINE_HANDLER(CMSG_LEARN_PVP_TALENTS, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_LEARN_TALENTS, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleLearnTalentsOpcode); DEFINE_HANDLER(CMSG_LEAVE_GROUP, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleLeaveGroupOpcode); DEFINE_HANDLER(CMSG_LEAVE_PET_BATTLE_QUEUE, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL); @@ -1589,7 +1589,7 @@ void OpcodeTable::InitializeServerOpcodes() DEFINE_SERVER_OPCODE_HANDLER(SMSG_KICK_REASON, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_LATENCY_REPORT_PING, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEARNED_SPELLS, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEARN_PVP_TALENT_FAILED, STATUS_NEVER, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEARN_PVP_TALENT_FAILED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEARN_TALENT_FAILED, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEGACY_LOOT_RULES, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEVEL_LINKING_RESULT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 56279f6b266..a0c382a4a7f 100644 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -730,7 +730,6 @@ namespace WorldPackets namespace Talent { class LearnTalents; - class LearnPvpTalents; class ConfirmRespecWipe; } @@ -1511,7 +1510,6 @@ class TC_GAME_API WorldSession void HandleMissileTrajectoryCollision(WorldPackets::Spells::MissileTrajectoryCollision& packet); void HandleUpdateMissileTrajectory(WorldPackets::Spells::UpdateMissileTrajectory& packet); - void HandleLearnPvpTalentsOpcode(WorldPackets::Talent::LearnPvpTalents& packet); void HandleLearnTalentsOpcode(WorldPackets::Talent::LearnTalents& packet); void HandleConfirmRespecWipeOpcode(WorldPackets::Talent::ConfirmRespecWipe& confirmRespecWipe); void HandleUnlearnSkillOpcode(WorldPackets::Spells::UnlearnSkill& packet); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 162ead20d45..4890f570df6 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -187,7 +187,7 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]= &AuraEffect::HandleNoImmediateEffect, //116 SPELL_AURA_MOD_REGEN_DURING_COMBAT &AuraEffect::HandleNoImmediateEffect, //117 SPELL_AURA_MOD_MECHANIC_RESISTANCE implemented in Unit::MagicSpellHitResult &AuraEffect::HandleNoImmediateEffect, //118 SPELL_AURA_MOD_HEALING_PCT implemented in Unit::SpellHealingBonus - &AuraEffect::HandleAuraPvpTalents, //119 SPELL_AURA_PVP_TALENTS + &AuraEffect::HandleUnused, //119 SPELL_AURA_PVP_TALENTS &AuraEffect::HandleAuraUntrackable, //120 SPELL_AURA_UNTRACKABLE &AuraEffect::HandleAuraEmpathy, //121 SPELL_AURA_EMPATHY &AuraEffect::HandleModOffhandDamagePercent, //122 SPELL_AURA_MOD_OFFHAND_DAMAGE_PCT @@ -6201,20 +6201,6 @@ void AuraEffect::HandleCreateAreaTrigger(AuraApplication const* aurApp, uint8 mo } } -void AuraEffect::HandleAuraPvpTalents(AuraApplication const* auraApp, uint8 mode, bool apply) const -{ - if (!(mode & AURA_EFFECT_HANDLE_REAL)) - return; - - if (Player* target = auraApp->GetTarget()->ToPlayer()) - { - if (apply) - target->TogglePvpTalents(true); - else if (!target->HasAuraType(SPELL_AURA_PVP_TALENTS)) - target->TogglePvpTalents(false); - } -} - void AuraEffect::HandleLinkedSummon(AuraApplication const* aurApp, uint8 mode, bool apply) const { if (!(mode & AURA_EFFECT_HANDLE_REAL)) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index 0b214181fb0..1bbf52e375e 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -357,9 +357,6 @@ class TC_GAME_API AuraEffect void HandleProcTriggerSpellAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo); void HandleProcTriggerSpellWithValueAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo); void HandleProcTriggerDamageAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo); - - // pvp talents - void HandleAuraPvpTalents(AuraApplication const* auraApp, uint8 mode, bool apply) const; }; namespace Trinity diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp index 8cfac55b236..f72ff32feb2 100644 --- a/src/server/game/Tools/PlayerDump.cpp +++ b/src/server/game/Tools/PlayerDump.cpp @@ -106,7 +106,6 @@ DumpTable const DumpTables[] = { "character_inventory", DTT_INVENTORY }, { "character_pet", DTT_PET }, { "character_pet_declinedname", DTT_PET }, - { "character_pvp_talent", DTT_CHAR_TABLE }, { "character_queststatus", DTT_CHAR_TABLE }, { "character_queststatus_daily", DTT_CHAR_TABLE }, { "character_queststatus_monthly", DTT_CHAR_TABLE }, |