Restore rank requirements to Vanilla PvP gear

This commit is contained in:
郑佩茹
2023-08-08 21:15:41 -06:00
parent f3c8d23aaa
commit 20f9993311
6 changed files with 144 additions and 3 deletions

View File

@@ -317,4 +317,14 @@ IndividualProgression.CustomProgression = ""
# #
# #
IndividualProgression.AllowEarlyDungeonSet2 = 1 IndividualProgression.AllowEarlyDungeonSet2 = 1
#
# IndividualProgression.PvPGearRequirements
# Description: Requires players to have earned relevant PvP Titles before high level PvP gear can be equipped
#
# Default: 1 - Enabled
# 0 - Disabled
#
#
IndividualProgression.PvPGearRequirements

View File

@@ -0,0 +1,25 @@
/* Alliance Vanilla PvP Gear Rank Requirements */
UPDATE `item_template` SET `requiredhonorrank` = 5 WHERE `entry` IN (15196);
UPDATE `item_template` SET `requiredhonorrank` = 7 WHERE `entry` IN (16342, 18440, 18441);
UPDATE `item_template` SET `requiredhonorrank` = 8 WHERE `entry` IN (18442, 18443, 18444);
UPDATE `item_template` SET `requiredhonorrank` = 9 WHERE `entry` IN (16315, 16336, 16337, 18448, 18449, 18454, 18455, 18452, 18453, 18445, 18447, 18456, 18457);
UPDATE `item_template` SET `requiredhonorrank` = 10 WHERE `entry` IN (15198);
UPDATE `item_template` SET `requiredhonorrank` = 11 WHERE `entry` IN (16401, 16403, 23278, 23279, 16393, 16397, 23280, 23281, 17562, 17564, 23282, 23283, 23274, 23275, 16392, 16396, 23284, 23285, 29594, 29595, 16405, 16406, 23286, 23287, 17594, 17596, 23288, 23289, 16369, 16391, 23290, 23291);
UPDATE `item_template` SET `requiredhonorrank` = 12 WHERE `entry` IN (16425, 23292, 16426, 23293, 23294, 16422, 23295, 16421, 17567, 23296, 17568, 23297, 23272, 23273, 16417, 23298, 16419, 23299, 29596, 29597, 16430, 23300, 16431, 23301, 17599, 23302, 17600, 23303, 16414, 23304, 16413, 23305);
UPDATE `item_template` SET `requiredhonorrank` = 14 WHERE `entry` IN (23306, 16428, 16427, 23307, 16416, 17598, 16423, 23308, 23309, 16424, 23310, 17569, 23311, 17566, 23276, 23277, 23312, 23313, 16420, 16418, 29598, 29599, 16429, 23314, 16432, 23315, 17601, 23316, 23317, 23318, 23319, 16415);
UPDATE `item_template` SET `requiredhonorrank` = 16 WHERE `entry` IN (16462, 16463, 16467, 16459, 16448, 16450, 17583, 17584, 17579, 16472, 16471, 16475, 16446, 16454, 16456, 29606, 29607, 29608, 16483, 16484, 16479, 17608, 17603, 17607, 16437, 16440, 16442);
UPDATE `item_template` SET `requiredhonorrank` = 17 WHERE `entry` IN (16466, 16465, 16468, 17578, 16441, 16452, 16451, 16449, 17581, 17580, 17602, 16473, 16474, 16476, 16453, 16457, 16455, 29609, 29610, 29611, 16477, 16478, 16480, 17604, 17605, 16444, 16443);
UPDATE `item_template` SET `requiredhonorrank` = 18 WHERE `entry` IN (12584, 18825, 18827, 18830, 18833, 18836, 18838, 18843, 18847, 18855, 18865, 18867, 18869, 18873, 18876, 23451, 23452, 23453, 23454, 23455, 23456);
/* Horde Vanilla PvP Gear Rank Requirements */
UPDATE `item_template` SET `requiredhonorrank` = 5 WHERE `entry` IN (15197);
UPDATE `item_template` SET `requiredhonorrank` = 7 WHERE `entry` IN (16341, 18427, 18461);
UPDATE `item_template` SET `requiredhonorrank` = 8 WHERE `entry` IN (15200, 16335, 18428);
UPDATE `item_template` SET `requiredhonorrank` = 9 WHERE `entry` IN (16340, 18434, 18436, 16497, 18435, 16532, 18432, 18429, 18430, 16486, 18437);
UPDATE `item_template` SET `requiredhonorrank` = 10 WHERE `entry` IN (15199);
UPDATE `item_template` SET `requiredhonorrank` = 11 WHERE `entry` IN (16531, 16530, 22843, 22862, 16494, 16496, 22863, 22852, 17576, 17577, 22865, 22855, 29600, 29601, 22864, 16498, 16499, 22856, 22857, 16519, 22867, 16518, 16343, 30710, 16509, 22868, 16510, 22858, 17616, 17617, 22869, 22859, 16485, 16487, 22870, 22860);
UPDATE `item_template` SET `requiredhonorrank` = 12 WHERE `entry` IN (19510, 19511, 19512, 19513, 20429, 16517, 16525, 16529, 22874, 16527, 22875, 16493, 16504, 22877, 22878, 16502, 16495, 17574, 17575, 17571, 22881, 17572, 22884, 29602, 29603, 22879, 16500, 16505, 16508, 22880, 16522, 16520, 22876, 16523, 22887, 16513, 16512, 16511, 22872, 22873, 16515, 17615, 22882, 17614, 17611, 22885, 17612, 16488, 22883, 16490, 16491, 22886, 19550, 19551, 19552, 19553, 20430);
UPDATE `item_template` SET `requiredhonorrank` = 14 WHERE `entry` IN (16526, 23251, 16528, 23252, 23253, 16503, 23254, 16501, 23255, 17570, 17573, 23256, 29604, 29605, 16506, 23257, 16507, 23258, 23259, 16521, 23260, 16524, 16514, 23244, 16516, 23243, 17610, 23261, 23262, 17613, 23263, 16489, 23264, 16492);
UPDATE `item_template` SET `requiredhonorrank` = 16 WHERE `entry` IN (16569, 16572, 16571, 16567, 16570, 16556, 16554, 16553, 16555, 16552, 17589, 17586, 17587, 17588, 17593, 29612, 29613, 29614, 16559, 16557, 16564, 16560, 16558, 16573, 16576, 16574, 16579, 16575, 16546, 16545, 16548, 16547, 16543, 17618, 17619, 17621, 17620, 17625, 16539, 16538, 16540, 16537, 16534);
UPDATE `item_template` SET `requiredhonorrank` = 17 WHERE `entry` IN (16565, 16566, 16568, 16551, 16549, 16550, 17591, 17590, 17592, 29615, 29616, 29617, 16563, 16561, 16562, 16577, 16578, 16580, 16541, 16542, 16544, 17623, 17622, 17624, 16536, 16533, 16535);
UPDATE `item_template` SET `requiredhonorrank` = 18 WHERE `entry` IN (18831, 23459, 23464, 16345, 18866, 18828, 18837, 23457, 23465, 18877, 18848, 18871, 18868, 23461, 23467, 18840, 18835, 18844, 18826, 23458, 23466, 18860, 23462, 23468, 23469, 18874);

View File

@@ -63,7 +63,8 @@ INSERT INTO `creature` (`id1`, `map`, `position_x`, `position_y`, `position_z`,
DELETE FROM `creature` WHERE `id1`=12782; DELETE FROM `creature` WHERE `id1`=12782;
INSERT INTO `creature` (`id1`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`) VALUES (12782, 0, -8778.3, 432.142, 105.309, 4.17386, 300); INSERT INTO `creature` (`id1`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`) VALUES (12782, 0, -8778.3, 432.142, 105.309, 4.17386, 300);
-- Lieutenant Jackspring <Legacy Weapon Quartermaster>
DELETE FROM `creature` WHERE `id1`=12784;
-- Sergeant Major Clate <Legacy Armor Quartermaster> -- Sergeant Major Clate <Legacy Armor Quartermaster>
DELETE FROM `creature` WHERE `id1`=12785; DELETE FROM `creature` WHERE `id1`=12785;

View File

@@ -314,6 +314,7 @@ private:
sIndividualProgression->deathKnightStartingProgression = sConfigMgr->GetOption<uint8>("IndividualProgression.DeathKnightStartingProgression", 11); sIndividualProgression->deathKnightStartingProgression = sConfigMgr->GetOption<uint8>("IndividualProgression.DeathKnightStartingProgression", 11);
sIndividualProgression->LoadCustomProgressionEntries(sConfigMgr->GetOption<std::string>("IndividualProgression.CustomProgression", "")); sIndividualProgression->LoadCustomProgressionEntries(sConfigMgr->GetOption<std::string>("IndividualProgression.CustomProgression", ""));
sIndividualProgression->earlyDungeonSet2 = sConfigMgr->GetOption<bool>("IndividualProgression.AllowEarlyDungeonSet2", true); sIndividualProgression->earlyDungeonSet2 = sConfigMgr->GetOption<bool>("IndividualProgression.AllowEarlyDungeonSet2", true);
sIndividualProgression->pvpGearRequirements = sConfigMgr->GetOption<bool>("IndividualProgression.PvPGearRequirements", true);
} }
static void LoadXpValues() static void LoadXpValues()

View File

@@ -137,6 +137,41 @@ enum RandomDungeonIds : uint16
RDF_WRATH_OF_THE_LICH_KING_HEROIC = 262 RDF_WRATH_OF_THE_LICH_KING_HEROIC = 262
}; };
enum PvPTitles : uint32
{
// Alliance
PRIVATE = 1,
CORPORAL = 2,
SERGEANT = 3,
MASTER_SERGEANT = 4,
SERGEANT_MAJOR = 5,
KNIGHT = 6,
KNIGHT_LIEUTENANT = 7,
KNIGHT_CAPTAIN = 8,
KNIGHT_CHAMPION = 9,
LIEUTENANT_COMMANDER = 10,
COMMANDER = 11,
MARSHAL = 12,
FIELD_MARSHAL = 13,
GRAND_MARSHAL = 14,
// Horde
SCOUT = 15,
GRUNT = 16,
SERGEANT_H = 17,
SENIOR_SERGEANT = 18,
FIRST_SERGEANT = 19,
STONE_GUARD = 20,
BLOOD_GUARD = 21,
LEGIONNAIRE = 22,
CENTURION = 23,
CHAMPION = 24,
LIEUTENANT_GENERAL = 25,
GENERAL = 26,
WARLORD = 27,
HIGH_WARLORD = 28
};
class IndividualProgression class IndividualProgression
{ {
public: public:
@@ -145,7 +180,7 @@ public:
std::map<uint32, uint8> customProgressionMap; std::map<uint32, uint8> customProgressionMap;
questXpMapType questXpMap; questXpMapType questXpMap;
float vanillaPowerAdjustment, vanillaHealthAdjustment, tbcPowerAdjustment, tbcHealthAdjustment, vanillaHealingAdjustment, tbcHealingAdjustment, previousGearTuning; float vanillaPowerAdjustment, vanillaHealthAdjustment, tbcPowerAdjustment, tbcHealthAdjustment, vanillaHealingAdjustment, tbcHealingAdjustment, previousGearTuning;
bool enabled, questXpFix, hunterPetLevelFix, requirePreAQQuests, enforceGroupRules, fishingFix, simpleConfigOverride, questMoneyAtLevelCap, repeatableVanillaQuestsXp, disableDefaultProgression, earlyDungeonSet2, requireNaxxStrath; bool enabled, questXpFix, hunterPetLevelFix, requirePreAQQuests, enforceGroupRules, fishingFix, simpleConfigOverride, questMoneyAtLevelCap, repeatableVanillaQuestsXp, disableDefaultProgression, earlyDungeonSet2, requireNaxxStrath, pvpGearRequirements;
int progressionLimit, startingProgression, tbcRacesProgressionLevel, deathKnightProgressionLevel, deathKnightStartingProgression; int progressionLimit, startingProgression, tbcRacesProgressionLevel, deathKnightProgressionLevel, deathKnightStartingProgression;
bool hasPassedProgression(Player* player, ProgressionState state) const; bool hasPassedProgression(Player* player, ProgressionState state) const;

View File

@@ -361,6 +361,75 @@ public:
rDungeonId = RDF_THE_BURNING_CRUSADE_HEROIC; rDungeonId = RDF_THE_BURNING_CRUSADE_HEROIC;
} }
} }
bool CanEquipItem(Player* player, uint8 /*slot*/, uint16& /*dest*/, Item* pItem, bool /*swap*/, bool /*not_loading*/) override
{
if (sIndividualProgression->pvpGearRequirements)
{
switch (pItem->GetTemplate()->RequiredHonorRank)
{
case 5:
if (!(player->HasTitle(PRIVATE) || player->HasTitle(SCOUT)))
return false;
break;
case 6:
if (!(player->HasTitle(CORPORAL) || player->HasTitle(GRUNT)))
return false;
break;
case 7:
if (!(player->HasTitle(SERGEANT) || player->HasTitle(SERGEANT_H)))
return false;
break;
case 8:
if (!(player->HasTitle(MASTER_SERGEANT) || player->HasTitle(SENIOR_SERGEANT)))
return false;
break;
case 9:
if (!(player->HasTitle(SERGEANT_MAJOR) || player->HasTitle(FIRST_SERGEANT)))
return false;
break;
case 10:
if (!(player->HasTitle(KNIGHT) || player->HasTitle(STONE_GUARD)))
return false;
break;
case 11:
if (!(player->HasTitle(KNIGHT_LIEUTENANT) || player->HasTitle(BLOOD_GUARD)))
return false;
break;
case 12:
if (!(player->HasTitle(KNIGHT_CAPTAIN) || player->HasTitle(LEGIONNAIRE)))
return false;
break;
case 13:
if (!(player->HasTitle(KNIGHT_CHAMPION) || player->HasTitle(CENTURION)))
return false;
break;
case 14:
if (!(player->HasTitle(LIEUTENANT_COMMANDER) || player->HasTitle(CHAMPION)))
return false;
break;
case 15:
if (!(player->HasTitle(COMMANDER) || player->HasTitle(LIEUTENANT_GENERAL)))
return false;
break;
case 16:
if (!(player->HasTitle(MARSHAL) || player->HasTitle(GENERAL)))
return false;
break;
case 17:
if (!(player->HasTitle(FIELD_MARSHAL) || player->HasTitle(WARLORD)))
return false;
break;
case 18:
if (!(player->HasTitle(GRAND_MARSHAL) || player->HasTitle(HIGH_WARLORD)))
return false;
break;
default:
break;
}
}
return true;
}
}; };
class IndividualPlayerProgression_AccountScript: public AccountScript class IndividualPlayerProgression_AccountScript: public AccountScript