public static MoleMole.MPAvatarDataItem Deserialize(MoleMole.MPProtocol.MPAvatarDataItem table, MoleMole.MPAvatarDataItem obj) { if (obj == null) { obj = new MoleMole.MPAvatarDataItem(); } obj.avatarID = table.AvatarID; obj.level = table.Level; obj.star = table.Star; obj.finalHP = table.FinalHP; obj.finalSP = table.FinalSP; obj.finalAttack = table.FinalAttack; obj.finalCritical = table.FinalCritical; obj.finalDefense = table.FinalDefense; return(obj); }
private void DebugCreateStageWithFullDataSync_Impl(Packet_Level_CreateStageFullData fullData) { Singleton <LevelScoreManager> .Instance.SetDevLevelBeginIntent("Lua/Levels/Common/Level 0.lua", LevelActor.Mode.NetworkedMP, 10, 10, null); Singleton <LevelScoreManager> .Instance.memberList = new List <AvatarDataItem>(); for (int i = 0; i < fullData.AvatarsLength; i++) { MoleMole.MPProtocol.MPAvatarDataItem avatars = fullData.GetAvatars(i); AvatarDataItem item = new AvatarDataItem(avatars.AvatarID, avatars.Level, avatars.Star); ConfigAvatar avatarConfig = AvatarData.GetAvatarConfig(item.AvatarRegistryKey); WeaponDataItem dummyFirstWeaponDataByRole = Singleton <StorageModule> .Instance.GetDummyFirstWeaponDataByRole(avatarConfig.CommonArguments.RoleName, 1); item.equipsMap[1] = dummyFirstWeaponDataByRole; Singleton <LevelScoreManager> .Instance.memberList.Add(item); } Singleton <LevelManager> .Instance.levelActor.SuddenLevelStart(); Singleton <LevelManager> .Instance.levelActor.levelMode = LevelActor.Mode.NetworkedMP; Singleton <MPLevelManager> .Instance.mpMode = fullData.MpMode; if (fullData.MpMode == MPMode.Normal) { Singleton <LevelManager> .Instance.gameMode = new NetworkedMP_Default_GameMode(); } else if (fullData.MpMode == MPMode.PvP_ReceiveNoSend) { Singleton <LevelManager> .Instance.gameMode = new NetworkedMP_PvPTest_GameMode(); } else if (fullData.MpMode == MPMode.PvP_SendNoReceive) { Singleton <LevelManager> .Instance.gameMode = new NetworkedMP_PvPTest_GameMode(); } List <string> avatarSpawnNameList = new List <string> { "Born" }; Singleton <StageManager> .Instance.CreateStage(fullData.StageData.StageName, avatarSpawnNameList, null, false); }