Пример #1
0
CItemMulti::~CItemMulti()
{
	MultiUnRealizeRegion();	// unrealize before removed from ground.
	DeletePrepare();	// Must remove early because virtuals will fail in child destructor.
	// NOTE: ??? This is dangerous to iterators. The "next" item may no longer be valid !

	// Attempt to remove all the accessory junk.
	// NOTE: assume we have already been removed from Top Level

	if ( ! m_pRegion )
		return;

	CWorldSearch Area( m_pRegion->m_pt, Multi_GetMaxDist() );	// largest area.
	while (true)
	{
		CItem * pItem = Area.GetItem();
		if ( pItem == NULL )
			break;
		if ( pItem == this )	// this gets deleted seperately.
			continue;
		if ( ! Multi_IsPartOf( pItem ))
			continue;
		pItem->Delete();	// delete the key id for the door/key/sign.
	}

	delete m_pRegion;
}
Пример #2
0
CItemStone::~CItemStone()
{
	SetAmount(0);	// Tell everyone we are deleting.
	DeletePrepare();	// Must remove early because virtuals will fail in child destructor.

	// Remove this stone from the links of guilds in the world
	g_World.m_Stones.RemovePtr( this );

	// all members are deleted automatically.
	Empty();	// do this manually to preserve the parents type cast
}
Пример #3
0
CItemVendable::~CItemVendable()
{
	// Nothing really to do...no dynamic memory has been allocated.
	DeletePrepare();	// Must remove early because virtuals will fail in child destructor.
}
Пример #4
0
CItemCorpse::~CItemCorpse()
{
	DeletePrepare();	// Must remove early because virtuals will fail in child destructor.
}