Example #1
0
        [PacketHandler(RealmServerOpCode.GuildWaveEnterRequest)] //4406
        public static void GuildWaveEnterRequest(IRealmClient client, RealmPacketIn packet)
        {
            Asda2GuildWave guildWave = Asda2GuildWaveMgr.GetGuildWaveForId((int)client.ActiveCharacter.GuildId);

            if (guildWave != null)
            {
                if (guildWave.RegistrationFinished)
                {
                    if (!guildWave.IsInProgress)
                    {
                        if (guildWave.isPlayerRegistered(client.ActiveCharacter))
                        {
                            client.ActiveCharacter.IsAsda2GuildWave = true;
                            guildWave.AddEnteredPlayer(client.ActiveCharacter);
                        }
                        else
                        {
                            GlobalHandler.SendTeleportedByCristalResponse(client, MapId.Alpia, 0, 0, TeleportByCristalStaus.NotRegisterWave);
                        }
                    }
                    else
                    {
                        GlobalHandler.SendTeleportedByCristalResponse(client, MapId.Alpia, 0, 0, TeleportByCristalStaus.RejoinNot);
                    }
                }
            }
            else
            {
                GlobalHandler.SendTeleportedByCristalResponse(client, MapId.Alpia, 0, 0, TeleportByCristalStaus.NoWaveInfo);
            }
        }