* Read Spline Movement part from Update Packets
Not used so far
This commit is contained in:
parent
af476c9595
commit
e41764e23c
@ -58,6 +58,37 @@ enum MovementFlags2
|
||||
MOVEMENTFLAG2_UNK10 = 0x8000,
|
||||
MOVEMENTFLAG2_INTERP_MASK = MOVEMENTFLAG2_INTERP_MOVEMENT | MOVEMENTFLAG2_INTERP_TURNING | MOVEMENTFLAG2_INTERP_PITCHING
|
||||
};
|
||||
|
||||
enum SplineFlags{
|
||||
SF_None = 0x00000000,
|
||||
// x00-xFF(first byte) used as animation Ids storage in pair with Animation flag
|
||||
SF_Done = 0x00000100,
|
||||
SF_Falling = 0x00000200, // Affects elevation computation, can't be combined with Parabolic flag
|
||||
SF_No_Spline = 0x00000400,
|
||||
SF_Parabolic = 0x00000800, // Affects elevation computation, can't be combined with Falling flag
|
||||
SF_Walkmode = 0x00001000,
|
||||
SF_Flying = 0x00002000, // Smooth movement(Catmullrom interpolation mode), flying animation
|
||||
SF_OrientationFixed = 0x00004000, // Model orientation fixed
|
||||
SF_Final_Point = 0x00008000,
|
||||
SF_Final_Target = 0x00010000,
|
||||
SF_Final_Angle = 0x00020000,
|
||||
SF_Catmullrom = 0x00040000, // Used Catmullrom interpolation mode
|
||||
SF_Cyclic = 0x00080000, // Movement by cycled spline
|
||||
SF_Enter_Cycle = 0x00100000, // Everytimes appears with cyclic flag in monster move packet, erases first spline vertex after first cycle done
|
||||
SF_Animation = 0x00200000, // Plays animation after some time passed
|
||||
SF_Frozen = 0x00400000, // Will never arrive
|
||||
SF_Unknown5 = 0x00800000,
|
||||
SF_Unknown6 = 0x01000000,
|
||||
SF_Unknown7 = 0x02000000,
|
||||
SF_Unknown8 = 0x04000000,
|
||||
SF_OrientationInversed = 0x08000000,
|
||||
SF_Unknown10 = 0x10000000,
|
||||
SF_Unknown11 = 0x20000000,
|
||||
SF_Unknown12 = 0x40000000,
|
||||
SF_Unknown13 = 0x80000000,
|
||||
};
|
||||
|
||||
|
||||
struct MovementInfo
|
||||
{
|
||||
static uint8 _c; //Version switch helper
|
||||
|
||||
@ -198,23 +198,23 @@ void WorldSession::_HandleUpdateObjectOpcode(WorldPacket& recvPacket)
|
||||
case UPDATETYPE_OUT_OF_RANGE_OBJECTS:
|
||||
{
|
||||
recvPacket >> usize;
|
||||
for(uint16 i=0;i<usize;i++)
|
||||
for(uint32 i=0;i<usize;i++)
|
||||
{
|
||||
uguid = recvPacket.readPackGUID(); // not 100% sure if this is correct
|
||||
logdebug("GUID "I64FMT" out of range",uguid);
|
||||
|
||||
// call script just before object removal
|
||||
if(GetInstance()->GetScripts()->ScriptExists("_onobjectdelete"))
|
||||
{
|
||||
Object *del_obj = objmgr.GetObj(uguid);
|
||||
CmdSet Set;
|
||||
Set.defaultarg = toString(uguid);
|
||||
Set.arg[0] = del_obj ? toString(del_obj->GetTypeId()) : "";
|
||||
Set.arg[1] = "true"; // out of range = true
|
||||
GetInstance()->GetScripts()->RunScript("_onobjectdelete", &Set);
|
||||
}
|
||||
|
||||
objmgr.Remove(uguid, false);
|
||||
// // call script just before object removal
|
||||
// if(GetInstance()->GetScripts()->ScriptExists("_onobjectdelete"))
|
||||
// {
|
||||
// Object *del_obj = objmgr.GetObj(uguid);
|
||||
// CmdSet Set;
|
||||
// Set.defaultarg = toString(uguid);
|
||||
// Set.arg[0] = del_obj ? toString(del_obj->GetTypeId()) : "";
|
||||
// Set.arg[1] = "true"; // out of range = true
|
||||
// GetInstance()->GetScripts()->RunScript("_onobjectdelete", &Set);
|
||||
// }
|
||||
//
|
||||
// objmgr.Remove(uguid, false);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -330,8 +330,27 @@ void WorldSession::_MovementUpdate(uint8 objtypeid, uint64 uguid, WorldPacket& r
|
||||
// TODO: correct this one as soon as its meaning is known OR if it appears often and needs to be fixed
|
||||
if(mi.flags & MOVEMENTFLAG_SPLINE_ENABLED)
|
||||
{
|
||||
logerror("MovementUpdate: MOVEMENTFLAG_SPLINE2 is set, if you see this message please report it!");
|
||||
return;
|
||||
logdev("MovementUpdate: MOVEMENTFLAG_SPLINE_ENABLED!");
|
||||
//checked for 3.3.5
|
||||
//We do not do anything with the spline stuff so far, it just needs to be read to be skipped correctly
|
||||
uint32 splineflags, timepassed, duration, id, effect_start_time, path_nodes;
|
||||
uint8 spline_mode;
|
||||
float facing_angle,facing_x,facing_y,facing_z, duration_mod, duration_next, vertical_acceleration;
|
||||
float x,y,z;
|
||||
uint64 facing_target;
|
||||
recvPacket >> splineflags;
|
||||
if(splineflags & SF_Final_Angle)
|
||||
recvPacket >> facing_angle;
|
||||
if(splineflags & SF_Final_Point)
|
||||
recvPacket >> facing_x >> facing_y >> facing_z;
|
||||
recvPacket >> timepassed >> duration >> id >> duration_mod >> duration_next >> vertical_acceleration >> effect_start_time;
|
||||
recvPacket >> path_nodes;
|
||||
for(uint32 i = 0;i<path_nodes;i++)
|
||||
{
|
||||
recvPacket >> x >> y >> z;
|
||||
}
|
||||
recvPacket >> spline_mode;
|
||||
recvPacket >> x >> y >> z; // FinalDestination
|
||||
}
|
||||
}
|
||||
else // !UPDATEFLAG_LIVING
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user