public static void UpdateStat(PacketWriter pw, Stat<StatType> stat, StatCollectionType statCollectionType) { var isBaseStat = (statCollectionType == StatCollectionType.Base); pw.Write(ServerPacketID.UpdateStat); pw.Write(isBaseStat); pw.Write(stat); }
public static void UpdateVelocityAndPosition(PacketWriter pw, DynamicEntity dynamicEntity, TickCount currentTime) { pw.Write(ServerPacketID.UpdateVelocityAndPosition); pw.Write(dynamicEntity.MapEntityIndex); dynamicEntity.SerializePositionAndVelocity(pw, currentTime); }
public static void SetUserChar(PacketWriter pw, MapEntityIndex mapEntityIndex) { pw.Write(ServerPacketID.SetUserChar); pw.Write(mapEntityIndex); }
public static void SynchronizeDynamicEntity(PacketWriter pw, DynamicEntity dynamicEntity) { pw.Write(ServerPacketID.SynchronizeDynamicEntity); pw.Write(dynamicEntity.MapEntityIndex); dynamicEntity.Serialize(pw); }
public static void SetMap(PacketWriter pw, MapID mapID) { pw.Write(ServerPacketID.SetMap); pw.Write(mapID); }
public static void SetProvidedQuests(PacketWriter pw, MapEntityIndex mapEntityIndex, IEnumerable<QuestID> quests) { pw.WriteEnum(ServerPacketID.SetProvidedQuests); pw.Write(mapEntityIndex); pw.Write((byte)quests.Count()); foreach (var q in quests) { pw.Write(q); } }
public static void SetMP(PacketWriter pw, SPValueType mp) { pw.Write(ServerPacketID.SetMP); pw.Write(mp); }
public static void SetInventorySlot(PacketWriter pw, InventorySlot slot, GrhIndex graphic, byte amount) { pw.Write(ServerPacketID.SetInventorySlot); pw.Write(slot); if (graphic.IsInvalid) pw.Write(false); else { pw.Write(true); pw.Write(graphic); } pw.Write(amount); }
public static void SetHP(PacketWriter pw, SPValueType hp) { pw.Write(ServerPacketID.SetHP); pw.Write(hp); }
public static void SetCharacterMPPercent(PacketWriter pw, MapEntityIndex mapEntityIndex, byte mpPercent) { pw.Write(ServerPacketID.SetCharacterMPPercent); pw.Write(mapEntityIndex); pw.Write(mpPercent); }
public static void CreateDynamicEntity(PacketWriter pw, DynamicEntity dynamicEntity) { pw.Write(ServerPacketID.CreateDynamicEntity); pw.Write(dynamicEntity.MapEntityIndex); DynamicEntityFactory.Instance.Write(pw, dynamicEntity, true); }