Exemplo n.º 1
0
        private void HandPlayerAddRobRiches(GSPacketIn pkg)
        {
            GamePlayer player = WorldMgr.GetPlayerById(pkg.ClientID);
            int        check  = pkg.ReadInt();

            if (player != null && check == pkg.Parameter1)
            {
                player.AddRobRiches(pkg.Parameter1);
            }
        }
        public void HandleConsortiaDelete(GSPacketIn packet)
        {
            int num = packet.ReadInt();

            GamePlayer[] allPlayers = WorldMgr.GetAllPlayers();
            GamePlayer[] array      = allPlayers;
            for (int i = 0; i < array.Length; i++)
            {
                GamePlayer gamePlayer = array[i];
                if (gamePlayer.PlayerCharacter.ConsortiaID == num)
                {
                    gamePlayer.ClearConsortia();
                    gamePlayer.AddRobRiches(-gamePlayer.PlayerCharacter.RichesRob);
                    gamePlayer.Out.SendTCP(packet);
                }
            }
        }
Exemplo n.º 3
0
        public void HandleConsortiaDelete(GSPacketIn packet)
        {
            int consortiaID = packet.ReadInt();

            GamePlayer[] players = WorldMgr.GetAllPlayers();
            GamePlayer[] array   = players;
            for (int i = 0; i < array.Length; i++)
            {
                GamePlayer p = array[i];
                if (p.PlayerCharacter.ConsortiaID == consortiaID)
                {
                    p.SaveIntoDatabase();
                    p.ClearConsortia(true);
                    p.AddRobRiches(-p.PlayerCharacter.RichesRob);
                    p.Out.SendTCP(packet);
                }
            }
        }