Exemple #1
0
        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);
        }
Exemple #2
0
 public static void UpdateVelocityAndPosition(PacketWriter pw, DynamicEntity dynamicEntity, TickCount currentTime)
 {
     pw.Write(ServerPacketID.UpdateVelocityAndPosition);
     pw.Write(dynamicEntity.MapEntityIndex);
     dynamicEntity.SerializePositionAndVelocity(pw, currentTime);
 }
Exemple #3
0
 public static void SetUserChar(PacketWriter pw, MapEntityIndex mapEntityIndex)
 {
     pw.Write(ServerPacketID.SetUserChar);
     pw.Write(mapEntityIndex);
 }
Exemple #4
0
 public static void SynchronizeDynamicEntity(PacketWriter pw, DynamicEntity dynamicEntity)
 {
     pw.Write(ServerPacketID.SynchronizeDynamicEntity);
     pw.Write(dynamicEntity.MapEntityIndex);
     dynamicEntity.Serialize(pw);
 }
Exemple #5
0
 public static void SetMap(PacketWriter pw, MapID mapID)
 {
     pw.Write(ServerPacketID.SetMap);
     pw.Write(mapID);
 }
Exemple #6
0
 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);
     }
 }
Exemple #7
0
 public static void SetMP(PacketWriter pw, SPValueType mp)
 {
     pw.Write(ServerPacketID.SetMP);
     pw.Write(mp);
 }
Exemple #8
0
        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);
        }
Exemple #9
0
 public static void SetHP(PacketWriter pw, SPValueType hp)
 {
     pw.Write(ServerPacketID.SetHP);
     pw.Write(hp);
 }
Exemple #10
0
 public static void SetCharacterMPPercent(PacketWriter pw, MapEntityIndex mapEntityIndex, byte mpPercent)
 {
     pw.Write(ServerPacketID.SetCharacterMPPercent);
     pw.Write(mapEntityIndex);
     pw.Write(mpPercent);
 }
Exemple #11
0
 public static void CreateDynamicEntity(PacketWriter pw, DynamicEntity dynamicEntity)
 {
     pw.Write(ServerPacketID.CreateDynamicEntity);
     pw.Write(dynamicEntity.MapEntityIndex);
     DynamicEntityFactory.Instance.Write(pw, dynamicEntity, true);
 }