private void HandleOnFriendOffline(JsonMessage lobbyMsg) { UserInfo playerself = WorldSystem.Instance.GetPlayerSelf(); if (null == playerself) { return; } JsonData jsonData = lobbyMsg.m_JsonData; ArkCrossEngineMessage.Msg_LC_FriendOffline protoData = lobbyMsg.m_ProtoData as ArkCrossEngineMessage.Msg_LC_FriendOffline; if (null != protoData) { ulong friend_guid = protoData.m_Guid; if (null != LobbyClient.Instance.CurrentRole) { Dictionary <ulong, FriendInfo> friends = LobbyClient.Instance.CurrentRole.Friends; if (null != friends && friends.Count > 0) { FriendInfo out_info = null; if (friends.TryGetValue(friend_guid, out out_info)) { out_info.IsOnline = false; GfxSystem.PublishGfxEvent("ge_friend_offline", "friend", friend_guid); } } } } }
private void HandleConfirmJoinGroupResult(JsonMessage lobbyMsg) { JsonData jsonData = lobbyMsg.m_JsonData; ArkCrossEngineMessage.Msg_LC_ConfirmJoinGroupResult protoData = lobbyMsg.m_ProtoData as ArkCrossEngineMessage.Msg_LC_ConfirmJoinGroupResult; if (null != protoData) { string nick = protoData.m_Nick; TeamOperateResult result = (TeamOperateResult)protoData.m_Result; GfxSystem.PublishGfxEvent("ge_confirm_join_group_result", "group", nick, result); //Note:加入队伍,通知RC RoleInfo role_info = LobbyClient.Instance.CurrentRole; if (result == TeamOperateResult.OR_Succeed && role_info != null) { if (role_info.Guid == role_info.Group.CreatorGuid) { GfxSystem.PublishGfxEvent("ge_joinABandWithBandId", "gt", role_info.Group.CreatorGuid.ToString()); } else { GfxSystem.PublishGfxEvent("ge_joinABandWithBandId", "gt", role_info.Group.CreatorGuid.ToString()); } } } }
private void HandleDelFriendResult(JsonMessage lobbyMsg) { UserInfo playerself = WorldSystem.Instance.GetPlayerSelf(); if (null == playerself) { return; } JsonData jsonData = lobbyMsg.m_JsonData; ArkCrossEngineMessage.Msg_LC_DelFriendResult protoData = lobbyMsg.m_ProtoData as ArkCrossEngineMessage.Msg_LC_DelFriendResult; if (null != protoData) { ulong target_guid = protoData.m_TargetGuid; DelFriendResult result = (DelFriendResult)protoData.m_Result; if (DelFriendResult.DEL_SUCCESS == result && null != LobbyClient.Instance.CurrentRole) { Dictionary <ulong, FriendInfo> friends = LobbyClient.Instance.CurrentRole.Friends; if (null != friends && friends.Count > 0) { if (friends.ContainsKey(target_guid)) { friends.Remove(target_guid); } } } GfxSystem.PublishGfxEvent("ge_del_friend", "friend", target_guid, result); } }
private void HandleSyncGroupUsers(JsonMessage lobbyMsg) { RoleInfo role_info = LobbyClient.Instance.CurrentRole; if (null == role_info) { return; } GroupInfo group = role_info.Group; if (null == group) { return; } JsonData jsonData = lobbyMsg.m_JsonData; ArkCrossEngineMessage.Msg_LC_SyncGroupUsers protoData = lobbyMsg.m_ProtoData as ArkCrossEngineMessage.Msg_LC_SyncGroupUsers; if (null != protoData) { group.Reset(); group.CreatorGuid = protoData.m_Creator; group.Count = protoData.m_Count; if (null != protoData.m_Members && protoData.m_Members.Count > 0) { int ct = protoData.m_Members.Count; for (int i = 0; i < ct; i++) { GroupMemberInfo member_info = new GroupMemberInfo(); member_info.Guid = protoData.m_Members[i].m_Guid; member_info.HeroId = protoData.m_Members[i].m_HeroId; member_info.Nick = protoData.m_Members[i].m_Nick; member_info.Level = protoData.m_Members[i].m_Level; member_info.FightingScore = protoData.m_Members[i].m_FightingScore; member_info.Status = (UserState)protoData.m_Members[i].m_Status; group.Members.Add(member_info); if (role_info.Guid == member_info.Guid) { //Note:更新RC队伍信息,只需更新玩家自己 GfxSystem.PublishGfxEvent("ge_joinABandWithBandId", "gt", group.CreatorGuid.ToString()); } } } if (null != protoData.m_Confirms && protoData.m_Confirms.Count > 0) { int ct = protoData.m_Confirms.Count; for (int i = 0; i < ct; i++) { GroupMemberInfo member_info = new GroupMemberInfo(); member_info.Guid = protoData.m_Confirms[i].m_Guid; member_info.HeroId = protoData.m_Confirms[i].m_HeroId; member_info.Nick = protoData.m_Confirms[i].m_Nick; member_info.Level = protoData.m_Confirms[i].m_Level; member_info.FightingScore = protoData.m_Confirms[i].m_FightingScore; member_info.Status = (UserState)protoData.m_Confirms[i].m_Status; group.Confirms.Add(member_info); } } GfxSystem.PublishGfxEvent("ge_sync_group_info", "group", group); } }
private void HandleChangeCaptain(JsonMessage lobbyMsg) { RoleInfo role_info = LobbyClient.Instance.CurrentRole; if (null == role_info) { return; } GroupInfo group = role_info.Group; if (null == group) { return; } JsonData jsonData = lobbyMsg.m_JsonData; ArkCrossEngineMessage.Msg_LC_ChangeCaptain protoData = lobbyMsg.m_ProtoData as ArkCrossEngineMessage.Msg_LC_ChangeCaptain; if (null != protoData) { ulong group_id = protoData.m_CreatorGuid; if (role_info.Guid == group_id) { GfxSystem.PublishGfxEvent("ge_change_captain", "group"); } } }
private void LoginLobby(string url, string user, string pass) { if (GlobalVariables.Instance.IsFullClient) { m_Url = url; m_User = user; m_Pass = pass; m_Guid = 1; GfxSystem.PublishGfxEvent("ge_start_login", "lobby", "user", 0); GfxSystem.PublishGfxEvent("ge_init_userinfo", "lobby", user, user, (int)m_Guid, 100); } else { if (IsConnected) { m_WebSocket.Close(); } m_IsWaitStart = false; m_IsLogged = false; m_Url = url; m_User = user; m_Pass = pass; ConnectIfNotOpen(); } GfxSystem.GfxLog("LoginLobby {0} {1} {2}", url, user, pass); }
private void HandleCompoundPartnerResult(JsonMessage lobbyMsg) { JsonData jsonData = lobbyMsg.m_JsonData; ArkCrossEngineMessage.Msg_LC_CompoundPartnerResult protoData = lobbyMsg.m_ProtoData as ArkCrossEngineMessage.Msg_LC_CompoundPartnerResult; if (null != protoData) { if ((int)PartnerMsgResultEnum.SUCCESS == protoData.m_ResultCode) { // 增加伙伴 && 处理消耗 RoleInfo role = LobbyClient.Instance.CurrentRole; if (null != role) { role.PartnerStateInfo.AddPartner(protoData.m_PartnerId, 1, 1); PartnerConfig partnerConfig = PartnerConfigProvider.Instance.GetDataById(protoData.m_PartnerId); if (null != partnerConfig) { role.ReduceItemData(partnerConfig.PartnerFragId, 0, partnerConfig.PartnerFragNum); } } else { // 失败, 这里失败的话应该是客户端和服务器不同步导致的。 } } GfxSystem.PublishGfxEvent("ge_partner_compound_result", "ui", protoData.m_ResultCode); } }
public void Buy() { RoleInfo ri = ArkCrossEngine.LobbyClient.Instance.CurrentRole; StoreConfig sc = ArkCrossEngine.StoreConfigProvider.Instance.GetDataById(exchangedId); if (ri != null && sc != null) { int nowcurrency = 0; if (sc.m_Currency == ItemConfigProvider.Instance.GetGoldId()) { nowcurrency = ri.Money; } else if (sc.m_Currency == ItemConfigProvider.Instance.GetDiamondId()) { nowcurrency = ri.Gold; } else { nowcurrency = ri.ExchangeCurrency; } if (nowcurrency < exchangeCurrency) { GfxSystem.PublishGfxEvent("ge_screen_tip", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(163), UIScreenTipPosEnum.AlignCenter, UnityEngine.Vector3.zero); } else { GfxSystem.PublishGfxEvent("ge_ui_connect_hint", "ui", false, true); ArkCrossEngine.LogicSystem.PublishLogicEvent("ge_exchange_goods", "lobby", exchangedId, false); } UIManager.Instance.HideWindowByName("ItemProperty"); signforExchange = false; } }
private void HandleUpgradePartnerStageResult(JsonMessage lobbyMsg) { JsonData jsonData = lobbyMsg.m_JsonData; ArkCrossEngineMessage.Msg_LC_UpgradeParnerStageResult protoData = lobbyMsg.m_ProtoData as ArkCrossEngineMessage.Msg_LC_UpgradeParnerStageResult; if (null != protoData) { if ((int)PartnerMsgResultEnum.SUCCESS == protoData.m_ResultCode) { RoleInfo role = LobbyClient.Instance.CurrentRole; PartnerInfo partner = role.PartnerStateInfo.GetPartnerInfoById(protoData.m_PartnerId); if (null == partner) { return; } PartnerConfig partnerConfig = PartnerConfigProvider.Instance.GetDataById(protoData.m_PartnerId); PartnerStageUpConfig psuConfig = PartnerStageUpConfigProvider.Instance.GetDataById(partner.CurSkillStage); if (null != partnerConfig && null != psuConfig) { role.ReduceItemData(partnerConfig.StageUpItemId, 0, psuConfig.ItemCost); role.Money -= psuConfig.GoldCost; } UserInfo user = WorldSystem.Instance.GetPlayerSelf(); if (null != user) { user.ParterChanged = true; } if (null != role) { role.PartnerStateInfo.SetPartnerStage(protoData.m_PartnerId, protoData.m_CurStage); } } GfxSystem.PublishGfxEvent("ge_partner_upgrade_skill_result", "ui", protoData.m_ResultCode); } }
private void OnRefreshSkill(CharacterInfo entity) { GfxSystem.PublishGfxEvent("ge_cast_skill_cd", "ui", "SkillA", 0); GfxSystem.PublishGfxEvent("ge_cast_skill_cd", "ui", "SkillB", 0); GfxSystem.PublishGfxEvent("ge_cast_skill_cd", "ui", "SkillC", 0); GfxSystem.PublishGfxEvent("ge_cast_skill_cd", "ui", "SkillD", 0); }
public int GetTouchObjID() { int object_id = -1; float skill_blear_radius = 0.5f; Vector3 touch_pos = new Vector3(position.x, position.y, 0); Ray ray = Camera.main.ScreenPointToRay(touch_pos); RaycastHit hitInfo; GameObject hitGameObj = null; int layermask = (1 << LayerMask.NameToLayer("Terrains")) | (1 << LayerMask.NameToLayer("Character")); SkillControllerInterface player_skill_ctrl = GetControl(); if (null != player_skill_ctrl) { SkillInputData skill_input_data = player_skill_ctrl.GetSkillInputData(SkillTags); if (null != skill_input_data) { skill_blear_radius = skill_input_data.targetChooseRange; } } if (Physics.Raycast(ray, out hitInfo, 200f, layermask)) { Collider[] hitObjs = Physics.OverlapSphere(hitInfo.point, skill_blear_radius, (1 << LayerMask.NameToLayer("Character"))); if (hitObjs.Length > 0) { hitGameObj = hitObjs[0].gameObject; if (null != hitGameObj) { SharedGameObjectInfo targetInfo = LogicSystem.GetSharedGameObjectInfo(hitGameObj); if (null != targetInfo && IsEnemy()) { // camp int camp_self = -1; GameObject goSelf = DashFire.LogicSystem.PlayerSelf; if (null != goSelf) { CharacterCamp camp_s = goSelf.GetComponent <CharacterCamp>(); if (null != camp_s) { camp_self = camp_s.m_CampId; } } CharacterCamp camp_t = hitGameObj.GetComponent <CharacterCamp>(); if (camp_t != null && camp_self != camp_t.m_CampId && targetInfo.Blood > 0) { object_id = targetInfo.m_LogicObjectId; } } } } } if (-1 != object_id && null != hitGameObj) { GfxSystem.PublishGfxEvent("Op_InputEffect", "Input", GestureEvent.OnSingleTap, hitGameObj.transform.position.x, hitGameObj.transform.position.y, hitGameObj.transform.position.z, true, false); } return(object_id); }
/**点击玩家 弹出加好友,组队功能界面*/ void OnCheckPlayerInfo(int actorid) { try { SharedGameObjectInfo share_info = ArkCrossEngine.LogicSystem.GetSharedGameObjectInfo(actorid); GfxUserInfo userInfo; bool sign = true; for (int i = 0; i < DFMUiRoot.GfxUserInfoListForUI.Count; i++) { if (DFMUiRoot.GfxUserInfoListForUI[i].m_ActorId == actorid) { sign = false; userInfo = DFMUiRoot.GfxUserInfoListForUI[i]; UnityEngine.GameObject go = UIManager.Instance.GetWindowGoByName("DynamicFriend"); if (null != go) { go.GetComponent <DynamicFriend>().InitPanel(userInfo, new UnityEngine.Vector3()); } LogicSystem.PublishLogicEvent("ge_request_player_info", "lobby", userInfo.m_Nick); break; } } if (sign) { GfxSystem.PublishGfxEvent("ge_screen_tip", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(557), UIScreenTipPosEnum.AlignCenter, UnityEngine.Vector3.zero); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
private void HandleQueryFriendInfoResult(JsonMessage lobbyMsg) { UserInfo playerself = WorldSystem.Instance.GetPlayerSelf(); if (null == playerself) { return; } JsonData jsonData = lobbyMsg.m_JsonData; ArkCrossEngineMessage.Msg_LC_QueryFriendInfoResult protoData = lobbyMsg.m_ProtoData as ArkCrossEngineMessage.Msg_LC_QueryFriendInfoResult; if (null != protoData) { List <FriendInfo> friend_list = new List <FriendInfo>(); int ct = protoData.m_Friends.Count; for (int i = 0; i < ct; i++) { FriendInfo assit_info = new FriendInfo(); assit_info.Guid = protoData.m_Friends[i].Guid; assit_info.Nickname = protoData.m_Friends[i].Nickname; assit_info.HeroId = protoData.m_Friends[i].HeroId; assit_info.Level = protoData.m_Friends[i].Level; assit_info.FightingScore = protoData.m_Friends[i].FightingScore; assit_info.IsOnline = protoData.m_Friends[i].IsOnline; assit_info.IsBlack = protoData.m_Friends[i].IsBlack; friend_list.Add(assit_info); } GfxSystem.PublishGfxEvent("ge_query_friend_result", "friend", friend_list); } }
public void OnLoginResult(int result, string accountId) { try { // mark account login GfxSystem.PublishGfxEvent("ge_enable_accountlogin", "ui"); // close connection window LogicSystem.EventChannelForGfx.Publish("ge_ui_connect_hint", "ui", true, false); // vairy login result AccountLoginResult ret = (AccountLoginResult)result; if (ret == AccountLoginResult.Success) { NormLog.Instance.UpdateUserid(accountId); } else if (ret == AccountLoginResult.FirstLogin) { UIManager.Instance.HideWindowByName("LoginPrefab"); UnityEngine.GameObject go = UIManager.Instance.GetWindowGoByName("Verification"); if (null != go) { go.GetComponent <UIVerification>().InitOpenType(UIVerification.OpenType.Verification); } UIManager.Instance.ShowWindowByName("Verification"); NormLog.Instance.UpdateUserid(accountId); } // login failed, back to login scene else { // get description of login result string chn_desc = string.Empty; if (ret == AccountLoginResult.Banned) { chn_desc = ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(209); } else if (ret == AccountLoginResult.AlreadyOnline) { chn_desc = ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(210); } else { chn_desc = ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(208); } string reloginTip = ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(211); // display YesOrNo dialog, call relogin if needed LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", chn_desc, reloginTip, null, null, (MyAction <int>)OnRelogin, false); // close socket connection LogicSystem.PublishLogicEvent("ge_stop_login", "lobby"); } NormLog.Instance.Record(GameEventCode.VerifyResult); } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
private void HandleLoginResult(int id, JsonData msg) { if (0 == msg.GetInt("m_Result")) { GfxSystem.PublishGfxEvent("ge_start_login", "lobby", "user", 0); } GfxSystem.GfxLog("HandleLoginResult"); }
private void Yes(int id) { if (id == 1) { ArkCrossEngine.LogicSystem.PublishLogicEvent("ge_refresh_exchanges", "lobby", currencyId); GfxSystem.PublishGfxEvent("ge_ui_connect_hint", "ui", false, true); } }
private void HandleLoginResult(JsonMessage msg) { LCJsonMsgLoginResult lcMsg = msg as LCJsonMsgLoginResult; if (lcMsg != null) { GfxSystem.PublishGfxEvent("start_login", "ui", lcMsg.m_Account, lcMsg.m_Result); } }
private void OnImpactScreenTip(CharacterInfo target, string tip) { if (null != target) { Vector3 pos = target.GetMovementStateInfo().GetPosition3D(); pos.Y += 2.0f; GfxSystem.PublishGfxEvent("ge_screen_tip", "ui", pos.X, pos.Y, pos.Z, true, tip); } }
public void DebugPVP() { int currentUser = WorldSystem.Instance.GetMaxCityUserCount(); WorldSystem.Instance.UpdateMaxCityUserCount(currentUser + 30); string notifyUsrCount = string.Format("人数+30,当前人数: {0}", currentUser + 30); GfxSystem.PublishGfxEvent("ge_highlight_prompt", "ui", notifyUsrCount); }
private void HandleUserInfo(JsonMessage msg) { LCJsonMsgUserInfo lcMsg = msg as LCJsonMsgUserInfo; if (lcMsg != null) { m_Guid = lcMsg.m_Guid; GfxSystem.PublishGfxEvent("init_userinfo", "ui", lcMsg.m_Account, lcMsg.m_Nick, lcMsg.m_Guid, lcMsg.m_Level); } }
private void HandleRequestJoinGroupResult(JsonMessage lobbyMsg) { JsonData jsonData = lobbyMsg.m_JsonData; ArkCrossEngineMessage.Msg_LC_RequestJoinGroupResult protoData = lobbyMsg.m_ProtoData as ArkCrossEngineMessage.Msg_LC_RequestJoinGroupResult; if (null != protoData) { string nick = protoData.m_Nick; TeamOperateResult result = (TeamOperateResult)protoData.m_Result; GfxSystem.PublishGfxEvent("ge_request_join_group_result", "group", nick, result); } }
private void OnHitRecover(CharacterInfo entity, string attribute, int value) { Vector3 pos = entity.GetMovementStateInfo().GetPosition3D(); if (attribute.Equals("HP")) { GfxSystem.PublishGfxEvent("ge_hero_blood", "ui", pos.X, pos.Y, pos.Z, value); } else if (attribute.Equals("MP")) { GfxSystem.PublishGfxEvent("ge_hero_energy", "ui", pos.X, pos.Y, pos.Z, value); } }
private void HandleUserInfo(int id, JsonData msg) { m_Guid = msg.GetUlong("m_Guid"); string account = msg.GetString("m_Account"); string nick = msg.GetString("m_Nick"); int level = msg.GetInt("m_Level"); m_IsLogged = true; GfxSystem.PublishGfxEvent("ge_init_userinfo", "lobby", account, nick, (int)m_Guid, level); GfxSystem.GfxLog("HandleUserInfo"); }
private void HandleAddFriendResult(JsonMessage lobbyMsg) { UserInfo playerself = WorldSystem.Instance.GetPlayerSelf(); if (null == playerself) { return; } JsonData jsonData = lobbyMsg.m_JsonData; ArkCrossEngineMessage.Msg_LC_AddFriendResult protoData = lobbyMsg.m_ProtoData as ArkCrossEngineMessage.Msg_LC_AddFriendResult; if (null != protoData) { string target_nick = protoData.m_TargetNick; AddFriendResult result = (AddFriendResult)protoData.m_Result; if (AddFriendResult.ADD_SUCCESS == result && null != LobbyClient.Instance.CurrentRole) { Dictionary <ulong, FriendInfo> friends = LobbyClient.Instance.CurrentRole.Friends; if (null != friends && friends.Count < FriendInfo.c_Friend_Max) { ulong friend_guid = protoData.m_FriendInfo.Guid; string friend_nick = protoData.m_FriendInfo.Nickname; int friend_hero_id = protoData.m_FriendInfo.HeroId; int friend_level = protoData.m_FriendInfo.Level; int friend_score = protoData.m_FriendInfo.FightingScore; bool friend_online = protoData.m_FriendInfo.IsOnline; bool friend_black = protoData.m_FriendInfo.IsBlack; FriendInfo new_friend = new FriendInfo(); new_friend.Guid = friend_guid; new_friend.Nickname = friend_nick; new_friend.HeroId = friend_hero_id; new_friend.Level = friend_level; new_friend.FightingScore = friend_score; new_friend.IsOnline = friend_online; new_friend.IsBlack = friend_black; if (!friends.ContainsKey(friend_guid)) { friends.Add(friend_guid, new_friend); } GfxSystem.PublishGfxEvent("ge_add_friend", "friend", friend_guid, friend_nick, result); } } else { ulong guid = 0; GfxSystem.PublishGfxEvent("ge_add_friend", "friend", guid, target_nick, result); } } }
private void HandleGetPartner(JsonMessage lobbyMsg) { JsonData jsonData = lobbyMsg.m_JsonData; ArkCrossEngineMessage.Msg_LC_GetPartner protoData = lobbyMsg.m_ProtoData as ArkCrossEngineMessage.Msg_LC_GetPartner; if (null != protoData) { RoleInfo role = LobbyClient.Instance.CurrentRole; if (null != role) { role.PartnerStateInfo.AddPartner(protoData.m_PartnerId, 1, 1); GfxSystem.PublishGfxEvent("ge_add_partner", "ui", protoData.m_PartnerId); } } }
private void RequestClientFriends() { try { RoleInfo role_info = LobbyClient.Instance.CurrentRole; if (null != role_info && null != role_info.Friends) { GfxSystem.PublishGfxEvent("ge_client_friends", "friend", role_info.Friends); } } catch (Exception ex) { LogSystem.Error("Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
private void HandleSyncFriendList(JsonMessage lobbyMsg) { UserInfo playerself = WorldSystem.Instance.GetPlayerSelf(); if (null == playerself) { return; } JsonData jsonData = lobbyMsg.m_JsonData; ArkCrossEngineMessage.Msg_LC_SyncFriendList protoData = lobbyMsg.m_ProtoData as ArkCrossEngineMessage.Msg_LC_SyncFriendList; if (null != protoData) { if (null != LobbyClient.Instance.CurrentRole) { Dictionary <ulong, FriendInfo> friends = LobbyClient.Instance.CurrentRole.Friends; if (null != friends) { if (null != protoData.m_FriendInfo && protoData.m_FriendInfo.Count > 0) { friends.Clear(); int ct = protoData.m_FriendInfo.Count; for (int i = 0; i < ct; i++) { ArkCrossEngineMessage.FriendInfoForMsg assit_fi = protoData.m_FriendInfo[i]; FriendInfo fi = new FriendInfo(); ulong target_guid = assit_fi.Guid; fi.Guid = target_guid; fi.Nickname = assit_fi.Nickname; fi.HeroId = assit_fi.HeroId; fi.Level = assit_fi.Level; fi.FightingScore = assit_fi.FightingScore; fi.IsOnline = assit_fi.IsOnline; fi.IsBlack = assit_fi.IsBlack; if (!friends.ContainsKey(target_guid)) { friends.Add(target_guid, fi); } //Note:通知rc,同步好友列表 GfxSystem.PublishGfxEvent("ge_addFriendSuccessWithFriendUserId", "gt", target_guid.ToString()); } } GfxSystem.PublishGfxEvent("ge_sync_friend_list", "friend"); } } } }
private void HandleSyncSignInCount(JsonMessage lobbyMsg) { JsonData jsonData = lobbyMsg.m_JsonData; ArkCrossEngineMessage.Msg_LC_SyncSignInCount protoData = lobbyMsg.m_ProtoData as ArkCrossEngineMessage.Msg_LC_SyncSignInCount; if (null != protoData) { RoleInfo roleInfo = LobbyClient.Instance.CurrentRole; if (null != roleInfo) { roleInfo.RestSignInCount = protoData.m_RestSignInCountCurDay; roleInfo.SignInCountCurMonth = protoData.m_SignInCountCurMonth; GfxSystem.PublishGfxEvent("ge_sync_sign_count", "ui"); } LogSystem.Debug("Sync SignIn Count, count = {0}, cur SignInCountCurMonth = {1}", protoData.m_RestSignInCountCurDay, protoData.m_SignInCountCurMonth); } }
private void OnUpdateSuperArmorShiled(CharacterInfo obj, int impactId) { if (null != obj) { CharacterView view = EntityManager.Instance.GetCharacterViewById(obj.GetId()); if (null != view) { ImpactInfo impactInfo = obj.GetSkillStateInfo().GetImpactInfoById(impactId); if (null != impactInfo) { ImpactLogic_SuperArmorShield.SuperArmorShieldInfo info = impactInfo.LogicDatas.GetData <ImpactLogic_SuperArmorShield.SuperArmorShieldInfo>(); if (null != info) { GfxSystem.PublishGfxEvent("ge_update_monster_sheild", "ui", view.Actor, info.DamageRemain * 1.0f / info.DamageMax); } } } } }
private void HandleSyncLeaveGroup(JsonMessage lobbyMsg) { RoleInfo role_info = LobbyClient.Instance.CurrentRole; if (null == role_info) { return; } GroupInfo group = role_info.Group; if (null == group) { return; } JsonData jsonData = lobbyMsg.m_JsonData; ArkCrossEngineMessage.Msg_LC_SyncLeaveGroup protoData = lobbyMsg.m_ProtoData as ArkCrossEngineMessage.Msg_LC_SyncLeaveGroup; if (null != protoData) { string group_nick = protoData.m_GroupNick; TeamOperateResult result = (TeamOperateResult)protoData.m_Result; if (TeamOperateResult.OR_Succeed == result) { group.Reset(); } GfxSystem.PublishGfxEvent("ge_leave_group_result", "group", group_nick, result); switch (result) { case TeamOperateResult.OR_Succeed: GfxSystem.PublishGfxEvent("ge_quitFromABandUserJoined", "gt"); break; case TeamOperateResult.OR_Kickout: GfxSystem.PublishGfxEvent("ge_quitFromABandUserJoined", "gt"); break; case TeamOperateResult.OR_Dismiss: GfxSystem.PublishGfxEvent("ge_breakBandUserJoined", "gt"); break; } } }