Пример #1
0
    void SychronizeBattleProgress2()
    {
        int fightId = InstancePlayer.instance.currentFightId;
        List <SlgPB.UnitGroup> deadUnits = PBConnect_finishBattle.GetPlayerDeadUnits();

        PBConnect_finishBattle.SychronizeBattleProgress(fightId, deadUnits, OnSychronizeBattleProgress2);
    }
Пример #2
0
    // ===========================
    // sychronize battle progress

//	private PBConnect_finishBattle.DelegateConnectCallback _cbSendBattleProgress = null;

    public void SendBattleProgress()
    {
        bool isOffline = IsStartOfOffline();

        if (isOffline)
        {
        }
        else
        {
            List <SlgPB.UnitGroup> deadUnits = PBConnect_finishBattle.GetPlayerDeadUnits();

            if (InstancePlayer.instance.pvpUser == null)
            {
                PBConnect_finishBattle.SychronizeBattleProgress(InstancePlayer.instance.currentFightId, deadUnits, OnSendBattleProgress);
            }
            else
            {
                PBConnect_finishPVPLadder.SychronizeBattleProgress(InstancePlayer.instance.currentPvpFightId, deadUnits, OnSendBattleProgress);
            }

//			FinishBattleRequest request = new FinishBattleRequest ();
//			request.api = new Model_ApiRequest ().api;
//
//			ListHelper.Push (request.unitGroup, PBConnect_finishBattle.GetPlayerDeadUnits ());
//
//			request.fightResult = -1;
//			request.star = 0;
//
//			(new PBConnect_finishBattle ()).Send (request, OnSendBattleProgress);
//			_cbSendBattleProgress = cbSendBattleProgress;
        }
    }