public static void ReciveSymbolBreakRsp(CSPkg msg) { Singleton <CUIManager> .GetInstance().CloseSendMsgAlert(); SCPKG_CMD_SYMBOL_BREAK stSymbolBreakRsp = msg.stPkgData.stSymbolBreakRsp; int num = 0; for (int i = 0; i < stSymbolBreakRsp.wSymbolCnt; i++) { ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(stSymbolBreakRsp.astSymbolList[i].dwSymbolID); if (dataByKey != null) { num += (int)(dataByKey.dwBreakCoin * stSymbolBreakRsp.astSymbolList[i].iSymbolCnt); } } s_breakSymbolCoinCnt = num; if (num > 0) { if (stSymbolBreakRsp.bBreakType == 0) { Singleton <CSymbolSystem> .GetInstance().m_symbolMakeCtrl.PlaySingleBreakAnimator(); Singleton <CSymbolSystem> .GetInstance().m_symbolMakeCtrl.RefreshSymbolTransformForm(); } else if (stSymbolBreakRsp.bBreakType == 1) { Singleton <CSymbolSystem> .GetInstance().m_symbolMakeCtrl.PlayBatchBreakAnimator(); Singleton <CSymbolSystem> .GetInstance().m_symbolMakeCtrl.OnReceiveBreakItemList(); Singleton <CSymbolSystem> .GetInstance().m_symbolMakeCtrl.RefreshSymbolBreakForm(); } } }
public static void RefreshSymbolItem(ResSymbolInfo symbolInfo, GameObject widget, CUIFormScript form) { if ((symbolInfo != null) && (widget != null)) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo != null) { CUseable useableByBaseID = masterRoleInfo.GetUseableContainer(enCONTAINER_TYPE.ITEM).GetUseableByBaseID(COM_ITEM_TYPE.COM_OBJTYPE_ITEMSYMBOL, symbolInfo.dwID); Image component = widget.transform.Find("iconImage").GetComponent <Image>(); Text text = widget.transform.Find("countText").GetComponent <Text>(); Text text2 = widget.transform.Find("nameText").GetComponent <Text>(); Text text3 = widget.transform.Find("descText").GetComponent <Text>(); component.SetSprite(string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Icon_Dir, symbolInfo.dwIcon), form, true, false, false); text.text = (useableByBaseID == null) ? string.Empty : useableByBaseID.m_stackCount.ToString(); text2.text = symbolInfo.szName; text3.text = CSymbolSystem.GetSymbolAttString(symbolInfo.dwID, true); CUIEventScript script = widget.GetComponent <CUIEventScript>(); if (script != null) { stUIEventParams eventParams = new stUIEventParams(); eventParams.symbolTransParam.symbolCfgInfo = symbolInfo; script.SetUIEvent(enUIEventType.Click, enUIEventID.SymbolMake_ListItemClick, eventParams); } if (useableByBaseID != null) { CUICommonSystem.PlayAnimator(widget, "Symbol_Normal"); } else { CUICommonSystem.PlayAnimator(widget, "Symbol_Disabled"); } } } }
private void OnSymbolMakeListClick(CUIEvent uiEvent) { this.m_curTransformSymbol = uiEvent.m_eventParams.symbolTransParam.symbolCfgInfo; Singleton <CUIManager> .GetInstance().OpenForm(s_symbolTransformPath, false, true); this.RefreshSymbolTransformForm(); }
public CSymbolItem(ulong objID, uint baseID, int stackCount = 0, int addTime = 0) { this.m_SymbolData = GameDataMgr.symbolInfoDatabin.GetDataByKey(baseID); if (this.m_SymbolData != null) { base.m_type = COM_ITEM_TYPE.COM_OBJTYPE_ITEMSYMBOL; base.m_objID = objID; base.m_baseID = baseID; base.m_name = StringHelper.UTF8BytesToString(ref this.m_SymbolData.szName); base.m_description = StringHelper.UTF8BytesToString(ref this.m_SymbolData.szDesc); base.m_iconID = this.m_SymbolData.dwIcon; base.m_stackCount = stackCount; base.m_stackMax = this.m_SymbolData.iOverLimit; base.m_goldCoinBuy = this.m_SymbolData.dwPVPCoinBuy; base.m_dianQuanBuy = this.m_SymbolData.dwCouponsBuy; base.m_diamondBuy = this.m_SymbolData.dwDiamondBuy; base.m_arenaCoinBuy = this.m_SymbolData.dwArenaCoinBuy; base.m_burningCoinBuy = this.m_SymbolData.dwBurningCoinBuy; base.m_dianQuanDirectBuy = 0; base.m_guildCoinBuy = this.m_SymbolData.dwGuildCoinBuy; base.m_coinSale = this.m_SymbolData.dwCoinSale; base.m_grade = (byte)(this.m_SymbolData.wLevel - 1); base.m_isSale = this.m_SymbolData.bIsSale; base.m_addTime = addTime; base.ResetTime(); } }
public static void GetSymbolProp(uint symbolId, ref int[] propArr, ref int[] propPctArr, bool bPvp) { int index = 0; int num2 = 0x24; for (index = 0; index < num2; index++) { propArr[index] = 0; propPctArr[index] = 0; } ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(symbolId); if (dataByKey != null) { ResDT_FuncEft_Obj[] objArray = !bPvp ? dataByKey.astPveEftList : dataByKey.astFuncEftList; for (int i = 0; i < objArray.Length; i++) { if (((objArray[i].wType != 0) && (objArray[i].wType < 0x24)) && (objArray[i].iValue != 0)) { if (objArray[i].bValType == 0) { propArr[objArray[i].wType] += objArray[i].iValue; } else if (objArray[i].bValType == 1) { propPctArr[objArray[i].wType] += objArray[i].iValue; } } } } }
public static void GetSymbolProp(uint symbolId, ref int[] propArr, ref int[] propPctArr, bool bPvp) { int num = 37; for (int i = 0; i < num; i++) { propArr[i] = 0; propPctArr[i] = 0; } ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(symbolId); if (dataByKey == null) { return; } ResDT_FuncEft_Obj[] array = (!bPvp) ? dataByKey.astPveEftList : dataByKey.astFuncEftList; for (int j = 0; j < array.Length; j++) { if (array[j].wType != 0 && array[j].wType < 37 && array[j].iValue != 0) { if (array[j].bValType == 0) { propArr[(int)array[j].wType] += array[j].iValue; } else if (array[j].bValType == 1) { propPctArr[(int)array[j].wType] += array[j].iValue; } } } }
public static void RefreshSymbolPropContent(GameObject propPanel, uint symbolId) { ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(symbolId); if (propPanel == null || dataByKey == null) { return; } CSymbolSystem.GetSymbolProp(symbolId, ref CSymbolSystem.s_symbolPagePropArr, ref CSymbolSystem.s_symbolPagePropPctArr, true); CSymbolSystem.GetSymbolProp(symbolId, ref CSymbolSystem.s_symbolPropValAddArr, ref CSymbolSystem.s_symbolPropPctAddArr, false); int num = 37; for (int i = 0; i < num; i++) { CSymbolSystem.s_symbolPropValAddArr[i] = CSymbolSystem.s_symbolPropValAddArr[i] - CSymbolSystem.s_symbolPagePropArr[i]; CSymbolSystem.s_symbolPropPctAddArr[i] = CSymbolSystem.s_symbolPropPctAddArr[i] - CSymbolSystem.s_symbolPagePropPctArr[i]; } Transform transform = propPanel.transform.Find("pvpPropPanel"); GameObject gameObject = transform.Find("propList").gameObject; CSymbolSystem.RefreshPropPanel(gameObject, ref CSymbolSystem.s_symbolPagePropArr, ref CSymbolSystem.s_symbolPagePropPctArr); Transform transform2 = propPanel.transform.Find("pveEnhancePropPanel"); GameObject gameObject2 = transform2.Find("propList").gameObject; CSymbolSystem.RefreshPropPanel(gameObject2, ref CSymbolSystem.s_symbolPropValAddArr, ref CSymbolSystem.s_symbolPropPctAddArr); }
public static void RefreshSymbolItem(ResSymbolInfo symbolInfo, GameObject widget, CUIFormScript form, enSymbolMakeSource source = enSymbolMakeSource.SymbolManage) { if (symbolInfo == null || widget == null) { return; } CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo == null) { return; } CUseableContainer useableContainer = masterRoleInfo.GetUseableContainer(enCONTAINER_TYPE.ITEM); CUseable useableByBaseID = useableContainer.GetUseableByBaseID(5, symbolInfo.dwID); Image component = widget.transform.Find("iconImage").GetComponent <Image>(); Text component2 = widget.transform.Find("countText").GetComponent <Text>(); Text component3 = widget.transform.Find("nameText").GetComponent <Text>(); Text component4 = widget.transform.Find("descText").GetComponent <Text>(); Transform transform = widget.transform.Find("Price"); if (transform != null) { Text componetInChild = Utility.GetComponetInChild <Text>(transform.gameObject, "Text"); if (componetInChild != null) { componetInChild.text = symbolInfo.dwMakeCoin.ToString(); } CUIEventScript component5 = transform.GetComponent <CUIEventScript>(); if (component5 != null) { stUIEventParams eventParams = default(stUIEventParams); eventParams.symbolTransParam.symbolCfgInfo = symbolInfo; component5.SetUIEvent(enUIEventType.Click, enUIEventID.SymbolMake_ListItemClick, eventParams); } } component.SetSprite(string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Icon_Dir, symbolInfo.dwIcon), form, true, false, false, false); component2.text = ((useableByBaseID == null) ? "0" : useableByBaseID.m_stackCount.ToString()); component3.text = symbolInfo.szName; component4.text = CSymbolSystem.GetSymbolAttString(symbolInfo.dwID, true); CUIEventScript component6 = widget.GetComponent <CUIEventScript>(); if (component6 != null) { stUIEventParams eventParams2 = default(stUIEventParams); eventParams2.symbolTransParam.symbolCfgInfo = symbolInfo; component6.SetUIEvent(enUIEventType.Click, enUIEventID.SymbolMake_ListItemClick, eventParams2); } if (source == enSymbolMakeSource.Mall) { CUICommonSystem.PlayAnimator(widget, "Symbol_Normal"); } else if (useableByBaseID != null) { CUICommonSystem.PlayAnimator(widget, "Symbol_Normal"); } else { CUICommonSystem.PlayAnimator(widget, "Symbol_Disabled"); } }
private static int GetHeroCombatEft(PoolObjHandle <ActorRoot> actor) { if (actor == 0) { return(0); } int num = 0; IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider); ActorServerData actorData = new ActorServerData(); if (actorDataProvider.GetActorServerData(ref actor.handle.TheActorMeta, ref actorData)) { num += CHeroInfo.GetCombatEftByStarLevel((int)actorData.Level, (int)actorData.Star); num += CSkinInfo.GetCombatEft((uint)actorData.TheActorMeta.ConfigId, actorData.SkinId); ActorServerRuneData runeData = new ActorServerRuneData(); for (int i = 0; i < 30; i++) { if (actorDataProvider.GetActorServerRuneData(ref actor.handle.TheActorMeta, (ActorRunelSlot)i, ref runeData)) { ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(runeData.RuneId); if (dataByKey != null) { num += dataByKey.iCombatEft; } } } } return(num); }
public void GetSymbolPageProp(int pageIndex, ref int[] propArr, ref int[] propPctArr, bool bPvp) { if (((pageIndex >= 0) && (pageIndex < 12)) && (((propArr != null) && (propPctArr != null)) && (this.m_symbolPageArr != null))) { int index = 0; int num2 = 0x24; for (index = 0; index < num2; index++) { propArr[index] = 0; propPctArr[index] = 0; } ulong[] numArray = this.m_symbolPageArr[pageIndex]; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if ((masterRoleInfo != null) && (numArray != null)) { CUseableContainer useableContainer = masterRoleInfo.GetUseableContainer(enCONTAINER_TYPE.ITEM); if (useableContainer == null) { DebugHelper.Assert(false, "GetSymbolPageProp container is null"); } else { for (index = 0; index < numArray.Length; index++) { if (numArray[index] > 0L) { CUseable useableByObjID = useableContainer.GetUseableByObjID(numArray[index]); if (useableByObjID != null) { ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(useableByObjID.m_baseID); if (dataByKey != null) { ResDT_FuncEft_Obj[] objArray = !bPvp ? dataByKey.astPveEftList : dataByKey.astFuncEftList; if (objArray != null) { for (int i = 0; i < objArray.Length; i++) { if (((objArray[i].wType != 0) && (objArray[i].wType < 0x24)) && (objArray[i].iValue != 0)) { if (objArray[i].bValType == 0) { propArr[objArray[i].wType] += objArray[i].iValue; } else if (objArray[i].bValType == 1) { propPctArr[objArray[i].wType] += objArray[i].iValue; } } } } } } } } } } } }
public void GetSymbolPageProp(int pageIndex, ref int[] propArr, ref int[] propPctArr, bool bPvp) { if (pageIndex < 0 || pageIndex >= 12 || propArr == null || propPctArr == null || this.m_symbolPageArr == null) { return; } int num = 37; for (int i = 0; i < num; i++) { propArr[i] = 0; propPctArr[i] = 0; } ulong[] array = this.m_symbolPageArr[pageIndex]; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo != null && array != null) { CUseableContainer useableContainer = masterRoleInfo.GetUseableContainer(enCONTAINER_TYPE.ITEM); if (useableContainer == null) { DebugHelper.Assert(false, "GetSymbolPageProp container is null"); return; } for (int i = 0; i < array.Length; i++) { if (array[i] > 0uL) { CUseable useableByObjID = useableContainer.GetUseableByObjID(array[i]); if (useableByObjID != null) { ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(useableByObjID.m_baseID); if (dataByKey != null) { ResDT_FuncEft_Obj[] array2 = (!bPvp) ? dataByKey.astPveEftList : dataByKey.astFuncEftList; if (array2 != null) { for (int j = 0; j < array2.Length; j++) { if (array2[j].wType != 0 && array2[j].wType < 37 && array2[j].iValue != 0) { if (array2[j].bValType == 0) { propArr[(int)array2[j].wType] += array2[j].iValue; } else if (array2[j].bValType == 1) { propPctArr[(int)array2[j].wType] += array2[j].iValue; } } } } } } } } } }
public static void Show(ResSymbolInfo symbolInfo, RES_SHOPBUY_COINTYPE coinType, float discount, CSymbolBuyPickDialog.OnConfirmBuyDelegate onClose, CSymbolBuyPickDialog.OnConfirmBuyCommonDelegate onConfirmCommon = null, CUIEvent uieventPars = null) { if (CSymbolBuyPickDialog.s_theDlg == null) { CSymbolBuyPickDialog.s_theDlg = new CSymbolBuyPickDialog(symbolInfo, coinType, discount, onClose, onConfirmCommon, uieventPars); if (CSymbolBuyPickDialog.s_theDlg._root == null) { CSymbolBuyPickDialog.s_theDlg = null; } } }
public static string GetSymbolAttString(uint cfgId, bool bPvp = true) { ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(cfgId); if (dataByKey == null) { return(string.Empty); } if (bPvp) { return(CUICommonSystem.GetFuncEftDesc(ref dataByKey.astFuncEftList, true)); } return(CUICommonSystem.GetFuncEftDesc(ref dataByKey.astPveEftList, true)); }
private void InitSymbolCfgList() { s_allSymbolCfgList.Clear(); Dictionary <long, object> .Enumerator enumerator = GameDataMgr.symbolInfoDatabin.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <long, object> current = enumerator.Current; ResSymbolInfo item = (ResSymbolInfo)current.Value; if ((item != null) && (item.bIsMakeShow > 0)) { s_allSymbolCfgList.Add(item); } } }
public static int GetSymbolLvWithArray(uint[] symbolArr) { int num = 0; for (int i = 0; i < symbolArr.Length; i++) { ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(symbolArr[i]); if (dataByKey != null) { num += (int)dataByKey.wLevel; } } return(num); }
private void OnRcmdListItemEnable(CUIEvent uiEvent) { if (this.m_rcmdSymbolList == null || this.m_rcmdSymbolList[(int)(this.m_symbolRcmdLevel - 1)] == null) { return; } if (uiEvent.m_srcWidgetIndexInBelongedList < 0 || uiEvent.m_srcWidgetIndexInBelongedList >= this.m_rcmdSymbolList[(int)(this.m_symbolRcmdLevel - 1)].get_Count()) { DebugHelper.Assert(false, "OnRcmdListItemEnable index out of range"); return; } ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(this.m_rcmdSymbolList[(int)(this.m_symbolRcmdLevel - 1)].get_Item(uiEvent.m_srcWidgetIndexInBelongedList)); CSymbolSystem.RefreshSymbolItem(dataByKey, uiEvent.m_srcWidget, uiEvent.m_srcFormScript, enSymbolMakeSource.SymbolManage); }
public static void RefreshSymbolPropContent(GameObject propPanel, uint symbolId) { ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(symbolId); if ((propPanel != null) && (dataByKey != null)) { GetSymbolProp(symbolId, ref s_symbolPagePropArr, ref s_symbolPagePropPctArr, true); GetSymbolProp(symbolId, ref s_symbolPropValAddArr, ref s_symbolPropPctAddArr, false); int num = 0x24; for (int i = 0; i < num; i++) { s_symbolPropValAddArr[i] -= s_symbolPagePropArr[i]; s_symbolPropPctAddArr[i] -= s_symbolPagePropPctArr[i]; } RefreshPropPanel(propPanel.transform.Find("pvpPropPanel").Find("propList").gameObject, ref s_symbolPagePropArr, ref s_symbolPagePropPctArr); RefreshPropPanel(propPanel.transform.Find("pveEnhancePropPanel").Find("propList").gameObject, ref s_symbolPropValAddArr, ref s_symbolPropPctAddArr); } }
public static void SetItemEtcCell(CUIFormScript form, GameObject item, Text name, COMDT_REWARD_INFO rewardInfo, COMDT_SETTLE_RESULT_DETAIL settleData) { byte bType = rewardInfo.bType; switch (bType) { case 1: { CUseable cUseable = CUseableManager.CreateUseable(2, 0uL, rewardInfo.stRewardInfo.get_stItem().dwItemID, (int)rewardInfo.stRewardInfo.get_stItem().dwCnt, 0); cUseable.SetMultiple(ref settleData.stMultipleDetail, true); CUICommonSystem.SetItemCell(form, item, cUseable, true, false, false, false); ResPropInfo dataByKey = GameDataMgr.itemDatabin.GetDataByKey(rewardInfo.stRewardInfo.get_stItem().dwItemID); if (dataByKey != null) { name.text = StringHelper.UTF8BytesToString(ref dataByKey.szName); } break; } case 2: break; case 3: { CUseable cUseable = CUseableManager.CreateVirtualUseable(enVirtualItemType.enDianQuan, (int)rewardInfo.stRewardInfo.dwCoupons); cUseable.SetMultiple(ref settleData.stMultipleDetail, true); CUICommonSystem.SetItemCell(form, item, cUseable, true, false, false, false); name.text = cUseable.m_name; break; } case 4: { CUseable cUseable = CUseableManager.CreateUseable(3, 0uL, rewardInfo.stRewardInfo.get_stEquip().dwEquipID, (int)rewardInfo.stRewardInfo.get_stEquip().dwCnt, 0); cUseable.SetMultiple(ref settleData.stMultipleDetail, true); CUICommonSystem.SetItemCell(form, item, cUseable, true, false, false, false); ResEquipInfo dataByKey2 = GameDataMgr.equipInfoDatabin.GetDataByKey(rewardInfo.stRewardInfo.get_stEquip().dwEquipID); if (dataByKey2 != null) { name.text = StringHelper.UTF8BytesToString(ref dataByKey2.szName); } break; } case 5: { CUseable cUseable = CUseableManager.CreateUseable(4, 0uL, rewardInfo.stRewardInfo.get_stHero().dwHeroID, (int)rewardInfo.stRewardInfo.get_stHero().dwCnt, 0); cUseable.SetMultiple(ref settleData.stMultipleDetail, true); CUICommonSystem.SetItemCell(form, item, cUseable, true, false, false, false); ResHeroCfgInfo dataByKey3 = GameDataMgr.heroDatabin.GetDataByKey(rewardInfo.stRewardInfo.get_stHero().dwHeroID); if (dataByKey3 != null) { name.text = StringHelper.UTF8BytesToString(ref dataByKey3.szName); } break; } case 6: { CUseable cUseable = CUseableManager.CreateUseable(5, 0uL, rewardInfo.stRewardInfo.get_stSymbol().dwSymbolID, (int)rewardInfo.stRewardInfo.get_stSymbol().dwCnt, 0); cUseable.SetMultiple(ref settleData.stMultipleDetail, true); CUICommonSystem.SetItemCell(form, item, cUseable, true, false, false, false); ResSymbolInfo dataByKey4 = GameDataMgr.symbolInfoDatabin.GetDataByKey(rewardInfo.stRewardInfo.get_stSymbol().dwSymbolID); if (dataByKey4 != null) { name.text = StringHelper.UTF8BytesToString(ref dataByKey4.szName); } break; } default: if (bType == 16) { CUseable cUseable = CUseableManager.CreateVirtualUseable(enVirtualItemType.enDiamond, (int)rewardInfo.stRewardInfo.dwDiamond); cUseable.SetMultiple(ref settleData.stMultipleDetail, true); CUICommonSystem.SetItemCell(form, item, cUseable, true, false, false, false); name.text = cUseable.m_name; } break; } }
public CSymbolBuyPickDialog(ResSymbolInfo symbolInfo, RES_SHOPBUY_COINTYPE coinType, float discount, CSymbolBuyPickDialog.OnConfirmBuyDelegate onConfirm, CSymbolBuyPickDialog.OnConfirmBuyCommonDelegate onConfirmCommon = null, CUIEvent uieventPars = null) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo == null) { return; } CUseableContainer useableContainer = masterRoleInfo.GetUseableContainer(enCONTAINER_TYPE.ITEM); this._usb = (useableContainer.GetUseableByBaseID(5, symbolInfo.dwID) as CSymbolItem); if (this._usb == null) { this._usb = (CUseableManager.CreateUseable(5, symbolInfo.dwID, 0) as CSymbolItem); } if (this._usb == null) { return; } CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CSymbolBuyPickDialog.s_Form_Path, false, true); if (null != cUIFormScript) { this._root = cUIFormScript.gameObject; this._itemCell = Utility.FindChild(this._root, "Panel/itemCell"); this._callContext = symbolInfo; this._count = 1u; if ((long)this._usb.m_stackCount >= 10L) { this._maxCount = 1u; } else { this._maxCount = (uint)(10 - this._usb.m_stackCount); } this._onConfirm = onConfirm; this._onConfirmdCommon = onConfirmCommon; this._uieventPars = uieventPars; this._coinType = coinType; this._realDiscount = discount; if (this._usb != null) { this._countText = Utility.GetComponetInChild <Text>(this._root, "Panel/Count"); this._costText = Utility.GetComponetInChild <Text>(this._root, "Panel/Cost"); CUICommonSystem.SetItemCell(cUIFormScript, this._itemCell, this._usb, true, false, false, false); this._descText = Utility.GetComponetInChild <Text>(this._root, "Panel/itemCell/SymbolDesc"); if (this._descText != null) { this._descText.text = CSymbolSystem.GetSymbolAttString(symbolInfo.dwID, true); } this._coinUsb = CUseableManager.CreateCoinUseable(coinType, 0); if (this._coinUsb != null) { Utility.GetComponetInChild <Image>(this._root, "Panel/Cost/CoinType").SetSprite(CUIUtility.GetSpritePrefeb(this._coinUsb.GetIconPath(), false, false), false); Utility.GetComponetInChild <Text>(this._root, "Panel/Price").text = this._usb.GetBuyPrice(this._coinType).ToString(); } } Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_CloseForm, new CUIEventManager.OnUIEventHandler(this.OnCloseForm)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Add, new CUIEventManager.OnUIEventHandler(this.OnClickAdd)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Dec, new CUIEventManager.OnUIEventHandler(this.OnClickDec)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Max, new CUIEventManager.OnUIEventHandler(this.OnClickMax)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Confirm, new CUIEventManager.OnUIEventHandler(this.OnClickConfirm)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Cancel, new CUIEventManager.OnUIEventHandler(this.OnClickCancel)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_ConfirmFactoryShopBuy, new CUIEventManager.OnUIEventHandler(this.OnConfirmFactoryShopBuy)); this.ValidateDynamic(); } }
public void AddSymbolPageAttToProp(ref ActorMeta meta, bool bPVPLevel) { for (int i = 0; i < 0x24; i++) { s_symbolPropValAddArr[i] = 0; } IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .GetInstance().GetActorDataProvider(GameActorDataProviderType.ServerDataProvider); ActorServerRuneData runeData = new ActorServerRuneData(); int index = 0; int bValType = 0; int val = 0; for (int j = 0; j < 30; j++) { if (actorDataProvider.GetActorServerRuneData(ref meta, (ActorRunelSlot)j, ref runeData)) { ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(runeData.RuneId); if (dataByKey != null) { if (bPVPLevel) { for (int m = 0; m < dataByKey.astFuncEftList.Length; m++) { index = dataByKey.astFuncEftList[m].wType; bValType = dataByKey.astFuncEftList[m].bValType; val = dataByKey.astFuncEftList[m].iValue; if (((index != 0) && (index < 0x24)) && (val != 0)) { switch (bValType) { case 0: s_symbolPropValAddArr[index] += val; break; case 1: this.ChangeFuncEft((RES_FUNCEFT_TYPE)index, (RES_VALUE_TYPE)bValType, val, true); break; } } } } else { for (int n = 0; n < dataByKey.astPveEftList.Length; n++) { index = dataByKey.astPveEftList[n].wType; bValType = dataByKey.astPveEftList[n].bValType; val = dataByKey.astPveEftList[n].iValue; if (((index != 0) && (index < 0x24)) && (val != 0)) { switch (bValType) { case 0: s_symbolPropValAddArr[index] += val; break; case 1: this.ChangeFuncEft((RES_FUNCEFT_TYPE)index, (RES_VALUE_TYPE)bValType, val, true); break; } } } } } } } for (int k = 0; k < 0x24; k++) { int num9 = s_symbolPropValAddArr[k] / 100; if (num9 > 0) { this.ChangeFuncEft((RES_FUNCEFT_TYPE)k, RES_VALUE_TYPE.TYPE_VALUE, num9, true); } } }
public static bool CheckTriggerCondition(uint id, NewbieGuideTriggerConditionItem condition) { bool flag6; uint dwCfgID; switch (condition.wType) { case 1: return(CheckCompleteNewbieDungeonCondition(condition)); case 2: return(CheckCompleteNormalDungeonCondition(condition)); case 3: return(CheckOwnCompleteNewbieGuideCondition(condition)); case 4: return(CheckUnCompleteNewbieGuideCondition(condition)); case 5: return(false); case 6: return(false); case 7: AvailableTask = null; return(Singleton <CTaskSys> .instance.model.AnyTaskOfState(COM_TASK_STATE.COM_TASK_HAVEDONE, RES_TASK_TYPE.RES_TASKTYPE_MAIN, out AvailableTask)); case 8: return(false); case 9: return(false); case 10: return(false); case 11: { uint num3 = condition.Param[0]; uint num4 = condition.Param[1]; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo == null) { return(false); } uint haveHeroCount = (uint)masterRoleInfo.GetHaveHeroCount(false); switch (num4) { case 0: return(haveHeroCount == num3); case 1: return(haveHeroCount > num3); case 2: return(haveHeroCount < num3); } DebugHelper.Assert(false); return(false); } case 12: { flag6 = false; dwCfgID = condition.Param[0]; RES_SHOPBUY_COINTYPE coinType = (condition.Param[1] != 0) ? RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_PVPCOIN : RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_COUPONS; CRoleInfo info5 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (info5 != null) { if (dwCfgID <= 0) { ListView <ResHeroCfgInfo> .Enumerator enumerator = CHeroDataFactory.GetAllHeroList().GetEnumerator(); while (enumerator.MoveNext()) { dwCfgID = enumerator.Current.dwCfgID; flag6 |= info5.CheckHeroBuyable(dwCfgID, coinType); if (flag6) { break; } } break; } flag6 = info5.CheckHeroBuyable(dwCfgID, coinType); } break; } case 13: return(Singleton <CShopSystem> .GetInstance().IsNormalShopItemsInited()); case 14: return(((Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().GoldCoin >= condition.Param[0]) && Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_SHOP)) && Singleton <CShopSystem> .GetInstance().IsNormalShopItemsInited()); case 15: return(CAdventureSys.IsChapterFullStar(Singleton <CAdventureSys> .GetInstance().currentChapter, Singleton <CAdventureSys> .GetInstance().currentDifficulty)); case 0x10: { uint num7 = condition.Param[0]; if (num7 <= 0) { return(false); } if (!Singleton <CAdventureSys> .GetInstance().IsLevelFinished((int)num7)) { return(false); } return(CAdventureSys.IsLevelFullStar((int)num7)); } case 0x11: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_PVPMODE)); case 0x12: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().GetUseableContainer(enCONTAINER_TYPE.ITEM).GetUseableStackCount(COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP, CAdventureSys.MOPUP_TICKET_ID) >= condition.Param[0]); case 0x13: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ZONGSHILIAN)); case 20: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ZHUANGZIHUANMENG)); case 0x15: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_LIUGUOYUANZHENG)); case 0x16: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ELITELEVEL)); case 0x17: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_UNION)); case 0x18: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_SYMBOL)); case 0x19: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_BLACKSHOP) && Singleton <CShopSystem> .GetInstance().IsMysteryShopAvailable()); case 0x1a: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_PVPCOINSHOP)); case 0x1b: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_TASK)); case 0x1c: return(false); case 30: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(0x1a)); case 0x1f: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(0x1b)); case 0x20: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(0x15)); case 0x21: { CRoleInfo info7 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return((info7 != null) && (info7.GoldCoin >= condition.Param[0])); } case 0x22: return(false); case 0x24: return(false); case 0x25: { bool flag = false; uint baseID = condition.Param[0]; CRoleInfo info = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (info != null) { CUseableContainer useableContainer = info.GetUseableContainer(enCONTAINER_TYPE.ITEM); if ((useableContainer != null) && (useableContainer.GetUseableByBaseID(COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP, baseID) != null)) { flag = true; } } AvailableItemId = !flag ? 0 : baseID; return(flag); } case 0x26: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(9)); case 0x27: { uint num2 = condition.Param[0]; CRoleInfo info3 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); return((info3 != null) && (info3.GetHaveHeroCount(false) >= num2)); } case 40: { CRoleInfo info2 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (info2 == null) { return(false); } return(info2.m_symbolInfo.CheckAnyWearSymbol(out AvailableSymbolPos, out AvailableSymbolId)); } case 0x29: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ARENA)); case 0x2a: return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(0x2c)); case 0x2b: { uint key = condition.Param[0]; ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(key); if (dataByKey == null) { goto Label_057D; } CRoleInfo info9 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (info9 == null) { goto Label_057D; } return(info9.SymbolCoin >= dataByKey.dwMakeCoin); } case 0x2c: return(Singleton <CFunctionUnlockSys> .GetInstance().FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ADDEDSKILL)); case 0x2d: return(CAddSkillSys.IsSelSkillAvailable()); case 0x2e: return(CheckOwnCompleteNewWeakGuideCondition(condition)); case 0x2f: return(CheckOwnCompleteNewWeakGuideCondition(condition)); case 0x30: if (Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().m_symbolInfo.m_pageCount <= 1) { return(false); } return(true); case 0x31: { LevelRewardData levelRewardData = Singleton <CTaskSys> .instance.model.GetLevelRewardData((int)condition.Param[0]); if (levelRewardData == null) { return(false); } return(!levelRewardData.m_bHasGetReward); } case 50: if (Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().m_freeDrawInfo[4].dwLeftFreeDrawCnt <= 0) { return(false); } return(true); case 0x33: return(Singleton <CFunctionUnlockSys> .instance.FucIsUnlock((RES_SPECIALFUNCUNLOCK_TYPE)condition.Param[0])); case 0x34: { CRoleInfo info12 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (((info12 == null) || !info12.IsOldPlayer()) || info12.IsOldPlayerGuided()) { return(false); } return(true); } case 0x35: { SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); if (curLvelContext == null) { return(false); } return(curLvelContext.IsMultilModeWithWarmBattle()); } case 0x36: { bool flag12 = false; CRoleInfo info13 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (info13 != null) { flag12 = info13.IsGuidedStateSet(0x62); } return(flag12); } case 0x37: return(CBattleGuideManager.EnableHeroVictoryTips()); case 0x38: return(Singleton <GameReplayModule> .GetInstance().HasRecord); default: return(false); } if (flag6) { AvailableHeroId = dwCfgID; } return(flag6); Label_057D: return(false); }
public void AddSymbolPageAttToProp(ref ActorMeta meta, bool bPVPLevel) { for (int i = 0; i < 37; i++) { PropertyHelper.s_symbolPropValAddArr[i] = 0; } IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .GetInstance().GetActorDataProvider(GameActorDataProviderType.ServerDataProvider); ActorServerRuneData actorServerRuneData = default(ActorServerRuneData); for (int j = 0; j < 30; j++) { if (actorDataProvider.GetActorServerRuneData(ref meta, (ActorRunelSlot)j, ref actorServerRuneData)) { ResSymbolInfo dataByKey = GameDataMgr.symbolInfoDatabin.GetDataByKey(actorServerRuneData.RuneId); if (dataByKey != null) { if (bPVPLevel) { for (int k = 0; k < dataByKey.astFuncEftList.Length; k++) { int wType = (int)dataByKey.astFuncEftList[k].wType; int bValType = (int)dataByKey.astFuncEftList[k].bValType; int iValue = dataByKey.astFuncEftList[k].iValue; if (wType != 0 && wType < 37 && iValue != 0) { if (bValType == 0) { PropertyHelper.s_symbolPropValAddArr[wType] += iValue; } else if (bValType == 1) { this.ChangeFuncEft(wType, bValType, iValue, true); } } } } else { for (int l = 0; l < dataByKey.astPveEftList.Length; l++) { int wType = (int)dataByKey.astPveEftList[l].wType; int bValType = (int)dataByKey.astPveEftList[l].bValType; int iValue = dataByKey.astPveEftList[l].iValue; if (wType != 0 && wType < 37 && iValue != 0) { if (bValType == 0) { PropertyHelper.s_symbolPropValAddArr[wType] += iValue; } else if (bValType == 1) { this.ChangeFuncEft(wType, bValType, iValue, true); } } } } } } } for (int m = 0; m < 37; m++) { int num = PropertyHelper.s_symbolPropValAddArr[m] / 100; if (num > 0) { this.ChangeFuncEft(m, 0, num, true); } } }
public static void SetItemEtcCell(CUIFormScript form, GameObject item, Text name, COMDT_REWARD_INFO rewardInfo, COMDT_SETTLE_RESULT_DETAIL settleData) { byte bType = rewardInfo.bType; switch (bType) { case 1: { CUseable cUseable = CUseableManager.CreateUseable(COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP, 0uL, rewardInfo.stRewardInfo.stItem.dwItemID, (int)rewardInfo.stRewardInfo.stItem.dwCnt, 0); cUseable.SetMultiple(ref settleData.stMultipleDetail, true); CUICommonSystem.SetItemCell(form, item, cUseable, true, false, false, false); ResPropInfo dataByKey = GameDataMgr.itemDatabin.GetDataByKey(rewardInfo.stRewardInfo.stItem.dwItemID); if (dataByKey != null) { name.set_text(StringHelper.UTF8BytesToString(ref dataByKey.szName)); } break; } case 2: break; case 3: { CUseable cUseable2 = CUseableManager.CreateVirtualUseable(enVirtualItemType.enDianQuan, (int)rewardInfo.stRewardInfo.dwCoupons); cUseable2.SetMultiple(ref settleData.stMultipleDetail, true); CUICommonSystem.SetItemCell(form, item, cUseable2, true, false, false, false); name.set_text(cUseable2.m_name); break; } case 4: { CUseable cUseable3 = CUseableManager.CreateUseable(COM_ITEM_TYPE.COM_OBJTYPE_ITEMEQUIP, 0uL, rewardInfo.stRewardInfo.stEquip.dwEquipID, (int)rewardInfo.stRewardInfo.stEquip.dwCnt, 0); cUseable3.SetMultiple(ref settleData.stMultipleDetail, true); CUICommonSystem.SetItemCell(form, item, cUseable3, true, false, false, false); ResEquipInfo dataByKey2 = GameDataMgr.equipInfoDatabin.GetDataByKey(rewardInfo.stRewardInfo.stEquip.dwEquipID); if (dataByKey2 != null) { name.set_text(StringHelper.UTF8BytesToString(ref dataByKey2.szName)); } break; } case 5: { CUseable cUseable4 = CUseableManager.CreateUseable(COM_ITEM_TYPE.COM_OBJTYPE_HERO, 0uL, rewardInfo.stRewardInfo.stHero.dwHeroID, (int)rewardInfo.stRewardInfo.stHero.dwCnt, 0); cUseable4.SetMultiple(ref settleData.stMultipleDetail, true); CUICommonSystem.SetItemCell(form, item, cUseable4, true, false, false, false); ResHeroCfgInfo dataByKey3 = GameDataMgr.heroDatabin.GetDataByKey(rewardInfo.stRewardInfo.stHero.dwHeroID); if (dataByKey3 != null) { name.set_text(StringHelper.UTF8BytesToString(ref dataByKey3.szName)); } break; } case 6: { CUseable cUseable5 = CUseableManager.CreateUseable(COM_ITEM_TYPE.COM_OBJTYPE_ITEMSYMBOL, 0uL, rewardInfo.stRewardInfo.stSymbol.dwSymbolID, (int)rewardInfo.stRewardInfo.stSymbol.dwCnt, 0); cUseable5.SetMultiple(ref settleData.stMultipleDetail, true); CUICommonSystem.SetItemCell(form, item, cUseable5, true, false, false, false); ResSymbolInfo dataByKey4 = GameDataMgr.symbolInfoDatabin.GetDataByKey(rewardInfo.stRewardInfo.stSymbol.dwSymbolID); if (dataByKey4 != null) { name.set_text(StringHelper.UTF8BytesToString(ref dataByKey4.szName)); } break; } default: if (bType == 16) { CUseable cUseable6 = CUseableManager.CreateVirtualUseable(enVirtualItemType.enDiamond, (int)rewardInfo.stRewardInfo.dwDiamond); cUseable6.SetMultiple(ref settleData.stMultipleDetail, true); CUICommonSystem.SetItemCell(form, item, cUseable6, true, false, false, false); name.set_text(cUseable6.m_name); } break; } }