Beispiel #1
0
        private void HandleCreate(GameSession session, PacketReader packet)
        {
            string guildName = packet.ReadUnicodeString();

            if (session.Player.Mesos < 2000)
            {
                // TODO: Reject packets
                return;
            }
            else
            {
                session.Player.Mesos -= 2000;

                session.Send(MesosPacket.UpdateMesos(session));
                session.Send(GuildPacket.Invite(session.Player, guildName));
                session.Send(GuildPacket.Create(guildName));
                session.Send(GuildPacket.UpdateGuild(session, guildName));
                session.Send(GuildPacket.Create2(session.Player, guildName));
                session.Send(GuildPacket.Create3(session.Player, guildName));

                Guild newGuild = new(guildName, new List <Player> {
                    session.Player
                });