mirror of
https://github.com/mangosfour/server.git
synced 2025-12-31 22:37:05 +00:00
[11947] Improve SCRIPT_COMMAND_MOVE_TO
This changes the handling of SCRIPT_COMMAND_MOVE_TO, to not expect some travel-time, but directly provide the speed for the movement (*100). Attention to DB-Devs, please check your MOVE_TO scripts. Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
78b0ffe4eb
commit
ea08f7c5d7
7 changed files with 42 additions and 13 deletions
|
|
@ -48,7 +48,8 @@ enum ScriptCommand // resSource, resTar
|
|||
SCRIPT_COMMAND_EMOTE = 1, // resSource = Unit, resTarget = Unit/none
|
||||
// datalong1 = emote_id
|
||||
SCRIPT_COMMAND_FIELD_SET = 2, // source = any, datalong3 = field_id, datalong2 = value
|
||||
SCRIPT_COMMAND_MOVE_TO = 3, // resSource = Creature, datalong2 = time, x/y/z
|
||||
SCRIPT_COMMAND_MOVE_TO = 3, // resSource = Creature, datalong2 = travel_speed*100, x/y/z
|
||||
// data_flags & SCRIPT_FLAG_COMMAND_ADDITIONAL: teleport unit to position
|
||||
SCRIPT_COMMAND_FLAG_SET = 4, // source = any, datalong3 = field_id, datalong2 = bitmask
|
||||
SCRIPT_COMMAND_FLAG_REMOVE = 5, // source = any, datalong3 = field_id, datalong2 = bitmask
|
||||
SCRIPT_COMMAND_TELEPORT_TO = 6, // source or target with Player, datalong2 = map_id, x/y/z
|
||||
|
|
@ -128,7 +129,7 @@ struct ScriptInfo
|
|||
struct // SCRIPT_COMMAND_MOVE_TO (3)
|
||||
{
|
||||
uint32 unused1; // datalong
|
||||
uint32 travelTime; // datalong2
|
||||
uint32 travelSpeed; // datalong2
|
||||
} moveTo;
|
||||
|
||||
struct // SCRIPT_COMMAND_FLAG_SET (4)
|
||||
|
|
@ -334,6 +335,7 @@ struct ScriptInfo
|
|||
{
|
||||
switch (command)
|
||||
{
|
||||
case SCRIPT_COMMAND_MOVE_TO:
|
||||
case SCRIPT_COMMAND_TEMP_SUMMON_CREATURE:
|
||||
case SCRIPT_COMMAND_CAST_SPELL:
|
||||
case SCRIPT_COMMAND_MORPH_TO_ENTRY_OR_MODEL:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue