public void AddAffixFashion(FashionInfo fashionInfo) { int affixEmptyIndex = this.GetAffixEmptyIndex(); if (affixEmptyIndex != -1) { this.mReward[affixEmptyIndex] = GameUITools.CreateReward(12, fashionInfo.ID, 1, this.mMailAffixGoods[affixEmptyIndex], false, true, 36f, -7f, -2000f, 20f, 13f, 7f, 0); if (this.mReward[affixEmptyIndex] != null) { this.mReward[affixEmptyIndex].AddComponent<UIDragScrollView>(); } this.mMailAffixGoods[affixEmptyIndex].gameObject.SetActive(true); } }
public CommonSourceItemData(EItemSource type, ulong index, FashionInfo fInfo = null) { if (type == EItemSource.EISource_SceneLoot) { Debug.LogError(new object[] { "SceneID is null" }); } this.mSourceType = type; this.id = index; this.mFashionInfo = fInfo; }
public static QuestRewardFashion CreateReward(FashionInfo info, int num) { GameObject gameObject = Tools.InstantiateGUIPrefab("GUI/QuestRewardFashion"); if (gameObject != null) { QuestRewardFashion questRewardFashion = gameObject.AddComponent<QuestRewardFashion>(); if (questRewardFashion != null) { questRewardFashion.Init(info, num); return questRewardFashion; } } return null; }
public void Init(int fashionInfoID, bool showTips) { this.fashionInfo = Globals.Instance.AttDB.FashionDict.GetInfo(fashionInfoID); if (this.fashionInfo == null) { global::Debug.LogErrorFormat("FashionDict.GetInfo, ID = {0}", new object[] { fashionInfoID }); return; } UISprite component = base.GetComponent<UISprite>(); component.spriteName = Tools.GetItemQualityIcon(this.fashionInfo.Quality); UISprite uISprite = GameUITools.FindUISprite("itemIcon", base.gameObject); uISprite.spriteName = this.fashionInfo.Icon; if (showTips) { UIEventListener expr_90 = UIEventListener.Get(base.gameObject); expr_90.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_90.onClick, new UIEventListener.VoidDelegate(this.OnRewardClick)); } }
private void Init(FashionInfo info, int num) { this.fashionInfo = info; if (this.fashionInfo == null) { base.gameObject.SetActive(false); return; } UISprite component = base.GetComponent<UISprite>(); component.spriteName = this.fashionInfo.Icon; UISprite uISprite = GameUITools.FindUISprite("Quality", base.gameObject); uISprite.spriteName = Tools.GetItemQualityIcon(this.fashionInfo.Quality); UILabel uILabel = GameUITools.FindUILabel("num", base.gameObject); if (num > 1) { uILabel.text = string.Format("{0}{1}[-] [FFFFFF]x{2}", Tools.GetItemQualityColorHex(this.fashionInfo.Quality), this.fashionInfo.Name, num); } else { uILabel.text = this.fashionInfo.Name; uILabel.color = Tools.GetItemQualityColor(this.fashionInfo.Quality); } }
public bool IsShiXiaoFashion(FashionInfo fInfo) { return fInfo != null && fInfo.Day > 0; }
private void RefreshReward() { if (this.mRewardData == null) { return; } if (this.showName) { this.mName.enabled = true; this.mName.color = Tools.GetItemQualityColor(0); } else { this.mName.enabled = false; } if (this.showNum) { this.mNum.enabled = true; } else { this.mNum.enabled = false; } ERewardType rewardType = (ERewardType)this.mRewardData.RewardType; switch (rewardType) { case ERewardType.EReward_Money: case ERewardType.EReward_Diamond: case ERewardType.EReward_Energy: case ERewardType.EReward_Exp: case ERewardType.EReward_GuildRepution: case ERewardType.EReward_MagicCrystal: case ERewardType.EReward_MagicSoul: case ERewardType.EReward_FireDragonScale: case ERewardType.EReward_KingMedal: case ERewardType.EReward_StarSoul: case ERewardType.EReward_Honor: case ERewardType.EReward_Emblem: case ERewardType.EReward_LopetSoul: case ERewardType.EReward_FestivalVoucher: this.mQualityMark.spriteName = Tools.GetRewardFrame(rewardType); this.mItemIcon.spriteName = Tools.GetRewardIcon(rewardType); this.mNum.text = Tools.FormatValue(this.mRewardData.RewardValue1); this.mName.text = Tools.GetRewardTypeName(rewardType, 0); this.mName.color = Tools.GetRewardNameColor(rewardType); break; case ERewardType.EReward_Item: { ItemInfo info = Globals.Instance.AttDB.ItemDict.GetInfo(this.mRewardData.RewardValue1); if (info == null) { global::Debug.LogErrorFormat("ItemDict.GetInfo error, id = {0}", new object[] { this.mRewardData.RewardValue1 }); return; } this.mItemInfo = info; this.SetType(CommonIconItem.ECIIT.ECIIT_Item); this.SetNum((!this.showNum) ? 0 : this.mRewardData.RewardValue2); break; } case ERewardType.EReward_Pet: { PetInfo info2 = Globals.Instance.AttDB.PetDict.GetInfo(this.mRewardData.RewardValue1); if (info2 == null) { global::Debug.LogErrorFormat("PetDict.GetInfo error, id = {0}", new object[] { this.mRewardData.RewardValue1 }); return; } this.mPetInfo = info2; this.SetType(CommonIconItem.ECIIT.ECIIT_Pet); this.SetNum((!this.showNum) ? 0 : this.mRewardData.RewardValue2); break; } case ERewardType.EReward_Fashion: { FashionInfo info3 = Globals.Instance.AttDB.FashionDict.GetInfo(this.mRewardData.RewardValue1); if (info3 == null) { global::Debug.LogErrorFormat("FashionDict.GetInfo error, id = {0}", new object[] { this.mRewardData.RewardValue1 }); return; } this.mFashionInfo = info3; this.SetType(CommonIconItem.ECIIT.ECIIT_Fashion); this.SetNum((!this.showNum) ? 0 : this.mRewardData.RewardValue2); break; } case ERewardType.EReward_Lopet: { LopetInfo info4 = Globals.Instance.AttDB.LopetDict.GetInfo(this.mRewardData.RewardValue1); if (info4 == null) { global::Debug.LogErrorFormat("LopetDict.GetInfo error, id = {0}", new object[] { this.mRewardData.RewardValue1 }); return; } this.mLopetInfo = info4; this.SetType(CommonIconItem.ECIIT.ECIIT_Lopet); this.SetNum((!this.showNum) ? 0 : this.mRewardData.RewardValue2); break; } } }
private void ClearData() { this.mItemInfo = null; this.mPetInfo = null; this.mPetData = null; this.mRewardData = null; this.mFashionInfo = null; }
public void Refresh(FashionInfo info, bool showName = false, bool showNum = false, bool showMinus = false) { if (this.mFashionInfo == info) { return; } this.InitBool(showName, showNum, showMinus); this.mFashionInfo = info; this.SetType(CommonIconItem.ECIIT.ECIIT_Fashion); }
public static ResourceEntity CreateUIFashion(FashionInfo fInfo, int depth = 0, bool playAction = false, bool canRotate = false, GameObject parent = null, float scale = 1f, Action<GameObject> callback = null) { if (fInfo == null) { if (callback != null) { callback(null); } return null; } return ActorManager.CreateUIActorAsync(fInfo.ResLoc, fInfo.WeaponResLoc, scale, depth, playAction, canRotate, parent, fInfo.Gender - 1, string.Empty, 180f, callback); }
public override void InitPopUp(FashionInfo fashionInfo) { if (fashionInfo == null) { return; } this.mFashionInfo = fashionInfo; this.InitFashion(); }
public static void ShowThis(FashionInfo info) { if (info == null) { return; } GameUIPopupManager.GetInstance().PushState(GameUIPopupManager.eSTATE.GUIHowGetPetItemPopUp, false, null, null); GameUIPopupManager.GetInstance().GetCurrentPopup().InitPopUp(info); }
public ShiZhuangItemData(FashionInfo fi) { this.mFashionInfo = fi; }
public void Init(int slot, int fashionID, RemotePlayerDetail data) { this.local = false; this.socketSlot = slot; int num = this.socketSlot * 6; for (int i = 0; i < data.Equips.Count; i++) { int num2 = (int)data.Equips[i].ID - num; if (num2 >= 0 && num2 < 6) { ItemInfo info = Globals.Instance.AttDB.ItemDict.GetInfo(data.Equips[i].InfoID); if (info == null) { Debug.LogErrorFormat("ItemDict.GetInfo error, id = {0}", new object[] { data.Equips[i].InfoID }); } else { this.equips[num2] = new ItemDataEx(data.Equips[i], info); if (this.equips[num2] != null) { this.equips[num2].SetEquipSlot(this.socketSlot * 6 + num2); } } } } if (fashionID != 0) { this.fashion = Globals.Instance.AttDB.FashionDict.GetInfo(fashionID); if (this.fashion == null) { Debug.LogErrorFormat("FashionDict.GetInfo error, id = {0}", new object[] { fashionID }); } else { PlayerPetInfo.Info2.Icon = this.fashion.Icon; } } for (int j = 0; j < data.Pets.Count; j++) { if (this.socketSlot == (int)data.Pets[j].ID) { PetInfo info2 = Globals.Instance.AttDB.PetDict.GetInfo(data.Pets[j].InfoID); if (info2 != null) { this.petData = new PetDataEx(data.Pets[j], info2); this.EquipPet(this.petData); break; } Debug.LogErrorFormat("PetDict.GetInfo error, id = {0}", new object[] { data.Pets[j].InfoID }); } } }
public void EquipFashion(int fashionID) { if (this.socketSlot != 0 || fashionID == 0) { return; } FashionInfo info = Globals.Instance.AttDB.FashionDict.GetInfo(fashionID); if (info == null) { Debug.LogErrorFormat("FashionDict.GetInfo error, id = {0}", new object[] { fashionID }); return; } this.fashion = info; PlayerPetInfo.Info.Icon = this.fashion.Icon; }
public virtual void InitPopUp(FashionInfo fashionInfo) { }