mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Scripts/Misc): Adjust points from old wrong 0 based indexing to smart ai indexing (#23472)
This commit is contained in:
@@ -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);
|
||||||
@@ -234,7 +234,7 @@ public:
|
|||||||
{
|
{
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case 5:
|
case 6:
|
||||||
events.ScheduleEvent(EVENT_TELEPORT_1, 2s);
|
events.ScheduleEvent(EVENT_TELEPORT_1, 2s);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public:
|
|||||||
|
|
||||||
void MovementInform(uint32 type, uint32 id) override
|
void MovementInform(uint32 type, uint32 id) override
|
||||||
{
|
{
|
||||||
if (type != WAYPOINT_MOTION_TYPE || id != 12)
|
if (type != WAYPOINT_MOTION_TYPE || id != 13)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -592,12 +592,12 @@ struct boss_nefarian : public BossAI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id == 3)
|
if (id == 4)
|
||||||
{
|
{
|
||||||
Talk(SAY_INTRO);
|
Talk(SAY_INTRO);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id == 5)
|
if (id == 6)
|
||||||
{
|
{
|
||||||
DoCastAOE(SPELL_SHADOWFLAME_INITIAL);
|
DoCastAOE(SPELL_SHADOWFLAME_INITIAL);
|
||||||
Talk(SAY_SHADOWFLAME);
|
Talk(SAY_SHADOWFLAME);
|
||||||
|
|||||||
@@ -64,12 +64,12 @@ enum Koltira
|
|||||||
//NPC_DEATH_KNIGHT_MOUNT = 29201,
|
//NPC_DEATH_KNIGHT_MOUNT = 29201,
|
||||||
MODEL_DEATH_KNIGHT_MOUNT = 25278,
|
MODEL_DEATH_KNIGHT_MOUNT = 25278,
|
||||||
|
|
||||||
POINT_STAND_UP = 0,
|
POINT_STAND_UP = 1,
|
||||||
POINT_BOX = 1,
|
POINT_BOX = 2,
|
||||||
POINT_ANTI_MAGIC_ZONE = 2,
|
POINT_ANTI_MAGIC_ZONE = 3,
|
||||||
|
|
||||||
POINT_MOUNT = 0,
|
POINT_MOUNT = 1,
|
||||||
POINT_DESPAWN = 1
|
POINT_DESPAWN = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
class npc_koltira_deathweaver : public CreatureScript
|
class npc_koltira_deathweaver : public CreatureScript
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ enum Events
|
|||||||
enum Misc
|
enum Misc
|
||||||
{
|
{
|
||||||
WEAPON_KIRTONOS_STAFF = 11365,
|
WEAPON_KIRTONOS_STAFF = 11365,
|
||||||
POINT_KIRTONOS_LAND = 13,
|
POINT_KIRTONOS_LAND = 14,
|
||||||
KIRTONOS_PATH = 105061,
|
KIRTONOS_PATH = 105061,
|
||||||
|
|
||||||
EMOTE_SUMMONED = 0
|
EMOTE_SUMMONED = 0
|
||||||
|
|||||||
@@ -486,7 +486,7 @@ struct npc_harrison_jones : public ScriptedAI
|
|||||||
void MovementInform(uint32 type, uint32 id) override
|
void MovementInform(uint32 type, uint32 id) override
|
||||||
{
|
{
|
||||||
// at gong
|
// 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))
|
if (GameObject* gong = _instance->GetGameObject(DATA_STRANGE_GONG))
|
||||||
me->SetFacingToObject(gong);
|
me->SetFacingToObject(gong);
|
||||||
@@ -503,13 +503,13 @@ struct npc_harrison_jones : public ScriptedAI
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
// to the massive gate
|
// 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);
|
me->SetEntry(NPC_HARRISON_JONES_1);
|
||||||
Talk(SAY_HARRISON_2);
|
Talk(SAY_HARRISON_2);
|
||||||
}
|
}
|
||||||
// at massive gate
|
// 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);
|
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
|
||||||
Talk(SAY_HARRISON_3);
|
Talk(SAY_HARRISON_3);
|
||||||
@@ -599,7 +599,7 @@ struct npc_amanishi_lookout : public NullCreatureAI
|
|||||||
void MovementInform(uint32 type, uint32 id) override
|
void MovementInform(uint32 type, uint32 id) override
|
||||||
{
|
{
|
||||||
// at boss
|
// 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);
|
me->DespawnOrUnsummon(0s, 0s);
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ enum Misc
|
|||||||
|
|
||||||
MODEL_OHGAN_MOUNT = 15271,
|
MODEL_OHGAN_MOUNT = 15271,
|
||||||
PATH_MANDOKIR = 492861,
|
PATH_MANDOKIR = 492861,
|
||||||
POINT_MANDOKIR_END = 24,
|
POINT_MANDOKIR_END = 25,
|
||||||
CHAINED_SPIRIT_COUNT = 20,
|
CHAINED_SPIRIT_COUNT = 20,
|
||||||
ACTION_CHARGE = 1
|
ACTION_CHARGE = 1
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -149,13 +149,13 @@ struct npc_sentinel_leader : public ScriptedAI
|
|||||||
{
|
{
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case 1:
|
case 2:
|
||||||
case 4:
|
case 5:
|
||||||
case 7:
|
|
||||||
case 8:
|
case 8:
|
||||||
case 13:
|
case 9:
|
||||||
case 14:
|
case 14:
|
||||||
case 17:
|
case 15:
|
||||||
|
case 18:
|
||||||
Creature* SentinelSpy = me->FindNearestCreature(NPC_SENTINEL_SPY, 2.0f, true);
|
Creature* SentinelSpy = me->FindNearestCreature(NPC_SENTINEL_SPY, 2.0f, true);
|
||||||
if (SentinelSpy)
|
if (SentinelSpy)
|
||||||
{
|
{
|
||||||
@@ -282,10 +282,10 @@ struct npc_sentinel_infiltrator : public ScriptedAI
|
|||||||
case PATH_ONE:
|
case PATH_ONE:
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case 5:
|
case 6:
|
||||||
case 8:
|
case 9:
|
||||||
case 14:
|
case 15:
|
||||||
case 18:
|
case 19:
|
||||||
Creature* SentinelInfiltrator = me->FindNearestCreature(NPC_SENTINEL_INFILTRATOR, 3.5f, true);
|
Creature* SentinelInfiltrator = me->FindNearestCreature(NPC_SENTINEL_INFILTRATOR, 3.5f, true);
|
||||||
if (SentinelInfiltrator)
|
if (SentinelInfiltrator)
|
||||||
{
|
{
|
||||||
@@ -299,10 +299,10 @@ struct npc_sentinel_infiltrator : public ScriptedAI
|
|||||||
case PATH_TWO:
|
case PATH_TWO:
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case 5:
|
case 6:
|
||||||
case 7:
|
case 8:
|
||||||
case 14:
|
case 15:
|
||||||
case 17:
|
case 18:
|
||||||
Creature* SentinelInfiltrator = me->FindNearestCreature(NPC_SENTINEL_INFILTRATOR, 3.5f, true);
|
Creature* SentinelInfiltrator = me->FindNearestCreature(NPC_SENTINEL_INFILTRATOR, 3.5f, true);
|
||||||
if (SentinelInfiltrator)
|
if (SentinelInfiltrator)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1085,9 +1085,9 @@ struct boss_headless_horseman : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (type == WAYPOINT_MOTION_TYPE)
|
if (type == WAYPOINT_MOTION_TYPE)
|
||||||
{
|
{
|
||||||
if (point == 0)
|
if (point == 1)
|
||||||
me->CastSpell(me, SPELL_HEAD_VISUAL, true);
|
me->CastSpell(me, SPELL_HEAD_VISUAL, true);
|
||||||
else if (point == 11)
|
else if (point == 12)
|
||||||
{
|
{
|
||||||
me->ReplaceAllUnitFlags(UNIT_FLAG_NONE);
|
me->ReplaceAllUnitFlags(UNIT_FLAG_NONE);
|
||||||
me->StopMoving();
|
me->StopMoving();
|
||||||
|
|||||||
@@ -114,10 +114,10 @@ struct boss_lieutenant_drake : public BossAI
|
|||||||
{
|
{
|
||||||
switch (point)
|
switch (point)
|
||||||
{
|
{
|
||||||
case 7:
|
case 8:
|
||||||
Talk(SAY_ENTER);
|
Talk(SAY_ENTER);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 11:
|
||||||
pathId = (me->GetEntry() * 10) + 1;
|
pathId = (me->GetEntry() * 10) + 1;
|
||||||
runSecondPath = true;
|
runSecondPath = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ enum Belnistrasz
|
|||||||
EVENT_FROST_NOVA = 6,
|
EVENT_FROST_NOVA = 6,
|
||||||
|
|
||||||
PATH_ESCORT = 871710,
|
PATH_ESCORT = 871710,
|
||||||
POINT_REACH_IDOL = 17,
|
POINT_REACH_IDOL = 18,
|
||||||
|
|
||||||
QUEST_EXTINGUISHING_THE_IDOL = 3525,
|
QUEST_EXTINGUISHING_THE_IDOL = 3525,
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ enum Emotes
|
|||||||
enum Points
|
enum Points
|
||||||
{
|
{
|
||||||
POINT_AIR = 0,
|
POINT_AIR = 0,
|
||||||
POINT_GROUND = 2,
|
POINT_GROUND = 3,
|
||||||
POINT_PARALYZE = 2
|
POINT_PARALYZE = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -130,9 +130,9 @@ enum Misc
|
|||||||
ACTION_DRAKE_DIED = 3,
|
ACTION_DRAKE_DIED = 3,
|
||||||
|
|
||||||
// Movement points
|
// Movement points
|
||||||
POINT_FINAL_TENEBRON = 8,
|
POINT_FINAL_TENEBRON = 9,
|
||||||
POINT_FINAL_SHADRON = 4,
|
POINT_FINAL_SHADRON = 5,
|
||||||
POINT_FINAL_VESPERON = 4,
|
POINT_FINAL_VESPERON = 5,
|
||||||
|
|
||||||
// Lava directions. Its used to identify to which side lava was moving by last time
|
// Lava directions. Its used to identify to which side lava was moving by last time
|
||||||
LAVA_LEFT_SIDE = 0,
|
LAVA_LEFT_SIDE = 0,
|
||||||
|
|||||||
@@ -1200,16 +1200,16 @@ public:
|
|||||||
|
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case 0:
|
case 1:
|
||||||
Talk(me->GetEntry() == NPC_JAINA_PART2 ? SAY_JAINA_OUTRO_2 : SAY_SYLVANAS_OUTRO_2);
|
Talk(me->GetEntry() == NPC_JAINA_PART2 ? SAY_JAINA_OUTRO_2 : SAY_SYLVANAS_OUTRO_2);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 2:
|
||||||
if (me->GetEntry() == NPC_JAINA_PART2)
|
if (me->GetEntry() == NPC_JAINA_PART2)
|
||||||
{
|
{
|
||||||
Talk(SAY_JAINA_OUTRO_3);
|
Talk(SAY_JAINA_OUTRO_3);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 7:
|
||||||
me->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
me->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||||
if (GameObject* g = me->FindNearestGameObject(GO_HOR_PORTCULLIS, 50.0f))
|
if (GameObject* g = me->FindNearestGameObject(GO_HOR_PORTCULLIS, 50.0f))
|
||||||
g->SetGoState(GO_STATE_ACTIVE);
|
g->SetGoState(GO_STATE_ACTIVE);
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ enum EnslavedProtoDrake
|
|||||||
SPELL_FLAME_BREATH = 50653,
|
SPELL_FLAME_BREATH = 50653,
|
||||||
SPELL_KNOCK_AWAY = 49722,
|
SPELL_KNOCK_AWAY = 49722,
|
||||||
|
|
||||||
POINT_LAST = 5,
|
POINT_LAST = 6,
|
||||||
};
|
};
|
||||||
|
|
||||||
const Position protodrakeCheckPos = {206.24f, -190.28f, 200.11f, 0.f};
|
const Position protodrakeCheckPos = {206.24f, -190.28f, 200.11f, 0.f};
|
||||||
|
|||||||
@@ -1652,7 +1652,7 @@ public:
|
|||||||
|
|
||||||
void MovementInform(uint32 type, uint32 param) override
|
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->SetWalk(false);
|
||||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY1H);
|
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY1H);
|
||||||
@@ -2024,7 +2024,7 @@ public:
|
|||||||
|
|
||||||
void MovementInform(uint32 type, uint32 param) override
|
void MovementInform(uint32 type, uint32 param) override
|
||||||
{
|
{
|
||||||
if (type == WAYPOINT_MOTION_TYPE && param == 2)
|
if (type == WAYPOINT_MOTION_TYPE && param == 3)
|
||||||
{
|
{
|
||||||
if (me->IsSummon())
|
if (me->IsSummon())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -622,7 +622,7 @@ public:
|
|||||||
if (type != WAYPOINT_MOTION_TYPE)
|
if (type != WAYPOINT_MOTION_TYPE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (point == 8) // max-1
|
if (point == 9)
|
||||||
{
|
{
|
||||||
Talk(0);
|
Talk(0);
|
||||||
me->RemoveAllAuras();
|
me->RemoveAllAuras();
|
||||||
|
|||||||
@@ -904,7 +904,7 @@ struct npc_akama_illidan : public ScriptedAI
|
|||||||
else if (type == WAYPOINT_MOTION_TYPE)
|
else if (type == WAYPOINT_MOTION_TYPE)
|
||||||
{
|
{
|
||||||
if (me->GetCurrentWaypointID() == PATH_AKAMA_MINIONS)
|
if (me->GetCurrentWaypointID() == PATH_AKAMA_MINIONS)
|
||||||
if (id == 2)
|
if (id == 3)
|
||||||
DoCastSelf(SPELL_AKAMA_TELEPORT);
|
DoCastSelf(SPELL_AKAMA_TELEPORT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,8 +81,8 @@ enum Misc
|
|||||||
|
|
||||||
enum WaterElementalPathIds
|
enum WaterElementalPathIds
|
||||||
{
|
{
|
||||||
PATH_CENTER = 5,
|
PATH_CENTER = 6,
|
||||||
PATH_END = 12
|
PATH_END = 13
|
||||||
};
|
};
|
||||||
|
|
||||||
struct boss_hydross_the_unstable : public BossAI
|
struct boss_hydross_the_unstable : public BossAI
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ struct boss_ghazan : public BossAI
|
|||||||
|
|
||||||
void MovementInform(uint32 type, uint32 pointId) override
|
void MovementInform(uint32 type, uint32 pointId) override
|
||||||
{
|
{
|
||||||
if (!_movedToPlatform || type != WAYPOINT_MOTION_TYPE || pointId != 19)
|
if (!_movedToPlatform || type != WAYPOINT_MOTION_TYPE || pointId != 20)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ enum Says
|
|||||||
|
|
||||||
enum Misc
|
enum Misc
|
||||||
{
|
{
|
||||||
POINT_SCOUT_WP_END = 3,
|
POINT_SCOUT_WP_END = 4,
|
||||||
|
|
||||||
SET_DATA_ARBITRARY_VALUE = 1,
|
SET_DATA_ARBITRARY_VALUE = 1,
|
||||||
SET_DATA_ENCOUNTER_DONE = 2
|
SET_DATA_ENCOUNTER_DONE = 2
|
||||||
|
|||||||
Reference in New Issue
Block a user