Exemplo n.º 1
0
        public override void Execute(Peer peer, bool hasReceivedArguments, string arguments = "")
        {
            _owner.GetGame().GetPeerInfo(peer).GetChampion().setSkillPoints(17);
            var skillUpResponse = new SkillUpPacket(_owner.GetGame().GetPeerInfo(peer).GetChampion().getNetId(), 0, 0, 17);

            _owner.GetGame().PacketHandlerManager.sendPacket(peer, skillUpResponse, Channel.CHL_GAMEPLAY);
        }
Exemplo n.º 2
0
        public override void Execute(Peer peer, bool hasReceivedArguments, string arguments = "")
        {
            Game          _game          = Program.ResolveDependency <Game>();
            PlayerManager _playerManager = Program.ResolveDependency <PlayerManager>();

            _playerManager.GetPeerInfo(peer).Champion.setSkillPoints(17);
            var skillUpResponse = new SkillUpPacket(_playerManager.GetPeerInfo(peer).Champion.NetId, 0, 0, 17);

            _game.PacketHandlerManager.sendPacket(peer, skillUpResponse, Channel.CHL_GAMEPLAY);
        }
Exemplo n.º 3
0
    //스킬 투자 -> Server
    public void SkillUp(int index)
    {
        Debug.Log("스킬 투자");

        SkillUpData   skillUpData   = new SkillUpData(index);
        SkillUpPacket skillUpPacket = new SkillUpPacket(skillUpData);

        skillUpPacket.SetPacketId((int)ClientPacketId.RequestRoomList);

        DataPacket packet = new DataPacket(CreatePacket(skillUpPacket), null);

        sendMsgs.Enqueue(packet);
    }
Exemplo n.º 4
0
    //스킬 투자
    public void SkillUp(DataPacket packet)
    {
        Console.WriteLine(packet.client.RemoteEndPoint.ToString() + "스킬 투자");
        SkillUpPacket skillUpPacket = new SkillUpPacket(packet.msg);
        SkillUpData   skillUpData   = skillUpPacket.GetData();

        string id          = loginUser[packet.client];
        int    characterId = userState[id].characterId;

        HeroData heroData = database.GetHeroData(id, characterId);

        heroData.SkillUp(skillUpData.SkillIndex);
    }
Exemplo n.º 5
0
        public bool HandlePacket(Peer peer, byte[] data, Game game)
        {
            var skillUpPacket = new SkillUpPacket(data);
            //!TODO Check if can up skill? :)

            var s = game.GetPeerInfo(peer).GetChampion().levelUpSpell(skillUpPacket.skill);

            if (s == null)
            {
                return(false);
            }

            var skillUpResponse = new SkillUpPacket(game.GetPeerInfo(peer).GetChampion().getNetId(), skillUpPacket.skill, (byte)s.getLevel(), (byte)s.getOwner().getSkillPoints());

            game.PacketHandlerManager.sendPacket(peer, skillUpResponse, Channel.CHL_GAMEPLAY);
            game.GetPeerInfo(peer).GetChampion().GetStats().setSpellEnabled(skillUpPacket.skill, true);

            return(true);
        }
Exemplo n.º 6
0
        public bool HandlePacket(Peer peer, byte[] data)
        {
            var skillUpPacket = new SkillUpPacket(data);
            //!TODO Check if can up skill? :)

            var s = _playerManager.GetPeerInfo(peer).Champion.levelUpSpell(skillUpPacket.skill);

            if (s == null)
            {
                return(false);
            }

            var skillUpResponse = new SkillUpPacket(
                _playerManager.GetPeerInfo(peer).Champion.NetId,
                skillUpPacket.skill,
                (byte)s.Level,
                (byte)s.Owner.getSkillPoints()
                );

            _game.PacketHandlerManager.sendPacket(peer, skillUpResponse, Channel.CHL_GAMEPLAY);
            _playerManager.GetPeerInfo(peer).Champion.GetStats().setSpellEnabled(skillUpPacket.skill, true);

            return(true);
        }
Exemplo n.º 7
0
        public bool HandlePacket(Peer peer, byte[] data)
        {
            var start = new StatePacket2(PacketCmd.PKT_S2C_StartSpawn);

            _game.PacketHandlerManager.sendPacket(peer, start, Channel.CHL_S2C);
            _logger.LogCoreInfo("Spawning map");

            int playerId = 0;

            foreach (var p in _playerManager.GetPlayers())
            {
                var spawn = new HeroSpawn(p.Item2, playerId++);
                _game.PacketHandlerManager.sendPacket(peer, spawn, Channel.CHL_S2C);

                var info = new AvatarInfo(p.Item2);
                _game.PacketHandlerManager.sendPacket(peer, info, Channel.CHL_S2C);
            }

            var peerInfo     = _playerManager.GetPeerInfo(peer);
            var bluePill     = _itemManager.GetItemType(_game.Map.GetBluePillId());
            var itemInstance = peerInfo.Champion.getInventory().SetExtraItem(7, bluePill);
            var buyItem      = new BuyItemAns(peerInfo.Champion, itemInstance);

            _game.PacketHandlerManager.sendPacket(peer, buyItem, Channel.CHL_S2C);

            // Runes
            byte runeItemSlot = 14;

            foreach (var rune in peerInfo.Champion.RuneList._runes)
            {
                var runeItem = _itemManager.GetItemType(rune.Value);
                var newRune  = peerInfo.Champion.getInventory().SetExtraItem(runeItemSlot, runeItem);
                _playerManager.GetPeerInfo(peer).Champion.GetStats().AddModifier(runeItem);
                runeItemSlot++;
            }

            // Not sure why both 7 and 14 skill slot, but it does not seem to work without it
            var skillUp = new SkillUpPacket(peerInfo.Champion.NetId, 7, 1, (byte)peerInfo.Champion.getSkillPoints());

            _game.PacketHandlerManager.sendPacket(peer, skillUp, Channel.CHL_GAMEPLAY);
            skillUp = new SkillUpPacket(peerInfo.Champion.NetId, 14, 1, (byte)peerInfo.Champion.getSkillPoints());
            _game.PacketHandlerManager.sendPacket(peer, skillUp, Channel.CHL_GAMEPLAY);

            peerInfo.Champion.GetStats().setSpellEnabled(7, true);
            peerInfo.Champion.GetStats().setSpellEnabled(14, true);
            peerInfo.Champion.GetStats().setSummonerSpellEnabled(0, true);
            peerInfo.Champion.GetStats().setSummonerSpellEnabled(1, true);

            var objects = _game.Map.GetObjects();

            foreach (var kv in objects)
            {
                if (kv.Value is LaneTurret)
                {
                    var turret      = kv.Value as LaneTurret;
                    var turretSpawn = new TurretSpawn(turret);
                    _game.PacketHandlerManager.sendPacket(peer, turretSpawn, Channel.CHL_S2C);

                    // Fog Of War
                    var fogOfWarPacket = new FogUpdate2(turret);
                    _game.PacketHandlerManager.broadcastPacketTeam(turret.Team, fogOfWarPacket, Channel.CHL_S2C);

                    // To suppress game HP-related errors for enemy turrets out of vision
                    var setHealthPacket = new SetHealth(turret);
                    _game.PacketHandlerManager.sendPacket(peer, setHealthPacket, Channel.CHL_S2C);

                    foreach (var item in turret.Inventory)
                    {
                        if (item == null)
                        {
                            continue;
                        }
                        _game.PacketNotifier.NotifyItemBought(turret, item as Item);
                    }

                    continue;
                }
                else if (kv.Value is LevelProp)
                {
                    var levelProp = kv.Value as LevelProp;

                    var levelPropSpawnPacket = new LevelPropSpawn(levelProp);
                    _game.PacketHandlerManager.sendPacket(peer, levelPropSpawnPacket, Channel.CHL_S2C);

                    continue;
                }
                else if (kv.Value is Champion)
                {
                    var champion = kv.Value as Champion;
                    if (champion.IsVisibleByTeam(peerInfo.Champion.Team))
                    {
                        var enterVisionPacket = new EnterVisionAgain(champion);
                        _game.PacketHandlerManager.sendPacket(peer, enterVisionPacket, Channel.CHL_S2C);
                    }
                }
                else if (kv.Value is Inhibitor || kv.Value is Nexus)
                {
                    var inhibtor = kv.Value as Unit;

                    var minionSpawnPacket = new MinionSpawn2(inhibtor.NetId);
                    _game.PacketHandlerManager.sendPacket(peer, minionSpawnPacket, Channel.CHL_S2C);
                    var setHealthPacket = new SetHealth(inhibtor.NetId);
                    _game.PacketHandlerManager.sendPacket(peer, setHealthPacket, Channel.CHL_S2C);

                    continue;
                }
                else if (kv.Value is Projectile)
                {
                    var projectile = kv.Value as Projectile;
                    if (projectile.IsVisibleByTeam(peerInfo.Champion.Team))
                    {
                        var spawnProjectilePacket = new SpawnProjectile(projectile);
                        _game.PacketHandlerManager.sendPacket(peer, spawnProjectilePacket, Channel.CHL_S2C);
                    }

                    continue;
                }
                else
                {
                    _logger.LogCoreWarning("Object of type: " + kv.Value.GetType() + " not handled in HandleSpawn.");
                }
            }

            // TODO shop map specific?
            // Level props are just models, we need button-object minions to allow the client to interact with it
            if (peerInfo != null && peerInfo.Team == TeamId.TEAM_BLUE)
            {
                // Shop (blue team)
                var minionSpawnPacket = new MinionSpawn2(0xff10c6db);
                _game.PacketHandlerManager.sendPacket(peer, minionSpawnPacket, Channel.CHL_S2C);
                var setHealthPacket = new SetHealth(0xff10c6db);
                _game.PacketHandlerManager.sendPacket(peer, setHealthPacket, Channel.CHL_S2C);
            }
            else if (peerInfo != null && peerInfo.Team == TeamId.TEAM_PURPLE)
            {
                // Shop (purple team)
                var minionSpawnPacket = new MinionSpawn2(0xffa6170e);
                _game.PacketHandlerManager.sendPacket(peer, minionSpawnPacket, Channel.CHL_S2C);
                var setHealthPacket = new SetHealth(0xffa6170e);
                _game.PacketHandlerManager.sendPacket(peer, setHealthPacket, Channel.CHL_S2C);
            }

            var endSpawnPacket = new StatePacket(PacketCmd.PKT_S2C_EndSpawn);

            return(_game.PacketHandlerManager.sendPacket(peer, endSpawnPacket, Channel.CHL_S2C));
        }
        public unsafe bool HandlePacket(ENetPeer *peer, byte[] data, Game game)
        {
            var message = new ChatMessage(data);
            var split   = message.msg.Split(' ');

            if (split.Length > 1)
            {
                int x, y = 0;
                if (int.TryParse(split[0], out x))
                {
                    if (int.TryParse(split[1], out y))
                    {
                        var response = new AttentionPingAns(game.getPeerInfo(peer), new AttentionPing {
                            x = x, y = y, targetNetId = 0, type = 0
                        });
                        PacketHandlerManager.getInstace().broadcastPacketTeam(game.getPeerInfo(peer).getTeam(), response, Channel.CHL_S2C);
                    }
                }
            }

            #region Commands
            //Lets do commands

            if (message.msg.StartsWith("."))
            {
                var cmd      = new string[] { ".set", ".gold", ".speed", ".health", ".xp", ".ap", ".ad", ".mana", ".model", ".help", ".spawn", ".size", ".junglespawn", ".skillpoints", ".level", ".tp", ".coords", ".ch" };
                var debugMsg = new StringBuilder();
                split = message.msg.ToLower().Split(' ');
                switch (split[0])
                {
                case ".set":
                    if (split.Length < 4)
                    {
                        return(true);
                    }
                    int   blockNo, fieldNo = 0;
                    float value = 0;
                    if (int.TryParse(split[1], out blockNo))
                    {
                        if (int.TryParse(split[2], out fieldNo))
                        {
                            if (float.TryParse(split[3], out value))
                            {
                                // blockNo = 1 << (blockNo - 1);
                                //var mask = 1 << (fieldNo - 1);
                                game.getPeerInfo(peer).getChampion().getStats().setStat((MasterMask)blockNo, (FieldMask)fieldNo, value);
                            }
                        }
                    }
                    return(true);

                case ".gold":
                    float gold;
                    if (split.Length < 2)
                    {
                        return(true);
                    }
                    if (float.TryParse(split[1], out gold))
                    {
                        game.getPeerInfo(peer).getChampion().getStats().setGold(gold);
                    }
                    return(true);

                case ".speed":
                    float speed;
                    if (split.Length < 2)
                    {
                        return(true);
                    }
                    if (float.TryParse(split[1], out speed))
                    {
                        game.getPeerInfo(peer).getChampion().getStats().setMovementSpeed(speed);
                    }
                    return(true);

                case ".health":
                    float hp;
                    if (split.Length < 2)
                    {
                        return(true);
                    }
                    if (float.TryParse(split[1], out hp))
                    {
                        game.getPeerInfo(peer).getChampion().getStats().setCurrentHealth(hp);
                        game.getPeerInfo(peer).getChampion().getStats().setMaxHealth(hp);

                        PacketNotifier.notifySetHealth(game.getPeerInfo(peer).getChampion());
                    }
                    return(true);

                case ".xp":
                    float xp;
                    if (split.Length < 2)
                    {
                        return(true);
                    }
                    if (float.TryParse(split[1], out xp))
                    {
                        game.getPeerInfo(peer).getChampion().getStats().setExp(xp);
                    }
                    return(true);

                case ".ap":
                    float ap;
                    if (split.Length < 2)
                    {
                        return(true);
                    }
                    if (float.TryParse(split[1], out ap))
                    {
                        game.getPeerInfo(peer).getChampion().getStats().setBonusApFlat(ap);
                    }
                    return(true);

                case ".ad":
                    float ad;
                    if (split.Length < 2)
                    {
                        return(true);
                    }
                    if (float.TryParse(split[1], out ad))
                    {
                        game.getPeerInfo(peer).getChampion().getStats().setBonusAdFlat(ad);
                    }
                    return(true);

                case ".mana":
                    float mp;
                    if (split.Length < 2)
                    {
                        return(true);
                    }
                    if (float.TryParse(split[1], out mp))
                    {
                        game.getPeerInfo(peer).getChampion().getStats().setCurrentMana(mp);
                        game.getPeerInfo(peer).getChampion().getStats().setMaxMana(mp);
                    }
                    return(true);

                case ".model":
                    if (split.Length >= 2)
                    {
                        game.getPeerInfo(peer).getChampion().setModel(split[1]);
                    }
                    return(true);

                case ".help":
                    debugMsg.Append("List of available commands: ");
                    foreach (var cc in cmd)
                    {
                        debugMsg.Append(cc + " ");
                    }

                    var dm = new SpawnParticle.DebugMessage(debugMsg.ToString());
                    PacketHandlerManager.getInstace().sendPacket(peer, dm, Channel.CHL_S2C);
                    return(true);

                case ".spawn":
                    Logger.LogCoreInfo("Not implemented command .spawn");
                    return(true);

                case ".size":
                    float size;
                    if (split.Length < 2)
                    {
                        return(true);
                    }
                    if (float.TryParse(split[1], out size))
                    {
                        game.getPeerInfo(peer).getChampion().getStats().setSize(size);
                    }
                    return(true);

                case ".junglespawn":
                    cmd = new string[] { "c baron", "c wolves", "c red", "c blue", "c dragon", "c wraiths", "c golems" };
                    return(true);

                case ".skillpoints":
                    game.getPeerInfo(peer).getChampion().setSkillPoints(17);
                    var skillUpResponse = new SkillUpPacket(game.getPeerInfo(peer).getChampion().getNetId(), 0, 0, 17);
                    PacketHandlerManager.getInstace().sendPacket(peer, skillUpResponse, Channel.CHL_GAMEPLAY);
                    return(true);

                case ".level":
                    float lvl;
                    if (split.Length < 2)
                    {
                        return(true);
                    }
                    if (float.TryParse(split[1], out lvl))
                    {
                        if (lvl < 1 || lvl > 18)
                        {
                            return(true);
                        }
                        game.getPeerInfo(peer).getChampion().getStats().setExp(game.getMap().getExperienceToLevelUp()[(int)lvl - 1]);
                        //game.peerInfo(peer).getChampion().getStats().setLevel(lvl);
                    }
                    return(true);

                case ".tp":
                    float x, y;
                    if (split.Length < 3)
                    {
                        return(true);
                    }
                    if (float.TryParse(split[1], out x))
                    {
                        if (float.TryParse(split[2], out y))
                        {
                            PacketNotifier.notifyTeleport(game.getPeerInfo(peer).getChampion(), x, y);
                        }
                    }
                    return(true);

                case ".coords":
                    Logger.LogCoreInfo("At " + game.getPeerInfo(peer).getChampion().getX() + ";" + game.getPeerInfo(peer).getChampion().getY());
                    debugMsg.Append("At Coords - X: ");
                    debugMsg.Append(game.getPeerInfo(peer).getChampion().getX());
                    debugMsg.Append(" Y: ");
                    debugMsg.Append(game.getPeerInfo(peer).getChampion().getY());
                    debugMsg.Append(" Z: ");
                    debugMsg.Append(game.getPeerInfo(peer).getChampion().getZ());
                    PacketNotifier.notifyDebugMessage(debugMsg.ToString());
                    return(true);

                case ".ch":
                    if (split.Length < 2)
                    {
                        return(true);
                    }
                    new System.Threading.Thread(new System.Threading.ThreadStart(() =>
                    {
                        var c = new Champion(split[1], game.getMap(), game.getPeerInfo(peer).getChampion().getNetId(), (int)game.getPeerInfo(peer).userId);
                        c.setPosition(game.getPeerInfo(peer).getChampion().getX(), game.getPeerInfo(peer).getChampion().getY());
                        c.setModel(split[1]);     // trigger the "modelUpdate" proc
                        game.getMap().removeObject(game.getPeerInfo(peer).getChampion());
                        game.getMap().addObject(c);
                        game.getPeerInfo(peer).setChampion(c);
                    })).Start();
                    return(true);

                case ".packet":
                    try
                    {
                        var s = message.msg.Split(' ');
                        if (s.Length < 2)
                        {
                            return(true);
                        }
                        var bytes = new List <byte>();

                        for (var i = 1; i < s.Length; i++)
                        {
                            var     ss   = s[i].Split(':');
                            var     type = ss[0];
                            dynamic num;
                            if (ss[1] == "netid")
                            {
                                num = game.getPeerInfo(peer).getChampion().getNetId();
                            }
                            else
                            {
                                num = System.Convert.ChangeType(int.Parse(ss[1]), Type.GetType("System." + type));
                            }
                            var d = BitConverter.GetBytes(num);
                            if (num.GetType() == typeof(byte))
                            {
                                bytes.Add(num);
                            }
                            else
                            {
                                bytes.AddRange(d);
                            }
                        }

                        PacketHandlerManager.getInstace().sendPacket(peer, bytes.ToArray(), Channel.CHL_C2S);
                    }
                    catch { }
                    return(true);

                case ".mobs":
                    if (split.Length < 2)
                    {
                        return(true);
                    }
                    int team;
                    if (!int.TryParse(split[1], out team))
                    {
                        return(true);
                    }
                    var units = game.getPeerInfo(peer).getChampion().getMap().getObjects().Where(xx => xx.Value.getTeam() == Convert.toTeamId(team)).Where(xx => xx.Value is Minion);
                    foreach (var unit in units)
                    {
                        var response = new AttentionPingAns(game.getPeerInfo(peer), new AttentionPing {
                            x = unit.Value.getX(), y = unit.Value.getY(), targetNetId = 0, type = Pings.Ping_Danger
                        });
                        PacketHandlerManager.getInstace().broadcastPacketTeam(game.getPeerInfo(peer).getTeam(), response, Channel.CHL_S2C);
                    }
                    return(true);

                case ".inhib":
                    var sender = game.getPeerInfo(peer);
                    var min    = new Monster(game.getMap(), Game.GetNewNetID(), sender.getChampion().getX(), sender.getChampion().getY(), sender.getChampion().getX(), sender.getChampion().getY(), "AncientGolem", "AncientGolem1.1.1");
                    game.getMap().addObject(min);
                    return(true);
                }
            }

            #endregion
            switch (message.type)
            {
            case ChatType.CHAT_ALL:
                return(PacketHandlerManager.getInstace().broadcastPacket(data, Channel.CHL_COMMUNICATION));

            case ChatType.CHAT_TEAM:
                return(PacketHandlerManager.getInstace().broadcastPacketTeam(game.getPeerInfo(peer).getTeam(), data, Channel.CHL_COMMUNICATION));

            default:
                //Logging.errorLine("Unknown ChatMessageType");
                return(PacketHandlerManager.getInstace().sendPacket(peer, data, Channel.CHL_COMMUNICATION));
            }
        }
Exemplo n.º 9
0
        public bool HandlePacket(Peer peer, byte[] data, Game game)
        {
            var start = new StatePacket2(PacketCmdS2C.PKT_S2C_StartSpawn);

            game.PacketHandlerManager.sendPacket(peer, start, Channel.CHL_S2C);
            Logger.LogCoreInfo("Spawning map");

            int playerId = 0;

            foreach (var p in game.GetPlayers())
            {
                var spawn = new HeroSpawn(p.Item2, playerId++);
                game.PacketHandlerManager.sendPacket(peer, spawn, Channel.CHL_S2C);

                var info = new PlayerInfo(p.Item2);
                game.PacketHandlerManager.sendPacket(peer, info, Channel.CHL_S2C);
            }

            var peerInfo     = game.GetPeerInfo(peer);
            var bluePill     = game.ItemManager.GetItemType(game.GetMap().GetBluePillId());
            var itemInstance = peerInfo.GetChampion().Inventory.SetExtraItem(7, bluePill);
            var buyItem      = new BuyItemAns(peerInfo.GetChampion(), itemInstance);

            game.PacketHandlerManager.sendPacket(peer, buyItem, Channel.CHL_S2C);

            // Not sure why both 7 and 14 skill slot, but it does not seem to work without it
            var skillUp = new SkillUpPacket(peerInfo.GetChampion().getNetId(), 7, 1, (byte)peerInfo.GetChampion().getSkillPoints());

            game.PacketHandlerManager.sendPacket(peer, skillUp, Channel.CHL_GAMEPLAY);
            skillUp = new SkillUpPacket(peerInfo.GetChampion().getNetId(), 14, 1, (byte)peerInfo.GetChampion().getSkillPoints());
            game.PacketHandlerManager.sendPacket(peer, skillUp, Channel.CHL_GAMEPLAY);

            peerInfo.GetChampion().GetStats().setSpellEnabled(7, true);
            peerInfo.GetChampion().GetStats().setSpellEnabled(14, true);
            peerInfo.GetChampion().GetStats().setSummonerSpellEnabled(0, true);
            peerInfo.GetChampion().GetStats().setSummonerSpellEnabled(1, true);

            var objects = game.GetMap().GetObjects();

            foreach (var kv in objects)
            {
                if (kv.Value is Turret)
                {
                    var t           = kv.Value as Turret;
                    var turretSpawn = new TurretSpawn(t);
                    game.PacketHandlerManager.sendPacket(peer, turretSpawn, Channel.CHL_S2C);

                    // To suppress game HP-related errors for enemy turrets out of vision
                    var sh = new SetHealth(t);
                    game.PacketHandlerManager.sendPacket(peer, sh, Channel.CHL_S2C);
                    continue;
                }
                else if (kv.Value is LevelProp)
                {
                    var lp = kv.Value as LevelProp;

                    var lpsPacket = new LevelPropSpawn(lp);
                    game.PacketHandlerManager.sendPacket(peer, lpsPacket, Channel.CHL_S2C);
                }
                else if (kv.Value is Inhibitor || kv.Value is Nexus)
                {
                    var inhib = kv.Value as Unit;

                    var ms = new MinionSpawn2(inhib.getNetId());
                    game.PacketHandlerManager.sendPacket(peer, ms, Channel.CHL_S2C);
                    var sh = new SetHealth(inhib.getNetId());
                    game.PacketHandlerManager.sendPacket(peer, sh, Channel.CHL_S2C);
                }
            }

            // TODO shop map specific?
            // Level props are just models, we need button-object minions to allow the client to interact with it
            if (peerInfo != null && peerInfo.GetTeam() == TeamId.TEAM_BLUE)
            {
                // Shop (blue team)
                var ms1 = new MinionSpawn2(0xff10c6db);
                game.PacketHandlerManager.sendPacket(peer, ms1, Channel.CHL_S2C);
                var sh1 = new SetHealth(0xff10c6db);
                game.PacketHandlerManager.sendPacket(peer, sh1, Channel.CHL_S2C);
            }
            else if (peerInfo != null && peerInfo.GetTeam() == TeamId.TEAM_PURPLE)
            {
                // Shop (purple team)
                var ms1 = new MinionSpawn2(0xffa6170e);
                game.PacketHandlerManager.sendPacket(peer, ms1, Channel.CHL_S2C);
                var sh1 = new SetHealth(0xffa6170e);
                game.PacketHandlerManager.sendPacket(peer, sh1, Channel.CHL_S2C);
            }

            var end = new StatePacket(PacketCmdS2C.PKT_S2C_EndSpawn);

            return(game.PacketHandlerManager.sendPacket(peer, end, Channel.CHL_S2C));
        }