mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-07-31 01:15:48 -04:00
Added serverGame library
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// TangibleVolumeContainer.cpp
|
||||
//
|
||||
// Copyright 2002 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverGame/FirstServerGame.h"
|
||||
#include "serverGame/TangibleVolumeContainer.h"
|
||||
|
||||
#include "serverGame/TangibleObject.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
TangibleVolumeContainer::TangibleVolumeContainer(Object &owner, int totalVolume) :
|
||||
VolumeContainer(owner, totalVolume)
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
TangibleVolumeContainer::~TangibleVolumeContainer()
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool TangibleVolumeContainer::mayAdd(Object const &item, ContainerErrorCode &error) const
|
||||
{
|
||||
error = CEC_Success;
|
||||
|
||||
ServerObject const * const so = item.asServerObject();
|
||||
if (so && so->asTangibleObject())
|
||||
return VolumeContainer::mayAdd(item, error);
|
||||
|
||||
error = CEC_WrongType;
|
||||
return false;
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
Reference in New Issue
Block a user