コード例 #1
0
ファイル: Server.cs プロジェクト: averes2/Russia-Next
 private bool ServerMessage_0x29_Animations(Client client, ServerPacket msg)
 {
     try
     {
         uint           index     = msg.ReadUInt32();
         uint           From      = msg.ReadUInt32();
         ushort         number    = msg.ReadUInt16();
         uint           Speed     = msg.ReadUInt32();
         SpellAnimation animation = new SpellAnimation(index, From, number, Speed);
         if ((int)index == (int)client.Base.Serial)
         {
             client.Base.Animations.Add(animation);
         }
         if (client.Base.Entitys.ContainsKey(index))
         {
             client.Base.Entitys[index].OnAnimation((object)null, new EntityArgs(client.Base[index], animation));
         }
         if (client.Base.Aislings.ContainsKey(index))
         {
             client.Base.Aislings[index].OnAnimation((object)null, new EntityArgs(client.Base[index], animation));
         }
         return(true);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message + "\n" + ex.StackTrace);
         return(false);
     }
 }
コード例 #2
0
ファイル: EntityArgs.cs プロジェクト: averes2/Russia-Next
 public EntityArgs(Entity entity, SpellAnimation animation)
 {
     this.Time      = DateTime.Now;
     this.Entity    = entity;
     this.Animation = animation;
 }