private void CompoundResult(ArkCrossEngine.Network.GeneralOperationResult result) { if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed) { RoleInfo roleInfo = LobbyClient.Instance.CurrentRole; if (roleInfo != null) { for (int i = chipItemList.Count - 1; i >= 0; i--) { ItemDataInfo itemData = roleInfo.GetItemData(chipItemList[i].Id(), chipItemList[i].Property()); if (itemData == null || itemData.ItemNum <= 0) { NGUITools.DestroyImmediate(chipItemList[i].gameObject); chipItemList.RemoveAt(i); } else { chipItemList[i].UpdateView(itemData.ItemNum); } } } CheckHasCompound(); } else { Debug.Log(result); } }
void UpgradeItem(int pos, int id, int itemlevel, int item_random_property, ArkCrossEngine.Network.GeneralOperationResult result) { try { if (ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed == result) { HeroPutOnEquipment(id, pos, itemlevel, item_random_property, ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed); UnityEngine.GameObject go = UIManager.Instance.GetWindowGoByName("ItemProperty"); if (go != null) { ItemProperty ip = go.GetComponent <ItemProperty>(); if (ip != null) { ip.SetItemProperty(id, pos, itemlevel, item_random_property, true); } } } else { //ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", result.ToString(), "understand", null, null, null, false); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
private void HandlerResetResult(ArkCrossEngine.Network.GeneralOperationResult result) { try { if (ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed == result) { InitTreasureMap(); if (uiPlayerInfo != null) { uiPlayerInfo.ResetPlayerInfo(); } } else { if (ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_Time == result) { string chn_desc = StrDictionaryProvider.Instance.GetDictString(459); LogicSystem.EventChannelForGfx.Publish("ge_screen_tip", "ui", chn_desc, UIScreenTipPosEnum.AlignTop, UnityEngine.Vector3.zero); } } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
// public void HandleUnLockSkill(int presetIndex, int skillId, int userLevel, ArkCrossEngine.Network.GeneralOperationResult result) { try { if (ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed == result) { //string msg = string.Format("HandleUnlockSkill in UI presetIndex:{0}, skillId:{1}", presetIndex, skillId); //Debug.Log(msg); uiSkillStorage.OnUnlockSkill(skillId); SetSkillInfo(skillId); //可装备、可升级 SetEquipButtonState(true); SetActionButtonState(true); SetEquipFlag(true); AutoEquipSkill(skillId); } else { string chn_desc = StrDictionaryProvider.Instance.GetDictString(366); LogicSystem.EventChannelForGfx.Publish("ge_screen_tip", "ui", chn_desc, UIScreenTipPosEnum.AlignTop, UnityEngine.Vector3.zero); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
//装备技能返回的消息 public void HandleLoadSkill(int presetIndex, int skillId, int slotPositon, ArkCrossEngine.Network.GeneralOperationResult result) { try { if (ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed == result) { string msg = string.Format("LoadSkill:{0},{1},{2}", presetIndex, skillId, slotPositon); Debug.Log(msg); uiSkillSetting.OnLoadedSkill(presetIndex, skillId, slotPositon); uiSkillStorage.OnLoadedSkill(presetIndex, skillId, slotPositon); if (UISkillGuide.Instance.GetSteps() < 3) { GuideStepComplete(3, skillId); } } else { string chn_desc = StrDictionaryProvider.Instance.GetDictString(363); LogicSystem.EventChannelForGfx.Publish("ge_screen_tip", "ui", chn_desc, UIScreenTipPosEnum.AlignTop, UnityEngine.Vector3.zero); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
private void HandlerAwardResult(int money, int[] items, int[] nums, ArkCrossEngine.Network.GeneralOperationResult result) { try { LogicSystem.EventChannelForGfx.Publish("ge_ui_connect_hint", "ui", false, false); if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed) { if (m_AudioClipOpenChest != null) { NGUITools.PlaySound(m_AudioClipOpenChest); } List <int> itemList = new List <int>(); List <int> numList = new List <int>(); if (itemList != null && numList != null && items != null && nums != null) { for (int i = 0; i < items.Length; ++i) { itemList.Add(items[i]); } for (int i = 0; i < nums.Length; ++i) { numList.Add(nums[i]); } UnityEngine.GameObject goTaskAward = UIManager.Instance.GetWindowGoByName("TaskAward"); if (goTaskAward != null) { TaskAward taskAward = goTaskAward.GetComponent <TaskAward>(); taskAward.SetAwardForMermanKing(money, 0, 0, itemList, numList, m_CurrentClickIndex); } } else { UnityEngine.GameObject goTaskAward = UIManager.Instance.GetWindowGoByName("TaskAward"); if (goTaskAward != null) { TaskAward taskAward = goTaskAward.GetComponent <TaskAward>(); taskAward.SetAwardForMermanKing(money, 0, 0, null, null, m_CurrentClickIndex); } } InitTreasureMap(); UIManager.Instance.ShowWindowByName("TaskAward"); } else { string CHN_DESC = StrDictionaryProvider.Instance.GetDictString(454); string CHN_CON = StrDictionaryProvider.Instance.GetDictString(4); ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", CHN_DESC, CHN_CON, null, null, null, false); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:{0},{1}", ex.Message, ex.StackTrace); } }
void HeroPutOnEquipment(int id, int pos, int itemLevel, int itemRandomProperty, ArkCrossEngine.Network.GeneralOperationResult result) { try { UIManager.Instance.HideWindowByName("DynamicEquipment"); DeleteNowCheckAnother(); } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
public void HandleUnLockSkill(int presetIndex, int skillId, int userLevel, ArkCrossEngine.Network.GeneralOperationResult result) { try { if (ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed == result && !UIManager.Instance.IsWindowVisible("SkillPanel")) { AutoEquipSkill(skillId); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
private void StartGameFailure(ArkCrossEngine.Network.GeneralOperationResult result) { try { if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_CostError) { ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(306), ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(140), null, null, null, false); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
void Buyresult(ArkCrossEngine.Network.GeneralOperationResult result) { try { if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed) { SetGoldBuyInfo(); ArkCrossEngine.RoleInfo ri = ArkCrossEngine.LobbyClient.Instance.CurrentRole; if (ri != null) { ArkCrossEngine.BuyMoneyConfig bmc = ArkCrossEngine.BuyMoneyConfigProvider.Instance.GetDataById(ri.BuyMoneyCount); if (bmc != null) { BuyMoneyTip(bmc.m_GainMoney); } } } else { int i = 0; if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_CostError) { i = 123; } if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_Overflow) { i = 150; } if (signtenbuy) { if (signshowtip) { return; } else { signshowtip = true; } } ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(i), ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(140), null, null, null, false); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
public void OnUnloadedSkill(int presetIndex, int slotPos, ArkCrossEngine.Network.GeneralOperationResult result) { try { if (ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed == result) { int skillId = uiSkillSetting.GetSkillId(slotPos); uiSkillStorage.OnUnloadedSkill(presetIndex, skillId); uiSkillSetting.OnUnloadedSkill(slotPos); } else { ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", result.ToString(), C_ConFirm, null, null, null, false); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
//处理升阶之后的信息 public void HandleLiftSkill(int sourceId, int targetId, ArkCrossEngine.Network.GeneralOperationResult result) { try { if (ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed == result) { //string str = string.Format("HandleLiftSkill,sourceId:{0},targetId:{1}", sourceId, targetId); //Debug.Log(str); SetSkillInfo(targetId); uiSkillStorage.OnLiftSkill(sourceId, targetId); uiSkillSetting.OnLiftSkill(sourceId, targetId); } else { string chn_desc = StrDictionaryProvider.Instance.GetDictString(367); ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", chn_desc, C_ConFirm, null, null, null, false); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
void Buyresult(ArkCrossEngine.Network.GeneralOperationResult result) { try { if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed) { SetBuyStaminaInfo(); RoleInfo ri = ArkCrossEngine.LobbyClient.Instance.CurrentRole; if (ri != null) { ArkCrossEngine.BuyStaminaConfig bsc = ArkCrossEngine.BuyStaminaConfigProvider.Instance.GetDataById(ri.BuyStaminaCount); if (bsc != null) { GfxSystem.PublishGfxEvent("ge_screen_tip", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.Format(172, bsc.m_GainStamina), UIScreenTipPosEnum.AlignCenter, UnityEngine.Vector3.zero); } } } else { int i = 0; if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_CostError) { i = 123; } if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_Overflow) { i = 150; } ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(i), ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(140), null, null, null, false); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
void ManageExchangeGoods(int currency, bool refresh, ArkCrossEngine.Network.GeneralOperationResult result, int exchangeid, int exchangenum) { try { GfxSystem.PublishGfxEvent("ge_ui_connect_hint", "ui", false, false); if (currency != currencyId && currency != 0) { return; } if (refresh) { if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed) { DataDictionaryMgr <StoreConfig> storedata = ArkCrossEngine.StoreConfigProvider.Instance.StoreDictionaryMgr; if (storedata != null) { MyDictionary <int, object> storedic = storedata.GetData(); if (storedic != null) { StoreConfig sc = null; foreach (KeyValuePair <int, object> pair in storedic) { sc = pair.Value as StoreConfig; if (sc != null) { if (sc.m_Currency == currencyId || (currency == 0 && sc.m_Currency == currencyId)) { AddItem(pair.Key, 0); } } } } } } else if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_CostError) { ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(123), ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(140), null, null, null, false); } } else { if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed) { AddItem(exchangeid, exchangenum); ArkCrossEngine.StoreConfig sc = ArkCrossEngine.StoreConfigProvider.Instance.GetDataById(exchangeid); if (sc != null) { ArkCrossEngine.ItemConfig ic = ArkCrossEngine.ItemConfigProvider.Instance.GetDataById(sc.m_ItemId); if (ic != null) { GfxSystem.PublishGfxEvent("ge_screen_tip", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(1005) + ic.m_ItemName + "X" + sc.m_ItemNum, UIScreenTipPosEnum.AlignCenter, UnityEngine.Vector3.zero); } } } else { //提示 int sign = 1003; switch (result) { case ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_CostError: sign = 1000; break; case ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_Overflow: sign = 1001; break; case ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_LevelError: sign = 1002; break; default: sign = 1003; break; } GfxSystem.PublishGfxEvent("ge_screen_tip", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(sign), UIScreenTipPosEnum.AlignCenter, UnityEngine.Vector3.zero); } } UIGrid ug = gridGo.GetComponent <UIGrid>(); if (ug != null) { ug.repositionNow = true; } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
public void DeleteItemInCheck(int[] item, int[] item_property_id, int[] item_num, ArkCrossEngine.Network.GeneralOperationResult result) { try { if (ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed == result) { UnityEngine.Transform tfc = null; for (int j = 0; j < item.Length; ++j) { ItemConfig config = ItemConfigProvider.Instance.GetDataById(item[j]); if (gridEquip != null) { for (int i = 0; i < gridEquip.transform.childCount; ++i) { tfc = gridEquip.transform.GetChild(i); if (tfc != null) { ItemClick ic = tfc.gameObject.GetComponent <ItemClick>(); if (ic != null && ic.ID == item[j] && ic.PropertyId == item_property_id[j]) { NGUITools.DestroyImmediate(tfc.gameObject); break; } } } } if (gridWingTop != null) { if (config != null && config.m_WearParts == 7) {//翅膀 for (int k = 0; k < gridWingTop.transform.childCount; ++k) { tfc = gridWingTop.transform.GetChild(k); WingItem witem = tfc.GetComponent <WingItem>(); if (witem != null) { witem.UpdateTopView(); } } } } } if (gridEquip != null) { UIGridForDFM ug = gridEquip.gameObject.GetComponent <UIGridForDFM>(); if (ug != null) { ug.repositionNow = true; } } } else { ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", result.ToString(), "YES", null, null, null, false); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
private void HeroPutOnEquipment(int id, int pos, int itemLevel, int itemRandomProperty, ArkCrossEngine.Network.GeneralOperationResult result) { try { if (ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed == result) { if (pos >= 0 && pos < 8) { equiparry[pos].SetEquipmentInfo(id, itemLevel, itemRandomProperty); UpdateRelateEquipFight(pos); CheckHasUpgrade(); } } else { if (ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_Position == result) { ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(151), ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(140), null, null, null, false); } else if (ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_LevelError == result) { ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(173), ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(140), null, null, null, false); } } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
// public void HandleUpgradeSkill(int presetIndex, int curSkillId, int curSkillLevel, ArkCrossEngine.Network.GeneralOperationResult result) { try { if (ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed == result) { //string msg = string.Format("HandleUpGradeSkill in UI presetIndex:{0}, skillId:{1}", presetIndex, curSkillId); //Debug.Log(msg); SetSkillInfo(curSkillId, true); RoleInfo role_info = LobbyClient.Instance.CurrentRole; if (role_info != null && uiSkillInfo != null) { uiSkillInfo.SetPlayerVigor(role_info.Vigor); } m_foreVigor = role_info.Vigor; m_backVigor = role_info.Vigor; CheckHasUpgrade(); } else { string chn_desc = StrDictionaryProvider.Instance.GetDictString(365); switch (result) { case ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_CostError: chn_desc = StrDictionaryProvider.Instance.GetDictString(369); break; case ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_LevelError: chn_desc = StrDictionaryProvider.Instance.GetDictString(370); break; case ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_Unknown: chn_desc = StrDictionaryProvider.Instance.GetDictString(365); break; case ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_VigorError: chn_desc = StrDictionaryProvider.Instance.GetDictString(371); break; } LogicSystem.EventChannelForGfx.Publish("ge_screen_tip", "ui", chn_desc, UIScreenTipPosEnum.AlignTop, UnityEngine.Vector3.zero); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
// public void HandleSwapSkill(int presetIndex, int skillId, SlotPosition sourcePos, SlotPosition targetPos, ArkCrossEngine.Network.GeneralOperationResult result) { try { if (ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed == result) { string msg = string.Format("OnSwapSkill:{0},{1}", sourcePos, targetPos); Debug.Log(msg); int targetSkillId = uiSkillSetting.GetSkillId((int)targetPos); uiSkillSetting.ExchangeSlot(sourcePos, targetPos); uiSkillStorage.OnExchangeSkill(skillId, targetSkillId, sourcePos, targetPos); } else { string chn_desc = StrDictionaryProvider.Instance.GetDictString(364); LogicSystem.EventChannelForGfx.Publish("ge_screen_tip", "ui", chn_desc, UIScreenTipPosEnum.AlignTop, UnityEngine.Vector3.zero); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
private void HeroUpdateProperty(ArkCrossEngine.CharacterProperty info, ArkCrossEngine.Network.GeneralOperationResult result) { try { if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed) { UnityEngine.Transform tfroot = transform; if (tfroot != null) { UnityEngine.Transform tf = tfroot.Find("RoleInfo/DragThing/Right0"); if (tf != null) { UILabel ul = tf.gameObject.GetComponent <UILabel>(); if (ul != null) { string str = "[ffffff]"; if (info != null) { str += info.AttackBase + "\n"; str += FormatDecimal(info.Critical * 100) + "%\n"; str += FormatDecimal(info.CriticalPow * 100) + "%\n"; str += FormatDecimal(info.CriticalBackHitPow * 100) + "%\n"; str += FormatDecimal(info.CriticalCrackPow * 100) + "%\n"; str += FormatDecimal(info.FireDamage) + "\n"; str += FormatDecimal(info.IceDamage) + "\n"; str += FormatDecimal(info.PoisonDamage) + "[-]"; } ul.text = str; } } tf = tfroot.Find("RoleInfo/DragThing/Right1"); if (tf != null) { UILabel ul = tf.gameObject.GetComponent <UILabel>(); if (ul != null) { string str = "[ffffff]"; if (info != null) { str += info.HpMax + "\n"; str += info.ADefenceBase + "\n"; str += info.MDefenceBase + "\n"; str += FormatDecimal(info.FireERD) + "\n"; str += FormatDecimal(info.IceERD) + "\n"; str += FormatDecimal(info.PoisonERD) + "[-]"; } ul.text = str; } } tf = tfroot.Find("RoleInfo/DragThing/Right2"); if (tf != null) { UILabel ul = tf.gameObject.GetComponent <UILabel>(); if (ul != null) { string str = "[ffffff]"; if (info != null) { str += "+" + FormatDecimal(info.MoveSpeed * 100) + "%\n"; str += FormatDecimal(info.HpRecover) + "/5S\n"; str += FormatDecimal(info.EnergyRecover) + "/5S\n"; str += "+" + /*info.EnergyRecover * 10*/ 0 + "%\n"; } ul.text = str; } } } } else { ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", result.ToString(), "understand", null, null, null, false); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }