ManaPlus
Public Member Functions
EAthena::FamilyHandler Class Reference

#include <familyhandler.h>

Inheritance diagram for EAthena::FamilyHandler:
Net::FamilyHandler

Public Member Functions

 FamilyHandler ()
 
 ~FamilyHandler ()
 
void askForChild (const Being *const being) const
 
void askForChildReply (const bool accept) const
 
- Public Member Functions inherited from Net::FamilyHandler
 FamilyHandler ()
 

Detailed Description

Definition at line 29 of file familyhandler.h.

Constructor & Destructor Documentation

◆ FamilyHandler()

EAthena::FamilyHandler::FamilyHandler ( )

Definition at line 35 of file familyhandler.cpp.

35  :
37 {
40 
41  familyHandler = this;
42 }
const BeingId BeingId_zero
Definition: beingid.h:30
Net::FamilyHandler * familyHandler
Definition: net.cpp:110

References BeingId_zero, familyHandler, EAthena::FamilyRecv::mParent1, and EAthena::FamilyRecv::mParent2.

◆ ~FamilyHandler()

EAthena::FamilyHandler::~FamilyHandler ( )
virtual

Reimplemented from Net::FamilyHandler.

Definition at line 44 of file familyhandler.cpp.

45 {
46  familyHandler = nullptr;
47 }

References familyHandler.

Member Function Documentation

◆ askForChild()

void EAthena::FamilyHandler::askForChild ( const Being *const  being) const
virtual

Implements Net::FamilyHandler.

Definition at line 49 of file familyhandler.cpp.

50 {
51  if (being == nullptr)
52  return;
53 
54  createOutPacket(CMSG_FAMILY_ASK_FOR_CHILD);
55  outMsg.writeBeingId(being->getId(), "account id");
56 }
BeingId getId() const
Definition: actorsprite.h:64
#define createOutPacket(name)
Definition: messageout.h:37

References createOutPacket, and ActorSprite::getId().

◆ askForChildReply()

void EAthena::FamilyHandler::askForChildReply ( const bool  accept) const
virtual

Implements Net::FamilyHandler.

Definition at line 58 of file familyhandler.cpp.

59 {
60  createOutPacket(CMSG_FAMILY_ASK_FOR_CHILD_REPLY);
61  outMsg.writeBeingId(FamilyRecv::mParent1, "parent1");
62  outMsg.writeBeingId(FamilyRecv::mParent2, "parent2");
63  outMsg.writeInt32(accept ? 1 : 0, "result");
66 }
TcpNet::Socket accept(const TcpNet::Socket sock)
Definition: sdltcpnet.cpp:198

References TcpNet::accept(), BeingId_zero, createOutPacket, EAthena::FamilyRecv::mParent1, and EAthena::FamilyRecv::mParent2.


The documentation for this class was generated from the following files: