Ejemplo n.º 1
0
 private bool OnGetConfigDataRsp(GetConfigRsp rsp)
 {
     base.UpdateField <int>(ref this.playerData.staminaRecoverConfigTime, (int)rsp.get_stamina_recover_config_time(), null);
     base.UpdateField <int>(ref this.playerData.skillPointRecoverConfigTime, (int)rsp.get_skill_point_recover_config_time(), null);
     base.UpdateField <int>(ref this.playerData.reviveHcoinCost, (int)rsp.get_avatar_revive_hcoin_cost(), null);
     base.UpdateField <int>(ref this.playerData.sameTypePowerUpRataInt, (int)rsp.get_same_type_power_up_rate(), null);
     base.UpdateField <int>(ref this.playerData.powerUpScoinCostRate, (int)rsp.get_power_up_scoin_cost_rate(), null);
     base.UpdateField <int>(ref this.playerData.maxFriend, (int)rsp.get_max_friend_num(), null);
     base.UpdateField <int>(ref this.playerData.endlessMinPlayerLevel, (int)rsp.get_endless_min_player_level(), null);
     base.UpdateField <int>(ref this.playerData.endlessMaxProgress, (int)rsp.get_endless_max_progress(), null);
     base.UpdateField <int>(rsp.get_endless_use_item_cd_timeSpecified(), ref this.playerData.endlessUseItemCDTime, (int)rsp.get_endless_use_item_cd_time(), null);
     base.UpdateField <int>(ref this.playerData.disjoin_equipment_back_exp_percent, (int)rsp.get_disjoin_equipment_back_exp_percent(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatBaseWeight, (int)rsp.get_avatar_combat_base_weight(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatBaseStarRate, (int)rsp.get_avatar_combat_base_star_rate(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatBaseLevelRate, (int)rsp.get_avatar_combat_base_level_rate(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatBaseUnlockStarRate, (int)rsp.get_avatar_combat_base_unlock_star_rate(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatSkillWeight, (int)rsp.get_avatar_combat_skill_weight(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatIslandWeight, (int)rsp.get_avatar_combat_island_weight(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatWeaponWeight, (int)rsp.get_avatar_combat_weapon_weight(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatWeaponRarityRate, (int)rsp.get_avatar_combat_weapon_rarity_rate(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatWeaponSubRarityRate, (int)rsp.get_avatar_combat_weapon_sub_rarity_rate(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatWeaponLevelRate, (int)rsp.get_avatar_combat_weapon_level_rate(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatStigmataWeight, (int)rsp.get_avatar_combat_stigmata_weight(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatStigmataRarityRate, (int)rsp.get_avatar_combat_stigmata_rarity_rate(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatStigmataSubRarityRate, (int)rsp.get_avatar_combat_stigmata_sub_rarity_rate(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatStigmataLevelRate, (int)rsp.get_avatar_combat_stigmata_level_rate(), null);
     base.UpdateField <int>(ref this.playerData.avatarCombatStigmataSuitNumRate, (int)rsp.get_avatar_combat_stigmata_suit_num_rate(), null);
     base.UpdateField <int>(ref this.playerData.minLevelToGenerateInviteCode, (int)rsp.get_min_invite_level(), null);
     base.UpdateField <int>(ref this.playerData.maxLevelToAcceptInvite, (int)rsp.get_max_accept_invitee_level(), null);
     foreach (AvatarCostPlusConfig config in rsp.get_avatar_cost_plus_config_list())
     {
         this.playerData.costAddByAvatarStar[(int)config.get_star()] = (int)config.get_cost_plus();
     }
     foreach (GetConfigRsp.GachaTicket ticket in rsp.get_gacha_ticket_list())
     {
         this.playerData.gachaTicketPriceDict[(int)ticket.get_material_id()]        = (int)ticket.get_hcoin_cost();
         this.playerData.gachaTicketPriceDict[(int)(ticket.get_material_id() * 10)] = (int)(ticket.get_hcoin_cost() * 10);
     }
     TimeUtil.SetServerCurTime(rsp.get_server_cur_time());
     TimeUtil.SetDayTimeOffset((int)rsp.get_day_time_offset());
     if (rsp.get_region_nameSpecified() && (Singleton <AccountManager> .Instance.manager != null))
     {
         Singleton <AccountManager> .Instance.manager.ChannelRegion = rsp.get_region_name();
     }
     return(false);
 }