public uint Execute(PacketDistributed ipacket) { GC_RET_ROLE_DATA packet = (GC_RET_ROLE_DATA )ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic if (FlyWingRoot.Instance() != null) { FlyWingRoot.Instance().SetFlightVlue(packet.Combatvalue); } if (PlayerFrameLogic.Instance()) { PlayerFrameLogic.Instance().ChangeCombatValue(packet.Combatvalue); } if (RoleViewLogic.Instance() == null) { return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); } RoleViewLogic.Instance().Name = packet.Rolename; RoleViewLogic.Instance().CombatValue = packet.Combatvalue; RoleViewLogic.Instance().Level = packet.Leve; RoleViewLogic.Instance().Profession = packet.Profession; RoleViewLogic.Instance().RoleGUID = packet.Guid; RoleViewLogic.Instance().CurHp = packet.Curhp; RoleViewLogic.Instance().MaxHP = packet.Maxhp; RoleViewLogic.Instance().CurMp = packet.Curmp; RoleViewLogic.Instance().MaxMp = packet.Maxmp; RoleViewLogic.Instance().CurExp = packet.Curexp; RoleViewLogic.Instance().MaxExp = packet.Maxexp; RoleViewLogic.Instance().PAttck = packet.Pattack; RoleViewLogic.Instance().MAttack = packet.Mattack; RoleViewLogic.Instance().Hit = packet.Hit; RoleViewLogic.Instance().Critical = packet.Critical; RoleViewLogic.Instance().PDefense = packet.Pdefense; RoleViewLogic.Instance().MDefense = packet.Mdefense; RoleViewLogic.Instance().DeCritical = packet.Decritical; RoleViewLogic.Instance().Doge = packet.Doge; RoleViewLogic.Instance().Strike = packet.Strike; RoleViewLogic.Instance().CriticalAdd = packet.Criticaladd; RoleViewLogic.Instance().Ductical = packet.Dutical; RoleViewLogic.Instance().CriticalMis = packet.Criticalmis; RoleViewLogic.Instance().OffLineExp = packet.Curofflineexp; Tab_OffLineExp curTabOffLine = TableManager.GetOffLineExpByID(packet.Leve, 0); if (null != curTabOffLine) { RoleViewLogic.Instance().OffLineMaxExp = curTabOffLine.OffLineExpLimit; } RoleViewLogic.Instance().UpdateAttrRightView(); return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
public void UpdateOffLineExp() { Obj_MainPlayer mainPlayer = Singleton <ObjManager> .Instance.MainPlayer; if (null == mainPlayer) { return; } Tab_OffLineExp curTabOffLine = TableManager.GetOffLineExpByID(mainPlayer.BaseAttr.Level, 0); if (null == curTabOffLine) { return; } m_MaxOffLineExp = curTabOffLine.OffLineExpLimit; m_CurOffLineExp = mainPlayer.BaseAttr.OffLineExp; UpdateOffLineProgress(); }