コード例 #1
0
ファイル: ItemManager.cs プロジェクト: mengtest/DragonBallNew
 //属性转换
 public void AttrSwap(BaseHttpRequest request, BaseResponse response)
 {
     if (response != null && response.status != BaseResponse.ERROR)
     {
         AttrSwapResponse resp = response as AttrSwapResponse;
         UseItem(resp.data.prop, resp.data.propnm);
     }
 }
コード例 #2
0
 //属性变换
 public void AttrSwap(BaseResponse reponse)
 {
     if (reponse != null && reponse.status != BaseResponse.ERROR)
     {
         AttrSwapResponse resp = reponse as AttrSwapResponse;
         RTData.curCoin  += resp.data.coin;
         RTData.curStone += resp.data.stone;
     }
 }
コード例 #3
0
    //属性变换
    public void AttrSwap(BaseHttpRequest request, BaseResponse response)
    {
        if (response != null && response.status != BaseResponse.ERROR)
        {
            HttpRequest   htReq = request as HttpRequest;
            AttrSwapParam param = htReq.ParamMem as AttrSwapParam;

            AttrSwapResponse resp = response as AttrSwapResponse;

            Monster mon = getMonsterById(param.roleid);
            if (mon != null)
            {
                mon.RTData.Attribute = (MonsterAttribute)resp.data.atr;
            }

            RED.Log("attr:    " + resp.data.atr);
            RED.Log("id:     " + param.roleid);

            mBagOfMonster [mon.pid] = mon;
        }
    }