Ejemplo n.º 1
0
 public static void spawnNearbys(Client client, IEntity baseEntity, int distance = 16, bool includeSelf = true)
 {
     Lib.searchForNearby(baseEntity, distance, includeSelf)?.ForEach(nearby =>
     {
         if (nearby is Hero)
         {
             client.send(
                 PacketEncoder.spawnHero(nearby as Hero, false)
                 );
         }
         else if (nearby is NPC)
         {
             client.send(
                 PacketEncoder.spawnNPC(nearby as NPC)
                 );
         }
     });
 }