bool HandleRoleIsFirstPayCurrcey(NetCmdBase obj) { PlayerRole.Instance.RoleInfo.RoleMe.SetIsFirstPayCurrcey(false); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleRoleActionStates(NetCmdBase obj) { LC_Cmd_ChangeRoleActionStates ncb = (LC_Cmd_ChangeRoleActionStates)obj; int256Function.SetBitStates(m_RoleInfo.GetActionStates(), ncb.Index, ncb.States); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleRoleAchievementIndex(NetCmdBase obj) { LC_Cmd_ChangeRoleAchievementIndex ncb = (LC_Cmd_ChangeRoleAchievementIndex)obj; RoleMe.SetAchievementIndex(ncb.AchievementIndex); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleChangeRoleCharm(NetCmdBase obj) { LC_Cmd_ChangeRoleCharmValue ncb = (LC_Cmd_ChangeRoleCharmValue)obj; m_RoleInfo.SetCharmInfo(ncb.CharmArray); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleChangeRoleAchievementPoint(NetCmdBase obj) { LC_Cmd_ChangeRoleAchievementPoint ncb = (LC_Cmd_ChangeRoleAchievementPoint)obj; m_RoleInfo.SetAchievementPoint(ncb.dwAchievementPoint); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleLCChangeRoleCurrency(NetCmdBase obj) { LC_Cmd_ChangeRoleCurrency ncb = (LC_Cmd_ChangeRoleCurrency)obj; m_RoleInfo.SetCurrency(ncb.dwCurrencyNum); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleLCChangeRoleGlobe(NetCmdBase obj) { LC_Cmd_ChangeRoleGlobe ncb = (LC_Cmd_ChangeRoleGlobe)obj; m_RoleInfo.SetGlobel(Convert.ToUInt32(ncb.dwGlobeNum + m_RoleInfo.GetGlobel())); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleChangeRoleParticularStates(NetCmdBase obj) { LC_Cmd_ChangeRoleParticularStates ncb = (LC_Cmd_ChangeRoleParticularStates)obj; PlayerRole.Instance.RoleInfo.RoleMe.SetParticularStates(ncb.ParticularStates); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleChangeRoleAcceptGiffSum(NetCmdBase obj) { LC_Cmd_ChangeRoleAcceptGiffSum ncb = (LC_Cmd_ChangeRoleAcceptGiffSum)obj; m_RoleInfo.SetAcceptGiffSum(Convert.ToByte(ncb.AcceptGiffSum)); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleLCChangeRoleMedal(NetCmdBase obj) { LC_Cmd_ChangeRoleMedal ncb = (LC_Cmd_ChangeRoleMedal)obj; m_RoleInfo.SetMedal(ncb.dwMedalNum); m_RoleInfo.SetTotalUseMedal(ncb.TotalUseMedal);//总使用的奖牌数量 tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleChangeRoleTotalRecharge(NetCmdBase obj) { //修改玩家总充值的数量 LC_Cmd_ChangeRoleTotalRecharge ncb = (LC_Cmd_ChangeRoleTotalRecharge)obj; PlayerRole.Instance.RoleInfo.RoleMe.SetTotalRechargeSum(ncb.Sum); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleChangeRoleCashSum(NetCmdBase obj) { LC_Cmd_ChangeRoleCashSum ncb = (LC_Cmd_ChangeRoleCashSum)obj; PlayerRole.Instance.RoleInfo.RoleMe.SetCashSum(ncb.CashSum); PlayerRole.Instance.RoleInfo.RoleMe.SetTotalCashSum(ncb.TotalCashSum); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleResetRoleGlobel(NetCmdBase obj) { LC_Cmd_ResetRoleGlobel ncb = (LC_Cmd_ResetRoleGlobel)obj; RoleMe.SetGlobel(ncb.TotalGlobelSum); RoleMe.SetLotteryScore(ncb.LotteryScore); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); // MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleLCChangeRoleExp(NetCmdBase obj) { //当用户经验发生变化的时候 LC_Cmd_ChangRoleExp ncb = (LC_Cmd_ChangRoleExp)obj; m_RoleInfo.SetExp(ncb.dwExp); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleChangeRoleTitle(NetCmdBase obj) { LC_Cmd_ChangeRoleTitle ncb = (LC_Cmd_ChangeRoleTitle)obj; m_RoleInfo.SetTitleID(ncb.TitleID); tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Title_Sucess); //MsgEventHandle.HandleMsg(pUOM); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleChangeRoleIsShowIpAddress(NetCmdBase obj) { LC_Cmd_ChangeRoleIsShowIpAddress ncb = (LC_Cmd_ChangeRoleIsShowIpAddress)obj; RoleMe.SetIsShowIpAddress(ncb.IsShowIpAddress); tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Role_IsShowIpAddress_Sucess); //MsgEventHandle.HandleMsg(pUOM); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
bool HandleLCChangeRoleGender(NetCmdBase obj) { LC_Cmd_ChangeRoleGender ncb = (LC_Cmd_ChangeRoleGender)obj; m_RoleInfo.SetGender(ncb.bGender); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Role_Gender_Sucess); //MsgEventHandle.HandleMsg(pUOM); return(true); }
bool HandleLCChangeRoleNickName(NetCmdBase obj) { LC_Cmd_ChangeRoleNickName ncb = (LC_Cmd_ChangeRoleNickName)obj; if (ncb.Result) { m_RoleInfo.SetNickName(ncb.NickName); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); } tagUserOperationEvent pUOM = new tagUserOperationEvent((ncb.Result ? UserOperateMessage.UOM_Role_NickName_Sucess : UserOperateMessage.UOM_Role_NickName_Failed_3)); //MsgEventHandle.HandleMsg(pUOM); return(true); }
bool HandleResetUserInfo(NetCmdBase obj) { LC_Cmd_ResetRoleInfo ncb = (LC_Cmd_ResetRoleInfo)obj; RoleMe.SetRoleInfo(ncb.RoleInfo); //ServerSetting.SetCallbckUrl(Utility.IPToString(ncb.OperateIP)); //PlayerRole.Instance.RoleExChange.SetPlayerRoleIsShowExChange(); PlayerRole.Instance.TableManager.ClearTableInfo(); PlayerRole.Instance.OnRoleResetOtherInfo();//清空数据并且提供事件 tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); // MsgEventHandle.HandleMsg(pEvent); return(true); }
public void UpdateDayByServer() //按服务器进行每天的更新处理 { //服务器进行天数更新的时候 m_RoleInfo.SetGameTime(0); m_RoleInfo.SetProduction(0); m_RoleInfo.SetSendGiffSum(0); m_RoleInfo.SetAcceptGiffSum(0); m_RoleInfo.BeneFitCount = 0; m_RoleInfo.BenefitTime = 0; int256Function.Clear(m_RoleInfo.GetTaskStates()); m_RoleInfo.SetOnlineMin(0); m_RoleInfo.SetOnlineRewardStates(0); SystemTime.Instance.ClearLogTimeByDay();//记录时间设置到当前 tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); tagOnlineRewardChangeEvent pEventOnline = new tagOnlineRewardChangeEvent(); //MsgEventHandle.HandleMsg(pEventOnline); }
bool HandleLCChangeRoleLevel(NetCmdBase obj) { LC_Cmd_ChangeRoleLevel ncb = (LC_Cmd_ChangeRoleLevel)obj; UInt16 OldLevel = m_RoleInfo.GetLevel(); m_RoleInfo.SetLevel(ncb.wLevel); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); UInt16 RewardID = 0; if (FishConfig.Instance.m_LevelRewardMap.m_LevelRewardMap.ContainsKey(ncb.wLevel)) { RewardID = FishConfig.Instance.m_LevelRewardMap.m_LevelRewardMap[ncb.wLevel]; } tagRoleLevelChangeEvent pLevelEvent = new tagRoleLevelChangeEvent(OldLevel, ncb.wLevel, RewardID); //MsgEventHandle.HandleMsg(pLevelEvent); return(true); }
bool HandleLCChangeRoleFaceID(NetCmdBase obj) { LC_Cmd_ChangeRoleFaceID ncb = (LC_Cmd_ChangeRoleFaceID)obj; m_RoleInfo.SetFaceID(ncb.dwFaceID); if (ncb.dwFaceID <= 100) { //系统头像 tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Role_ChangeFace_Sucess); //MsgEventHandle.HandleMsg(pUOM); } else { //自定义头像 tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Role_CustFace_Sucess);//使用用户头像成功 //MsgEventHandle.HandleMsg(pUOM); } tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); }
public bool OnAddUserGlobelByCatchedData(Byte Seat, int GlobelSum) //修改指定位置上玩家的金币 或者是积分 必须是 与鱼群相关的 { //因为捕获鱼 添加金币 Seat = SceneRuntime.ClientToServerSeat(Seat); bool IsInMonth = (PlayerRole.Instance.RoleInfo.RoleMe.GetMonthID() != 0); if (PlayerRole.Instance.RoleInfo.RoleMe.GetSeat() == Seat) { if (PlayerRole.Instance.RoleInfo.RoleMe == null) { return(false); } if (IsInMonth) { if (GlobelSum >= 0) { PlayerRole.Instance.RoleInfo.RoleMe.SetMonthScore( Convert.ToUInt32(PlayerRole.Instance.RoleInfo.RoleMe.GetMonthScore() + GlobelSum)); } else { if (PlayerRole.Instance.RoleInfo.RoleMe.GetMonthGlobel() < GlobelSum * -1) { return(false); } PlayerRole.Instance.RoleInfo.RoleMe.SetMonthGlobel( Convert.ToUInt32(PlayerRole.Instance.RoleInfo.RoleMe.GetMonthGlobel() + GlobelSum)); } //tagMonthChangeEvent pEvent = new tagMonthChangeEvent(PlayerRole.Instance.RoleInfo.RoleMe.GetUserID()); //MsgEventHandle.HandleMsg(pEvent); tagMatchScoreAddEvent pEvent = new tagMatchScoreAddEvent(PlayerRole.Instance.RoleInfo.RoleMe.GetUserID()); //MsgEventHandle.HandleMsg(pEvent); IEvent evnt = new Event(EventMsg.UPDATE_PLAYSCORE); EventManager.Instance.DispatchEvent(evnt); return(true); } else { if (GlobelSum < 0 && PlayerRole.Instance.RoleInfo.RoleMe.GetGlobel() < -1 * GlobelSum) { return(false); } PlayerRole.Instance.RoleInfo.RoleMe.SetGlobel( Convert.ToUInt32(PlayerRole.Instance.RoleInfo.RoleMe.GetGlobel() + GlobelSum)); tagRoleChangeEvent pEvent = new tagRoleChangeEvent(); //MsgEventHandle.HandleMsg(pEvent); return(true); } } else { if (IsInMonth) { TableRole pTableRole = PlayerRole.Instance.TableManager.GetTableRole(Seat); if (pTableRole == null) { return(false); } if (GlobelSum >= 0) { pTableRole.SetMonthScore(Convert.ToUInt32(pTableRole.GetMonthScore() + GlobelSum)); } else { if (pTableRole.GetMonthGlobel() < GlobelSum * -1) { return(false); } pTableRole.SetMonthGlobel(Convert.ToUInt32(pTableRole.GetMonthGlobel() + GlobelSum)); } tagMonthChangeEvent pEvent = new tagMonthChangeEvent(pTableRole.GetUserID()); //MsgEventHandle.HandleMsg(pEvent); return(true); } else { if (GlobelSum < 0 && PlayerRole.Instance.TableManager.GetTableRole(Seat).GetGlobel() < -1 * GlobelSum) { return(false); } TableRole pTableRole = PlayerRole.Instance.TableManager.GetTableRole(Seat); if (pTableRole == null) { return(false); } pTableRole.SetGlobel(Convert.ToUInt32(pTableRole.GetGlobel() + GlobelSum)); tagTableChangeEvent pEvent = new tagTableChangeEvent(pTableRole.GetUserID()); //MsgEventHandle.HandleMsg(pEvent); return(true); } } return(false); }