Beispiel #1
0
 public void ApplyHostData(NPCHostToServerData data)
 {
     if (NPCId == data.NPCId)
     {
         Location = data.Location;
         Rotation = data.Rotation;
         if (data.IsAttacking)
         {
             IsAttacking   = true;
             NotAttackTime = DateTime.Now + new TimeSpan(0, 0, 1);
         }
     }
 }
Beispiel #2
0
        public static void RecvDataFromHost(NPCHostToServerData data, Player host)
        {
            NPC npc = GetNPC(data.NPCId);

            if (npc == null)
            {
                return;
            }
            if (npc.Host.Name != host.Name)
            {
                return;
            }
            npc.ApplyHostData(data);
        }