Beispiel #1
0
 public override void onReqsChooseHeroResult(HERO_INFOS heroInfos, SKILL_INFOS_LIST skillLst)
 {
     Debug.Log("onReqsChooseHeroResult::" + heroInfos.name + "," + heroInfos.id + "," + heroInfos.skill_3 + ",onReqsSkillLstResult::" + skillLst.Count);
     for (int i = 0; i < skillLst.Count; i++)
     {
         Debug.Log("skillId[" + skillLst[i].id + "]" + ",name::" + skillLst[i].name + ",other::" + skillLst[i].skill_ap_growth);
     }
 }
 public void addToStreamEx(Bundle stream, SKILL_INFOS_LIST v)
 {
     stream.writeUint32((UInt32)v.Count);
     for (int i = 0; i < v.Count; ++i)
     {
         itemType.addToStreamEx(stream, v[i]);
     }
     ;
 }
        public SKILL_INFOS_LIST createFromStreamEx(MemoryStream stream)
        {
            UInt32           size  = stream.readUint32();
            SKILL_INFOS_LIST datas = new SKILL_INFOS_LIST();

            while (size > 0)
            {
                --size;
                datas.Add(itemType.createFromStreamEx(stream));
            }
            ;

            return(datas);
        }
Beispiel #4
0
 /// <summary>
 /// 异地登录处理后推送的信息
 /// </summary>
 /// <param name="infos"></param>
 /// <param name="heroInfos"></param>
 /// <param name="skillLst"></param>
 /// <param name="gameState"></param>
 public override void onNonLocalLogin(MATCHING_INFOS_LIST infos, HERO_INFOS heroInfos, SKILL_INFOS_LIST skillLst, Int32 gameState)
 {
     onPushMatchPlayersData(infos);
     onReqsChooseHeroResult(heroInfos, skillLst);
     onGameStateChanged(gameState);
     Debug.Log("gameState" + gameState);
 }
 public abstract void onReqsSkillLstResult(SKILL_INFOS_LIST arg1);
 public abstract void onReqsChooseHeroResult(HERO_INFOS arg1, SKILL_INFOS_LIST arg2);
        public override void onRemoteMethodCall(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["Avatar"];

            UInt16 methodUtype            = 0;
            UInt16 componentPropertyUType = 0;

            if (sm.useMethodDescrAlias)
            {
                componentPropertyUType = stream.readUint8();
                methodUtype            = stream.readUint8();
            }
            else
            {
                componentPropertyUType = stream.readUint16();
                methodUtype            = stream.readUint16();
            }

            Method method = null;

            if (componentPropertyUType == 0)
            {
                method = sm.idmethods[methodUtype];
            }
            else
            {
                Property pComponentPropertyDescription = sm.idpropertys[componentPropertyUType];
                switch (pComponentPropertyDescription.properUtype)
                {
                case 17:
                    componentFrameSync.onRemoteMethodCall(methodUtype, stream);
                    break;

                default:
                    break;
                }

                return;
            }

            switch (method.methodUtype)
            {
            case 18:
                Int32 onExitMatch_arg1 = stream.readInt32();
                onExitMatch(onExitMatch_arg1);
                break;

            case 15:
                Int32 onHeroIdChanged_arg1 = stream.readInt32();
                Int32 onHeroIdChanged_arg2 = stream.readInt32();
                onHeroIdChanged(onHeroIdChanged_arg1, onHeroIdChanged_arg2);
                break;

            case 16:
                onLoadingToReadyBattleState();
                break;

            case 13:
                UInt32 onPushAvatarCurrentScene_arg1 = stream.readUint32();
                onPushAvatarCurrentScene(onPushAvatarCurrentScene_arg1);
                break;

            case 14:
                MATCHING_INFOS_LIST onPushMatchPlayersData_arg1 = ((DATATYPE_MATCHING_INFOS_LIST)method.args[0]).createFromStreamEx(stream);
                onPushMatchPlayersData(onPushMatchPlayersData_arg1);
                break;

            case 12:
                Int32 onPushStatisticalResult_arg1 = stream.readInt32();
                onPushStatisticalResult(onPushStatisticalResult_arg1);
                break;

            case 17:
                onReadyBattle();
                break;

            case 10:
                HERO_INFOS       onReqsChooseHeroResult_arg1 = ((DATATYPE_HERO_INFOS)method.args[0]).createFromStreamEx(stream);
                SKILL_INFOS_LIST onReqsChooseHeroResult_arg2 = ((DATATYPE_SKILL_INFOS_LIST)method.args[1]).createFromStreamEx(stream);
                onReqsChooseHeroResult(onReqsChooseHeroResult_arg1, onReqsChooseHeroResult_arg2);
                break;

            case 11:
                SKILL_INFOS_LIST onReqsSkillLstResult_arg1 = ((DATATYPE_SKILL_INFOS_LIST)method.args[0]).createFromStreamEx(stream);
                onReqsSkillLstResult(onReqsSkillLstResult_arg1);
                break;

            default:
                break;
            }
            ;
        }