private void OnReq_UnloadPet(MessageRecv obj) { System.IO.MemoryStream ms = new System.IO.MemoryStream(obj.Data); ReqUnloadPet req = Serializer.Deserialize <ReqUnloadPet>(ms); AckUnloadPet ack = new AckUnloadPet(); ack.ID = req.ID; NetworkManager.Instance.Send(MessageID.MSG_ACK_UNLOAD_PET, ack, 0, 0); }
private void OnAck_UnloadPet(MessageRecv obj) { System.IO.MemoryStream ms = new System.IO.MemoryStream(obj.Data); AckUnloadPet ack = Serializer.Deserialize <AckUnloadPet>(ms); XCharacter role = RoleModule.Instance.GetCurPlayer(); role.PetID = 0; DataDBSRole.Update(role.Id, role); CharacterManager.Instance.SyncMainPlayerData(ESyncDataType.TYPE_BASEATTR); GTEventCenter.FireEvent(GTEventID.TYPE_UNLOAD_PET); GTEventCenter.FireEvent(GTEventID.TYPE_CHANGE_FIGHTVALUE); }
private void OnAck_UnloadPet(MessageRecv obj) { System.IO.MemoryStream ms = new System.IO.MemoryStream(obj.Data); AckUnloadPet ack = Serializer.Deserialize <AckUnloadPet>(ms); XCharacter role = GTGlobal.Main; role.PetID = 0; DataDBSCharacter.Update(role.Carrer, role); GTWorld.Instance.SyncMainPlayerData(ESyncDataType.TYPE_BASEATTR); GTEventCenter.FireEvent(GTEventID.TYPE_PET_UNLOAD); GTEventCenter.FireEvent(GTEventID.TYPE_CHANGE_FIGHTVALUE); }