Ejemplo n.º 1
0
        void c_ClientChannelStuffInfo(object sender, ClientChannelChangeStuffEventArgs e)
        {
            Client c = (Client)sender;

            Client[]    nearbyClients = GetNearByClients(c, false);
            Character[] charlist      = characterManager.GetAllCharactersByAccountId(c.AccountID);

            byte[] bufferSendChannelChange2 = PacketManager.SendChannelChange(2, 0);
            c.Send(bufferSendChannelChange2);

            byte[] bufferSendCharList = PacketManager.SendCharacterList(charlist);
            c.Send(bufferSendCharList);

            byte[] bufferRemoveCharacter = PacketManager.SendRemoveCharacter(c.MyCharacter);
            SendSpecific(nearbyClients, bufferRemoveCharacter);
        }
Ejemplo n.º 2
0
        void c_ClientChannelStuffInfo(object sender, ClientChannelChangeStuffEventArgs e)
        {
            Client c = (Client)sender;

            Client[] nearbyClients = GetNearByClients(c, false);
            Character[] charlist = characterManager.GetAllCharactersByAccountId(c.AccountID);

            byte[] bufferSendChannelChange2 = PacketManager.SendChannelChange(2, 0);
            c.Send(bufferSendChannelChange2);

            byte[] bufferSendCharList = PacketManager.SendCharacterList(charlist);
            c.Send(bufferSendCharList);

            byte[] bufferRemoveCharacter = PacketManager.SendRemoveCharacter(c.MyCharacter);
            SendSpecific(nearbyClients, bufferRemoveCharacter);
        }
Ejemplo n.º 3
0
        void c_ClientChannelStuffInfo(object sender, ClientChannelChangeStuffEventArgs e)
        {
            Client c = (Client)sender;
            Character[] charlist = characterManager.GetAllCharactersByAccountId(c.AccountID);

            byte[] bufferSendChannelChange2 = PacketManager.SendChannelChange(2, 0);
            c.Send(bufferSendChannelChange2);

            byte[] bufferSendCharList = PacketManager.SendCharacterList(charlist);
            c.Send(bufferSendCharList);

            if (c.MyCharacter != null)
            {
                MapEngine mapEngine = GetMapEngine(c.MyCharacter.MapId);
                Client[] clients = GetClientsForChars(mapEngine.GetCharactersInRange(c.MyCharacter.Position, 150).ToArray());
                mapEngine.ActiveClientEntities.Remove(c.MyCharacter);
                byte[] bufferRemoveCharacter = PacketManager.SendRemoveCharacter(c.MyCharacter, RemoveCharacterEffect.None);
                SendToClients(bufferRemoveCharacter, clients);

                if (c.MyCharacter.Pet != null && !c.MyCharacter.Pet.IsSealed)
                {
                    mapEngine.ActiveClientEntities.Remove(c.MyCharacter.Pet);
                    byte[] bufferRemovePet = PacketManager.SendRemovePet(c.MyCharacter.Pet);
                    SendToClients(bufferRemovePet, clients);
                }
            }
        }