public void AddM3Res() { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Post("/userres/debugAddM3Res"); lookupsManager.Service(request, null); }
public void BuyGoldToHc() { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Post("/userres/buyGoldToHc"); lookupsManager.Service(request, null); }
public void GetAllEquipmentInfo(System.Action <Response> callback) { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Get("/equipment/DEBUG_getEquipmentClientData"); lookupsManager.Service(request, callback, false); }
//#if DEBUG public void AddGold(int goldAmount) { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Post("/userres/addGold"); request.AddData("amount", goldAmount); lookupsManager.Service(request, null); }
public void AddTicket(int ticket, System.Action <EB.Sparx.Response> callback) { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Post("/userres/addTicket"); request.AddData("num", ticket); lookupsManager.Service(request, callback); }
public void AddVipHc(int hc, System.Action <EB.Sparx.Response> callback) { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Post("/userres/addVipHc"); request.AddData("hc", hc); lookupsManager.Service(request, callback); }
public void Process() { if (!m_TimerScheduler.isLegalTimer) { return; } if (m_NextRequestTime <= 0) { m_NextRequestTime = GetNextRequestTime(m_TimePath); EB.Debug.Log("CronRefreshExcuter.Process: next time = {0}", EB.Time.FromPosixTime(m_NextRequestTime)); if (m_NextRequestTime <= 0) { return; } } int now = EB.Time.Now; if (now > m_NextRequestTime) { m_NextRequestTime = GetNextRequestTime(m_TimePath); EB.Debug.Log("CronRefreshExcuter.Process: next time = {0}", EB.Time.FromPosixTime(m_NextRequestTime)); if (m_NextRequestTime <= 0) { return; } DataLookupSparxManager lookup = SparxHub.Instance.GetManager <DataLookupSparxManager>(); var request = (m_IsPost) ? lookup.EndPoint.Post(m_RequestURL) : lookup.EndPoint.Get(m_RequestURL); request.numRetries = 2; if (m_Parameters != null) { request.AddData(m_Parameters); } lookup.Service(request, delegate(EB.Sparx.Response res) { if (res.sucessful) { if (m_Callback != null) { m_Callback(res.hashtable); } EB.Debug.Log("CronRefreshExcuter.Process: sucessful"); } else if (res.fatal) { SparxHub.Instance.FatalError(res.localizedError); } else { EB.Debug.LogWarning("CronRefreshExcuter.Process: error = {0}", res.localizedError); } }, true); } }
public void SetResRPC(string type, int num) { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Post("/userres/debugSetRes"); request.AddData("type", type); request.AddData("num", num); lookupsManager.Service(request, null); }
public void OnPartnerUpgradeClick() { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Post("/userres/debugAddBuddyXp"); int exp = 5000000; request.AddData("xp", exp); lookupsManager.Service(request, null); MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, "您的所有伙伴已增加500w经验!"); }
public void EquipmentRecycle(string[] inventoryIdList, System.Action <bool> callback) { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Post("/recycling/equipmentRecycle"); request.AddData("inventoryIdList", inventoryIdList); lookupsManager.Service(request, delegate(Response result) { callback(result.sucessful); }, true); }
public void useInventory(string inventoryId, int amount, System.Action <bool> callback) { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Post("/gaminventory/use"); request.AddData("inventoryId", inventoryId); request.AddData("num", amount); lookupsManager.Service(request, delegate(Response result) { callback(result.sucessful); }, true); }
public void UnEquip(int itemInvID, System.Action <bool> callback) { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request req = lookupsManager.EndPoint.Post("/equipment/unEquip"); req.AddData("inventoryId", itemInvID); lookupsManager.Service(req, delegate(Response result) { callback(result.sucessful); }, true); }
public void EquipmentUnsocketGem(string equipmentInvID, int slotNum, System.Action <bool> callback) { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request req = lookupsManager.EndPoint.Post("/socketing/unsocketGem"); req.AddData("inventoryId", equipmentInvID); req.AddData("slotNum", slotNum); lookupsManager.Service(req, delegate(Response result) { callback(result.sucessful); }, true); }
public void ChangeRandomStats(string inventoryId, System.Action <bool> callback) { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Post("/refining/changeRandomStats"); request.AddData("inventoryId", inventoryId); lookupsManager.Service(request, delegate(Response result) { EB.Debug.Log("changeRandomStats : result = ", result); callback(result.sucessful); }, true); }
public void OnSendMainCampaignOpenReq() { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Post("/lostmaincampaign/debugallstar"); if (int.TryParse(chapterlabel.text, out int chapter)) { request.AddData("chapter", chapter); lookupsManager.Service(request, null); MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, "已解锁主线副本指定关卡,重新登录后生效!"); } else { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, "请输入指定章节,如: 101 "); } }
public void EquipmentRefine(string inventoryId, string[] lockStatsList, bool autoBuy, System.Action <bool> callback) { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Post("/refining/refineEquipment"); request.AddData("inventoryId", inventoryId); request.AddData("lockStats", lockStatsList); request.AddData("autoBuy", autoBuy); lookupsManager.Service(request, delegate(Response result) { EB.Debug.Log("refineEquipment : result = ", result); callback(result.sucessful); }, true); }
public void OnSendChanllengeCampaignOpenReq() { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Post("/lostchallengecampaign/enterChapter"); if (int.TryParse(challengeLabel.text, out int chapter)) { request.AddData("level", chapter); lookupsManager.Service(request, null); MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, "已解锁挑战副本指定关卡,重新登录后生效!"); } else { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, "请输入指定层数,如: 1 "); } }
public void instantCreate(string targetEconomyId, int count, System.Action <bool, string> callback) { DataLookupSparxManager lookupsManager = EB.Sparx.Hub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request request = lookupsManager.EndPoint.Post("/synthesis/instantCreate"); request.AddData("targetEconomyId", targetEconomyId); request.AddData("number", count); lookupsManager.Service(request, delegate(Response result) { if (result.sucessful) { callback(result.sucessful, ""); } else { callback(result.sucessful, result.error.ToString()); } }, true); }
public void EnchantItem(int itemInvID, int luckstoneInvID, System.Action <bool> callback) { DataLookupSparxManager data_lookups_mgr = SparxHub.Instance.GetManager <DataLookupSparxManager>(); EB.Sparx.Request req = data_lookups_mgr.EndPoint.Post("/enchantments/enchant"); //req.AddData ("itemID", itemInvID); req.AddData("inventoryId", itemInvID); if (luckstoneInvID != -1) { req.AddData("luckStoneID", luckstoneInvID); } data_lookups_mgr.Service(req, (response) => { var jobject = response.result as Hashtable; var jobject2 = jobject["enchantments"] as Hashtable; bool enchantSuccess = (bool)jobject2["success"]; callback(enchantSuccess); }); }