mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-08-02 03:16:11 -04:00
41 lines
1.0 KiB
C++
Executable File
41 lines
1.0 KiB
C++
Executable File
// ChatServerAvatarOwner.cpp
|
|
// Copyright 2000-02, Sony Online Entertainment Inc., all rights reserved.
|
|
// Author: Justin Randall
|
|
|
|
//-----------------------------------------------------------------------
|
|
|
|
#include "FirstChatServer.h"
|
|
#include "ChatServerAvatarOwner.h"
|
|
#include "ConnectionServerConnection.h"
|
|
|
|
//-----------------------------------------------------------------------
|
|
|
|
ChatServerAvatarOwner::ChatServerAvatarOwner(ConnectionServerConnection * c, const NetworkId & n) :
|
|
networkId(n),
|
|
playerConnection(c)
|
|
{
|
|
c->addAvatar(this);
|
|
}
|
|
|
|
//-----------------------------------------------------------------------
|
|
|
|
ChatServerAvatarOwner::~ChatServerAvatarOwner()
|
|
{
|
|
if(playerConnection)
|
|
{
|
|
playerConnection->removeAvatar(this);
|
|
}
|
|
|
|
playerConnection = 0;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------
|
|
|
|
void ChatServerAvatarOwner::setPlayerConnection(ConnectionServerConnection * c)
|
|
{
|
|
playerConnection = c;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------
|
|
|