Beispiel #1
0
        public void CreateBattle(string accountID, string nickName, string face, int vip, int gameNum, int whoTakMoney)
        {
            LogHelper.DebugLog("收到:" + accountID + "  发来的CreateBattle");
            Battleground bg = BattlegroundManager.Instance.CreateBattle(accountID, nickName, face, vip, gameNum, BattleType.CreateRoom);

            bg.Battle.WhoTakeMoney = whoTakMoney;
            bg.CreateBattleBack();
            //创建记录to游戏数据库
            int takeDiamon = -10;

            if (bg.Battle.WhoTakeMoney == 2)
            {
                if (gameNum == 8)
                {
                    takeDiamon = -80;
                }
                else if (gameNum == 16)
                {
                    takeDiamon = -120;
                }
            }
            new Game.Service.BattleService().JoinBattle(Config.ServerIP, Config.MahjongPort.ToString(),
                                                        Convert.ToInt32(accountID), 1, bg.Battle.Code, 0, takeDiamon);
        }