public uint Execute(PacketDistributed ipacket) { CG_ASK_RECOVER packet = (CG_ASK_RECOVER )ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
void OnRecoverOk() { Obj_NPC TargetNpc = Singleton <DialogCore> .GetInstance().CareNPC; if (TargetNpc == null) { return; } if (Singleton <ObjManager> .Instance.MainPlayer) { CG_ASK_RECOVER Pack = (CG_ASK_RECOVER)PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASK_RECOVER); Pack.ObjID = TargetNpc.ServerID; Pack.SendPacket(); } }