mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 19:13:49 +00:00
feat(Core/SmartAI): Add support for waypoint_data in SAI (#18706)
* Create rev_1712670662273633900.sql * eol? * doesn't like a comment at the end, ok, ok * init * mack * Update SmartScript.cpp * kurzel * random paths and garg * Update rev_1712889530436412200.sql * brend & marge * Update rev_1712889530436412200.sql * movement actions * Update SmartScriptMgr.h
This commit is contained in:
@@ -634,6 +634,9 @@ void SmartAI::MovementInform(uint32 MovementType, uint32 Data)
|
||||
if (MovementType == POINT_MOTION_TYPE && Data == SMART_ESCORT_LAST_OOC_POINT)
|
||||
me->ClearUnitState(UNIT_STATE_EVADE);
|
||||
|
||||
if (MovementType == WAYPOINT_MOTION_TYPE)
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_DATA_REACHED, nullptr, Data + 1); // Data + 1 to align smart_scripts and waypoint_data Id rows
|
||||
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_MOVEMENTINFORM, nullptr, MovementType, Data);
|
||||
if (!HasEscortState(SMART_ESCORT_ESCORTING))
|
||||
return;
|
||||
@@ -1150,6 +1153,11 @@ void SmartAI::OnSpellClick(Unit* clicker, bool& /*result*/)
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_ON_SPELLCLICK, clicker);
|
||||
}
|
||||
|
||||
void SmartAI::PathEndReached(uint32 pathId)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_DATA_ENDED, nullptr, 0, me->GetWaypointPath());
|
||||
}
|
||||
|
||||
void SmartGameObjectAI::SummonedCreatureDies(Creature* summon, Unit* /*killer*/)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_SUMMONED_UNIT_DIES, summon);
|
||||
|
||||
Reference in New Issue
Block a user