Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28950
Modified Files:
basechar.cpp corpse.cpp items.cpp items.h npc.cpp server.cpp
trade.cpp wolfpack.vcproj world.cpp
Added Files:
content.cpp content.h
Log Message:
Container content changes
--- NEW FILE: content.h ---
#if !defined(__CONTENT_H__)
#define __CONTENT_H__
// Forward declarations
class ContainerIterator;
class ContainerContent;
class cItem;
class QString;
#include <functional>
/*
Use this to make sure that a certain item type exists in a container.
*/
class ContainerComparer {
public:
virtual bool operator() (cItem *item) const {
return false;
}
};
// This class manages the content of a container
class ContainerContent {
friend class ContainerIterator;
friend class ContainerCopyIterator;
private:
cItem **content;
public:
ContainerContent(const ContainerContent &src) {
// Copy content
if (!src.content) {
content = 0;
} else {
size_t count = src.maxCount() + 2; // How many slots
content = new cItem* [count];
for (size_t i = 0; i < count; ++i) {
content[i] = src.content[i];
}
}
}
ContainerContent() {
content = 0;
}
~ContainerContent() {
clear();
}
// Tries to find an item in the container using the given ternary function.
inline bool match(const ContainerComparer &functor) {
bool result = false;
size_t count = this->count();
for (size_t i = 2; i < 2 + count; ++i) {
if (functor(content[i])) {
result = true;
break;
}
}
return result;
}
inline size_t count() const {
if (!content) {
return 0;
} else {
return reinterpret_cast<size_t>(content[0]);
}
}
inline size_t maxCount() const {
if (!content) {
return 0;
} else {
return reinterpret_cast<size_t>(content[1]);
}
}
/*
This method truncates the array or adds new elements to it.
*/
inline void ensureCapacity(size_t count) {
// Round up to the nearest multiple of 16 for the item part
size_t maxcount = ((count + 15) / 16) * 16 + 2; // 2 for real size and used size
// Nothing at all...
if (maxcount == 2) {
clear();
} else if (maxcount != maxCount()) {
if (content) {
// Save old pointer
cItem **oldContent = content;
content = new cItem*[maxcount];
// Set the new size and maxsize
content[0] = reinterpret_cast<cItem*>(count); // Write the _new_ count.
content[1] = reinterpret_cast<cItem*>(maxcount);
// Copy old items over
size_t oldCount = reinterpret_cast<size_t>(oldContent[0]);
for (size_t i = 2; (i < oldCount + 2) && (i < 2 + count); ++i) {
content[i] = oldContent[i];
}
// Delete old content
delete [] oldContent;
} else {
content = new cItem*[maxcount];
content[0] = reinterpret_cast<cItem*>(count);
content[1] = reinterpret_cast<cItem*>(maxcount);
}
} else if (content) {
content[0] = reinterpret_cast<cItem*>(count);
}
}
/*
Checks if this item container contains the given item.
*/
inline bool contains(const cItem *item) const {
bool result = false;
size_t count = this->count(); // If there is no content, this will always be zero
for (int i = 2; i < count + 2; ++i) {
if (content[i] == item) {
result = true;
break;
}
}
return result;
}
/*
Removes an item from the array
*/
inline void remove(const cItem *item) {
bool found = false;
size_t count = this->count();
// Iterate trough all items.
for (int i = 2; i < 2 + count; ++i) {
if (content[i] != item) {
continue; // Skip this item
}
// We found the item we want to remove here
// What we do now is seek ahead and write all following items in the array
// one index downwards
for (int j = i + 1; j < 2 + count; ++j) {
content[j - 1] = content[j]; // Swap Values
}
found = true;
break; // It's insured that there is only once instance of an item here
}
if (found) {
ensureCapacity(count - 1); // Decrease itemcount
}
}
/*
Adds an item to the array if it's not already there.
*/
inline void add(cItem *item) {
if (!contains(item)) {
size_t count = this->count(); // Retrieve current count
ensureCapacity(count + 1); // Resize array and write the new count
content[2 + count] = item; // Write to the end of the array
}
}
/*
Clear the array.
*/
inline void clear() {
delete [] content;
content = 0;
}
/*
Return a string representation of the array.
*/
QString dump();
};
// This class manages an iteration over the content of an item.
// This iterator is not invalidated by removing items from a container. However,
// the iterator could skip an item if it points to an item behind the deleted
// item.
class ContainerIterator {
private:
size_t pos; // Position within the items array
const ContainerContent &content;
public:
/*
Iterate over the content of an item.
*/
ContainerIterator::ContainerIterator(const cItem *item);
/*
Iterate over a ContainerContent instance.
*/
ContainerIterator(const ContainerContent &container) : content(container), pos(0) {
}
// Get the current element
cItem *operator *() {
size_t count = content.count();
if (pos >= count) {
return 0;
} else {
return content.content[2 + pos];
}
}
// Jump back to the first item in the iteration
void reset() {
pos = 0;
}
// Step to the next position
ContainerIterator &operator ++() {
pos++;
return *this;
}
// Step to the previous position
ContainerIterator &operator --() {
pos++;
return *this;
}
// Is this iterator at the end?
bool atEnd() {
size_t count = content.count();
return pos >= count;
}
// Utility Wrapper
size_t count() {
return content.count();
}
// Seek to a given position in the array
void seek(size_t pos) {
this->pos = pos;
}
};
// This class works as mentioned above but contains a copy
// of the content.
class ContainerCopyIterator {
private:
size_t pos; // Position within the items array
ContainerContent content;
public:
/*
Iterate over the content of an item.
*/
ContainerCopyIterator::ContainerCopyIterator(const cItem *item);
/*
Iterate over a ContainerContent instance.
*/
ContainerCopyIterator(const ContainerContent &container) : pos(0) {
content = ContainerContent(container);
}
// Get the current element
cItem *operator *() {
size_t count = content.count();
if (pos >= count) {
return 0;
} else {
return content.content[2 + pos];
}
}
// Jump back to the first item in the iteration
void reset() {
pos = 0;
}
// Step to the next position
ContainerCopyIterator &operator ++() {
pos++;
return *this;
}
// Step to the previous position
ContainerCopyIterator &operator --() {
pos++;
return *this;
}
// Is this iterator at the end?
bool atEnd() {
size_t count = content.count();
return pos >= count;
}
// Utility Wrapper
size_t count() {
return content.count();
}
// Seek to a given position in the array
void seek(size_t pos) {
this->pos = pos;
}
};
#endif
Index: trade.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/trade.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** trade.cpp 30 Oct 2004 16:03:20 -0000 1.15
--- trade.cpp 2 Nov 2004 20:45:44 -0000 1.16
***************
*** 100,113 ****
P_ITEM pStock = pVendor->getItemOnLayer( 0x1A );
- cItem::ContainerContent sContent;
-
- if ( pStock )
- sContent = pStock->content();
-
P_ITEM pBought = pVendor->getItemOnLayer( 0x1B );
- cItem::ContainerContent bContent;
-
- if ( pBought )
- bContent = pBought->content();
Q_UINT32 totalValue = 0;
--- 100,104 ----
***************
*** 130,158 ****
// First check: is the item on the vendor in the specified layer
! if ( layer == 0x1A )
! {
! if ( find_if( sContent.begin(), sContent.end(), bind2nd( MatchItemAndSerial(), pItem->serial() ) ) == sContent.end() )
! {
! socket->sysMessage( tr( "Invalid item bought." ) );
! socket->send( &clearBuy );
! return;
! }
!
amount = QMIN(pItem->restock(), amount);
! }
! else if ( layer == 0x1B )
! {
! if ( find_if( bContent.begin(), bContent.end(), bind2nd( MatchItemAndSerial(), pItem->serial() ) ) == bContent.end() )
! {
! socket->sysMessage( tr( "Invalid item bought." ) );
! socket->send( &clearBuy );
! return;
! }
!
// Not enough of that item is left
amount = QMIN(pItem->amount(), amount);
! }
! else
! {
socket->sysMessage( tr( "Invalid item bought." ) );
socket->send( &clearBuy );
--- 121,130 ----
// First check: is the item on the vendor in the specified layer
! if (layer == cBaseChar::BuyRestockContainer) {
amount = QMIN(pItem->restock(), amount);
! } else if (layer == cBaseChar::BuyNoRestockContainer) {
// Not enough of that item is left
amount = QMIN(pItem->amount(), amount);
! } else {
socket->sysMessage( tr( "Invalid item bought." ) );
socket->send( &clearBuy );
***************
*** 292,297 ****
return;
}
- cItem::ContainerContent sContent;
- cItem::ContainerContent::const_iterator it;
Q_UINT32 totalValue = 0;
--- 264,267 ----
***************
*** 313,320 ****
// First an equal item with higher amount must be in the vendors sell container!
- sContent = pPurchase->content();
-
bool found = false;
! for ( it = sContent.begin(); it != sContent.end(); ++it )
{
if ( !( *it ) )
--- 283,288 ----
// First an equal item with higher amount must be in the vendors sell container!
bool found = false;
! for (ContainerIterator it(pPurchase); !it.atEnd(); ++it)
{
if ( !( *it ) )
***************
*** 400,404 ****
}*/
! if ( pItem->isPileable() )
{
P_ITEM pSold = pItem->dupe();
--- 368,372 ----
}*/
! if ( pItem->isPileable() && amount < pItem->amount() )
{
P_ITEM pSold = pItem->dupe();
***************
*** 408,411 ****
--- 376,380 ----
pBought->addItem( pSold );
pSold->update();
+
if ( pItem->amount() <= amount ) {
pItem->remove();
***************
*** 417,421 ****
else
{
- pPack->removeItem( pItem );
pBought->addItem( pItem );
pItem->update();
--- 386,389 ----
Index: basechar.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v
retrieving revision 1.171
retrieving revision 1.172
diff -C2 -d -r1.171 -r1.172
*** basechar.cpp 27 Oct 2004 14:56:00 -0000 1.171
--- basechar.cpp 2 Nov 2004 20:45:42 -0000 1.172
***************
*** 827,833 ****
// Move all items from the corpse to the backpack and then look for
// previous equipment
! cItem::ContainerContent content = corpse->content();
! cItem::ContainerContent::iterator it;
! for ( it = content.begin(); it != content.end(); ++it )
{
backpack->addItem( *it, false );
--- 827,831 ----
// Move all items from the corpse to the backpack and then look for
// previous equipment
! for (ContainerIterator it(corpse); !it.atEnd(); ++it)
{
backpack->addItem( *it, false );
***************
*** 2878,2885 ****
// Create Loot - Either on the corpse or on the ground
! cItem::ContainerContent content = backpack->content();
! cItem::ContainerContent::iterator it;
!
! for ( it = content.begin(); it != content.end(); ++it )
{
P_ITEM item = *it;
--- 2876,2880 ----
// Create Loot - Either on the corpse or on the ground
! for (ContainerIterator it(backpack); !it.atEnd(); ++it)
{
P_ITEM item = *it;
Index: wolfpack.vcproj
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.vcproj,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** wolfpack.vcproj 16 Oct 2004 18:19:40 -0000 1.53
--- wolfpack.vcproj 2 Nov 2004 20:45:44 -0000 1.54
***************
*** 292,295 ****
--- 292,301 ----
</File>
<File
+ RelativePath=".\content.cpp">
+ </File>
+ <File
+ RelativePath=".\content.h">
+ </File>
+ <File
RelativePath=".\contextmenu.cpp">
</File>
***************
*** 665,671 ****
</File>
<File
- RelativePath=".\python\content.h">
- </File>
- <File
RelativePath=".\python\engine.cpp">
</File>
--- 671,674 ----
***************
*** 698,701 ****
--- 701,707 ----
</File>
<File
+ RelativePath=".\python\pycontent.h">
+ </File>
+ <File
RelativePath=".\python\pycoord.cpp">
</File>
Index: items.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v
retrieving revision 1.457
retrieving revision 1.458
diff -C2 -d -r1.457 -r1.458
*** items.cpp 30 Oct 2004 16:03:20 -0000 1.457
--- items.cpp 2 Nov 2004 20:45:43 -0000 1.458
***************
*** 280,287 ****
bool cItem::containerPileItem( cItem* pItem )
{
! cItem::ContainerContent::const_iterator it( content_.begin() );
! cItem::ContainerContent::const_iterator end( content_.end() );
! for ( ; it != end; ++it )
! {
if ( ( *it )->pileItem( pItem ) )
return true;
--- 280,284 ----
bool cItem::containerPileItem( cItem* pItem )
{
! for (ContainerIterator it(this); !it.atEnd(); ++it) {
if ( ( *it )->pileItem( pItem ) )
return true;
***************
*** 330,338 ****
unsigned int rest = amount;
P_ITEM pi;
! cItem::ContainerContent container( this->content() );
! cItem::ContainerContent::const_iterator it( container.begin() );
! cItem::ContainerContent::const_iterator end( container.end() );
! for ( ; it != end; ++it )
! {
pi = *it;
if ( pi->type() == 1 )
--- 327,331 ----
unsigned int rest = amount;
P_ITEM pi;
! for (ContainerCopyIterator it(this); !it.atEnd(); ++it) {
pi = *it;
if ( pi->type() == 1 )
***************
*** 584,590 ****
// Create a copy of the content so we don't accidently change our working copy
! ContainerContent container( content() );
! ContainerContent::const_iterator it2;
! for ( it2 = container.begin(); it2 != container.end(); ++it2 )
( *it2 )->remove();
--- 577,581 ----
// Create a copy of the content so we don't accidently change our working copy
! for (ContainerCopyIterator it2(this); !it2.atEnd(); ++it2)
( *it2 )->remove();
***************
*** 1084,1087 ****
--- 1075,1079 ----
P_ITEM nItem = new cItem( *this );
nItem->setSerial( World::instance()->findItemSerial() );
+ nItem->container_ = 0;
if ( container_ )
***************
*** 1091,1095 ****
if ( pchar )
{
- nItem->container_ = 0;
nItem->moveTo( pchar->pos(), true );
}
--- 1083,1086 ----
***************
*** 1098,1103 ****
P_ITEM item = dynamic_cast<P_ITEM>( container_ );
! if ( item )
! item->addItem( nItem, false, true, false );
}
}
--- 1089,1095 ----
P_ITEM item = dynamic_cast<P_ITEM>( container_ );
! if ( item ) {
! item->addItem( nItem, false, true, false, false );
! }
}
}
***************
*** 1274,1283 ****
QPtrList< cItem > cItem::getContainment() const
{
- ContainerContent containment = content();
- ContainerContent::iterator it = containment.begin();
QPtrList<cItem> itemlist;
! while ( it != containment.end() )
! {
P_ITEM pItem = *it;
--- 1266,1272 ----
QPtrList< cItem > cItem::getContainment() const
{
QPtrList<cItem> itemlist;
! for (ContainerIterator it(content_); !it.atEnd(); ++it) {
P_ITEM pItem = *it;
***************
*** 1299,1304 ****
else
itemlist.append( pItem );
-
- ++it;
}
--- 1288,1291 ----
***************
*** 1407,1415 ****
}
! content_.push_back( pItem );
! pItem->layer_ = 0;
! pItem->container_ = this;
!
! if ( handleWeight )
{
// Increase the totalweight upward recursively
--- 1394,1398 ----
}
! if ( !content_.contains(pItem) && handleWeight )
{
// Increase the totalweight upward recursively
***************
*** 1417,1420 ****
--- 1400,1407 ----
}
+ content_.add( pItem );
+ pItem->layer_ = 0;
+ pItem->container_ = this;
+
// If the Server is running and this happens, resend the tooltip of us and
// all our parent containers.
***************
*** 1432,1449 ****
void cItem::removeItem( cItem* pItem, bool handleWeight )
{
! //ContainerContent::iterator it = std::find(content_.begin(), content_.end(), pItem);
! ContainerContent::iterator it = content_.begin();
! while ( it != content_.end() )
! {
! if ( ( *it ) == pItem )
! {
! content_.erase( it );
! if ( handleWeight )
! {
! setTotalweight( this->totalweight() - pItem->totalweight() );
! }
! break;
}
- ++it;
}
--- 1419,1428 ----
void cItem::removeItem( cItem* pItem, bool handleWeight )
{
! // only do this if it's really in the container
! if (content_.contains(pItem)) {
! content_.remove(pItem);
! if ( handleWeight ) {
! setTotalweight( this->totalweight() - pItem->totalweight() );
}
}
***************
*** 1466,1470 ****
}
! cItem::ContainerContent cItem::content() const
{
return content_;
--- 1445,1449 ----
}
! const ContainerContent &cItem::content() const
{
return content_;
***************
*** 1473,1478 ****
bool cItem::contains( const cItem* pItem ) const
{
! ContainerContent::const_iterator it = std::find( content_.begin(), content_.end(), pItem );
! return it != content_.end();
}
--- 1452,1456 ----
bool cItem::contains( const cItem* pItem ) const
{
! return content_.contains(pItem);
}
***************
*** 2032,2036 ****
if ( type() == 1 )
{
! unsigned int count = content_.size();
unsigned int weight = ( unsigned int ) floor( totalweight_ );
tooltip.addLine( 1050044, QString( "%1\t%2" ).arg( count ).arg( weight ) );
--- 2010,2014 ----
if ( type() == 1 )
{
! unsigned int count = content_.count();
unsigned int weight = ( unsigned int ) floor( totalweight_ );
tooltip.addLine( 1050044, QString( "%1\t%2" ).arg( count ).arg( weight ) );
***************
*** 2095,2102 ****
}
! ContainerContent::const_iterator it(content_.begin());
! ContainerContent::const_iterator end(content_.end());
! for ( ; it != end; ++it )
! {
count += ( *it )->countItems( baseids );
}
--- 2073,2077 ----
}
! for (ContainerIterator it(this); !it.atEnd(); ++it) {
count += ( *it )->countItems( baseids );
}
***************
*** 2145,2157 ****
}
! if ( content().size() > 0 )
! {
! ContainerContent content( this->content() );
! ContainerContent::iterator it = content.begin();
! while ( amount > 0 && it != content.end() )
! {
! amount = ( *it )->removeItems( baseids, amount );
! ++it;
! }
}
--- 2120,2125 ----
}
! for (ContainerCopyIterator it(this); !it.atEnd(); ++it) {
! amount = ( *it )->removeItems( baseids, amount );
}
***************
*** 2238,2244 ****
cUObject::save(writer);
! // Save container content
! ContainerContent::iterator it = content_.begin();
! for (; it != content_.end(); ++it) {
(*it)->save(writer);
}
--- 2206,2211 ----
cUObject::save(writer);
! // Save container content
! for (ContainerIterator it(this); !it.atEnd(); ++it) {
(*it)->save(writer);
}
Index: corpse.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/corpse.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** corpse.cpp 19 Aug 2004 01:55:55 -0000 1.65
--- corpse.cpp 2 Nov 2004 20:45:43 -0000 1.66
***************
*** 194,200 ****
void cCorpse::update( cUOSocket* mSock )
{
- // Do not send a normal item update here but something else instead
- cItem::ContainerContent content = cItem::content();
-
cUOTxCorpseEquipment corpseEquip;
cUOTxItemContent corpseContent;
--- 194,197 ----
Index: items.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/items.h,v
retrieving revision 1.220
retrieving revision 1.221
diff -C2 -d -r1.220 -r1.221
*** items.h 10 Oct 2004 20:10:02 -0000 1.220
--- items.h 2 Nov 2004 20:45:44 -0000 1.221
***************
*** 36,39 ****
--- 36,40 ----
#include "singleton.h"
#include "objectdef.h"
+ #include "content.h"
// Library Includes
***************
*** 85,90 ****
}
- typedef QValueVector<cItem*> ContainerContent;
-
inline const char* objectID() const
{
--- 86,89 ----
***************
*** 371,375 ****
void removeItem( cItem*, bool handleWeight = true );
void removeFromCont( bool handleWeight = true );
! ContainerContent content() const;
bool contains( const cItem* ) const;
unsigned int countItems( const QStringList& baseids ) const;
--- 370,374 ----
void removeItem( cItem*, bool handleWeight = true );
void removeFromCont( bool handleWeight = true );
! const ContainerContent &content() const; // Return a reference to the container content object
bool contains( const cItem* ) const;
unsigned int countItems( const QStringList& baseids ) const;
Index: server.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/server.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** server.cpp 21 Oct 2004 12:11:18 -0000 1.34
--- server.cpp 2 Nov 2004 20:45:44 -0000 1.35
***************
*** 80,83 ****
--- 80,85 ----
#endif
+ #include "content.h"
+
cComponent::cComponent()
{
***************
*** 264,268 ****
bool cServer::run( int argc, char** argv )
! {
// If have no idea where i should put this otherwise
#if defined(Q_OS_UNIX)
--- 266,270 ----
bool cServer::run( int argc, char** argv )
! {
// If have no idea where i should put this otherwise
#if defined(Q_OS_UNIX)
***************
*** 276,279 ****
--- 278,308 ----
d->app = new QApplication ( argc, argv, false );
+ /* cItem *item1 = (cItem*)0;
+ cItem *item2 = (cItem*)1;
+ cItem *item3 = (cItem*)2;
+
+ ContainerContent content;
+ for (int i = 0; i < 18; ++i) {
+ content.add((cItem*)i);
+ }
+
+ content.remove((cItem*)16);
+ content.remove((cItem*)15);
+ content.remove((cItem*)16);
+ content.remove((cItem*)17);
+
+ Console::instance()->send(content.dump());
+
+ ContainerIterator it(content);
+ while (!it.atEnd()) {
+ Console::instance()->send(QString::number(reinterpret_cast<size_t>(*it)) + "\n");
+ if ((*it) == item3) {
+ content.remove(item3);
+ }
+ ++it;
+ }
+
+ return false;*/
+
// Load wolfpack.xml
Config::instance()->load();
--- NEW FILE: content.cpp ---
#include "content.h"
#include "items.h"
#include <qstring.h>
/*
Iterate over the content of an item.
*/
ContainerIterator::ContainerIterator(const cItem *item) : content(item->content()), pos(0) {
}
ContainerCopyIterator::ContainerCopyIterator(const cItem *item) : pos(0) {
content = ContainerContent(item->content());
}
QString ContainerContent::dump() {
QString result = "Content of array:\n";
result += QString("Count: %1; MaxCount: %2\n").arg(count()).arg(maxCount());
size_t count = this->count();
for (size_t i = 2; i < 2 + count; ++i) {
result += QString("At %1: 0x%2\n").arg(i - 2).arg(reinterpret_cast<size_t>(content[i]), 0, 16);
}
return result;
}
Index: world.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v
retrieving revision 1.135
retrieving revision 1.136
diff -C2 -d -r1.135 -r1.136
*** world.cpp 12 Oct 2004 23:59:28 -0000 1.135
--- world.cpp 2 Nov 2004 20:45:44 -0000 1.136
***************
*** 379,387 ****
// Also delete all items inside if it's a container.
! cItem::ContainerContent container( pi->content() );
! cItem::ContainerContent::const_iterator it( container.begin() );
! cItem::ContainerContent::const_iterator end( container.end() );
! for ( ; it != end; ++it )
! quickdelete( *it );
// if it is within a multi, delete it from the multis vector
--- 379,384 ----
// Also delete all items inside if it's a container.
! for (ContainerIterator it(pi); !it.atEnd(); ++it)
! quickdelete(*it);
// if it is within a multi, delete it from the multis vector
Index: npc.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/npc.cpp,v
retrieving revision 1.124
retrieving revision 1.125
diff -C2 -d -r1.124 -r1.125
*** npc.cpp 26 Oct 2004 18:37:34 -0000 1.124
--- npc.cpp 2 Nov 2004 20:45:44 -0000 1.125
***************
*** 1358,1362 ****
P_ITEM pContC = getItemOnLayer( cBaseChar::SellContainer );
! if ( !pContC || pContC->content().size() == 0 )
{
talk( 501550, 0, 0, false, saycolor_, player->socket() );
--- 1358,1362 ----
P_ITEM pContC = getItemOnLayer( cBaseChar::SellContainer );
! if ( !pContC || pContC->content().count() == 0 )
{
talk( 501550, 0, 0, false, saycolor_, player->socket() );
|