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