More vanilla level range adjustments and progression aware NPCs

This commit is contained in:
郑佩茹
2022-09-09 18:12:34 -06:00
parent ccae41dae6
commit af501dfda9
4 changed files with 220 additions and 12 deletions

View File

@@ -1,10 +1,15 @@
UPDATE `creature_template` SET `ScriptName` = 'npc_ipp_tbc' WHERE `entry` IN (16841, 19254, 16840);
UPDATE `creature_template` SET `ScriptName` = 'npc_ipp_tbc' WHERE `entry` IN (16841, 19254, 16840,
20026, 20027, 20053, 20054, 20069, 18542, 20080, 20081, 20082, 21643, 20130,
19934, 19936, 19950, 19951, 19959, 22889, 22902, 22835, 22837);
UPDATE `creature_template` SET `ScriptName` = 'npc_ipp_aq' WHERE `entry` IN (15293,15270,15306,15191,15181,15182,15306,15599,15282,15183,15194,15176,15270,16091,15701,15612,15613,15609,15540,15704,15693,15431,15903,15610,15180, 15499);
UPDATE `creature_template` SET `ScriptName` = 'npc_ipp_aq' WHERE `entry` IN (15293,15270,15306,15191,15181,15182,15306,15599,15282,15183,15194,15176,15270,16091,15701,15612,15613,15540,15704,15693,15431,15903,15180, 15499);
# Two Cenarion Scouts - 15609 and 15610 - should be in this progression but they have some quest AI that we don't want to override, so leave them for now
# TODO: This is currently override SmartAI for the RP dialog of these NPCs
# We will need a custom script to hide them and keep the dialog working properly
UPDATE `creature_template` SET `ScriptName` = 'npc_ipp_naxx40' WHERE `entry` IN (11102, 16113, 16112, 16115, 16116, 16131, 16132, 16133, 16134, 16135, 16114, 16376, 16212, 16225, 16228, 16229,
16256, 16283, 16284, 16378);
UPDATE `creature_template` SET `ScriptName` = 'npc_ipp_wotlk' WHERE `entry` IN (29611, 27616, 27618, 27619, 27620, 27624, 34084);
UPDATE `creature_template` SET `ScriptName` = 'npc_ipp_wotlk' WHERE `entry` IN (28602, 29611, 34084);
UPDATE `gameobject_template` SET `ScriptName` = 'gobject_ipp_tbc' WHERE `entry` IN (195141);

View File

@@ -10,43 +10,77 @@ UPDATE `creature_template` SET `minlevel` = 55, `maxlevel` = 55 WHERE `entry` IN
UPDATE `creature_template` SET `minlevel` = 60, `maxlevel` = 60 WHERE `entry` IN (28048, 29144);
UPDATE `creature_template` SET `minlevel` = 58, `maxlevel` = 58 WHERE `entry` IN (28049);
/* Orgrimmar Guards */
UPDATE `creature_template` SET `minlevel` = 60, `maxlevel` = 60 WHERE `entry` IN (23090);
UPDATE `creature_template` SET `minlevel` = 55, `maxlevel` = 55 WHERE `entry` IN (31564, 31416, 31431);
/* Undercity NPCs */
UPDATE `creature_template` SET `minlevel` = 60, `maxlevel` = 60 WHERE `entry` IN (36224, 36225, 36226);
/* Blood Knight Honor Guard */
UPDATE `creature_template` SET `minlevel` = 60, `maxlevel` = 60 WHERE `entry` IN (23131);
/* Locksmiths */
UPDATE `creature_template` SET `minlevel` = 55, `maxlevel` = 55 WHERE `entry` IN (29725, 29728);
/* Event vendors */
UPDATE `creature_template` SET `minlevel` = 35, `maxlevel` = 35 WHERE `entry` IN (34382, 34383, 34653, 38065, 32798, 32799, 26124,
23486, 23710, 26221, 25909, 25925, 25941, 27215,
25944, 34382, 34383, 34653, 34654, 38065);
25944, 34382, 34383, 34653, 34654, 38065, 24657,
24495, 27216, 25906, 25928, 25930, 25932);
UPDATE `creature_template` SET `minlevel` = 37, `maxlevel` = 37 WHERE `entry` IN (25915, 25920);
UPDATE `creature_template` SET `minlevel` = 37, `maxlevel` = 37 WHERE `entry` IN (25915, 25920, 25914, 25916, 25917, 25919, 25921, 25922);
UPDATE `creature_template` SET `minlevel` = 30, `maxlevel` = 37 WHERE `entry` IN (26123, 26124);
UPDATE `creature_template` SET `minlevel` = 32, `maxlevel` = 37 WHERE `entry` IN (25975, 25920);
UPDATE `creature_template` SET `minlevel` = 55, `maxlevel` = 55 WHERE `entry` IN (37671);
/* Karazhan Quest NPCs */
UPDATE `creature_template` SET `minlevel` = 60, `maxlevel` = 60, `ScriptName`='npc_ipp_tbc' WHERE `entry` IN (17613);
UPDATE `creature_template` SET `minlevel` = 59, `maxlevel` = 59, `ScriptName`='npc_ipp_tbc' WHERE `entry` IN (18253);
UPDATE `creature_template` SET `minlevel` = 59, `maxlevel` = 59, `ScriptName`='npc_ipp_tbc' WHERE `entry` IN (18253); # TODO: This is currently overriding some SmartAI and needs a custom fix
UPDATE `creature_template` SET `minlevel` = 58, `maxlevel` = 58, `ScriptName`='npc_ipp_tbc' WHERE `entry` IN (18255);
/* Arena NPCs */
UPDATE `creature_template` SET `minlevel` = 60, `maxlevel` = 60, `ScriptName`='npc_ipp_tbc' WHERE `entry` IN
(19915, 19909, 19911, 26012, 26007, 26075, 26307, 26309, 26760);
(19915, 19909, 19911, 26012, 26007, 26075, 26307, 26309, 26760, 19912, 19859, 19860, 19861, 21448, 20499, 20497,
34093, 20278, 33939, 33935, 33934, 30610, 30611, 32407, 32385, 32832, 32383, 33924, 34090, 33928, 33929, 33915,
34088, 33920, 33917);
/* WotLK Arena NPCs */
UPDATE `creature_template` SET `minlevel` = 60, `maxlevel` = 60, `ScriptName`='npc_ipp_wotlk' WHERE `entry` IN
(34060, 34063, 34038);
/* PvP Vendors */
UPDATE `creature_template` SET `minlevel` = 55, `maxlevel` = 55 WHERE `entry` IN (32834, 34075, 34078, 34081);
/* Wintergrasp NPCs */
UPDATE `creature_template` SET `minlevel` = 60, `maxlevel` = 60, `ScriptName`='npc_ipp_wotlk' WHERE `entry` IN (35611, 35598, 35600);
/* Wintergrasp NPCs - These have custom phasing set in their script so we do not need to change the ScriptName*/
UPDATE `creature_template` SET `minlevel` = 60, `maxlevel` = 60 WHERE `entry` IN (35611, 35598, 35600, 35599, 35603, 35602);
/* Battlemasters */
UPDATE `creature_template` SET `minlevel` = 60, `maxlevel` = 60 WHERE `entry` IN (34997, 34998, 35007, 34991, 30578, 30579, 30583, 35021, 35024, 35025, 35598, 35600, 35611);
UPDATE `creature_template` SET `minlevel` = 60, `maxlevel` = 60 WHERE `entry` IN (34997, 34998, 35007, 34991, 30578, 30579, 30583, 35021, 35024, 35025, 35598,
35600, 35611, 34988, 34978, 34976, 35008, 34955, 35023, 30580, 30582, 35017, 20385, 35020, 20388);
UPDATE `creature_template` SET `minlevel` = 59, `maxlevel` = 59 WHERE `entry` IN (19848);
UPDATE `creature_template` SET `minlevel` = 51, `maxlevel` = 51 WHERE `entry` IN (20374, 20381, 20386);
UPDATE `creature_template` SET `minlevel` = 51, `maxlevel` = 51 WHERE `entry` IN (20374, 20381, 20386, 20383);
/* New flightmasters */
UPDATE `creature_template` SET `minlevel` = 55, `maxlevel` = 55 WHERE `entry` IN (24366, 37888, 29480, 37915);
UPDATE `creature_template` SET `minlevel` = 55, `maxlevel` = 55 WHERE `entry` IN (24366, 37888, 29480, 37915, 23612, 22935, 22931, 40204, 31426);
/* Alicia */
UPDATE `creature_template` SET `minlevel` = 5, `maxlevel` = 5 WHERE `entry` IN (24729);
/* Don Carlos */
UPDATE `creature_template` SET `minlevel` = 58, `maxlevel` = 58 WHERE `entry` IN (28126);
/* Sentinel Stillbough */
UPDATE `creature_template` SET `minlevel` = 55, `maxlevel` = 55 WHERE `entry` IN (36481);
/* Rukua - Draenei Paladin Trainer in Darnassus */
UPDATE `creature_template` SET `minlevel` = 60, `maxlevel` = 60 WHERE `entry` IN (35281);
/* Boat Crews */
UPDATE `creature_template` SET `minlevel` = 45, `maxlevel` = 45 WHERE `entry` IN (25019, 25020, 24993, 24995, 25051, 25052);
UPDATE `creature_template` SET `minlevel` = 50, `maxlevel` = 50 WHERE `entry` IN (25025, 24456, 25050);
UPDATE `creature_template` SET `minlevel` = 55, `maxlevel` = 55 WHERE `entry` IN (25089, 24841, 24842, 25021, 25022, 25023, 25024, 24996, 24997, 25007, 25054, 25055, 25056);
UPDATE `creature_template` SET `minlevel` = 60, `maxlevel` = 60 WHERE `entry` IN (31788, 31763);
UPDATE `creature_template` SET `minlevel` = 52, `maxlevel` = 52 WHERE `entry` IN (31791, 31792, 31793, 31759, 31760, 31761);
UPDATE `creature_template` SET `minlevel` = 54, `maxlevel` = 54 WHERE `entry` IN (31790, 31762);
UPDATE `creature_template` SET `minlevel` = 56, `maxlevel` = 56 WHERE `entry` IN (31789, 31764);

View File

@@ -30,6 +30,7 @@ void AddSC_boss_razuvious_40();
void AddSC_boss_sapphiron_40();
void AddSC_boss_thaddius_40();
void AddSC_npc_omarion();
void AddSC_Ipp_Wotlk_Modded_Scripts();
void Addmod_individual_progressionScripts()
@@ -61,5 +62,6 @@ void Addmod_individual_progressionScripts()
AddSC_boss_sapphiron_40();
AddSC_boss_thaddius_40();
AddSC_npc_omarion();
AddSC_Ipp_Wotlk_Modded_Scripts();
}

View File

@@ -0,0 +1,167 @@
#include "IndividualProgression.h"
#include "Battlefield.h"
#include "BattlefieldMgr.h"
#include "ScriptedGossip.h"
#include "GameTime.h"
enum eWGqueuenpctext
{
WG_NPCQUEUE_TEXT_H_NOWAR = 14775,
WG_NPCQUEUE_TEXT_H_QUEUE = 14790,
WG_NPCQUEUE_TEXT_H_WAR = 14777,
WG_NPCQUEUE_TEXT_A_NOWAR = 14782,
WG_NPCQUEUE_TEXT_A_QUEUE = 14791,
WG_NPCQUEUE_TEXT_A_WAR = 14781,
WG_NPCQUEUE_TEXTOPTION_JOIN = -1850507,
WG_GOSSIP_MENU_QUEUE = 10662,
};
enum eWgQueue
{
EVENT_ARCANIST_BRAEDIN_YELL = 1,
EVENT_MAGISTER_SURDIEL_YELL = 2,
EVENT_SPELL_FROST_ARMOR = 3,
SAY_ARCANIST_BRAEDIN = 0,
SAY_MAGISTER_SURDIEL = 0,
NPC_ARCANIST_BRAEDIN = 32169,
NPC_MAGISTER_SURDIEL = 32170,
SPELL_FROST_ARMOR = 31256
};
class npc_wg_queue_ipp : public CreatureScript
{
public:
npc_wg_queue_ipp() : CreatureScript("npc_wg_queue") { }
bool OnGossipHello(Player* player, Creature* creature) override
{
if (!sWorld->getBoolConfig(CONFIG_MINIGOB_MANABONK))
return false;
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
if (!wintergrasp)
return true;
if (wintergrasp->IsWarTime())
{
AddGossipItemFor(player, WG_GOSSIP_MENU_QUEUE, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
SendGossipMenuFor(player, wintergrasp->GetDefenderTeam() ? WG_NPCQUEUE_TEXT_H_WAR : WG_NPCQUEUE_TEXT_A_WAR, creature->GetGUID());
}
else
{
uint32 timer = wintergrasp->GetTimer() / 1000;
player->SendUpdateWorldState(4354, GameTime::GetGameTime().count() + timer);
if (timer < 15 * MINUTE)
{
AddGossipItemFor(player, WG_GOSSIP_MENU_QUEUE, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
SendGossipMenuFor(player, wintergrasp->GetDefenderTeam() ? WG_NPCQUEUE_TEXT_H_QUEUE : WG_NPCQUEUE_TEXT_A_QUEUE, creature->GetGUID());
}
else
SendGossipMenuFor(player, wintergrasp->GetDefenderTeam() ? WG_NPCQUEUE_TEXT_H_NOWAR : WG_NPCQUEUE_TEXT_A_NOWAR, creature->GetGUID());
}
return true;
}
bool OnGossipSelect(Player* player, Creature* /*creature */, uint32 /*sender */, uint32 /*action*/) override
{
CloseGossipMenuFor(player);
Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
if (!wintergrasp)
return true;
if (wintergrasp->IsWarTime())
wintergrasp->InvitePlayerToWar(player);
else
{
uint32 timer = wintergrasp->GetTimer() / 1000;
if (timer < 15 * MINUTE)
wintergrasp->InvitePlayerToQueue(player);
}
return true;
}
struct npc_wg_queue_ippAI : public ScriptedAI
{
npc_wg_queue_ippAI(Creature* creature) : ScriptedAI(creature)
{
if (creature->GetEntry() == NPC_ARCANIST_BRAEDIN)
events.ScheduleEvent(EVENT_ARCANIST_BRAEDIN_YELL, 0);
else if (creature->GetEntry() == NPC_MAGISTER_SURDIEL)
events.ScheduleEvent(EVENT_MAGISTER_SURDIEL_YELL, 0);
events.ScheduleEvent(EVENT_SPELL_FROST_ARMOR, 0);
}
bool CanBeSeen(Player const* player) override
{
if (player->IsGameMaster())
{
return true;
}
Player* target = ObjectAccessor::FindConnectedPlayer(player->GetGUID());
return target->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value >= PROGRESSION_TBC_TIER_5;
}
EventMap events;
void UpdateAI(uint32 diff) override
{
if (!sWorld->getBoolConfig(CONFIG_WINTERGRASP_ENABLE))
return;
ScriptedAI::UpdateAI(diff);
events.Update(diff);
switch (events.ExecuteEvent())
{
case EVENT_ARCANIST_BRAEDIN_YELL:
if (Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG))
{
if (wintergrasp->IsWarTime())
{
Talk(SAY_ARCANIST_BRAEDIN);
events.ScheduleEvent(EVENT_ARCANIST_BRAEDIN_YELL, 240000);
break;
}
}
events.ScheduleEvent(EVENT_ARCANIST_BRAEDIN_YELL, 5000);
break;
case EVENT_MAGISTER_SURDIEL_YELL:
if (Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG))
{
uint32 timer = wintergrasp->GetTimer() / 1000;
if (!wintergrasp->IsWarTime() && timer < 5 * MINUTE && timer > 4 * MINUTE)
{
Talk(SAY_MAGISTER_SURDIEL);
events.ScheduleEvent(EVENT_MAGISTER_SURDIEL_YELL, 300000);
break;
}
}
events.ScheduleEvent(EVENT_MAGISTER_SURDIEL_YELL, 5000);
break;
case EVENT_SPELL_FROST_ARMOR:
me->CastSpell(me, SPELL_FROST_ARMOR, true);
events.ScheduleEvent(EVENT_SPELL_FROST_ARMOR, 900000);
break;
}
}
};
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_wg_queue_ippAI(creature);
}
};
void AddSC_Ipp_Wotlk_Modded_Scripts()
{
new npc_wg_queue_ipp();
}