public void ParseConfig(CFriendRecruit.RecruitData data) { for (int i = 0; i < this.m_rewardConfig.get_Count(); i++) { ResRecruitmentReward resRecruitmentReward = this.m_rewardConfig.get_Item(i); if (data.type == resRecruitmentReward.bRecruimentType) { CFriendRecruit.RecruitReward reward = data.GetReward(resRecruitmentReward.wID); if (reward == null || reward.state != CFriendRecruit.RewardState.Getted) { data.SetReward(resRecruitmentReward.wID, CFriendRecruit.RewardState.Normal); } } } }
public void SetZhaoMuZheRewardData(COMDT_FRIEND_INFO friendData, ushort rewardID, CFriendRecruit.RewardState state) { CFriendRecruit.RecruitData zhaoMuZhe = this.GetZhaoMuZhe(friendData.stUin.ullUid, friendData.stUin.dwLogicWorldId); if (zhaoMuZhe != null) { zhaoMuZhe.SetReward(rewardID, state); } else { CFriendRecruit.RecruitData validRecruitData = this.GetValidRecruitData(); if (validRecruitData != null) { validRecruitData.userInfo = friendData; validRecruitData.SetReward(rewardID, state); } } }
public static void On_Send_INTIMACY_RELATION_REQUEST(CSPkg msg) { Singleton <CUIManager> .GetInstance().CloseSendMsgAlert(); SCPKG_RECRUITMENT_REWARD_RSP stRecruitmentRewardRsp = msg.stPkgData.stRecruitmentRewardRsp; CFriendRecruit friendRecruit = Singleton <CFriendContoller> .instance.model.friendRecruit; ResRecruitmentReward cfgReward = friendRecruit.GetCfgReward(stRecruitmentRewardRsp.wRecruitRewardId); if (cfgReward.bRewardType == 2) { friendRecruit.SetBITS((RES_RECRUIMENT_BITS)cfgReward.bRewardBit, true); } CFriendRecruit.RecruitData recruitData = friendRecruit.GetRecruitData(stRecruitmentRewardRsp.stUin.ullUid, stRecruitmentRewardRsp.stUin.dwLogicWorldId); recruitData.SetReward(stRecruitmentRewardRsp.wRecruitRewardId, CFriendRecruit.RewardState.Getted); if (friendRecruit.SuperReward.rewardID == stRecruitmentRewardRsp.wRecruitRewardId) { friendRecruit.SuperReward.state = CFriendRecruit.RewardState.Getted; } }