diff options
author | Discover- <amort11@hotmail.com> | 2012-03-03 23:41:29 +0100 |
---|---|---|
committer | Discover- <amort11@hotmail.com> | 2012-03-03 23:41:29 +0100 |
commit | c4fd6b89dba06ad8e42065f8aebeb8101d4ccaab (patch) | |
tree | a1beb9c201864d03034124c16a52e045f5b4c063 | |
parent | d21179ab56f80c14982b0753c19e6fdc7ffc9503 (diff) |
Core/SAI: SMART_ACTION_MOVE_TO_POS will now have param1 as PointId. This means you can now (properly) use SMART_EVENT_MOVEMENTINFORM when reaching the point you make the NPC move to.
Wiki is updated accordingly.
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 6 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.h | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 80ded6681c9..0523f59da5d 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1373,10 +1373,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u target = targets->front(); } - if(!target) - me->GetMotionMaster()->MovePoint(0, e.target.x, e.target.y, e.target.z); + if (!target) + me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, e.target.x, e.target.y, e.target.z); else - me->GetMotionMaster()->MovePoint(0, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()); + me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()); break; } case SMART_ACTION_RESPAWN_TARGET: diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 9af0c4de9fc..007b57b52d7 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -441,7 +441,7 @@ enum SMART_ACTION SMART_ACTION_CREATE_TIMED_EVENT = 67, // id, InitialMin, InitialMax, RepeatMin(only if it repeats), RepeatMax(only if it repeats), chance SMART_ACTION_PLAYMOVIE = 68, // entry - SMART_ACTION_MOVE_TO_POS = 69, // xyz + SMART_ACTION_MOVE_TO_POS = 69, // PointId, xyz SMART_ACTION_RESPAWN_TARGET = 70, // SMART_ACTION_EQUIP = 71, // entry, slotmask slot1, slot2, slot3 , only slots with mask set will be sent to client, bits are 1, 2, 4, leaving mask 0 is defaulted to mask 7 (send all), slots1-3 are only used if no entry is set SMART_ACTION_CLOSE_GOSSIP = 72, // none @@ -874,6 +874,11 @@ struct SmartAction struct { + uint8 pointId; + } MoveToPos; + + struct + { uint32 gossipMenuId; uint32 gossipNpcTextId; } sendGossipMenu; |