Example #1
0
        internal void SendGameNextTurn(Living living, BaseGame game, List<Box> newBoxes)
        {
            int _wind = (int)(m_map.wind * 10);
            GSPacketIn pkg = new GSPacketIn((byte)ePackageType.GAME_CMD, living.Id);
            pkg.Parameter1 = living.Id;
            pkg.WriteByte((byte)eTankCmdType.TURN);
            pkg.WriteBoolean(_wind > 0);
            pkg.WriteByte(GetVane(_wind, 1));
            pkg.WriteByte(GetVane(_wind, 2));
            pkg.WriteByte(GetVane(_wind, 3));
            pkg.WriteBoolean(living.IsHide);
            pkg.WriteInt(getTurnTime(TimeType));
            pkg.WriteInt(newBoxes.Count);
            foreach (Box box in newBoxes)
            {
                pkg.WriteInt(box.Id);
                pkg.WriteInt(box.X);
                pkg.WriteInt(box.Y);
                pkg.WriteInt(box.Type);
            }

            List<Player> list = game.GetAllFightPlayers();
            pkg.WriteInt(list.Count);
            foreach (Player p in list)
            {
                pkg.WriteInt(p.Id);
                pkg.WriteBoolean(p.IsLiving);
                pkg.WriteInt(p.X);
                pkg.WriteInt(p.Y);
                pkg.WriteInt(p.Blood);
                pkg.WriteBoolean(p.IsNoHole);
                pkg.WriteInt(p.Energy);
                pkg.WriteInt(p.psychic);// _loc_28.psychic = _loc_25
                pkg.WriteInt(p.Dander);
                pkg.WriteInt(p.Energy);//_loc_26 = _pkg.readInt();//currentPet.MaxMP
                pkg.WriteInt(p.Energy);//_loc_27 = _pkg.readInt();//currentPet.MP
                pkg.WriteInt(p.ShootCount);

            }
            pkg.WriteInt(game.TurnIndex);

            SendToAll(pkg);
        }
Example #2
0
 public void Execute(BaseGame game, Player player, ItemTemplateInfo item)
 {
    
 }
Example #3
0
        internal void SendGameNextTurn(Living living, BaseGame game, List<Box> newBoxes)
        {
            GSPacketIn pkg = new GSPacketIn((byte)ePackageType.GAME_CMD, living.Id);
            pkg.Parameter1 = living.Id;
            //pkg.Parameter2 = -1;
            pkg.WriteByte((byte)eTankCmdType.TURN);
            pkg.WriteInt((int)(game.Wind * 10));
            pkg.WriteBoolean(false);
            pkg.WriteByte(0);
            pkg.WriteByte(0);
            pkg.WriteByte(0);
            pkg.WriteBoolean(living.IsHide);

            //turnTime
           // TimeType
            pkg.WriteInt(getTurnTime(TimeType));
            pkg.WriteInt(newBoxes.Count);
            foreach (Box box in newBoxes)
            {
                pkg.WriteInt(box.Id);
                pkg.WriteInt(box.X);
                pkg.WriteInt(box.Y);
                pkg.WriteInt(9);
               // pkg.WriteBoolean(false);
            }

            List<Player> list = game.GetAllFightPlayers();
            pkg.WriteInt(list.Count);
            foreach (Player p in list)
            {
                pkg.WriteInt(p.Id);
                pkg.WriteBoolean(p.IsLiving);
                pkg.WriteInt(p.X);
                pkg.WriteInt(p.Y);
                pkg.WriteInt(p.Blood);
                pkg.WriteBoolean(p.IsNoHole);
                pkg.WriteInt(p.Energy);
                pkg.WriteInt(p.Dander);
                pkg.WriteInt(p.ShootCount);
            }
            pkg.WriteInt(game.TurnIndex);

            SendToAll(pkg);
        }
Example #4
0
 public void StartGame(BaseGame game)
 {
     IsPlaying = true;
     m_game = game;
     game.GameStopped += new GameEventHandle(game_GameStopped);
     m_client.SendStartGame(m_orientRoomId, game);
 }
 protected override void ExecuteImp(BaseGame game, long tick)
 {
     ((PVEGame) game).SendPlayBackgroundSound(this.m_isPlay);
     base.Finish(tick);
 }