public void CancelTarget(CursorId lastCursorId, ObjectId itemId, Location3D location, ModelId type) { TargetLocationRequest cancelRequest = new TargetLocationRequest(lastCursorId, itemId, CursorType.Cancel, location, type); Send(cancelRequest.RawPacket); }
public void DrawGamePlayer(ObjectId playerId, ModelId bodyType, Location3D location, Direction direction, MovementType movementType, Color color) { var drawGamePlayerPacket = new DrawGamePlayerPacket(playerId, bodyType, location, direction, movementType, color); Send(drawGamePlayerPacket.RawPacket); }
public void PlayGraphicalEffect(EffectDirectionType directionType, ObjectId characterId, ModelId type, Location3D location, byte animationSpeed, byte duration, bool adjustDirection, bool explodeOnImpact) { GraphicalEffectPacket packet = new GraphicalEffectPacket(characterId, 0, type, location, location, animationSpeed, directionType, duration, adjustDirection, explodeOnImpact); Send(packet.RawPacket); }
public ushort GetDistance(Location3D secondLocation) { var vector = this - secondLocation; var distance = Math.Sqrt(Math.Pow(vector.X, 2) + Math.Pow(vector.Y, 2) + Math.Pow(vector.Z, 2)); return((ushort)distance); }
public Item CreatePhantom(ObjectId id, ModelId modelId, Location3D location, Color?color) { Item item = new Item(id, modelId, 1, location, color, null, null); ObjectInfo(id, modelId, location, color); return(item); }
public Mobile(ObjectId id, ModelId type, Location3D location, Color?color, Direction?orientation, MovementType?currentMovementType, Notoriety?notoriety, byte flags = 0) : base(id, type, location) { Color = color; Orientation = orientation; CurrentMovementType = currentMovementType; Notoriety = notoriety; this.Flags = flags; }
public GameObject UpdateLocation(Location3D location, Direction direction, MovementType movementType) { var updatedMobile = (Mobile)Duplicate(); updatedMobile.Location = location; updatedMobile.Orientation = direction; updatedMobile.CurrentMovementType = movementType; return(updatedMobile); }
public Mobile Update(ModelId type, Location3D location, Color color, Direction?orientation, MovementType?currentMovementType, Notoriety?notoriety, byte flags) { var updatedMobile = (Mobile)Duplicate(); updatedMobile.Location = location; updatedMobile.Type = type; updatedMobile.Color = color; updatedMobile.Orientation = orientation; updatedMobile.CurrentMovementType = currentMovementType; updatedMobile.Notoriety = notoriety; updatedMobile.Flags = flags; return(updatedMobile); }
public void RejectMove(Location3D location, Direction direction) { var packet = new CharMoveRejectionPacket(0, location, direction); Send(packet.RawPacket); }
public void ObjectInfo(ObjectId id, ModelId type, Location3D location, Color?color) { ObjectInfoPacket packet = new ObjectInfoPacket(id, type, location, color); Send(packet.RawPacket); }
public void TargetLocation(CursorId cursorId, Location3D location, ModelId tileType, CursorType cursorType) { TargetLocationRequest targetRequest = new TargetLocationRequest(cursorId, location, tileType, cursorType); Send(targetRequest.RawPacket); }
public void DropItem(ObjectId itemId, Location3D location) { var dropPacket = new DropItemRequest(itemId, location); Send(dropPacket.RawPacket); }
public void DropItem(ObjectId itemId, Location3D location) { var dropPacket = packetRegistry.Instantiate <DropItemRequest>(); Send(dropPacket.Serialize(itemId, location)); }
public Mobile(ObjectId id, ModelId type, Location3D location) : base(id, type, location) { }
public void TargetItem(CursorId cursorId, ObjectId itemId, CursorType cursorType, Location3D location, ModelId type) { var targetRequest = new TargetLocationRequest(cursorId, itemId, CursorType.Harmful, location, type); Send(targetRequest.RawPacket); }
public void UpdatePlayer(ObjectId playerId, ModelId bodyType, Location3D location, Direction direction, Color color) { var packet = new UpdatePlayerPacket(playerId, bodyType, location, direction, color); Send(packet.RawPacket); }
public bool Equals(Location3D other) => X == other.X && Y == other.Y && Z == other.Z;