コード例 #1
0
    public static PlayerLoadInfo FromUserStatus(bool need_weapon, bool is_priority_visual_equip, int set_no = -1)
    {
        PlayerLoadInfo playerLoadInfo = new PlayerLoadInfo();

        playerLoadInfo.ApplyUserStatus(need_weapon, is_priority_visual_equip, set_no);
        return(playerLoadInfo);
    }
コード例 #2
0
 protected void SetRenderPlayerModel(PlayerLoadInfo load_player_info)
 {
     //IL_0029: Unknown result type (might be due to invalid IL or missing references)
     //IL_003d: Unknown result type (might be due to invalid IL or missing references)
     SetRenderPlayerModel(transRoot, UI.TEX_MODEL, load_player_info, record.animID, new Vector3(0f, -0.75f, 14f), new Vector3(0f, 180f, 0f), isVisualMode, delegate(PlayerLoader player_loader)
     {
         if (player_loader != null)
         {
             loader = player_loader;
         }
         if (loader != null && loader.animator != null)
         {
             if (MonoBehaviourSingleton <InGameRecorder> .IsValid())
             {
                 if (MonoBehaviourSingleton <InGameRecorder> .I.isVictory)
                 {
                     loader.animator.Play("win_loop");
                 }
             }
             else
             {
                 PlayerAnimCtrl.Get(loader.animator, PlayerAnimCtrl.battleAnims[record.playerLoadInfo.weaponModelID / 1000], null, null, null);
             }
         }
     });
 }
コード例 #3
0
        public ModelLoaderBase LoadModel(GameObject go, bool need_shadow, bool enable_light_probe, Action <Animator> on_complete, bool useSpecialModel)
        {
            if (IsUsePlayerModel())
            {
                PlayerLoader   loader           = go.AddComponent <PlayerLoader>();
                PlayerLoadInfo player_load_info = CreatePlayerLoadInfo();
                loader.StartLoad(player_load_info, go.get_layer(), 99, false, false, need_shadow, enable_light_probe, false, false, FieldManager.IsValidInField(), true, (!enable_light_probe) ? SHADER_TYPE.UI : ShaderGlobal.GetCharacterShaderType(), delegate
                {
                    if (on_complete != null)
                    {
                        on_complete(loader.animator);
                    }
                }, true, -1);
                return(loader);
            }
            NPCLoader loader2 = go.AddComponent <NPCLoader>();

            HomeThemeTable.HomeThemeData homeThemeData = Singleton <HomeThemeTable> .I.GetHomeThemeData(TimeManager.GetNow());

            int num = Singleton <HomeThemeTable> .I.GetNpcModelID(homeThemeData, id);

            int num2         = (num <= 0) ? specialModelID : num;
            int npc_model_id = (!useSpecialModel || num2 <= 0) ? npcModelID : num2;

            loader2.Load(npc_model_id, go.get_layer(), need_shadow, enable_light_probe, (!enable_light_probe) ? SHADER_TYPE.UI : ShaderGlobal.GetCharacterShaderType(), delegate
            {
                if (on_complete != null)
                {
                    on_complete(loader2.animator);
                }
            });
            return(loader2);
        }
コード例 #4
0
    public void SetEquipInfo(EquipItemInfo equip_info)
    {
        PlayerLoadInfo playerLoadInfo = playerLoader.loadInfo.Clone();

        if (equip_info != null)
        {
            playerLoadInfo.SetEquip(MonoBehaviourSingleton <UserInfoManager> .I.userStatus.sex, equip_info.tableData, true, true, true);
        }
        else if (viewMode == VIEW_MODE.AVATAR)
        {
            int num = EQUIP_SLOT.AvatatToEquip(equipSetData.index);
            equip_info = equipSetData.equipSetInfo.item[num];
            if (equip_info == null)
            {
                playerLoadInfo.RemoveEquip(MonoBehaviourSingleton <UserInfoManager> .I.userStatus.sex, num);
            }
            else
            {
                playerLoadInfo.SetEquip(MonoBehaviourSingleton <UserInfoManager> .I.userStatus.sex, equip_info.tableData, true, true, true);
            }
        }
        else if (equipSetData != null)
        {
            playerLoadInfo.RemoveEquip(MonoBehaviourSingleton <UserInfoManager> .I.userStatus.sex, equipSetData.index);
        }
        LoadPlayer(playerLoadInfo);
        if (equipInfo != equip_info)
        {
            equipInfo = equip_info;
            MoveCamera(viewType, viewType, viewMode, viewMode);
        }
    }
コード例 #5
0
    private void SetMemberInfo(LoungeModel.SlotInfo data, int i, Transform t)
    {
        //IL_005b: Unknown result type (might be due to invalid IL or missing references)
        //IL_006f: Unknown result type (might be due to invalid IL or missing references)
        CharaInfo          userInfo           = data.userInfo;
        FollowLoungeMember followLoungeMember = MonoBehaviourSingleton <LoungeMatchingManager> .I.GetFollowLoungeMember(userInfo.userId);

        EquipSetCalculator otherEquipSetCalculator = MonoBehaviourSingleton <StatusManager> .I.GetOtherEquipSetCalculator(i + 4);

        otherEquipSetCalculator.SetEquipSet(data.userInfo.equipSet, false);
        SetRenderPlayerModel(t, UI.TEX_MODEL, PlayerLoadInfo.FromCharaInfo(userInfo, false, true, false, true), 99, new Vector3(0f, -1.536f, 1.87f), new Vector3(0f, 154f, 0f), true, null);
        SetLabelText(t, UI.LBL_NAME, userInfo.name);
        SetLabelText(t, UI.LBL_LEVEL, userInfo.level.ToString());
        SetFollowStatus(t, userInfo.userId, followLoungeMember.following, followLoungeMember.follower);
        SetActive(t, UI.SPR_ICON_HOST, userInfo.userId == MonoBehaviourSingleton <LoungeMatchingManager> .I.loungeData.ownerUserId);
        SetPlayingStatus(t, userInfo.userId);
        SetActive(t, UI.SPR_ICON_FIRST_MET, MonoBehaviourSingleton <LoungeMatchingManager> .I.CheckFirstMet(userInfo.userId));
        DegreePlate component = FindCtrl(t, UI.OBJ_DEGREE_FRAME_ROOT).GetComponent <DegreePlate>();

        component.Initialize(userInfo.selectedDegrees, false, delegate
        {
            GetCtrl(UI.GRD_LIST).GetComponent <UIGrid>().Reposition();
        });
        if (MonoBehaviourSingleton <LoungeMatchingManager> .I.IsRallyUser(userInfo.userId))
        {
            SetBadge(t, -1, 1, 10, 0, true);
        }
    }
コード例 #6
0
 public void ClearPlayerLoaded(PlayerLoadInfo load_info)
 {
     if ((!(playerLoader != null) || !playerLoader.loadInfo.Equals(load_info)) && renderTexture != null)
     {
         Object.DestroyImmediate(renderTexture);
     }
 }
コード例 #7
0
    private void InitRally(int index, Transform t)
    {
        //IL_0072: Unknown result type (might be due to invalid IL or missing references)
        //IL_0086: Unknown result type (might be due to invalid IL or missing references)
        SetEvent(t, "JOIN_MAP", index);
        LoungeModel.SlotInfo slotInfo           = rallyInvites[index];
        CharaInfo            userInfo           = slotInfo.userInfo;
        FollowLoungeMember   followLoungeMember = MonoBehaviourSingleton <LoungeMatchingManager> .I.GetFollowLoungeMember(userInfo.userId);

        EquipSetCalculator otherEquipSetCalculator = MonoBehaviourSingleton <StatusManager> .I.GetOtherEquipSetCalculator(index + 4);

        otherEquipSetCalculator.SetEquipSet(slotInfo.userInfo.equipSet, false);
        SetRenderPlayerModel(t, UI.TEX_MODEL, PlayerLoadInfo.FromCharaInfo(userInfo, false, true, false, true), 99, new Vector3(0f, -1.536f, 1.87f), new Vector3(0f, 154f, 0f), true, null);
        SetLabelText(t, UI.LBL_NAME, userInfo.name);
        SetLabelText(t, UI.LBL_LEVEL, userInfo.level.ToString());
        SetFollowStatus(t, userInfo.userId, followLoungeMember.following, followLoungeMember.follower);
        SetActive(t, UI.SPR_ICON_HOST, userInfo.userId == MonoBehaviourSingleton <LoungeMatchingManager> .I.loungeData.ownerUserId);
        SetPlayingStatus(t, userInfo.userId);
        SetActive(t, UI.SPR_ICON_FIRST_MET, MonoBehaviourSingleton <LoungeMatchingManager> .I.CheckFirstMet(userInfo.userId));
        DegreePlate component = FindCtrl(t, UI.OBJ_DEGREE_FRAME_ROOT).GetComponent <DegreePlate>();

        component.Initialize(userInfo.selectedDegrees, false, delegate
        {
            RepositionTable();
        });
    }
コード例 #8
0
    protected void SetCharaInfo(FriendCharaInfo data, int i, Transform t, bool is_recycle, bool isGM)
    {
        //IL_001f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0033: Unknown result type (might be due to invalid IL or missing references)
        //IL_006b: Unknown result type (might be due to invalid IL or missing references)
        //IL_007f: Unknown result type (might be due to invalid IL or missing references)
        if (isGM)
        {
            SetRenderNPCModel(t, UI.TEX_MODEL, 0, new Vector3(0f, -1.49f, 1.87f), new Vector3(0f, 154f, 0f), 10f, null);
        }
        else
        {
            SetRenderPlayerModel(t, UI.TEX_MODEL, PlayerLoadInfo.FromCharaInfo(data, false, true, false, true), 99, new Vector3(0f, -1.536f, 1.87f), new Vector3(0f, 154f, 0f), true, null);
        }
        SetLabelText(t, UI.LBL_NAME, data.name);
        SetLabelText(t, UI.LBL_LEVEL, data.level.ToString());
        SetLabelText(t, UI.LBL_COMMENT, data.comment);
        SetLabelText(t, UI.LBL_LAST_LOGIN, base.sectionData.GetText("LAST_LOGIN"));
        SetLabelText(t, UI.LBL_LAST_LOGIN_TIME, data.lastLogin);
        EquipSetCalculator otherEquipSetCalculator = MonoBehaviourSingleton <StatusManager> .I.GetOtherEquipSetCalculator(i + 4);

        otherEquipSetCalculator.SetEquipSet(data.equipSet, false);
        SimpleStatus finalStatus = otherEquipSetCalculator.GetFinalStatus(0, data.hp, data.atk, data.def);

        SetLabelText(t, UI.LBL_ATK, finalStatus.GetAttacksSum().ToString());
        SetLabelText(t, UI.LBL_DEF, finalStatus.defences[0].ToString());
        SetLabelText(t, UI.LBL_HP, finalStatus.hp.ToString());
        DegreePlate component = FindCtrl(t, UI.OBJ_DEGREE_FRAME_ROOT).GetComponent <DegreePlate>();

        component.Initialize(data.selectedDegrees, false, delegate
        {
            GetCtrl(UI.GRD_LIST).GetComponent <UIGrid>().Reposition();
        });
    }
コード例 #9
0
 protected void ReloadPlayerModelByLocalEquipSet()
 {
     SetLabelText(transRoot, UI.LBL_SET_NAME, localEquipSet.name);
     record.playerLoadInfo = PlayerLoadInfo.FromUserStatus(true, isVisualMode, selfCharaEquipSetNo);
     record.playerLoadInfo.SetupLoadInfo(localEquipSet, 0uL, 0uL, 0uL, 0uL, 0uL, localEquipSet.showHelm == 1);
     SetRenderPlayerModel(record.playerLoadInfo);
 }
コード例 #10
0
    public static PlayerLoadInfo FromCharaInfo(CharaInfo chara_info, bool need_weapon, bool need_helm, bool need_leg, bool is_priority_visual_equip)
    {
        PlayerLoadInfo playerLoadInfo = new PlayerLoadInfo();

        playerLoadInfo.Apply(chara_info, need_weapon, need_helm, need_leg, is_priority_visual_equip);
        return(playerLoadInfo);
    }
コード例 #11
0
    public PlayerLoadInfo Clone()
    {
        PlayerLoadInfo playerLoadInfo = new PlayerLoadInfo();

        playerLoadInfo.faceModelID        = faceModelID;
        playerLoadInfo.hairModelID        = hairModelID;
        playerLoadInfo.headModelID        = headModelID;
        playerLoadInfo.bodyModelID        = bodyModelID;
        playerLoadInfo.armModelID         = armModelID;
        playerLoadInfo.legModelID         = legModelID;
        playerLoadInfo.weaponModelID      = weaponModelID;
        playerLoadInfo.skinColor          = skinColor;
        playerLoadInfo.hairColor          = hairColor;
        playerLoadInfo.headColor          = headColor;
        playerLoadInfo.bodyColor          = bodyColor;
        playerLoadInfo.armColor           = armColor;
        playerLoadInfo.legColor           = legColor;
        playerLoadInfo.weaponColor0       = weaponColor0;
        playerLoadInfo.weaponColor1       = weaponColor1;
        playerLoadInfo.weaponColor2       = weaponColor2;
        playerLoadInfo.weaponEffectID     = weaponEffectID;
        playerLoadInfo.weaponEffectParam  = weaponEffectParam;
        playerLoadInfo.weaponEffectColor  = weaponEffectColor;
        playerLoadInfo.weaponEvolveId     = weaponEvolveId;
        playerLoadInfo.equipType          = equipType;
        playerLoadInfo.weaponSpAttackType = weaponSpAttackType;
        playerLoadInfo.actionVoiceBaseID  = actionVoiceBaseID;
        return(playerLoadInfo);
    }
コード例 #12
0
 public void InitPlayer(UITexture ui_tex, PlayerLoadInfo info, int anim_id, Vector3 pos, Vector3 rot, bool is_priority_visual_equip, Action <PlayerLoader> onload_callback)
 {
     //IL_0050: Unknown result type (might be due to invalid IL or missing references)
     //IL_0052: Unknown result type (might be due to invalid IL or missing references)
     if ((!(playerLoader != null) || !playerLoader.isLoading) && (playerLoadInfo == null || !playerLoadInfo.Equals(info) || isPriorityVisualEquip != is_priority_visual_equip))
     {
         InitPlayerInFact(ui_tex, info, anim_id, pos, rot, is_priority_visual_equip, onload_callback);
     }
 }
コード例 #13
0
    protected override ModelLoaderBase LoadModel()
    {
        //IL_001d: Unknown result type (might be due to invalid IL or missing references)
        lastTargetNPCID = -1;
        sexType         = MonoBehaviourSingleton <UserInfoManager> .I.userStatus.sex;
        PlayerLoader playerLoader = this.get_gameObject().AddComponent <PlayerLoader>();

        playerLoader.StartLoad(PlayerLoadInfo.FromUserStatus(false, true, -1), 8, 99, false, false, true, true, false, false, false, false, SHADER_TYPE.NORMAL, null, true, -1);
        return(playerLoader);
    }
コード例 #14
0
    private void UpdateModel()
    {
        PlayerLoadInfo playerLoadInfo = new PlayerLoadInfo();

        playerLoadInfo.SetupLoadInfo(localEquipSet[equipSetNo], 0uL, visualEquip.VisialID(0), visualEquip.VisialID(1), visualEquip.VisialID(2), visualEquip.VisialID(3), localEquipSet[equipSetNo].showHelm == 1);
        if (MonoBehaviourSingleton <StatusStageManager> .IsValid())
        {
            MonoBehaviourSingleton <StatusStageManager> .I.LoadPlayer(playerLoadInfo);
        }
    }
コード例 #15
0
        public PlayerLoadInfo CreatePlayerLoadInfo()
        {
            PlayerLoadInfo playerLoadInfo = new PlayerLoadInfo();

            playerLoadInfo.SetFace(sexID, faceTypeID, skinColorID);
            playerLoadInfo.SetHair(sexID, hairStyleID, hairColorID);
            playerLoadInfo.SetEquipBody(sexID, (uint)bdy);
            playerLoadInfo.SetEquipHead(sexID, (uint)hlm);
            playerLoadInfo.SetEquipArm(sexID, (uint)arm);
            playerLoadInfo.SetEquipLeg(sexID, (uint)leg);
            return(playerLoadInfo);
        }
コード例 #16
0
    protected void SetCharaInfo(FriendCharaInfo data, int i, Transform t, bool is_recycle, bool isGM)
    {
        //IL_0045: Unknown result type (might be due to invalid IL or missing references)
        //IL_0059: Unknown result type (might be due to invalid IL or missing references)
        //IL_0091: Unknown result type (might be due to invalid IL or missing references)
        //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
        object[] event_data = new object[2]
        {
            data.userId,
            t
        };
        SetEvent(t, "SELECT_FRIEND", event_data);
        if (isGM)
        {
            SetRenderNPCModel(t, UI.TEX_MODEL, 0, new Vector3(0f, -1.49f, 1.87f), new Vector3(0f, 154f, 0f), 10f, null);
        }
        else
        {
            SetRenderPlayerModel(t, UI.TEX_MODEL, PlayerLoadInfo.FromCharaInfo(data, false, true, false, true), 99, new Vector3(0f, -1.536f, 1.87f), new Vector3(0f, 154f, 0f), true, null);
        }
        SetLabelText(t, UI.LBL_NAME, data.name);
        SetLabelText(t, UI.LBL_LEVEL, data.level.ToString());
        SetLabelText(t, UI.LBL_COMMENT, data.comment);
        SetLabelText(t, UI.LBL_LAST_LOGIN, base.sectionData.GetText("LAST_LOGIN"));
        SetLabelText(t, UI.LBL_LAST_LOGIN_TIME, data.lastLogin);
        EquipSetCalculator otherEquipSetCalculator = MonoBehaviourSingleton <StatusManager> .I.GetOtherEquipSetCalculator(i + 4);

        otherEquipSetCalculator.SetEquipSet(data.equipSet, false);
        SimpleStatus finalStatus = otherEquipSetCalculator.GetFinalStatus(0, data.hp, data.atk, data.def);

        SetLabelText(t, UI.LBL_ATK, finalStatus.GetAttacksSum().ToString());
        SetLabelText(t, UI.LBL_DEF, finalStatus.defences[0].ToString());
        SetLabelText(t, UI.LBL_HP, finalStatus.hp.ToString());
        if ((int)data.level < 15)
        {
            SetActive(t, UI.OBJ_DISABLE_USER_MASK, true);
            SetActive(t, UI.SPR_SELECTED, false);
            SetActive(t, UI.STR_LIMIT_LVL, true);
            SetEvent(t, "_", null);
        }
        else if (mInviteFriendIDs.Contains(data.userId))
        {
            SetActive(t, UI.OBJ_DISABLE_USER_MASK, true);
            SetActive(t, UI.SPR_SELECTED, true);
            SetActive(t, UI.STR_LIMIT_LVL, false);
        }
        else
        {
            SetActive(t, UI.OBJ_DISABLE_USER_MASK, false);
            SetActive(t, UI.SPR_SELECTED, false);
            SetActive(t, UI.STR_LIMIT_LVL, false);
        }
    }
コード例 #17
0
 public void LoadPlayer(PlayerLoadInfo load_info)
 {
     //IL_002f: Unknown result type (might be due to invalid IL or missing references)
     //IL_003a: Unknown result type (might be due to invalid IL or missing references)
     //IL_004e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0053: Unknown result type (might be due to invalid IL or missing references)
     //IL_0122: Unknown result type (might be due to invalid IL or missing references)
     if (playerShadow == null)
     {
         playerShadow = PlayerLoader.CreateShadow(MonoBehaviourSingleton <StageManager> .I.stageObject, false, -1, false);
         playerShadow.get_transform().set_position(parameter.playerPos + new Vector3(0f, 0.005f, 0f));
     }
     ShaderGlobal.lightProbe = false;
     if (!(playerLoader != null) || !playerLoader.loadInfo.Equals(load_info))
     {
         if (renderTexture != null)
         {
             Object.DestroyImmediate(renderTexture);
         }
         renderTexture = UIRenderTexture.Get(uiTexture, -1f, true, -1);
         renderTexture.Disable();
         renderTexture.nearClipPlane = parameter.renderTextureNearClip;
         int num = -1;
         if (MonoBehaviourSingleton <OutGameSettingsManager> .IsValid())
         {
             num = ((!MonoBehaviourSingleton <OutGameSettingsManager> .I.statusScene.isChangeHairShader) ? (-1) : MonoBehaviourSingleton <UserInfoManager> .I.userStatus.hairColorId);
         }
         playerLoader = renderTexture.modelTransform.get_gameObject().AddComponent <PlayerLoader>();
         PlayerLoader obj = playerLoader;
         int          use_hair_overlay = num;
         obj.StartLoad(load_info, renderTexture.renderLayer, PLAYER_ANIM_TYPE.GetStatus(MonoBehaviourSingleton <UserInfoManager> .I.userStatus.sex), false, false, false, false, false, true, true, true, SHADER_TYPE.NORMAL, delegate
         {
             //IL_0006: Unknown result type (might be due to invalid IL or missing references)
             //IL_0011: Unknown result type (might be due to invalid IL or missing references)
             //IL_0021: Unknown result type (might be due to invalid IL or missing references)
             //IL_0056: Unknown result type (might be due to invalid IL or missing references)
             //IL_00a2: Unknown result type (might be due to invalid IL or missing references)
             //IL_00ad: Unknown result type (might be due to invalid IL or missing references)
             //IL_00b2: Unknown result type (might be due to invalid IL or missing references)
             //IL_00ba: Unknown result type (might be due to invalid IL or missing references)
             //IL_00bf: Unknown result type (might be due to invalid IL or missing references)
             playerLoader.get_transform().set_position(parameter.playerPos);
             playerLoader.get_transform().set_eulerAngles(new Vector3(0f, (viewMode != 0) ? parameter.avatarPlayerRot : parameter.playerRot, 0f));
             if (MonoBehaviourSingleton <UserInfoManager> .IsValid())
             {
                 UserStatus userStatus = MonoBehaviourSingleton <UserInfoManager> .I.userStatus;
                 float num2            = (userStatus.sex != 0) ? parameter.playerScaleFemale : parameter.playerScaleMale;
                 playerLoader.get_transform().set_localScale(playerLoader.get_transform().get_localScale().Mul(new Vector3(num2, num2, num2)));
             }
             renderTexture.Enable(0.25f);
         }, true, use_hair_overlay);
     }
 }
コード例 #18
0
 protected virtual void LoadModel()
 {
     //IL_0041: Unknown result type (might be due to invalid IL or missing references)
     //IL_0055: Unknown result type (might be due to invalid IL or missing references)
     SetRenderPlayerModel(transRoot, UI.TEX_MODEL, PlayerLoadInfo.FromCharaInfo(data, true, true, true, isVisualMode), PLAYER_ANIM_TYPE.GetStatus(data.sex), new Vector3(0f, -0.75f, 14f), new Vector3(0f, 180f, 0f), isVisualMode, delegate(PlayerLoader player_loader)
     {
         if (player_loader != null)
         {
             loader = player_loader;
         }
     });
 }
コード例 #19
0
    private static PlayerLoader Load(HomePlayerCharacter chara, GameObject go, FriendCharaInfo chara_info, PlayerLoader.OnCompleteLoad callback)
    {
        PlayerLoader   playerLoader   = go.AddComponent <PlayerLoader>();
        PlayerLoadInfo playerLoadInfo = new PlayerLoadInfo();

        if (chara_info != null)
        {
            playerLoadInfo.Apply(chara_info, false, true, true, true);
            chara.sexType = chara_info.sex;
        }
        else
        {
            int num = Random.Range(0, 2);
            int face_type_id;
            int hair_style_id;
            if (num == 0)
            {
                int[] defaultHasManFaceIndexes = Singleton <AvatarTable> .I.defaultHasManFaceIndexes;
                face_type_id = defaultHasManFaceIndexes[Random.Range(0, defaultHasManFaceIndexes.Length)];
                int[] defaultHasManHeadIndexes = Singleton <AvatarTable> .I.defaultHasManHeadIndexes;
                hair_style_id = defaultHasManHeadIndexes[Random.Range(0, defaultHasManHeadIndexes.Length)];
            }
            else
            {
                int[] defaultHasWomanFaceIndexes = Singleton <AvatarTable> .I.defaultHasWomanFaceIndexes;
                face_type_id = defaultHasWomanFaceIndexes[Random.Range(0, defaultHasWomanFaceIndexes.Length)];
                int[] defaultHasWomanHeadIndexes = Singleton <AvatarTable> .I.defaultHasWomanHeadIndexes;
                hair_style_id = defaultHasWomanHeadIndexes[Random.Range(0, defaultHasWomanHeadIndexes.Length)];
            }
            int[] defaultHasSkinColorIndexes = Singleton <AvatarTable> .I.defaultHasSkinColorIndexes;
            int   skin_color_id = defaultHasSkinColorIndexes[Random.Range(0, defaultHasSkinColorIndexes.Length)];
            int[] defaultHasHairColorIndexes = Singleton <AvatarTable> .I.defaultHasHairColorIndexes;
            int   hair_color_id = defaultHasHairColorIndexes[Random.Range(0, defaultHasHairColorIndexes.Length)];
            playerLoadInfo.SetFace(num, face_type_id, skin_color_id);
            playerLoadInfo.SetHair(num, hair_style_id, hair_color_id);
            OutGameSettingsManager.HomeScene.RandomEquip randomEquip = MonoBehaviourSingleton <OutGameSettingsManager> .I.homeScene.randomEquip;
            uint equip_body_item_id = (uint)Utility.Lot(randomEquip.bodys);
            uint equip_head_item_id = (uint)Utility.Lot(randomEquip.helms);
            uint equip_arm_item_id  = (uint)Utility.Lot(randomEquip.arms);
            uint equip_leg_item_id  = (uint)Utility.Lot(randomEquip.legs);
            playerLoadInfo.SetEquipBody(num, equip_body_item_id);
            if (Random.Range(0, 4) != 0)
            {
                playerLoadInfo.SetEquipHead(num, equip_head_item_id);
            }
            playerLoadInfo.SetEquipArm(num, equip_arm_item_id);
            playerLoadInfo.SetEquipLeg(num, equip_leg_item_id);
            chara.sexType = num;
        }
        playerLoader.StartLoad(playerLoadInfo, 0, 99, false, false, true, true, false, false, true, true, SHADER_TYPE.NORMAL, callback, true, -1);
        return(playerLoader);
    }
コード例 #20
0
    private PlayerLoader Load(LoungePlayer chara, GameObject go, CharaInfo chara_info, PlayerLoader.OnCompleteLoad callback)
    {
        PlayerLoader   playerLoader   = go.AddComponent <PlayerLoader>();
        PlayerLoadInfo playerLoadInfo = new PlayerLoadInfo();

        if (chara_info != null)
        {
            playerLoadInfo.Apply(chara_info, false, true, true, true);
            chara.sexType = chara_info.sex;
        }
        playerLoader.StartLoad(playerLoadInfo, 8, 99, false, false, true, true, false, false, true, true, SHADER_TYPE.NORMAL, callback, true, -1);
        return(playerLoader);
    }
コード例 #21
0
    private void SetFollowerInfo(GuildSearchFollowerRoomModel.GuildFollowerModel data, Transform t)
    {
        //IL_0029: Unknown result type (might be due to invalid IL or missing references)
        //IL_003d: Unknown result type (might be due to invalid IL or missing references)
        SetRenderPlayerModel(t, UI.TEX_MODEL, PlayerLoadInfo.FromCharaInfo(data.charInfo, false, true, false, true), 99, new Vector3(0f, -1.536f, 1.87f), new Vector3(0f, 154f, 0f), true, null);
        SetLabelText(t, UI.LBL_NAME, data.charInfo.name);
        SetLabelText(t, UI.LBL_LEVEL, data.charInfo.level.ToString());
        DegreePlate component = FindCtrl(t, UI.OBJ_DEGREE_FRAME_ROOT).GetComponent <DegreePlate>();

        component.Initialize(data.charInfo.selectedDegrees, false, delegate
        {
            GetCtrl(UI.GRD_LIST).GetComponent <UIGrid>().Reposition();
        });
    }
コード例 #22
0
    private IEnumerator Loading()
    {
        renderTexture.enableTexture = false;
        if (userInfo != null && userIndex >= 0)
        {
            bool is_owner = userInfo.userId == MonoBehaviourSingleton <PartyManager> .I.GetOwnerUserId();

            foreach (Transform item in model)
            {
                Transform t = item;
                Object.Destroy(t.get_gameObject());
            }
            PlayerLoadInfo load_info = new PlayerLoadInfo();
            load_info.Apply(userInfo, true, true, true, true);
            bool wait = true;
            loader = model.get_gameObject().AddComponent <PlayerLoader>();
            loader.StartLoad(load_info, renderTexture.renderLayer, 90, false, false, false, false, false, false, true, true, SHADER_TYPE.UI, delegate
            {
                //IL_004b: Unknown result type (might be due to invalid IL or missing references)
                //IL_005b: Unknown result type (might be due to invalid IL or missing references)
                //IL_0060: Unknown result type (might be due to invalid IL or missing references)
                //IL_0068: Unknown result type (might be due to invalid IL or missing references)
                //IL_006d: Unknown result type (might be due to invalid IL or missing references)
                ((_003CLoading_003Ec__Iterator105) /*Error near IL_0168: stateMachine*/)._003Cwait_003E__4 = false;
                float num = (((_003CLoading_003Ec__Iterator105) /*Error near IL_0168: stateMachine*/)._003C_003Ef__this.userInfo.sex != 0) ? MonoBehaviourSingleton <OutGameSettingsManager> .I.statusScene.playerScaleFemale : MonoBehaviourSingleton <OutGameSettingsManager> .I.statusScene.playerScaleMale;
                ((_003CLoading_003Ec__Iterator105) /*Error near IL_0168: stateMachine*/)._003C_003Ef__this.loader.get_transform().set_localScale(((_003CLoading_003Ec__Iterator105) /*Error near IL_0168: stateMachine*/)._003C_003Ef__this.loader.get_transform().get_localScale().Mul(new Vector3(num, num, num)));
            }, true, -1);
            int voice_id = -1;
            if (!is_owner)
            {
                voice_id = loader.GetVoiceId(ACTION_VOICE_EX_ID.ALLIVE_01);
                LoadingQueue lo_queue = new LoadingQueue(this);
                lo_queue.CacheActionVoice(voice_id, null);
                while (lo_queue.IsLoading())
                {
                    yield return((object)null);
                }
            }
            while (wait)
            {
                yield return((object)null);
            }
            animCtrl = PlayerAnimCtrl.Get(loader.animator, PlayerAnimCtrl.battleAnims[load_info.weaponModelID / 1000], null, OnAnimChange, OnAnimEnd);
            renderTexture.enableTexture = true;
            if (voice_id > 0)
            {
                SoundManager.PlayActionVoice(voice_id, 1f, 0u, null, null);
            }
        }
    }
コード例 #23
0
    private PlayerLoadInfo CreatePlayerLoadInfo(int set_no)
    {
        PlayerLoadInfo playerLoadInfo = new PlayerLoadInfo();
        UserStatus     userStatus     = MonoBehaviourSingleton <UserInfoManager> .I.userStatus;

        localEquipSet = MonoBehaviourSingleton <StatusManager> .I.GetEquipSet(set_no);

        StatusManager.LocalVisual localVisual = new StatusManager.LocalVisual();
        localVisual.visualItem[0] = ((!isVisualMode) ? null : MonoBehaviourSingleton <InventoryManager> .I.GetEquipItem(ulong.Parse(userStatus.armorUniqId)));
        localVisual.visualItem[1] = ((!isVisualMode) ? null : MonoBehaviourSingleton <InventoryManager> .I.GetEquipItem(ulong.Parse(userStatus.helmUniqId)));
        localVisual.visualItem[2] = ((!isVisualMode) ? null : MonoBehaviourSingleton <InventoryManager> .I.GetEquipItem(ulong.Parse(userStatus.armUniqId)));
        localVisual.visualItem[3] = ((!isVisualMode) ? null : MonoBehaviourSingleton <InventoryManager> .I.GetEquipItem(ulong.Parse(userStatus.legUniqId)));
        localVisual.isVisibleHelm = (MonoBehaviourSingleton <StatusManager> .I.GetEquippingShowHelm(set_no) > 0);
        playerLoadInfo.SetupLoadInfo(localEquipSet, 0uL, localVisual.VisialID(0), localVisual.VisialID(1), localVisual.VisialID(2), localVisual.VisialID(3), localVisual.isVisibleHelm);
        return(playerLoadInfo);
    }
コード例 #24
0
 public void ForceInitPlayer(UITexture ui_tex, PlayerLoadInfo info, int anim_id, Vector3 pos, Vector3 rot, bool is_priority_visual_equip, Action <PlayerLoader> onload_callback)
 {
     //IL_0064: Unknown result type (might be due to invalid IL or missing references)
     //IL_0066: Unknown result type (might be due to invalid IL or missing references)
     if (playerLoadInfo != null && playerLoadInfo.Equals(info) && isPriorityVisualEquip == is_priority_visual_equip)
     {
         onload_callback?.Invoke(null);
     }
     else
     {
         if (playerLoader != null && playerLoader.isLoading)
         {
             DeleteModel();
         }
         InitPlayerInFact(ui_tex, info, anim_id, pos, rot, is_priority_visual_equip, onload_callback);
     }
 }
コード例 #25
0
 public InGameRecorder.PlayerRecord CreateInGameRecord(CharaInfo _charaInfo)
 {
     if (_charaInfo != null)
     {
         charaInfo = _charaInfo;
     }
     InGameRecorder.PlayerRecord playerRecord = new InGameRecorder.PlayerRecord();
     playerRecord.id               = ((!isSelf) ? charaInfo.userId : 0);
     playerRecord.isNPC            = false;
     playerRecord.isSelf           = isSelf;
     playerRecord.charaInfo        = charaInfo;
     playerRecord.beforeLevel      = charaInfo.level;
     playerRecord.playerLoadInfo   = PlayerLoadInfo.FromCharaInfo(charaInfo, true, true, true, false);
     playerRecord.animID           = playerRecord.playerLoadInfo.weaponModelID / 1000;
     playerRecord.givenTotalDamage = givenTotalDamage;
     return(playerRecord);
 }
コード例 #26
0
    protected void SetCharaInfo(FriendCharaInfo data, int i, Transform t, bool is_recycle, bool isGM)
    {
        //IL_002d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0041: Unknown result type (might be due to invalid IL or missing references)
        //IL_007a: Unknown result type (might be due to invalid IL or missing references)
        //IL_008e: Unknown result type (might be due to invalid IL or missing references)
        SetEvent(t, "FOLLOW_INFO", i);
        if (isGM)
        {
            SetRenderNPCModel(t, UI.TEX_MODEL, 0, new Vector3(0f, -1.49f, 1.87f), new Vector3(0f, 154f, 0f), 10f, null);
        }
        else
        {
            ForceSetRenderPlayerModel(t, UI.TEX_MODEL, PlayerLoadInfo.FromCharaInfo(data, false, true, false, true), 99, new Vector3(0f, -1.536f, 1.87f), new Vector3(0f, 154f, 0f), true, null);
        }
        CharaInfo.ClanInfo clanInfo = data.clanInfo;
        if (clanInfo == null)
        {
            clanInfo        = new CharaInfo.ClanInfo();
            clanInfo.clanId = -1;
            clanInfo.tag    = string.Empty;
        }
        bool isSameTeam = clanInfo.clanId > -1 && MonoBehaviourSingleton <GuildManager> .I.guildData != null && clanInfo.clanId == MonoBehaviourSingleton <GuildManager> .I.guildData.clanId;

        SetSupportEncoding(t, UI.LBL_NAME, true);
        SetLabelText(t, UI.LBL_NAME, Utility.GetNameWithColoredClanTag(clanInfo.tag, data.name, data.userId == MonoBehaviourSingleton <UserInfoManager> .I.userInfo.id, isSameTeam));
        SetLabelText(t, UI.LBL_LEVEL, data.level.ToString());
        SetLabelText(t, UI.LBL_COMMENT, data.comment);
        SetLabelText(t, UI.LBL_LAST_LOGIN, base.sectionData.GetText("LAST_LOGIN"));
        SetLabelText(t, UI.LBL_LAST_LOGIN_TIME, data.lastLogin);
        EquipSetCalculator otherEquipSetCalculator = MonoBehaviourSingleton <StatusManager> .I.GetOtherEquipSetCalculator(i + 4);

        otherEquipSetCalculator.SetEquipSet(data.equipSet, false);
        SimpleStatus finalStatus = otherEquipSetCalculator.GetFinalStatus(0, data.hp, data.atk, data.def);

        SetLabelText(t, UI.LBL_ATK, finalStatus.GetAttacksSum().ToString());
        SetLabelText(t, UI.LBL_DEF, finalStatus.GetDefencesSum().ToString());
        SetLabelText(t, UI.LBL_HP, finalStatus.hp.ToString());
        DegreePlate component = FindCtrl(t, UI.OBJ_DEGREE_FRAME_ROOT).GetComponent <DegreePlate>();

        component.Initialize(data.selectedDegrees, false, delegate
        {
            GetCtrl(UI.GRD_LIST).GetComponent <UIGrid>().Reposition();
        });
    }
コード例 #27
0
 public override void Initialize()
 {
     charaInfo = (GameSection.GetEventData() as FriendCharaInfo);
     InGameRecorder.PlayerRecord playerRecord = new InGameRecorder.PlayerRecord();
     playerRecord.id             = charaInfo.userId;
     playerRecord.isNPC          = false;
     playerRecord.isSelf         = false;
     playerRecord.playerLoadInfo = PlayerLoadInfo.FromCharaInfo(charaInfo, true, true, true, true);
     playerRecord.animID         = PLAYER_ANIM_TYPE.GetStatus(charaInfo.sex);
     playerRecord.charaInfo      = charaInfo;
     GameSection.SetEventData(new object[3]
     {
         playerRecord,
         false,
         false
     });
     base.Initialize();
 }
コード例 #28
0
    private IEnumerator DoInitialize()
    {
        bool wait = true;

        degree = GetCtrl(UI.OBJ_DEGREE_ROOT).GetComponent <DegreePlate>();
        UserStatus   status    = MonoBehaviourSingleton <UserInfoManager> .I.userStatus;
        EquipSetInfo equip_set = MonoBehaviourSingleton <StatusManager> .I.GetEquipSet(status.eSetNo);

        uint visual_armor = uint.Parse(status.armorUniqId);
        uint visual_helm  = uint.Parse(status.helmUniqId);
        uint visual_arm   = uint.Parse(status.armUniqId);
        uint visual_leg   = uint.Parse(status.legUniqId);
        bool is_show_helm = MonoBehaviourSingleton <StatusManager> .I.GetEquippingShowHelm(status.eSetNo) == 1;

        PlayerLoadInfo load_info = new PlayerLoadInfo();

        load_info.SetupLoadInfo(equip_set, 0uL, visual_armor, visual_helm, visual_arm, visual_leg, is_show_helm);
        OutGameSettingsManager.ProfileScene param = MonoBehaviourSingleton <OutGameSettingsManager> .I.profileScene;
        UIRenderTexture rt = InitRenderTexture(UI.TEX_MODEL, param.cameraFieldOfView, false);

        if (!object.ReferenceEquals(rt, null))
        {
            rt.nearClipPlane = param.nearClip;
        }
        EnableRenderTexture(UI.TEX_MODEL);
        SetRenderPlayerModel((Enum)UI.TEX_MODEL, load_info, PLAYER_ANIM_TYPE.GetStatus(MonoBehaviourSingleton <UserInfoManager> .I.userStatus.sex), param.playerPos, new Vector3(0f, param.playerRot, 0f), is_show_helm, (Action <PlayerLoader>) delegate(PlayerLoader x)
        {
            ((_003CDoInitialize_003Ec__IteratorF4) /*Error near IL_01e7: stateMachine*/)._003C_003Ef__this.playerLoader = x;
            ((_003CDoInitialize_003Ec__IteratorF4) /*Error near IL_01e7: stateMachine*/)._003Cwait_003E__0 = false;
        });
        if (eventListener == null)
        {
            eventListener = GetCtrl(UI.OBJ_PROFILE_BG).GetComponent <UIEventListener>();
            UIEventListener uIEventListener = eventListener;
            uIEventListener.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener.onDrag, new UIEventListener.VectorDelegate(OnDrag));
        }
        while (wait)
        {
            yield return((object)null);
        }
        base.Initialize();
    }
コード例 #29
0
 public void InitPlayerInFact(UITexture ui_tex, PlayerLoadInfo info, int anim_id, Vector3 pos, Vector3 rot, bool is_priority_visual_equip, Action <PlayerLoader> onload_callback)
 {
     //IL_006c: Unknown result type (might be due to invalid IL or missing references)
     //IL_006e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0074: Unknown result type (might be due to invalid IL or missing references)
     //IL_0076: Unknown result type (might be due to invalid IL or missing references)
     isPriorityVisualEquip = is_priority_visual_equip;
     Init(ui_tex, 10f, LOADER_TYPE.PLAYER);
     if (uiRenderTexture != null && uiRenderTexture.nearClipPlane == -1f && pos.z > 13f)
     {
         uiRenderTexture.nearClipPlane = pos.z - 5f;
     }
     playerLoadInfo = info;
     modelPos       = pos;
     modelRot       = rot;
     playerAnimID   = anim_id;
     onPlayerLoadFinishedCallBack = onload_callback;
     playerLoader.StartLoad(info, modelLayer, playerAnimID, false, false, false, false, false, false, true, true, SHADER_TYPE.UI, OnPlayerLoadFinished, true, -1);
     LoadStart();
 }
コード例 #30
0
 public void Clear()
 {
     if (uiRenderTexture != null)
     {
         uiRenderTexture.Release();
         Object.Destroy(uiRenderTexture);
         uiRenderTexture = null;
     }
     DeleteModel();
     playerLoadInfo    = null;
     npcData           = null;
     equipItemID       = -1;
     skillItemID       = -1;
     skillSymbolItemID = -1;
     itemID            = -1;
     enemyID           = -1;
     foundationName    = null;
     uiTexture         = null;
     referenceSexID    = -1;
     referenceFaceID   = -1;
 }