fix(Scripts/Misc): Adjust points from old wrong 0 based indexing to smart ai indexing (#23472)

This commit is contained in:
killerwife
2025-10-30 10:44:34 +01:00
committed by GitHub
parent fdf19f1cf7
commit a8976aa6e7
22 changed files with 52 additions and 49 deletions

View File

@@ -0,0 +1,3 @@
-- Adjusts events previously ordered from 0 wrongly
UPDATE `smart_scripts` SET `event_param2` = `event_param2` +1 WHERE `event_type` =34 AND `event_param1` = 2 AND `entryorguid` IN (-158029, -158021, -158000, -148360, -148268, -139547 ,-139546, -139539, -139538, -139533, -139532);

View File

@@ -234,7 +234,7 @@ public:
{
switch (id)
{
case 5:
case 6:
events.ScheduleEvent(EVENT_TELEPORT_1, 2s);
break;
}

View File

@@ -44,7 +44,7 @@ public:
void MovementInform(uint32 type, uint32 id) override
{
if (type != WAYPOINT_MOTION_TYPE || id != 12)
if (type != WAYPOINT_MOTION_TYPE || id != 13)
{
return;
}

View File

@@ -592,12 +592,12 @@ struct boss_nefarian : public BossAI
return;
}
if (id == 3)
if (id == 4)
{
Talk(SAY_INTRO);
}
if (id == 5)
if (id == 6)
{
DoCastAOE(SPELL_SHADOWFLAME_INITIAL);
Talk(SAY_SHADOWFLAME);

View File

@@ -64,12 +64,12 @@ enum Koltira
//NPC_DEATH_KNIGHT_MOUNT = 29201,
MODEL_DEATH_KNIGHT_MOUNT = 25278,
POINT_STAND_UP = 0,
POINT_BOX = 1,
POINT_ANTI_MAGIC_ZONE = 2,
POINT_STAND_UP = 1,
POINT_BOX = 2,
POINT_ANTI_MAGIC_ZONE = 3,
POINT_MOUNT = 0,
POINT_DESPAWN = 1
POINT_MOUNT = 1,
POINT_DESPAWN = 2
};
class npc_koltira_deathweaver : public CreatureScript

View File

@@ -56,7 +56,7 @@ enum Events
enum Misc
{
WEAPON_KIRTONOS_STAFF = 11365,
POINT_KIRTONOS_LAND = 13,
POINT_KIRTONOS_LAND = 14,
KIRTONOS_PATH = 105061,
EMOTE_SUMMONED = 0

View File

@@ -486,7 +486,7 @@ struct npc_harrison_jones : public ScriptedAI
void MovementInform(uint32 type, uint32 id) override
{
// at gong
if (type == WAYPOINT_MOTION_TYPE && id == 2 && _phase == PHASE_GONG)
if (type == WAYPOINT_MOTION_TYPE && id == 3 && _phase == PHASE_GONG)
{
if (GameObject* gong = _instance->GetGameObject(DATA_STRANGE_GONG))
me->SetFacingToObject(gong);
@@ -503,13 +503,13 @@ struct npc_harrison_jones : public ScriptedAI
});
}
// to the massive gate
else if (type == WAYPOINT_MOTION_TYPE && id == 1 && _phase == PHASE_GATE_CLOSED)
else if (type == WAYPOINT_MOTION_TYPE && id == 2 && _phase == PHASE_GATE_CLOSED)
{
me->SetEntry(NPC_HARRISON_JONES_1);
Talk(SAY_HARRISON_2);
}
// at massive gate
else if (type == WAYPOINT_MOTION_TYPE && id == 2 && _phase == PHASE_GATE_CLOSED)
else if (type == WAYPOINT_MOTION_TYPE && id == 3 && _phase == PHASE_GATE_CLOSED)
{
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
Talk(SAY_HARRISON_3);
@@ -599,7 +599,7 @@ struct npc_amanishi_lookout : public NullCreatureAI
void MovementInform(uint32 type, uint32 id) override
{
// at boss
if (type == WAYPOINT_MOTION_TYPE && id == 8) // should despawn with waypoint script
if (type == WAYPOINT_MOTION_TYPE && id == 9) // should despawn with waypoint script
me->DespawnOrUnsummon(0s, 0s);
}
private:

View File

@@ -80,7 +80,7 @@ enum Misc
MODEL_OHGAN_MOUNT = 15271,
PATH_MANDOKIR = 492861,
POINT_MANDOKIR_END = 24,
POINT_MANDOKIR_END = 25,
CHAINED_SPIRIT_COUNT = 20,
ACTION_CHARGE = 1
};

View File

@@ -149,13 +149,13 @@ struct npc_sentinel_leader : public ScriptedAI
{
switch (id)
{
case 1:
case 4:
case 7:
case 2:
case 5:
case 8:
case 13:
case 9:
case 14:
case 17:
case 15:
case 18:
Creature* SentinelSpy = me->FindNearestCreature(NPC_SENTINEL_SPY, 2.0f, true);
if (SentinelSpy)
{
@@ -282,10 +282,10 @@ struct npc_sentinel_infiltrator : public ScriptedAI
case PATH_ONE:
switch (id)
{
case 5:
case 8:
case 14:
case 18:
case 6:
case 9:
case 15:
case 19:
Creature* SentinelInfiltrator = me->FindNearestCreature(NPC_SENTINEL_INFILTRATOR, 3.5f, true);
if (SentinelInfiltrator)
{
@@ -299,10 +299,10 @@ struct npc_sentinel_infiltrator : public ScriptedAI
case PATH_TWO:
switch (id)
{
case 5:
case 7:
case 14:
case 17:
case 6:
case 8:
case 15:
case 18:
Creature* SentinelInfiltrator = me->FindNearestCreature(NPC_SENTINEL_INFILTRATOR, 3.5f, true);
if (SentinelInfiltrator)
{

View File

@@ -1085,9 +1085,9 @@ struct boss_headless_horseman : public ScriptedAI
{
if (type == WAYPOINT_MOTION_TYPE)
{
if (point == 0)
if (point == 1)
me->CastSpell(me, SPELL_HEAD_VISUAL, true);
else if (point == 11)
else if (point == 12)
{
me->ReplaceAllUnitFlags(UNIT_FLAG_NONE);
me->StopMoving();

View File

@@ -114,10 +114,10 @@ struct boss_lieutenant_drake : public BossAI
{
switch (point)
{
case 7:
case 8:
Talk(SAY_ENTER);
break;
case 10:
case 11:
pathId = (me->GetEntry() * 10) + 1;
runSecondPath = true;
break;

View File

@@ -51,7 +51,7 @@ enum Belnistrasz
EVENT_FROST_NOVA = 6,
PATH_ESCORT = 871710,
POINT_REACH_IDOL = 17,
POINT_REACH_IDOL = 18,
QUEST_EXTINGUISHING_THE_IDOL = 3525,

View File

@@ -70,7 +70,7 @@ enum Emotes
enum Points
{
POINT_AIR = 0,
POINT_GROUND = 2,
POINT_GROUND = 3,
POINT_PARALYZE = 2
};

View File

@@ -130,9 +130,9 @@ enum Misc
ACTION_DRAKE_DIED = 3,
// Movement points
POINT_FINAL_TENEBRON = 8,
POINT_FINAL_SHADRON = 4,
POINT_FINAL_VESPERON = 4,
POINT_FINAL_TENEBRON = 9,
POINT_FINAL_SHADRON = 5,
POINT_FINAL_VESPERON = 5,
// Lava directions. Its used to identify to which side lava was moving by last time
LAVA_LEFT_SIDE = 0,

View File

@@ -1200,16 +1200,16 @@ public:
switch (id)
{
case 0:
case 1:
Talk(me->GetEntry() == NPC_JAINA_PART2 ? SAY_JAINA_OUTRO_2 : SAY_SYLVANAS_OUTRO_2);
break;
case 1:
case 2:
if (me->GetEntry() == NPC_JAINA_PART2)
{
Talk(SAY_JAINA_OUTRO_3);
}
break;
case 6:
case 7:
me->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
if (GameObject* g = me->FindNearestGameObject(GO_HOR_PORTCULLIS, 50.0f))
g->SetGoState(GO_STATE_ACTIVE);

View File

@@ -95,7 +95,7 @@ enum EnslavedProtoDrake
SPELL_FLAME_BREATH = 50653,
SPELL_KNOCK_AWAY = 49722,
POINT_LAST = 5,
POINT_LAST = 6,
};
const Position protodrakeCheckPos = {206.24f, -190.28f, 200.11f, 0.f};

View File

@@ -1652,7 +1652,7 @@ public:
void MovementInform(uint32 type, uint32 param) override
{
if (type == WAYPOINT_MOTION_TYPE && param == 2)
if (type == WAYPOINT_MOTION_TYPE && param == 3)
{
me->SetWalk(false);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY1H);
@@ -2024,7 +2024,7 @@ public:
void MovementInform(uint32 type, uint32 param) override
{
if (type == WAYPOINT_MOTION_TYPE && param == 2)
if (type == WAYPOINT_MOTION_TYPE && param == 3)
{
if (me->IsSummon())
{

View File

@@ -622,7 +622,7 @@ public:
if (type != WAYPOINT_MOTION_TYPE)
return;
if (point == 8) // max-1
if (point == 9)
{
Talk(0);
me->RemoveAllAuras();

View File

@@ -904,7 +904,7 @@ struct npc_akama_illidan : public ScriptedAI
else if (type == WAYPOINT_MOTION_TYPE)
{
if (me->GetCurrentWaypointID() == PATH_AKAMA_MINIONS)
if (id == 2)
if (id == 3)
DoCastSelf(SPELL_AKAMA_TELEPORT);
}
}

View File

@@ -81,8 +81,8 @@ enum Misc
enum WaterElementalPathIds
{
PATH_CENTER = 5,
PATH_END = 12
PATH_CENTER = 6,
PATH_END = 13
};
struct boss_hydross_the_unstable : public BossAI

View File

@@ -92,7 +92,7 @@ struct boss_ghazan : public BossAI
void MovementInform(uint32 type, uint32 pointId) override
{
if (!_movedToPlatform || type != WAYPOINT_MOTION_TYPE || pointId != 19)
if (!_movedToPlatform || type != WAYPOINT_MOTION_TYPE || pointId != 20)
{
return;
}

View File

@@ -43,7 +43,7 @@ enum Says
enum Misc
{
POINT_SCOUT_WP_END = 3,
POINT_SCOUT_WP_END = 4,
SET_DATA_ARBITRARY_VALUE = 1,
SET_DATA_ENCOUNTER_DONE = 2