diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 207a2dc7772d6..eae379db89d06 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -12051,6 +12051,10 @@ InventoryResult Player::CanUseAmmo(uint32 item) const if (HasAura(46699)) return EQUIP_ERR_BAG_FULL6; + // Requires No Ammo + if (HasAura(81101)) + return EQUIP_ERR_BAG_FULL6; + return EQUIP_ERR_OK; } return EQUIP_ERR_ITEM_NOT_FOUND; @@ -27171,3 +27175,60 @@ GameClient* Player::GetGameClient() const { return GetSession()->GetGameClient(); } + +// Wahl des Klassenmounts noch inaktiv -> Zum aktivieren /**/ entfernen +/* +uint8 Player::GetMostPointsTalentTree() const +{ + uint32 active_spec = GetActiveSpec(); + + std::unordered_map spec_data; + + for (uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId) + { + TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentId); + + if (!talentInfo) + continue; + + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TabID); + + if (!talentTabInfo) + continue; + + if ((GetClassMask() & talentTabInfo->ClassMask) == 0) + continue; + + uint8 currentTalentRank = 0; + for (int8 rank = MAX_TALENT_RANK - 1; rank >= 0; --rank) + { + // skip non-existing talent ranks + if (talentInfo->SpellRank[rank] == 0) + continue; + + SpellInfo const* _spellEntry = sSpellMgr->GetSpellInfo(talentInfo->SpellRank[rank]); + if (!_spellEntry) + continue; + + // if he doesn't have the talent skip + if (!HasTalent(talentInfo->SpellRank[rank], active_spec)) + continue; + + currentTalentRank = rank + 1; + spec_data[talentTabInfo->ID] += currentTalentRank; + } + } + + std::pair max_spec = { 0, 0 }; + for (const auto& [spec_id, talent_count] : spec_data) + { + if (talent_count > max_spec.second) + { + max_spec.first = spec_id; + max_spec.second = talent_count; + } + } + + return max_spec.first; +} +*/ diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index b0d982fd1b18e..35546a29f1cb1 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2199,6 +2199,9 @@ class TC_GAME_API Player : public Unit, public GridObject std::string GetDebugInfo() const override; + // Wahl des Klassenmounts noch inaktiv -> Zu Aktivieren // entfernen + // uint8 GetMostPointsTalentTree() const; + /*****************************************************************/ /*** NPCBOT SYSTEM ***/ /*****************************************************************/ diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 4337d35d628a2..f42f4e9e3bc72 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -12944,6 +12944,52 @@ uint32 Unit::GetModelForForm(ShapeshiftForm form, uint32 spellId) const break; } + if (Player const* player = ToPlayer()) + { + switch (form) + { + case FORM_DIREBEAR: + case FORM_BEAR: + { + if (player->HasAura(81139)) + return 32984; // Display ID + else if (player->HasAura(81141)) + return 32985; // Display ID + else if (player->HasAura(81143)) + return 32986; // Display ID + else if (player->HasAura(81145)) + return 32987; // Display ID + else if (player->HasAura(81147)) + return 32988; // Display ID + else if (player->HasAura(81149)) + return 32989; // Display ID + else if (player->HasAura(81151)) + return 32990; // Display ID + else if (player->HasAura(81153)) + return 32991; // Display ID + else if (player->HasAura(81155)) + return 32992; // Display ID + else if (player->HasAura(81157)) + return 32993; // Display ID + else if (player->HasAura(81159)) + return 32994; // Display ID + else if (player->HasAura(81161)) + return 32995; // Display ID + else if (player->HasAura(81163)) + return 32996; // Display ID + else if (player->HasAura(81165)) + return 32997; // Display ID + else if (player->HasAura(81167)) + return 32998; // Display ID + else if (player->HasAura(81169)) + return 32999; // Display ID + break; + } + default: + break; + } + } + if (Player const* player = ToPlayer()) { switch (form) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index e686d37d976fb..276abde4d9e1a 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -2607,6 +2607,90 @@ void AuraEffect::HandleAuraModSkill(AuraApplication const* aurApp, uint8 mode, b /****************************/ /*** MOVEMENT ***/ /****************************/ +/* Wahl des Klassenmounts -> zum aktivieren ** entfernen +enum ClassSpec +{ + MAGE_ARCANE = 81, + MAGE_FIRE = 41, + MAGE_FROST = 61, + + WARRIOR_ARMS = 161, + WARRIOR_FURY = 164, + WARRIOR_PROTECTION = 163, + + ROGUE_ASSASSINATION = 182, + ROGUE_COMBAT = 181, + ROGUE_SUBTLETY = 183, + + PRIEST_DISCIPLINE = 201, + PRIEST_HOLY = 202, + PRIEST_SHADOW = 203, + + SHAMAN_ELEMENTAL = 5, + SHAMAN_ENHANCEMENT = 7, + SHAMAN_RESTORATION = 6, + + DRUID_BALANCE = 27, + DRUID_FERAL = 25, + DRUID_RESTORATION = 26, + + WARLOCK_AFFLICTION = 46, + WARLOCK_DEMONOLOGY = 47, + WARLOCK_DESTRUCTION = 45, + + HUNTER_BEAST_MASTERY = 105, + HUNTER_MARKSMANSHIP = 107, + HUNTER_SURVIVAL = 106, + + PALADIN_HOLY = 126, + PALADIN_PROTECTION = 127, + PALADIN_RETRIBUTION = 125, + + DEATH_KNIGHT_BLOOD = 142, + DEATH_KNIGHT_FROST = 143, + DEATH_KNIGHT_UNHOLY = 144 +}; + +void UpdateCustomMountDisplayId(Unit* target, uint32& creatureEntry) +{ + if (!target->ToPlayer()) + return; + + const uint32 active_spec = target->ToPlayer()->GetMostPointsTalentTree(); + + if (target->HasAura(75620)) + { + + switch (active_spec) + { + case MAGE_ARCANE: + creatureEntry = 32637; + break; + case MAGE_FROST: + creatureEntry = 28531; + break; + case MAGE_FIRE: + creatureEntry = 40165; + break; + } + } + else if (target->HasAura(81240) || target->HasAura(81241) || target->HasAura(81242) || target->HasAura(81201)) + { + switch (active_spec) + { + case WARLOCK_AFFLICTION: + creatureEntry = 100575; + break; + case WARLOCK_DESTRUCTION: + creatureEntry = 100579; + break; + case WARLOCK_DEMONOLOGY: + creatureEntry = 100580; + break; + } + } +} +*/ void AuraEffect::HandleAuraMounted(AuraApplication const* aurApp, uint8 mode, bool apply) const { @@ -2630,6 +2714,9 @@ void AuraEffect::HandleAuraMounted(AuraApplication const* aurApp, uint8 mode, bo creatureEntry = 15665; } + // Wahl des Klassenmounts -> zum aktivieren // Entfernen + // UpdateCustomMountDisplayId(target, creatureEntry); + if (CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(creatureEntry)) { if (GetMiscValueB() > 0) // Choose proper modelid @@ -4494,6 +4581,10 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool if (target->GetTypeId() == TYPEID_PLAYER) target->ToPlayer()->RemoveAmmo(); // not use ammo and not allow use break; + case 81101: // Requires No Ammo + if (target->GetTypeId() == TYPEID_PLAYER) + target->ToPlayer()->RemoveAmmo(); // not use ammo and not allow use + break; } } // AT REMOVE diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index ad32169087e74..a404389a5ef06 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4494,6 +4494,11 @@ void Spell::UpdateSpellCastDataAmmo(WorldPackets::Spells::SpellAmmo& ammo) ammoDisplayID = 5996; // normal arrow ammoInventoryType = INVTYPE_AMMO; } + else if (m_caster->ToPlayer()->HasAura(81101)) // Requires No Ammo + { + ammoDisplayID = 5996; // normal arrow + ammoInventoryType = INVTYPE_AMMO; + } } } } diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 0c713a1ab50b9..37544049eb96d 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3474,6 +3474,25 @@ void SpellMgr::LoadSpellInfoCorrections() 65917, // Magic Rooster 71342, // Big Love Rocket 72286, // Invincible + 80933, // Bunny Mount + 80938, // FOX Mount + 80943, // HAND Mount + 80990, // Blue Phönix + 80995, // Orange Phönix + 81000, // Katzenmount + 81183, // Palamount Blau + 81184, // Palamount Purple + 81185, // Palamount Rot + 81186, // Palamount Gelb + 81187, // Jägermount Blau + 81188, // Jägermount Grün + 81189, // Jägermount Orange + 81190, // Priestermount Diszi + 81191, // Priestermount Holy + 81192, // Priestermount Shatten + 81201, // Hexenmeistermount Grün + 81202, // Hexenmeistermount Rot + 81203, // Hexenmeistermount Shatten 74856, // Blazing Hippogryph 75614, // Celestial Steed 75973 // X-53 Touring Rocket @@ -4957,6 +4976,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(5); // 40yd }); + // CUSTOM: DK BOSS SCOURGE AURA + ApplySpellFix({ 60023 }, [](SpellInfo* spellInfo) + { + spellInfo->AttributesEx &= ~SPELL_ATTR1_CANT_TARGET_SELF; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 4da6b12e60634..f9c6170c7bc85 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -2201,6 +2201,107 @@ enum Mounts SPELL_INVINCIBLE_100 = 72282, SPELL_INVINCIBLE_150 = 72283, SPELL_INVINCIBLE_310 = 72284, + + // Bunny Mount + SPELL_BUNNY_60 = 80929, + SPELL_BUNNY_100 = 80930, + SPELL_BUNNY_150 = 80931, + SPELL_BUNNY_310 = 80932, + + // Blauer Phönix + SPELL_PHOENIX_A_60 = 80986, + SPELL_PHOENIX_A_100 = 80987, + SPELL_PHOENIX_A_150 = 80988, + SPELL_PHOENIX_A_310 = 80989, + + // Oranger Phönix + SPELL_PHOENIX_B_60 = 80991, + SPELL_PHOENIX_B_100 = 80992, + SPELL_PHOENIX_B_150 = 80993, + SPELL_PHOENIX_B_310 = 80994, + + // Katzenmount Phönix + SPELL_CATMOUNT_60 = 80996, + SPELL_CATMOUNT_100 = 80997, + SPELL_CATMOUNT_150 = 80998, + SPELL_CATMOUNT_310 = 80999, + + // Fox Mount + SPELL_FOX_60 = 80934, + SPELL_FOX_100 = 80935, + SPELL_FOX_150 = 80936, + SPELL_FOX_310 = 80937, + + // Hand Mount + SPELL_HAND_60 = 80939, + SPELL_HAND_100 = 80940, + SPELL_HAND_150 = 80941, + SPELL_HAND_310 = 80942, + + // Paladin Klassenmount Blau + SPELL_PALA_BLAU_100 = 81210, + SPELL_PALA_BLAU_150 = 81211, + SPELL_PALA_BLAU_280 = 81212, + + // Paladin Klassenmount Purple + SPELL_PALA_PURPLE_100 = 81213, + SPELL_PALA_PURPLE_150 = 81214, + SPELL_PALA_PURPLE_280 = 81215, + + // Paladin Klassenmount Rot + SPELL_PALA_RED_100 = 81216, + SPELL_PALA_RED_150 = 81217, + SPELL_PALA_RED_280 = 81218, + + // Paladin Klassenmount Gelb + SPELL_PALA_YELLOW_100 = 81219, + SPELL_PALA_YELLOW_150 = 81220, + SPELL_PALA_YELLOW_280 = 81221, + + // Jäger Klassenmount Blau + SPELL_HUNTER_BLUE_100 = 81222, + SPELL_HUNTER_BLUE_150 = 81223, + SPELL_HUNTER_BLUE_280 = 81224, + + // Jäger Klassenmount Grün + SPELL_HUNTER_GREEN_100 = 81225, + SPELL_HUNTER_GREEN_150 = 81226, + SPELL_HUNTER_GREEN_280 = 81227, + + // Jäger Klassenmount Orange + SPELL_HUNTER_ORANGE_100 = 81228, + SPELL_HUNTER_ORANGE_150 = 81229, + SPELL_HUNTER_ORANGE_280 = 81230, + + // Priester Klassenmount Diszi + SPELL_PRIEST_DISZI_100 = 81231, + SPELL_PRIEST_DISZI_150 = 81232, + SPELL_PRIEST_DISZI_280 = 81233, + + // Priester Klassenmount Holy + SPELL_PRIEST_HOLY_100 = 81234, + SPELL_PRIEST_HOLY_150 = 81235, + SPELL_PRIEST_HOLY_280 = 81236, + + // Priester Klassenmount Shadow + SPELL_PRIEST_SHADOW_100 = 81237, + SPELL_PRIEST_SHADOW_150 = 81238, + SPELL_PRIEST_SHADOW_280 = 81239, + + // Hexenmeister Klassenmount Grün + SPELL_WARLOCK_GREEN_100 = 81240, + SPELL_WARLOCK_GREEN_150 = 81241, + SPELL_WARLOCK_GREEN_280 = 81242, + + // Hexenmeister Klassenmount Rot + SPELL_WARLOCK_RED_100 = 81243, + SPELL_WARLOCK_RED_150 = 81244, + SPELL_WARLOCK_RED_280 = 81245, + + // Hexenmeister Klassenmount Schatten + SPELL_WARLOCK_SHADOW_100 = 81246, + SPELL_WARLOCK_SHADOW_150 = 81247, + SPELL_WARLOCK_SHADOW_280 = 81248, // Blazing Hippogryph SPELL_BLAZING_HIPPOGRYPH_150 = 74854, @@ -4677,6 +4778,25 @@ void AddSC_generic_spell_scripts() RegisterSpellScriptWithArgs(spell_gen_mount, "spell_big_blizzard_bear", 0, SPELL_BIG_BLIZZARD_BEAR_60, SPELL_BIG_BLIZZARD_BEAR_100); RegisterSpellScriptWithArgs(spell_gen_mount, "spell_big_love_rocket", SPELL_BIG_LOVE_ROCKET_0, SPELL_BIG_LOVE_ROCKET_60, SPELL_BIG_LOVE_ROCKET_100, SPELL_BIG_LOVE_ROCKET_150, SPELL_BIG_LOVE_ROCKET_310); RegisterSpellScriptWithArgs(spell_gen_mount, "spell_invincible", 0, SPELL_INVINCIBLE_60, SPELL_INVINCIBLE_100, SPELL_INVINCIBLE_150, SPELL_INVINCIBLE_310); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_bunny", 0, SPELL_BUNNY_60, SPELL_BUNNY_100, SPELL_BUNNY_150, SPELL_BUNNY_310); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_phoenix_a", 0, SPELL_PHOENIX_A_60, SPELL_PHOENIX_A_100, SPELL_PHOENIX_A_150, SPELL_PHOENIX_A_310); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_phoenix_b", 0, SPELL_PHOENIX_B_60, SPELL_PHOENIX_B_100, SPELL_PHOENIX_B_150, SPELL_PHOENIX_B_310); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_catmount", 0, SPELL_CATMOUNT_60, SPELL_CATMOUNT_100, SPELL_CATMOUNT_150, SPELL_CATMOUNT_310); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_fox", 0, SPELL_FOX_60, SPELL_FOX_100, SPELL_FOX_150, SPELL_FOX_310); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_hand", 0, SPELL_HAND_60, SPELL_HAND_100, SPELL_HAND_150, SPELL_HAND_310); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_pala_blue", 0, 0, SPELL_PALA_BLAU_100, SPELL_PALA_BLAU_150, SPELL_PALA_BLAU_280); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_pala_purple", 0, 0, SPELL_PALA_PURPLE_100, SPELL_PALA_PURPLE_150, SPELL_PALA_PURPLE_280); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_pala_red", 0, 0, SPELL_PALA_RED_100, SPELL_PALA_RED_150, SPELL_PALA_RED_280); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_pala_yellow", 0, 0, SPELL_PALA_YELLOW_100, SPELL_PALA_YELLOW_150, SPELL_PALA_YELLOW_280); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_hunter_blue", 0, 0, SPELL_HUNTER_BLUE_100, SPELL_HUNTER_BLUE_150, SPELL_HUNTER_BLUE_280); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_hunter_green", 0, 0, SPELL_HUNTER_GREEN_100, SPELL_HUNTER_GREEN_150, SPELL_HUNTER_GREEN_280); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_hunter_orange", 0, 0, SPELL_HUNTER_ORANGE_100, SPELL_HUNTER_ORANGE_150, SPELL_HUNTER_ORANGE_280); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_priest_diszi", 0, 0, SPELL_PRIEST_DISZI_100, SPELL_PRIEST_DISZI_150, SPELL_PRIEST_DISZI_280); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_priest_holy", 0, 0, SPELL_PRIEST_HOLY_100, SPELL_PRIEST_HOLY_150, SPELL_PRIEST_HOLY_280); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_priest_shadow", 0, 0, SPELL_PRIEST_SHADOW_100, SPELL_PRIEST_SHADOW_150, SPELL_PRIEST_SHADOW_280); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_warlock_green", 0, 0, SPELL_WARLOCK_GREEN_100, SPELL_WARLOCK_GREEN_150, SPELL_WARLOCK_GREEN_280); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_warlock_red", 0, 0, SPELL_WARLOCK_RED_100, SPELL_WARLOCK_RED_150, SPELL_WARLOCK_RED_280); + RegisterSpellScriptWithArgs(spell_gen_mount, "spell_warlock_shadow", 0, 0, SPELL_WARLOCK_SHADOW_100, SPELL_WARLOCK_SHADOW_150, SPELL_WARLOCK_SHADOW_280); RegisterSpellScriptWithArgs(spell_gen_mount, "spell_blazing_hippogryph", 0, 0, 0, SPELL_BLAZING_HIPPOGRYPH_150, SPELL_BLAZING_HIPPOGRYPH_280); RegisterSpellScriptWithArgs(spell_gen_mount, "spell_celestial_steed", 0, SPELL_CELESTIAL_STEED_60, SPELL_CELESTIAL_STEED_100, SPELL_CELESTIAL_STEED_150, SPELL_CELESTIAL_STEED_280, SPELL_CELESTIAL_STEED_310); RegisterSpellScriptWithArgs(spell_gen_mount, "spell_x53_touring_rocket", 0, 0, 0, SPELL_X53_TOURING_ROCKET_150, SPELL_X53_TOURING_ROCKET_280, SPELL_X53_TOURING_ROCKET_310); diff --git a/src/server/shared/DataStores/DBCStructure.h b/src/server/shared/DataStores/DBCStructure.h index 88804e73c42a4..0060e401a9057 100644 --- a/src/server/shared/DataStores/DBCStructure.h +++ b/src/server/shared/DataStores/DBCStructure.h @@ -1116,7 +1116,7 @@ struct MapEntry bool IsContinent() const { - return ID == 0 || ID == 1 || ID == 530 || ID == 571; + return ID == 0 || ID == 1 || ID == 530 || ID == 571 || ID == 728 || ID == 732 || ID == 733; } bool IsDynamicDifficultyMap() const { return (Flags & MAP_FLAG_DYNAMIC_DIFFICULTY) != 0; } diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp index 25eb1a9f9e72f..be243b97ff462 100644 --- a/src/tools/map_extractor/System.cpp +++ b/src/tools/map_extractor/System.cpp @@ -90,6 +90,10 @@ const char *CONF_mpq_list[]={ "patch-3.MPQ", "patch-4.MPQ", "patch-5.MPQ", + "patch-6.MPQ", + "patch-7.MPQ", + "patch-8.MPQ", + "patch-9.MPQ", }; static char const* const langs[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU" };