Exemplo n.º 1
0
        public void DeSpawnMe()
        {
            try
            {
                byte[] buff = Client.Packet.ObjectDeSpawn(UniqueID);
                lock (Helpers.Manager.clients)
                {
                    for (int i = 0; i < Helpers.Manager.clients.Count; i++)
                    {
                        try
                        {
                            if (Spawned(Helpers.Manager.clients[i].Character.Information.UniqueID))
                            {
                                Helpers.Manager.clients[i].client.Send(buff);

                                //end buff
                                if (Formule.GetSurroundRange(new ObjData.vektor(Helpers.Manager.clients[i].Character.Information.UniqueID, Helpers.Manager.clients[i].Character.Position.packetX, Helpers.Manager.clients[i].Character.Position.packetZ, Helpers.Manager.clients[i].Character.Position.packetY, Helpers.Manager.clients[i].Character.Position.xSec, Helpers.Manager.clients[i].Character.Position.ySec), new ObjData.vektor(0, (float)x, (float)z, (float)y, xSec, ySec), Radius))
                                {
                                    if (Helpers.Manager.clients[i].Character.Action.Buff.InfiniteBuffs.ContainsKey(Name))
                                    {
                                        Helpers.Manager.clients[i].SkillBuffEnd(Helpers.Manager.clients[i].Character.Action.Buff.InfiniteBuffs[Name]);
                                    }
                                }
                            }
                        }
                        catch (Exception ex)
                        {
                            Log.Exception(ex);
                        }
                    }
                }

                Spawn.Clear();
            }
            catch (Exception ex)
            {
                Log.Exception(ex);
            }
        }