|
@@ -18,80 +18,108 @@
|
|
|
*/
|
|
|
package com.l2jserver.gameserver.network.serverpackets;
|
|
|
|
|
|
+import com.l2jserver.gameserver.model.actor.L2Character;
|
|
|
+
|
|
|
+/**
|
|
|
+ * Special Camera server packet implementation.
|
|
|
+ * @author Zoey76
|
|
|
+ */
|
|
|
public class SpecialCamera extends L2GameServerPacket
|
|
|
{
|
|
|
private final int _id;
|
|
|
- private final int _dist;
|
|
|
- private final int _yaw;
|
|
|
- private final int _pitch;
|
|
|
+ private final int _force;
|
|
|
+ private final int _angle1;
|
|
|
+ private final int _angle2;
|
|
|
private final int _time;
|
|
|
private final int _duration;
|
|
|
- private final int _turn;
|
|
|
- private final int _rise;
|
|
|
- private final int _widescreen;
|
|
|
- private final int _unknown;
|
|
|
+ private final int _relYaw;
|
|
|
+ private final int _relPitch;
|
|
|
+ private final int _isWide;
|
|
|
+ private final int _relAngle;
|
|
|
+ private final int _unk;
|
|
|
|
|
|
/**
|
|
|
- * @param id object Id
|
|
|
- * @param dist the distance to the object
|
|
|
- * @param yaw North = 90, South = 270, East = 0, West = 180
|
|
|
- * @param pitch > 0: looks up, pitch < 0: looks down (angle)
|
|
|
- * @param time faster if it's smaller
|
|
|
- * @param duration animation time
|
|
|
+ * Special Camera packet constructor.
|
|
|
+ * @param creature the creature
|
|
|
+ * @param force
|
|
|
+ * @param angle1
|
|
|
+ * @param angle2
|
|
|
+ * @param time
|
|
|
+ * @param range
|
|
|
+ * @param duration
|
|
|
+ * @param relYaw
|
|
|
+ * @param relPitch
|
|
|
+ * @param isWide
|
|
|
+ * @param relAngle
|
|
|
*/
|
|
|
- public SpecialCamera(int id, int dist, int yaw, int pitch, int time, int duration)
|
|
|
+ public SpecialCamera(L2Character creature, int force, int angle1, int angle2, int time, int range, int duration, int relYaw, int relPitch, int isWide, int relAngle)
|
|
|
{
|
|
|
- _id = id;
|
|
|
- _dist = dist;
|
|
|
- _yaw = yaw;
|
|
|
- _pitch = pitch;
|
|
|
- _time = time;
|
|
|
- _duration = duration;
|
|
|
- _turn = 0;
|
|
|
- _rise = 0;
|
|
|
- _widescreen = 0;
|
|
|
- _unknown = 0;
|
|
|
+ this(creature, force, angle1, angle2, time, duration, range, relYaw, relPitch, isWide, relAngle, 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Special Camera Ex packet constructor.
|
|
|
+ * @param creature the creature
|
|
|
+ * @param talker
|
|
|
+ * @param force
|
|
|
+ * @param angle1
|
|
|
+ * @param angle2
|
|
|
+ * @param time
|
|
|
+ * @param duration
|
|
|
+ * @param relYaw
|
|
|
+ * @param relPitch
|
|
|
+ * @param isWide
|
|
|
+ * @param relAngle
|
|
|
+ */
|
|
|
+ public SpecialCamera(L2Character creature, L2Character talker, int force, int angle1, int angle2, int time, int duration, int relYaw, int relPitch, int isWide, int relAngle)
|
|
|
+ {
|
|
|
+ this(creature, force, angle1, angle2, time, duration, 0, relYaw, relPitch, isWide, relAngle, 0);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param id object Id
|
|
|
- * @param dist the distance to the object
|
|
|
- * @param yaw North = 90, South = 270, East = 0, West = 180
|
|
|
- * @param pitch > 0: looks up, pitch < 0: looks down (angle)
|
|
|
- * @param time faster if it's smaller
|
|
|
- * @param duration animation time
|
|
|
- * @param turn
|
|
|
- * @param rise
|
|
|
- * @param widescreen
|
|
|
- * @param unk
|
|
|
+ * Special Camera 3 packet constructor.
|
|
|
+ * @param creature the creature
|
|
|
+ * @param force
|
|
|
+ * @param angle1
|
|
|
+ * @param angle2
|
|
|
+ * @param time
|
|
|
+ * @param range
|
|
|
+ * @param duration
|
|
|
+ * @param relYaw
|
|
|
+ * @param relPitch
|
|
|
+ * @param isWide
|
|
|
+ * @param relAngle
|
|
|
+ * @param unk unknown post-C4 parameter
|
|
|
*/
|
|
|
- public SpecialCamera(int id, int dist, int yaw, int pitch, int time, int duration, int turn, int rise, int widescreen, int unk)
|
|
|
+ public SpecialCamera(L2Character creature, int force, int angle1, int angle2, int time, int range, int duration, int relYaw, int relPitch, int isWide, int relAngle, int unk)
|
|
|
{
|
|
|
- _id = id;
|
|
|
- _dist = dist;
|
|
|
- _yaw = yaw;
|
|
|
- _pitch = pitch;
|
|
|
+ _id = creature.getObjectId();
|
|
|
+ _force = force;
|
|
|
+ _angle1 = angle1;
|
|
|
+ _angle2 = angle2;
|
|
|
_time = time;
|
|
|
_duration = duration;
|
|
|
- _turn = turn;
|
|
|
- _rise = rise;
|
|
|
- _widescreen = widescreen;
|
|
|
- _unknown = unk;
|
|
|
+ _relYaw = relYaw;
|
|
|
+ _relPitch = relPitch;
|
|
|
+ _isWide = isWide;
|
|
|
+ _relAngle = relAngle;
|
|
|
+ _unk = unk;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void writeImpl()
|
|
|
{
|
|
|
- writeC(0xd6);
|
|
|
+ writeC(0xD6);
|
|
|
writeD(_id);
|
|
|
- writeD(_dist);
|
|
|
- writeD(_yaw);
|
|
|
- writeD(_pitch);
|
|
|
+ writeD(_force);
|
|
|
+ writeD(_angle1);
|
|
|
+ writeD(_angle2);
|
|
|
writeD(_time);
|
|
|
writeD(_duration);
|
|
|
- writeD(_turn);
|
|
|
- writeD(_rise);
|
|
|
- writeD(_widescreen);
|
|
|
- writeD(_unknown);
|
|
|
+ writeD(_relYaw);
|
|
|
+ writeD(_relPitch);
|
|
|
+ writeD(_isWide);
|
|
|
+ writeD(_relAngle);
|
|
|
+ writeD(_unk);
|
|
|
}
|
|
|
}
|