Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17239
Modified Files:
accounts.cpp basechar.cpp basechar.h basedef.h basics.cpp
basics.h commands.cpp contextmenu.cpp coord.cpp corpse.cpp
corpse.h customtags.cpp customtags.h dbdriver.cpp defines.h
definitions.cpp dragdrop.cpp factory.h guilds.cpp guilds.h
gumps.cpp items.cpp items.h log.h multi.cpp multi.h npc.cpp
npc.h party.cpp persistentbroker.cpp player.cpp player.h
pythonscript.cpp pythonscript.h sectors.cpp server.cpp
serverconfig.cpp serverconfig.h singleton.h spawnregions.cpp
spawnregions.h speech.cpp targetrequests.cpp territories.cpp
timers.cpp timing.cpp timing.h trade.cpp typedefs.h
uobject.cpp uobject.h walking.cpp world.cpp world.h
Log Message:
applied coding standard rules.
Index: trade.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/trade.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** trade.cpp 4 Aug 2004 23:17:37 -0000 1.5
--- trade.cpp 10 Aug 2004 03:15:57 -0000 1.6
***************
*** 209,213 ****
{
pSold = pItem->dupe();
! pSold->removeTag("restock"); // Remove the restock tag;
pSold->setAmount( iter->second );
pPack->addItem( pSold );
--- 209,213 ----
{
pSold = pItem->dupe();
! pSold->removeTag( "restock" ); // Remove the restock tag;
pSold->setAmount( iter->second );
pPack->addItem( pSold );
***************
*** 220,224 ****
{
pSold = pItem->dupe();
! pSold->removeTag("restock"); // Remove the restock tag;
pSold->setAmount( 1 );
pPack->addItem( pSold );
--- 220,224 ----
{
pSold = pItem->dupe();
! pSold->removeTag( "restock" ); // Remove the restock tag;
pSold->setAmount( 1 );
pPack->addItem( pSold );
***************
*** 315,319 ****
continue;
! if ( ( *it )->id() == pItem->id() && ( *it )->color() == pItem->color() &&
// (*it)->amount() >= pItem->amount() &&
( *it )->eventList() == pItem->eventList() )
--- 315,319 ----
continue;
! if ( ( *it )->id() == pItem->id() && ( *it )->color() == pItem->color() &&
// (*it)->amount() >= pItem->amount() &&
( *it )->eventList() == pItem->eventList() )
***************
*** 357,361 ****
{
P_ITEM pSold = pItem->dupe();
! pSold->removeTag("restock");
pSold->setAmount( iter->second );
pBought->addItem( pSold );
--- 357,361 ----
{
P_ITEM pSold = pItem->dupe();
! pSold->removeTag( "restock" );
pSold->setAmount( iter->second );
pBought->addItem( pSold );
Index: basechar.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v
retrieving revision 1.124
retrieving revision 1.125
diff -C2 -d -r1.124 -r1.125
*** basechar.cpp 9 Aug 2004 20:30:21 -0000 1.124
--- basechar.cpp 10 Aug 2004 03:15:56 -0000 1.125
***************
*** 161,170 ****
static void characterRegisterAfterLoading( P_CHAR pc );
! void cBaseChar::load(cBufferedReader &reader, unsigned int version) {
! cUObject::load(reader, version);
orgName_ = reader.readUtf8();
title_ = reader.readUtf8();
! creationDate_ = QDateTime::fromString(reader.readUtf8(), Qt::ISODate);
body_ = reader.readShort();
orgBody_ = reader.readShort();
--- 161,171 ----
static void characterRegisterAfterLoading( P_CHAR pc );
! void cBaseChar::load( cBufferedReader& reader, unsigned int version )
! {
! cUObject::load( reader, version );
orgName_ = reader.readUtf8();
title_ = reader.readUtf8();
! creationDate_ = QDateTime::fromString( reader.readUtf8(), Qt::ISODate );
body_ = reader.readShort();
orgBody_ = reader.readShort();
***************
*** 192,200 ****
poison_ = reader.readByte();
murdererTime_ = reader.readInt();
! if (murdererTime_) {
murdererTime_ += Server::instance()->time();
}
criminalTime_ = reader.readInt();
! if (criminalTime_) {
criminalTime_ += Server::instance()->time();
}
--- 193,203 ----
poison_ = reader.readByte();
murdererTime_ = reader.readInt();
! if ( murdererTime_ )
! {
murdererTime_ += Server::instance()->time();
}
criminalTime_ = reader.readInt();
! if ( criminalTime_ )
! {
criminalTime_ += Server::instance()->time();
}
***************
*** 202,206 ****
propertyFlags_ = reader.readInt();
murdererSerial_ = reader.readInt();
! guarding_ = reinterpret_cast<P_CHAR>(reader.readInt()); // PostProcess
hitpointsBonus_ = reader.readShort();
staminaBonus_ = reader.readShort();
--- 205,209 ----
propertyFlags_ = reader.readInt();
murdererSerial_ = reader.readInt();
! guarding_ = reinterpret_cast<P_CHAR>( reader.readInt() ); // PostProcess
hitpointsBonus_ = reader.readShort();
staminaBonus_ = reader.readShort();
***************
*** 215,288 ****
// Load Skills
unsigned int count = ALLSKILLS;
! for (unsigned int s = 0; s < count; ++s) {
// Read value, cap, lock
! setSkillValue(s, reader.readShort());
! setSkillCap(s, reader.readShort());
! setSkillLock(s, reader.readByte());
}
}
! void cBaseChar::postload(unsigned int version) {
// Resolve the guarding_ value.
! SERIAL guarding = (SERIAL)guarding_;
guarding_ = 0;
! setGuarding(World::instance()->findChar(guarding));
!
!
}
! void cBaseChar::save(cBufferedWriter &writer, unsigned int version) {
! cUObject::save(writer, version);
! writer.writeUtf8(orgName_);
! writer.writeUtf8(title_);
! writer.writeUtf8(creationDate_.toString(Qt::ISODate));
! writer.writeShort(body_);
! writer.writeShort(orgBody_);
! writer.writeShort(skin_);
! writer.writeShort(orgSkin_);
! writer.writeShort(saycolor_);
! writer.writeShort(emoteColor_);
! writer.writeShort(strength_);
! writer.writeShort(strengthMod_);
! writer.writeShort(dexterity_);
! writer.writeShort(dexterityMod_);
! writer.writeShort(intelligence_);
! writer.writeShort(intelligenceMod_);
! writer.writeShort(maxHitpoints_);
! writer.writeShort(hitpoints_);
! writer.writeShort(maxStamina_);
! writer.writeShort(stamina_);
! writer.writeShort(maxMana_);
! writer.writeShort(mana_);
! writer.writeShort(karma_);
! writer.writeShort(fame_);
! writer.writeShort(kills_);
! writer.writeShort(deaths_);
! writer.writeByte(hunger_);
! writer.writeByte(poison_);
! writer.writeInt(murdererTime_ ? murdererTime_ - Server::instance()->time() : 0);
! writer.writeInt(criminalTime_ ? criminalTime_ - Server::instance()->time() : 0);
! writer.writeByte(gender_);
! writer.writeInt(propertyFlags_);
! writer.writeInt(murdererSerial_);
! writer.writeInt(guarding_ ? guarding_->serial() : INVALID_SERIAL);
! writer.writeShort(hitpointsBonus_);
! writer.writeShort(staminaBonus_);
! writer.writeShort(manaBonus_);
! writer.writeByte(strengthCap_);
! writer.writeByte(dexterityCap_);
! writer.writeByte(intelligenceCap_);
! writer.writeByte(statCap_);
! writer.writeAscii(baseid());
! writer.writeByte(direction_);
// Load Skills
unsigned int count = ALLSKILLS;
! for (unsigned int s = 0; s < count; ++s) {
// Read value, cap, lock
! writer.writeShort(skillValue(s));
! writer.writeShort(skillCap(s));
! writer.writeByte(skillLock(s));
}
}
--- 218,293 ----
// Load Skills
unsigned int count = ALLSKILLS;
! for ( unsigned int s = 0; s < count; ++s )
! {
// Read value, cap, lock
! setSkillValue( s, reader.readShort() );
! setSkillCap( s, reader.readShort() );
! setSkillLock( s, reader.readByte() );
}
}
! void cBaseChar::postload( unsigned int version )
! {
// Resolve the guarding_ value.
! SERIAL guarding = ( SERIAL ) guarding_;
guarding_ = 0;
! setGuarding( World::instance()->findChar( guarding ) );
}
! void cBaseChar::save( cBufferedWriter& writer, unsigned int version )
! {
! cUObject::save( writer, version );
! writer.writeUtf8( orgName_ );
! writer.writeUtf8( title_ );
! writer.writeUtf8( creationDate_.toString( Qt::ISODate ) );
! writer.writeShort( body_ );
! writer.writeShort( orgBody_ );
! writer.writeShort( skin_ );
! writer.writeShort( orgSkin_ );
! writer.writeShort( saycolor_ );
! writer.writeShort( emoteColor_ );
! writer.writeShort( strength_ );
! writer.writeShort( strengthMod_ );
! writer.writeShort( dexterity_ );
! writer.writeShort( dexterityMod_ );
! writer.writeShort( intelligence_ );
! writer.writeShort( intelligenceMod_ );
! writer.writeShort( maxHitpoints_ );
! writer.writeShort( hitpoints_ );
! writer.writeShort( maxStamina_ );
! writer.writeShort( stamina_ );
! writer.writeShort( maxMana_ );
! writer.writeShort( mana_ );
! writer.writeShort( karma_ );
! writer.writeShort( fame_ );
! writer.writeShort( kills_ );
! writer.writeShort( deaths_ );
! writer.writeByte( hunger_ );
! writer.writeByte( poison_ );
! writer.writeInt( murdererTime_ ? murdererTime_ - Server::instance()->time() : 0 );
! writer.writeInt( criminalTime_ ? criminalTime_ - Server::instance()->time() : 0 );
! writer.writeByte( gender_ );
! writer.writeInt( propertyFlags_ );
! writer.writeInt( murdererSerial_ );
! writer.writeInt( guarding_ ? guarding_->serial() : INVALID_SERIAL );
! writer.writeShort( hitpointsBonus_ );
! writer.writeShort( staminaBonus_ );
! writer.writeShort( manaBonus_ );
! writer.writeByte( strengthCap_ );
! writer.writeByte( dexterityCap_ );
! writer.writeByte( intelligenceCap_ );
! writer.writeByte( statCap_ );
! writer.writeAscii( baseid() );
! writer.writeByte( direction_ );
// Load Skills
unsigned int count = ALLSKILLS;
! for ( unsigned int s = 0; s < count; ++s )
! {
// Read value, cap, lock
! writer.writeShort( skillValue( s ) );
! writer.writeShort( skillCap( s ) );
! writer.writeByte( skillLock( s ) );
}
}
***************
*** 379,389 ****
}
! void cBaseChar::save(cBufferedWriter &writer) {
! cUObject::save(writer);
// Save equipment
ItemContainer::iterator it = content_.begin();
! for (; it != content_.end(); ++it) {
! it.data()->save(writer);
}
}
--- 384,396 ----
}
! void cBaseChar::save( cBufferedWriter& writer )
! {
! cUObject::save( writer );
// Save equipment
ItemContainer::iterator it = content_.begin();
! for ( ; it != content_.end(); ++it )
! {
! it.data()->save( writer );
}
}
***************
*** 1208,1212 ****
}
! void cBaseChar::processNode(const cElement* Tag) {
changed_ = true;
QString TagName = Tag->name();
--- 1215,1220 ----
}
! void cBaseChar::processNode( const cElement* Tag )
! {
changed_ = true;
QString TagName = Tag->name();
***************
*** 1579,1583 ****
SET_INT_PROPERTY( "skin", skin_ )
! // \property char.direction This is the direction this character is facing.
else
SET_INT_PROPERTY( "direction", direction_ )
--- 1587,1591 ----
SET_INT_PROPERTY( "skin", skin_ )
! // \property char.direction This is the direction this character is facing.
else
SET_INT_PROPERTY( "direction", direction_ )
***************
*** 1742,1747 ****
return 0;
/*
! \property char.dexterity This integer property is the dexterity of this character.
! */
}
else if ( name == "dexterity" )
--- 1750,1755 ----
return 0;
/*
! \property char.dexterity This integer property is the dexterity of this character.
! */
}
else if ( name == "dexterity" )
***************
*** 1750,1755 ****
return 0;
/*
! \property char.intelligence This integer property is the intelligence of this character.
! */
}
else if ( name == "intelligence" )
--- 1758,1763 ----
return 0;
/*
! \property char.intelligence This integer property is the intelligence of this character.
! */
}
else if ( name == "intelligence" )
***************
*** 1758,1764 ****
return 0;
/*
! \property char.strength2 This integer property contains a modification value applied to strength. This is used to
! determine the real strength of the character if needed.
! */
}
else if ( name == "strength2" )
--- 1766,1772 ----
return 0;
/*
! \property char.strength2 This integer property contains a modification value applied to strength. This is used to
! determine the real strength of the character if needed.
! */
}
else if ( name == "strength2" )
***************
*** 1767,1773 ****
return 0;
/*
! \property char.dexterity2 This integer property contains a modification value applied to dexterity. This is used to
! determine the real dexterity of the character if needed.
! */
}
else if ( name == "dexterity2" )
--- 1775,1781 ----
return 0;
/*
! \property char.dexterity2 This integer property contains a modification value applied to dexterity. This is used to
! determine the real dexterity of the character if needed.
! */
}
else if ( name == "dexterity2" )
***************
*** 1776,1782 ****
return 0;
/*
! \property char.intelligence2 This integer property contains a modification value applied to intelligence. This is used to
! determine the real intelligence of the character if needed.
! */
}
else if ( name == "intelligence2" )
--- 1784,1790 ----
return 0;
/*
! \property char.intelligence2 This integer property contains a modification value applied to intelligence. This is used to
! determine the real intelligence of the character if needed.
! */
}
else if ( name == "intelligence2" )
***************
*** 1888,1893 ****
return 0;
/*
! \property char.staminabonus The integer bonus awarded to the maximum stamina of this character.
! */
}
else if ( name == "staminabonus" )
--- 1896,1901 ----
return 0;
/*
! \property char.staminabonus The integer bonus awarded to the maximum stamina of this character.
! */
}
else if ( name == "staminabonus" )
***************
*** 1896,1901 ****
return 0;
/*
! \property char.manabonus The integer bonus awarded to the maximum mana of this character.
! */
}
else if ( name == "manabonus" )
--- 1904,1909 ----
return 0;
/*
! \property char.manabonus The integer bonus awarded to the maximum mana of this character.
! */
}
else if ( name == "manabonus" )
***************
*** 1904,1909 ****
return 0;
/*
! \property char.invulnerable Indicates whether the character is invulnerable or not.
! */
}
else if ( name == "invulnerable" )
--- 1912,1917 ----
return 0;
/*
! \property char.invulnerable Indicates whether the character is invulnerable or not.
! */
}
else if ( name == "invulnerable" )
***************
*** 1962,1970 ****
}
! PyObject *cBaseChar::getProperty(const QString &name) {
PY_PROPERTY( "orgname", orgName_ )
PY_PROPERTY( "direction", direction_ )
PY_PROPERTY( "baseid", baseid() )
! PY_PROPERTY( "lastmovement", lastMovement_ )
PY_PROPERTY( "title", title_ )
PY_PROPERTY( "incognito", isIncognito() )
--- 1970,1979 ----
}
! PyObject* cBaseChar::getProperty( const QString& name )
! {
PY_PROPERTY( "orgname", orgName_ )
PY_PROPERTY( "direction", direction_ )
PY_PROPERTY( "baseid", baseid() )
! PY_PROPERTY( "lastmovement", lastMovement_ )
PY_PROPERTY( "title", title_ )
PY_PROPERTY( "incognito", isIncognito() )
***************
*** 1974,1978 ****
PY_PROPERTY( "creationdate", creationDate_.toString() )
PY_PROPERTY( "stealthedsteps", stealthedSteps_ )
! PY_PROPERTY( "runningsteps", runningSteps_ )
PY_PROPERTY( "tamed", isTamed() )
PY_PROPERTY( "guarding", guarding_ )
--- 1983,1987 ----
PY_PROPERTY( "creationdate", creationDate_.toString() )
PY_PROPERTY( "stealthedsteps", stealthedSteps_ )
! PY_PROPERTY( "runningsteps", runningSteps_ )
PY_PROPERTY( "tamed", isTamed() )
PY_PROPERTY( "guarding", guarding_ )
***************
*** 1981,1990 ****
PY_PROPERTY( "hidden", isHidden() )
PY_PROPERTY( "hunger", hunger_ )
! PY_PROPERTY( "hungertime", hungerTime_ )
PY_PROPERTY( "poison", poison_ )
PY_PROPERTY( "flag", flag_ )
! PY_PROPERTY( "propertyflags", propertyFlags_ )
! PY_PROPERTY( "murderertime", murdererTime_ )
! PY_PROPERTY( "criminaltime", criminalTime_ )
PY_PROPERTY( "meditating", isMeditating() )
PY_PROPERTY( "weight", weight_ )
--- 1990,1999 ----
PY_PROPERTY( "hidden", isHidden() )
PY_PROPERTY( "hunger", hunger_ )
! PY_PROPERTY( "hungertime", hungerTime_ )
PY_PROPERTY( "poison", poison_ )
PY_PROPERTY( "flag", flag_ )
! PY_PROPERTY( "propertyflags", propertyFlags_ )
! PY_PROPERTY( "murderertime", murdererTime_ )
! PY_PROPERTY( "criminaltime", criminalTime_ )
PY_PROPERTY( "meditating", isMeditating() )
PY_PROPERTY( "weight", weight_ )
***************
*** 2011,2025 ****
PY_PROPERTY( "karma", karma_ )
PY_PROPERTY( "fame", fame_ )
! PY_PROPERTY( "kills", kills_ )
! PY_PROPERTY( "deaths", deaths_ )
PY_PROPERTY( "dead", isDead() )
PY_PROPERTY( "war", isAtWar() )
PY_PROPERTY( "attacktarget", attackTarget_ )
! PY_PROPERTY( "nextswing", nextSwing_ )
! PY_PROPERTY( "regenhealth", regenHitpointsTime_ )
! PY_PROPERTY( "regenstamina", regenStaminaTime_ )
! PY_PROPERTY( "regenmana", regenManaTime_ )
PY_PROPERTY( "region", region_ )
! PY_PROPERTY( "skilldelay", skillDelay_ )
PY_PROPERTY( "gender", gender_ )
PY_PROPERTY( "id", body_ )
--- 2020,2034 ----
PY_PROPERTY( "karma", karma_ )
PY_PROPERTY( "fame", fame_ )
! PY_PROPERTY( "kills", kills_ )
! PY_PROPERTY( "deaths", deaths_ )
PY_PROPERTY( "dead", isDead() )
PY_PROPERTY( "war", isAtWar() )
PY_PROPERTY( "attacktarget", attackTarget_ )
! PY_PROPERTY( "nextswing", nextSwing_ )
! PY_PROPERTY( "regenhealth", regenHitpointsTime_ )
! PY_PROPERTY( "regenstamina", regenStaminaTime_ )
! PY_PROPERTY( "regenmana", regenManaTime_ )
PY_PROPERTY( "region", region_ )
! PY_PROPERTY( "skilldelay", skillDelay_ )
PY_PROPERTY( "gender", gender_ )
PY_PROPERTY( "id", body_ )
***************
*** 2132,2159 ****
PY_PROPERTY( "controlslots", controlSlots() )
! if (name.left(6) == "skill.") {
QString skill = name.right( name.length() - 6 );
INT16 skillId = Skills::instance()->findSkillByDef( skill );
! if (skillId != -1) {
! return createPyObject(skillValue(skillId));
}
// skillcap.
! } else if (name.left(9) == "skillcap.") {
QString skill = name.right( name.length() - 9 );
INT16 skillId = Skills::instance()->findSkillByDef( skill );
! if (skillId != -1) {
! return createPyObject(skillCap(skillId));
}
! } else {
// See if there's a skill by that name
INT16 skillId = Skills::instance()->findSkillByDef( name );
! if (skillId != -1) {
! return createPyObject(skillValue(skillId));
}
}
! return cUObject::getProperty(name);
}
--- 2141,2176 ----
PY_PROPERTY( "controlslots", controlSlots() )
! if ( name.left( 6 ) == "skill." )
! {
QString skill = name.right( name.length() - 6 );
INT16 skillId = Skills::instance()->findSkillByDef( skill );
! if ( skillId != -1 )
! {
! return createPyObject( skillValue( skillId ) );
}
// skillcap.
! }
! else if ( name.left( 9 ) == "skillcap." )
! {
QString skill = name.right( name.length() - 9 );
INT16 skillId = Skills::instance()->findSkillByDef( skill );
! if ( skillId != -1 )
! {
! return createPyObject( skillCap( skillId ) );
}
! }
! else
! {
// See if there's a skill by that name
INT16 skillId = Skills::instance()->findSkillByDef( name );
! if ( skillId != -1 )
! {
! return createPyObject( skillValue( skillId ) );
}
}
! return cUObject::getProperty( name );
}
***************
*** 2821,2825 ****
// Will display the right color
corpse->setTag( "notoriety", cVariant( notoriety( this ) ) );
! corpse->setCharBaseid(baseid());
corpse->setOwner( this );
corpse->moveTo( pos_, true );
--- 2838,2842 ----
// Will display the right color
corpse->setTag( "notoriety", cVariant( notoriety( this ) ) );
! corpse->setCharBaseid( baseid() );
corpse->setOwner( this );
corpse->moveTo( pos_, true );
***************
*** 2828,2832 ****
// stores the time and the murderer's name
! if ( pKiller ) {
corpse->setMurderer( pKiller->serial() );
}
--- 2845,2850 ----
// stores the time and the murderer's name
! if ( pKiller )
! {
corpse->setMurderer( pKiller->serial() );
}
***************
*** 3177,3183 ****
bool cBaseChar::sysmessage( const QString& message, unsigned short color, unsigned short font )
{
! Q_UNUSED(message);
! Q_UNUSED(color);
! Q_UNUSED(font);
return false;
}
--- 3195,3201 ----
bool cBaseChar::sysmessage( const QString& message, unsigned short color, unsigned short font )
{
! Q_UNUSED( message );
! Q_UNUSED( color );
! Q_UNUSED( font );
return false;
}
***************
*** 3185,3192 ****
bool cBaseChar::sysmessage( unsigned int message, const QString& params, unsigned short color, unsigned short font )
{
! Q_UNUSED(message);
! Q_UNUSED(params);
! Q_UNUSED(color);
! Q_UNUSED(font);
return false;
}
--- 3203,3210 ----
bool cBaseChar::sysmessage( unsigned int message, const QString& params, unsigned short color, unsigned short font )
{
! Q_UNUSED( message );
! Q_UNUSED( params );
! Q_UNUSED( color );
! Q_UNUSED( font );
return false;
}
***************
*** 3194,3202 ****
bool cBaseChar::message( const QString& message, unsigned short color, cUObject* source, unsigned short font, unsigned char mode )
{
! Q_UNUSED(message);
! Q_UNUSED(color);
! Q_UNUSED(source);
! Q_UNUSED(font);
! Q_UNUSED(mode);
return false;
}
--- 3212,3220 ----
bool cBaseChar::message( const QString& message, unsigned short color, cUObject* source, unsigned short font, unsigned char mode )
{
! Q_UNUSED( message );
! Q_UNUSED( color );
! Q_UNUSED( source );
! Q_UNUSED( font );
! Q_UNUSED( mode );
return false;
}
***************
*** 3204,3208 ****
bool cBaseChar::send( cUOPacket* packet )
{
! Q_UNUSED(packet);
return false;
}
--- 3222,3226 ----
bool cBaseChar::send( cUOPacket* packet )
{
! Q_UNUSED( packet );
return false;
}
***************
*** 3431,3437 ****
}
! void cBaseChar::load(cBufferedReader &reader) {
! load(reader, reader.version());
! World::instance()->registerObject(this);
! SectorMaps::instance()->add(this);
}
--- 3449,3456 ----
}
! void cBaseChar::load( cBufferedReader& reader )
! {
! load( reader, reader.version() );
! World::instance()->registerObject( this );
! SectorMaps::instance()->add( this );
}
Index: timers.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/timers.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** timers.cpp 9 Aug 2004 20:30:21 -0000 1.6
--- timers.cpp 10 Aug 2004 03:15:57 -0000 1.7
***************
*** 358,362 ****
( *i )->Dispel( pSource, silent );
! eraselist.append(*i);
}
--- 358,362 ----
( *i )->Dispel( pSource, silent );
! eraselist.append( *i );
}
Index: basics.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basics.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** basics.cpp 9 Aug 2004 20:30:21 -0000 1.31
--- basics.cpp 10 Aug 2004 03:15:56 -0000 1.32
***************
*** 187,215 ****
// Swap the value in place
! inline void swapBytes(unsigned int &data) {
! data = ((data & 0xFF) << 24) | ((data & 0xFF00) << 8) | ((data & 0xFF0000) >> 8) | ((data & 0xFF000000) >> 24);
}
! inline void swapBytes(double &value) {
! unsigned char *ptr = (unsigned char*)&value;
! std::swap(ptr[0], ptr[7]);
! std::swap(ptr[1], ptr[6]);
[...1031 lines suppressed...]
! {
return d->typemap;
}
! unsigned int cBufferedReader::getSkipSize( unsigned char type )
! {
! if ( !d->sizemap.contains( type ) )
! {
return 0;
! }
! else
! {
return d->sizemap[type];
}
}
! unsigned int cBufferedReader::objectCount()
! {
return d->objectCount;
}
Index: definitions.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/definitions.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** definitions.cpp 4 Aug 2004 23:17:35 -0000 1.12
--- definitions.cpp 10 Aug 2004 03:15:56 -0000 1.13
***************
*** 66,93 ****
stCategory categories[] =
{
! { "item", WPDT_ITEM },
! { "script", WPDT_SCRIPT },
! { "npc", WPDT_NPC },
! { "list", WPDT_LIST },
! { "menu", WPDT_MENU },
! { "spell", WPDT_SPELL },
! { "acl", WPDT_PRIVLEVEL },
! { "spawnregion", WPDT_SPAWNREGION },
! { "region", WPDT_REGION },
! { "multi", WPDT_MULTI },
! { "text", WPDT_TEXT },
! { "startitems", WPDT_STARTITEMS },
! { "location", WPDT_LOCATION },
! { "skill", WPDT_SKILL },
! { "action", WPDT_ACTION },
! { "make", WPDT_MAKESECTION },
! { "makeitem", WPDT_MAKEITEM },
! { "useitem", WPDT_USEITEM },
! { "skillcheck", WPDT_SKILLCHECK },
! { "define", WPDT_DEFINE },
! { "resource", WPDT_RESOURCE },
! { "contextmenu", WPDT_CONTEXTMENU },
! { "ai", WPDT_AI },
! { 0, WPDT_COUNT },
};
--- 66,93 ----
stCategory categories[] =
{
! { "item", WPDT_ITEM },
! { "script", WPDT_SCRIPT },
! { "npc", WPDT_NPC },
! { "list", WPDT_LIST },
! { "menu", WPDT_MENU },
! { "spell", WPDT_SPELL },
! { "acl", WPDT_PRIVLEVEL },
! { "spawnregion", WPDT_SPAWNREGION },
! { "region", WPDT_REGION },
! { "multi", WPDT_MULTI },
! { "text", WPDT_TEXT },
! { "startitems", WPDT_STARTITEMS },
! { "location", WPDT_LOCATION },
! { "skill", WPDT_SKILL },
! { "action", WPDT_ACTION },
! { "make", WPDT_MAKESECTION },
! { "makeitem", WPDT_MAKEITEM },
! { "useitem", WPDT_USEITEM },
! { "skillcheck", WPDT_SKILLCHECK },
! { "define", WPDT_DEFINE },
! { "resource", WPDT_RESOURCE },
! { "contextmenu", WPDT_CONTEXTMENU },
! { "ai", WPDT_AI },
! { 0, WPDT_COUNT },
};
***************
*** 729,741 ****
PyTypeObject wpElementType =
{
! PyObject_HEAD_INIT( NULL )
! 0,
! "element",
! sizeof( wpElementType ),
! 0,
! wpDealloc,
! 0,
! ( getattrfunc ) wpElement_getAttr,
! 0,
};
--- 729,741 ----
PyTypeObject wpElementType =
{
! PyObject_HEAD_INIT( NULL )
! 0,
! "element",
! sizeof( wpElementType ),
! 0,
! wpDealloc,
! 0,
! ( getattrfunc ) wpElement_getAttr,
! 0,
};
***************
*** 828,832 ****
static PyMethodDef methods[] =
{
! {"hasattribute", ( getattrofunc ) wpElement_hasattribute, METH_VARARGS, 0}, {"getattribute", ( getattrofunc ) wpElement_getattribute, METH_VARARGS, 0}, {"findchild", ( getattrofunc ) wpElement_findchild, METH_VARARGS, 0}, {"getchild", ( getattrofunc ) wpElement_getchild, METH_VARARGS, 0}, {0, 0, 0, 0}
};
--- 828,832 ----
static PyMethodDef methods[] =
{
! {"hasattribute", ( getattrofunc ) wpElement_hasattribute, METH_VARARGS, 0}, {"getattribute", ( getattrofunc ) wpElement_getattribute, METH_VARARGS, 0}, {"findchild", ( getattrofunc ) wpElement_findchild, METH_VARARGS, 0}, {"getchild", ( getattrofunc ) wpElement_getchild, METH_VARARGS, 0}, {0, 0, 0, 0}
};
Index: corpse.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/corpse.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** corpse.cpp 9 Aug 2004 20:30:21 -0000 1.61
--- corpse.cpp 10 Aug 2004 03:15:56 -0000 1.62
***************
*** 68,73 ****
}
! void cCorpse::load(cBufferedReader &reader, unsigned int version) {
! cItem::load(reader, version);
bodyId_ = reader.readShort();
hairStyle_ = reader.readShort();
--- 68,74 ----
}
! void cCorpse::load( cBufferedReader& reader, unsigned int version )
! {
! cItem::load( reader, version );
bodyId_ = reader.readShort();
hairStyle_ = reader.readShort();
***************
*** 82,112 ****
// Write a serial for every possible layer (fixed block size)
unsigned char layer;
! for (layer = cBaseChar::SingleHandedWeapon; layer <= cBaseChar::Mount; ++layer) {
SERIAL serial = reader.readInt();
! if (serial != INVALID_SERIAL) {
! equipment_.insert(layer, serial);
}
}
}
! void cCorpse::save(cBufferedWriter &writer, unsigned int version) {
! cItem::save(writer, version);
! writer.writeShort(bodyId_);
! writer.writeShort(hairStyle_);
! writer.writeShort(hairColor_);
! writer.writeShort(beardStyle_);
! writer.writeShort(beardColor_);
! writer.writeByte(direction_);
! writer.writeAscii(charbaseid_);
! writer.writeInt(murderer_);
! writer.writeInt(murdertime_);
// Write a serial for every possible layer (fixed block size)
unsigned char layer;
! for (layer = cBaseChar::SingleHandedWeapon; layer <= cBaseChar::Mount; ++layer) {
! if (equipment_.contains(layer)) {
! writer.writeInt(equipment_[layer]);
! } else {
! writer.writeInt(INVALID_SERIAL);
}
}
--- 83,120 ----
// Write a serial for every possible layer (fixed block size)
unsigned char layer;
! for ( layer = cBaseChar::SingleHandedWeapon; layer <= cBaseChar::Mount; ++layer )
! {
SERIAL serial = reader.readInt();
! if ( serial != INVALID_SERIAL )
! {
! equipment_.insert( layer, serial );
}
}
}
! void cCorpse::save( cBufferedWriter& writer, unsigned int version )
! {
! cItem::save( writer, version );
! writer.writeShort( bodyId_ );
! writer.writeShort( hairStyle_ );
! writer.writeShort( hairColor_ );
! writer.writeShort( beardStyle_ );
! writer.writeShort( beardColor_ );
! writer.writeByte( direction_ );
! writer.writeAscii( charbaseid_ );
! writer.writeInt( murderer_ );
! writer.writeInt( murdertime_ );
// Write a serial for every possible layer (fixed block size)
unsigned char layer;
! for ( layer = cBaseChar::SingleHandedWeapon; layer <= cBaseChar::Mount; ++layer )
! {
! if ( equipment_.contains( layer ) )
! {
! writer.writeInt( equipment_[layer] );
! }
! else
! {
! writer.writeInt( INVALID_SERIAL );
}
}
***************
*** 289,293 ****
}
! equipment_.insert(layer, serial);
}
--- 297,301 ----
}
! equipment_.insert( layer, serial );
}
***************
*** 306,310 ****
direction_ = 0;
id_ = 0x2006;
! setBaseid("2006");
}
--- 314,318 ----
direction_ = 0;
id_ = 0x2006;
! setBaseid( "2006" );
}
***************
*** 317,357 ****
SET_INT_PROPERTY( "bodyid", bodyId_ )
else
! /*
! \property item.hairstyle The id of the hairstyle displayed on the corpse.
! For no hair use 0.
! This property only exists for corpses.
! */
SET_INT_PROPERTY( "hairstyle", hairStyle_ )
else
! /*
! \property item.haircolor The color of the hair displayed on the corpse.
! This property only exists for corpses.
! */
SET_INT_PROPERTY( "haircolor", hairColor_ )
else
! /*
! \property item.beardstyle The id of the beardstyle displayed on the corpse.
! For no beard use 0.
! This property only exists for corpses.
! */
SET_INT_PROPERTY( "beardstyle", beardStyle_ )
else
! /*
! \property item.beardcolor The color of the beard displayed on the corpse.
! This property only exists for corpses.
! */
SET_INT_PROPERTY( "beardcolor", beardColor_ )
! /*
\property item.murderer The character who killed this creature. May be None if the
character has been deleted or the owner of this corpse accidently died.
This property only exists for corpses.
! */
! else if (name == "murderer")
{
P_CHAR pChar = value.toChar();
! if (pChar) {
murderer_ = pChar->serial();
! } else {
murderer_ = INVALID_SERIAL;
}
--- 325,368 ----
SET_INT_PROPERTY( "bodyid", bodyId_ )
else
! /*
! \property item.hairstyle The id of the hairstyle displayed on the corpse.
! For no hair use 0.
! This property only exists for corpses.
! */
SET_INT_PROPERTY( "hairstyle", hairStyle_ )
else
! /*
! \property item.haircolor The color of the hair displayed on the corpse.
! This property only exists for corpses.
! */
SET_INT_PROPERTY( "haircolor", hairColor_ )
else
! /*
! \property item.beardstyle The id of the beardstyle displayed on the corpse.
! For no beard use 0.
! This property only exists for corpses.
! */
SET_INT_PROPERTY( "beardstyle", beardStyle_ )
else
! /*
! \property item.beardcolor The color of the beard displayed on the corpse.
! This property only exists for corpses.
! */
SET_INT_PROPERTY( "beardcolor", beardColor_ )
! /*
\property item.murderer The character who killed this creature. May be None if the
character has been deleted or the owner of this corpse accidently died.
This property only exists for corpses.
! */
! else if ( name == "murderer" )
{
P_CHAR pChar = value.toChar();
! if ( pChar )
! {
murderer_ = pChar->serial();
! }
! else
! {
murderer_ = INVALID_SERIAL;
}
***************
*** 365,380 ****
SET_INT_PROPERTY( "murdertime", murdertime_ )
! /*
\property item.direction The direction this corpse is facing.
This property only exists for corpses.
! */
else
SET_INT_PROPERTY( "direction", direction_ )
! /*
\property item.charbaseid The npc definition id of the murdererd creature.
This is used to derive the carve section for this corpse.
This property only exists for corpses.
! */
else
SET_STR_PROPERTY( "charbaseid", charbaseid_ )
--- 376,391 ----
SET_INT_PROPERTY( "murdertime", murdertime_ )
! /*
\property item.direction The direction this corpse is facing.
This property only exists for corpses.
! */
else
SET_INT_PROPERTY( "direction", direction_ )
! /*
\property item.charbaseid The npc definition id of the murdererd creature.
This is used to derive the carve section for this corpse.
This property only exists for corpses.
! */
else
SET_STR_PROPERTY( "charbaseid", charbaseid_ )
***************
*** 383,387 ****
}
! PyObject* cCorpse::getProperty(const QString& name) {
PY_PROPERTY( "bodyid", bodyId_ )
PY_PROPERTY( "hairstyle", hairStyle_ )
--- 394,399 ----
}
! PyObject* cCorpse::getProperty( const QString& name )
! {
PY_PROPERTY( "bodyid", bodyId_ )
PY_PROPERTY( "hairstyle", hairStyle_ )
***************
*** 389,397 ****
PY_PROPERTY( "beardstyle", beardStyle_ )
PY_PROPERTY( "beardcolor", beardColor_ )
! PY_PROPERTY( "murderer", FindCharBySerial(murderer_) )
PY_PROPERTY( "murdertime", murdertime_ )
PY_PROPERTY( "direction", direction_ )
PY_PROPERTY( "charbaseid", charbaseid_ )
! return cItem::getProperty(name);
}
--- 401,409 ----
PY_PROPERTY( "beardstyle", beardStyle_ )
PY_PROPERTY( "beardcolor", beardColor_ )
! PY_PROPERTY( "murderer", FindCharBySerial( murderer_ ) )
PY_PROPERTY( "murdertime", murdertime_ )
PY_PROPERTY( "direction", direction_ )
PY_PROPERTY( "charbaseid", charbaseid_ )
! return cItem::getProperty( name );
}
***************
*** 447,454 ****
}
! unsigned int cCorpse::decayDelay() {
unsigned int delay = cItem::decayDelay();
! if (delay == 0) {
return 0;
}
--- 459,468 ----
}
! unsigned int cCorpse::decayDelay()
! {
unsigned int delay = cItem::decayDelay();
! if ( delay == 0 )
! {
return 0;
}
Index: factory.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/factory.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** factory.h 19 Jun 2004 02:06:51 -0000 1.8
--- factory.h 10 Aug 2004 03:15:57 -0000 1.9
***************
*** 40,44 ****
{
public:
! virtual ~Factory() {}
bool registerType( const keyType& id, productCreator creator )
{
--- 40,46 ----
{
public:
! virtual ~Factory()
! {
! }
bool registerType( const keyType& id, productCreator creator )
{
Index: coord.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/coord.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** coord.cpp 2 Jul 2004 06:01:15 -0000 1.49
--- coord.cpp 10 Aug 2004 03:15:56 -0000 1.50
***************
*** 454,485 ****
/*another try, but i think its needed for all positions, not only start and end...
! //target
! if( (*pit).y == target.y )
! {
! if( dz > 0 )
! {
! zmax = QMIN( zmax, i );
! //Console::instance()->send( QString( "TargetY, zmax:%1, i:%2\n" ).arg( zmax ).arg( i ) );
! }
! else
! {
! zmin = QMAX( zmin, i+1 );
! //Console::instance()->send( QString( "TargetY, zmin:%1, i:%2\n" ).arg( zmin ).arg( i ) );
! }
! }
! //source
! if( (*pit).y == y )
! {
! if( dz > 0 )
! {
! zmin = QMAX( zmin, z );
! //Console::instance()->send( QString( "SourceY, zmin:%1, i:%2\n" ).arg( zmax ).arg( i ) );
! }
! else
! {
! zmax = QMIN( zmax, z );
! //Console::instance()->send( QString( "SourceY, zmax:%1, i:%2\n" ).arg( zmax ).arg( i ) );
! }
! }*/
if ( dz > 0 )
{
--- 454,485 ----
/*another try, but i think its needed for all positions, not only start and end...
! //target
! if( (*pit).y == target.y )
! {
! if( dz > 0 )
! {
! zmax = QMIN( zmax, i );
! //Console::instance()->send( QString( "TargetY, zmax:%1, i:%2\n" ).arg( zmax ).arg( i ) );
! }
! else
! {
! zmin = QMAX( zmin, i+1 );
! //Console::instance()->send( QString( "TargetY, zmin:%1, i:%2\n" ).arg( zmin ).arg( i ) );
! }
! }
! //source
! if( (*pit).y == y )
! {
! if( dz > 0 )
! {
! zmin = QMAX( zmin, z );
! //Console::instance()->send( QString( "SourceY, zmin:%1, i:%2\n" ).arg( zmax ).arg( i ) );
! }
! else
! {
! zmax = QMIN( zmax, z );
! //Console::instance()->send( QString( "SourceY, zmax:%1, i:%2\n" ).arg( zmax ).arg( i ) );
! }
! }*/
if ( dz > 0 )
{
***************
*** 624,639 ****
/*SI08 zmin = (SI08)floor( i - dz*sqrt( ((double)target.x - (double)(*pit).x)*((double)target.x - (double)(*pit).x) + ((double)target.y - (double)(*pit).y)*((double)target.y - (double)(*pit).y) ) );
! SI08 zmax;
! //Console::instance()->send( QString( "zmin:%1,dz:%2\n" ).arg( zmin ).arg( dz ) );
! if( dz > 0 )
! {
! zmin = QMAX( (SI08)floor( zmin - dz/2 ), z+1 );
! zmax = QMIN( zmin + dz + 1, target.z+targetheight+1 ); //to prevent floor-mistakes
! }
! else
! {
! zmin = QMIN( (SI08)floor( zmin + dz/2 ), target.z+1 );
! zmax = QMAX( zmin - dz + 1, z ); //to prevent floor-mistakes
! }*/
// Texture mapping
--- 624,639 ----
/*SI08 zmin = (SI08)floor( i - dz*sqrt( ((double)target.x - (double)(*pit).x)*((double)target.x - (double)(*pit).x) + ((double)target.y - (double)(*pit).y)*((double)target.y - (double)(*pit).y) ) );
! SI08 zmax;
! //Console::instance()->send( QString( "zmin:%1,dz:%2\n" ).arg( zmin ).arg( dz ) );
! if( dz > 0 )
! {
! zmin = QMAX( (SI08)floor( zmin - dz/2 ), z+1 );
! zmax = QMIN( zmin + dz + 1, target.z+targetheight+1 ); //to prevent floor-mistakes
! }
! else
! {
! zmin = QMIN( (SI08)floor( zmin + dz/2 ), target.z+1 );
! zmax = QMAX( zmin - dz + 1, z ); //to prevent floor-mistakes
! }*/
// Texture mapping
***************
*** 657,662 ****
//in this case, both dont cut our line, but the mapconnection between them
//should do
! if ( ( ( map1.z < map2.z ) && ( map1.z < zmin ) && ( map2.z > zmax + dz ) ) || // 1) lineofsight collides with a map "wall"
! ( ( map1.z > map2.z ) && ( map1.z > zmin ) && ( map2.z < zmax - dz ) ) || ( ( ( map1.id >= 431 && map1.id <= 432 ) || // 3) lineofsight cuts a mountain
( map1.id >= 467 && map1.id <= 475 ) || ( map1.id >= 543 && map1.id <= 560 ) || ( map1.id >= 1754 && map1.id <= 1757 ) || ( map1.id >= 1787 && map1.id <= 1789 ) || ( map1.id >= 1821 && map1.id <= 1824 ) || ( map1.id >= 1851 && map1.id <= 1854 ) || ( map1.id >= 1881 && map1.id <= 1884 ) ) && ( posHigherThanMap ) && ( msi.atEnd() ) ) ) // mountains cut only if we are not beneath them
{
--- 657,662 ----
//in this case, both dont cut our line, but the mapconnection between them
//should do
! if ( ( ( map1.z < map2.z ) && ( map1.z < zmin ) && ( map2.z > zmax + dz ) ) || // 1) lineofsight collides with a map "wall"
! ( ( map1.z > map2.z ) && ( map1.z > zmin ) && ( map2.z < zmax - dz ) ) || ( ( ( map1.id >= 431 && map1.id <= 432 ) || // 3) lineofsight cuts a mountain
( map1.id >= 467 && map1.id <= 475 ) || ( map1.id >= 543 && map1.id <= 560 ) || ( map1.id >= 1754 && map1.id <= 1757 ) || ( map1.id >= 1787 && map1.id <= 1789 ) || ( map1.id >= 1821 && map1.id <= 1824 ) || ( map1.id >= 1851 && map1.id <= 1854 ) || ( map1.id >= 1881 && map1.id <= 1884 ) ) && ( posHigherThanMap ) && ( msi.atEnd() ) ) ) // mountains cut only if we are not beneath them
{
***************
*** 1218,1222 ****
//should do
land_st tile = TileCache::instance()->getLand( map1.id );
! if ( ( ( map1.z < map2.z ) && ( map1.z < zmin ) && ( map2.z > zmax + dz_down ) && !targetpos ) || // 1) lineofsight collides with a map "wall"
( ( map1.z > map2.z ) && ( map1.z > zmin ) && ( map2.z < zmin + dz_down ) && !targetpos ) || ( tile.isBlocking() && posHigherThanMap && msi.atEnd() && rj.atEnd() ) )
{
--- 1218,1222 ----
//should do
land_st tile = TileCache::instance()->getLand( map1.id );
! if ( ( ( map1.z < map2.z ) && ( map1.z < zmin ) && ( map2.z > zmax + dz_down ) && !targetpos ) || // 1) lineofsight collides with a map "wall"
( ( map1.z > map2.z ) && ( map1.z > zmin ) && ( map2.z < zmin + dz_down ) && !targetpos ) || ( tile.isBlocking() && posHigherThanMap && msi.atEnd() && rj.atEnd() ) )
{
Index: dbdriver.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbdriver.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** dbdriver.cpp 20 Jul 2004 04:40:51 -0000 1.38
--- dbdriver.cpp 10 Aug 2004 03:15:56 -0000 1.39
***************
*** 189,201 ****
PyTypeObject wpDbResultType =
{
! PyObject_HEAD_INIT( NULL )
! 0,
! "dbresult",
! sizeof( wpDbResultType ),
! 0,
! wpDeallocDbResult,
! 0,
! ( getattrfunc ) wpDbResult_getAttr,
! 0,
};
--- 189,201 ----
PyTypeObject wpDbResultType =
{
! PyObject_HEAD_INIT( NULL )
! 0,
! "dbresult",
! sizeof( wpDbResultType ),
! 0,
! wpDeallocDbResult,
! 0,
! ( getattrfunc ) wpDbResult_getAttr,
! 0,
};
***************
*** 269,273 ****
static PyMethodDef wpDbResultMethods[] =
{
! {"free", ( getattrofunc ) wpDbResult_free, METH_VARARGS, 0}, {"fetchrow", ( getattrofunc ) wpDbResult_fetchrow, METH_VARARGS, 0}, {"getint", ( getattrofunc ) wpDbResult_getint, METH_VARARGS, 0}, {"getstring", ( getattrofunc ) wpDbResult_getstring, METH_VARARGS, 0}, {0, 0, 0, 0}
};
--- 269,273 ----
static PyMethodDef wpDbResultMethods[] =
{
! {"free", ( getattrofunc ) wpDbResult_free, METH_VARARGS, 0}, {"fetchrow", ( getattrofunc ) wpDbResult_fetchrow, METH_VARARGS, 0}, {"getint", ( getattrofunc ) wpDbResult_getint, METH_VARARGS, 0}, {"getstring", ( getattrofunc ) wpDbResult_getstring, METH_VARARGS, 0}, {0, 0, 0, 0}
};
Index: party.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/party.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** party.cpp 20 Jul 2004 04:40:51 -0000 1.15
--- party.cpp 10 Aug 2004 03:15:57 -0000 1.16
***************
*** 456,470 ****
PyTypeObject wpPartyType =
{
! PyObject_HEAD_INIT( NULL )
! 0,
! "party",
! sizeof( wpPartyType ),
! 0,
! wpDealloc,
! 0,
! ( getattrfunc ) wpParty_getAttr,
! ( setattrfunc ) wpParty_setAttr,
! wpParty_compare,
! 0,
};
--- 456,470 ----
PyTypeObject wpPartyType =
{
! PyObject_HEAD_INIT( NULL )
! 0,
! "party",
! sizeof( wpPartyType ),
! 0,
! wpDealloc,
! 0,
! ( getattrfunc ) wpParty_getAttr,
! ( setattrfunc ) wpParty_setAttr,
! wpParty_compare,
! 0,
};
***************
*** 533,537 ****
static PyMethodDef wpPartyMethods[] =
{
! { "tellall", ( getattrofunc ) wpParty_tellall, METH_VARARGS, 0 }, { "tellsingle", ( getattrofunc ) wpParty_tellsingle, METH_VARARGS, 0 }, { 0, 0, 0, 0 }
};
--- 533,537 ----
static PyMethodDef wpPartyMethods[] =
{
! { "tellall", ( getattrofunc ) wpParty_tellall, METH_VARARGS, 0 }, { "tellsingle", ( getattrofunc ) wpParty_tellsingle, METH_VARARGS, 0 }, { 0, 0, 0, 0 }
};
***************
*** 586,592 ****
static int wpParty_setAttr( wpParty* self, char* name, PyObject* value )
{
! Q_UNUSED(self);
! Q_UNUSED(name);
! Q_UNUSED(value);
return 0;
}
--- 586,592 ----
static int wpParty_setAttr( wpParty* self, char* name, PyObject* value )
{
! Q_UNUSED( self );
! Q_UNUSED( name );
! Q_UNUSED( value );
return 0;
}
Index: corpse.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/corpse.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** corpse.h 9 Aug 2004 20:30:21 -0000 1.26
--- corpse.h 10 Aug 2004 03:15:56 -0000 1.27
***************
*** 62,80 ****
// they're displayed as equipment
public:
! unsigned char getClassid() {
return cCorpse::classid;
}
! cCorpse(bool init = false);
! void setBodyId(UINT16 data);
! void setHairStyle(UINT16 data);
! void setHairColor(UINT16 data);
! void setBeardStyle(UINT16 data);
! void setBeardColor(UINT16 data);
! void setMurderer(SERIAL data);
! void setMurderTime(uint data);
! void setDirection(unsigned char data);
! void setCharBaseid(const QCString &data);
bool corpse() const
{
--- 62,81 ----
// they're displayed as equipment
public:
! unsigned char getClassid()
! {
return cCorpse::classid;
}
! cCorpse( bool init = false );
! void setBodyId( UINT16 data );
! void setHairStyle( UINT16 data );
! void setHairColor( UINT16 data );
! void setBeardStyle( UINT16 data );
! void setBeardColor( UINT16 data );
! void setMurderer( SERIAL data );
! void setMurderTime( uint data );
! void setDirection( unsigned char data );
! void setCharBaseid( const QCString& data );
bool corpse() const
{
***************
*** 90,94 ****
UINT16 beardColor() const;
unsigned char direction() const;
! const QCString &charBaseid() const;
SERIAL murderer() const;
unsigned int murderTime() const;
--- 91,95 ----
UINT16 beardColor() const;
unsigned char direction() const;
! const QCString& charBaseid() const;
SERIAL murderer() const;
unsigned int murderTime() const;
***************
*** 112,117 ****
void save();
bool del();
! void load(cBufferedReader &reader, unsigned int version);
! void save(cBufferedWriter &reader, unsigned int version);
// abstract cDefinable
--- 113,118 ----
void save();
bool del();
! void load( cBufferedReader& reader, unsigned int version );
! void save( cBufferedWriter& reader, unsigned int version );
// abstract cDefinable
***************
*** 122,126 ****
virtual stError* setProperty( const QString& name, const cVariant& value );
! PyObject* getProperty(const QString& name);
void createTooltip( cUOTxTooltipList& tooltip, cPlayer* player );
};
--- 123,127 ----
virtual stError* setProperty( const QString& name, const cVariant& value );
! PyObject* getProperty( const QString& name );
void createTooltip( cUOTxTooltipList& tooltip, cPlayer* player );
};
***************
*** 162,171 ****
}
! inline void cCorpse::setDirection(unsigned char data)
{
direction_ = data;
}
! inline void cCorpse::setCharBaseid(const QCString &baseid)
{
charbaseid_ = baseid;
--- 163,172 ----
}
! inline void cCorpse::setDirection( unsigned char data )
{
direction_ = data;
}
! inline void cCorpse::setCharBaseid( const QCString& baseid )
{
charbaseid_ = baseid;
***************
*** 197,201 ****
}
! inline const QCString &cCorpse::charBaseid() const
{
return charbaseid_;
--- 198,202 ----
}
! inline const QCString& cCorpse::charBaseid() const
{
return charbaseid_;
Index: player.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.h,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** player.h 9 Aug 2004 20:30:21 -0000 1.52
--- player.h 10 Aug 2004 03:15:57 -0000 1.53
***************
*** 75,81 ****
void save();
bool del();
! void load(cBufferedReader &reader, unsigned int version);
! void save(cBufferedWriter &writer, unsigned int version);
! void load(cBufferedReader &reader);
virtual bool send( cUOPacket* packet );
--- 75,81 ----
void save();
bool del();
! void load( cBufferedReader& reader, unsigned int version );
! void save( cBufferedWriter& writer, unsigned int version );
! void load( cBufferedReader& reader );
virtual bool send( cUOPacket* packet );
***************
*** 101,105 ****
// other public methods
virtual stError* setProperty( const QString& name, const cVariant& value );
! PyObject *getProperty(const QString& name);
void turnTo( cUObject* object ); // override
void turnTo( const Coord_cl& data ); // override
--- 101,105 ----
// other public methods
virtual stError* setProperty( const QString& name, const cVariant& value );
! PyObject* getProperty( const QString& name );
void turnTo( cUObject* object ); // override
void turnTo( const Coord_cl& data ); // override
***************
*** 203,207 ****
const char* className() const;
! unsigned char getClassid() {
return cPlayer::classid;
}
--- 203,208 ----
const char* className() const;
! unsigned char getClassid()
! {
return cPlayer::classid;
}
Index: walking.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/walking.cpp,v
retrieving revision 1.131
retrieving revision 1.132
diff -C2 -d -r1.131 -r1.132
*** walking.cpp 6 Aug 2004 22:27:02 -0000 1.131
--- walking.cpp 10 Aug 2004 03:15:57 -0000 1.132
***************
*** 121,126 ****
bool checkWalkable( P_CHAR pChar, UINT16 tileId )
{
! Q_UNUSED(pChar);
! Q_UNUSED(tileId);
return false;
}
--- 121,126 ----
bool checkWalkable( P_CHAR pChar, UINT16 tileId )
{
! Q_UNUSED( pChar );
! Q_UNUSED( tileId );
return false;
}
Index: pythonscript.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/pythonscript.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** pythonscript.cpp 27 Jul 2004 04:15:20 -0000 1.44
--- pythonscript.cpp 10 Aug 2004 03:15:57 -0000 1.45
***************
*** 43,513 ****
static char* eventNames[] =
{
! /*
! \event onUse
! \param player The player who used the item.
! \param item The item that was used.
! \return Return 1 if your function should handle the event. If you return 0,
! the server will try to process the event internally or call other scripts.
! \condition Triggered when a player doubleclicks an item.
! \notes This event is called for the character first and then for the item.
[...1032 lines suppressed...]
! bool cPythonScriptable::convertPyObject( PyObject* object, QCString& string )
! {
return false;
}
! bool cPythonScriptable::convertPyObject( PyObject* object, unsigned int& data )
! {
return false;
}
! bool cPythonScriptable::convertPyObject( PyObject* object, int& data )
! {
return false;
}
! bool cPythonScriptable::setPropety( const QString& name, PyObject* value )
! {
return true;
}
Index: npc.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/npc.h,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** npc.h 9 Aug 2004 20:30:21 -0000 1.53
--- npc.h 10 Aug 2004 03:15:57 -0000 1.54
***************
*** 91,98 ****
void save();
bool del();
! void load(cBufferedReader &reader, unsigned int version);
! void save(cBufferedWriter &writer, unsigned int version);
! void postload(unsigned int version);
! void load(cBufferedReader &reader);
virtual enCharTypes objectType();
--- 91,98 ----
void save();
bool del();
! void load( cBufferedReader& reader, unsigned int version );
! void save( cBufferedWriter& writer, unsigned int version );
! void postload( unsigned int version );
! void load( cBufferedReader& reader );
virtual enCharTypes objectType();
***************
*** 125,129 ****
// other public methods
virtual stError* setProperty( const QString& name, const cVariant& value );
! PyObject *getProperty(const QString &name);
void setNextMoveTime( void );
virtual void callGuards(); // overriding
--- 125,129 ----
// other public methods
virtual stError* setProperty( const QString& name, const cVariant& value );
! PyObject* getProperty( const QString& name );
void setNextMoveTime( void );
virtual void callGuards(); // overriding
***************
*** 197,201 ****
const char* className() const;
! unsigned char getClassid() {
return cNPC::classid;
}
--- 197,202 ----
const char* className() const;
! unsigned char getClassid()
! {
return cNPC::classid;
}
Index: speech.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/speech.cpp,v
retrieving revision 1.182
retrieving revision 1.183
diff -C2 -d -r1.182 -r1.183
*** speech.cpp 4 Aug 2004 23:17:36 -0000 1.182
--- speech.cpp 10 Aug 2004 03:15:57 -0000 1.183
***************
*** 269,273 ****
PyList_SetItem( pkeywords, i, PyInt_FromLong( keywords[i] ) );
! PyObject* args = Py_BuildValue( "(NNNO)", pNpc->getPyObject(), pPlayer->getPyObject(), QString2Python(comm), pkeywords );
bool result = cPythonScript::callChainedEventHandler( EVENT_SPEECH, events, args );
--- 269,273 ----
PyList_SetItem( pkeywords, i, PyInt_FromLong( keywords[i] ) );
! PyObject* args = Py_BuildValue( "(NNNO)", pNpc->getPyObject(), pPlayer->getPyObject(), QString2Python( comm ), pkeywords );
bool result = cPythonScript::callChainedEventHandler( EVENT_SPEECH, events, args );
***************
*** 339,343 ****
UINT16 keyword = *iter;
! if (keyword == 0x07)
pChar->callGuards();
}
--- 339,343 ----
UINT16 keyword = *iter;
! if ( keyword == 0x07 )
pChar->callGuards();
}
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.116
retrieving revision 1.117
diff -C2 -d -r1.116 -r1.117
*** player.cpp 9 Aug 2004 20:30:21 -0000 1.116
--- player.cpp 10 Aug 2004 03:15:57 -0000 1.117
***************
*** 113,126 ****
static void playerRegisterAfterLoading( P_PLAYER pc );
! void cPlayer::load(cBufferedReader &reader) {
! load(reader, reader.version());
! World::instance()->registerObject(this);
! SectorMaps::instance()->add(this);
}
! void cPlayer::load(cBufferedReader &reader, unsigned int version) {
! cBaseChar::load(reader, version);
! setAccount(Accounts::instance()->getRecord(reader.readUtf8()));
additionalFlags_ = reader.readInt();
visualRange_ = reader.readByte();
--- 113,128 ----
static void playerRegisterAfterLoading( P_PLAYER pc );
! void cPlayer::load( cBufferedReader& reader )
! {
! load( reader, reader.version() );
! World::instance()->registerObject( this );
! SectorMaps::instance()->add( this );
}
! void cPlayer::load( cBufferedReader& reader, unsigned int version )
! {
! cBaseChar::load( reader, version );
! setAccount( Accounts::instance()->getRecord( reader.readUtf8() ) );
additionalFlags_ = reader.readInt();
visualRange_ = reader.readByte();
***************
*** 132,145 ****
}
! void cPlayer::save(cBufferedWriter &writer, unsigned int version) {
! cBaseChar::save(writer, version);
! writer.writeUtf8(account_ ? account_->login() : QString::null);
! writer.writeInt(additionalFlags_);
! writer.writeByte(visualRange_);
! writer.writeUtf8(profile_);
! writer.writeByte(fixedLightLevel_);
! writer.writeByte(strengthLock_);
! writer.writeByte(dexterityLock_);
! writer.writeByte(intelligenceLock_);
}
--- 134,148 ----
}
! void cPlayer::save( cBufferedWriter& writer, unsigned int version )
! {
! cBaseChar::save( writer, version );
! writer.writeUtf8( account_ ? account_->login() : QString::null );
! writer.writeInt( additionalFlags_ );
! writer.writeByte( visualRange_ );
! writer.writeUtf8( profile_ );
! writer.writeByte( fixedLightLevel_ );
! writer.writeByte( strengthLock_ );
! writer.writeByte( dexterityLock_ );
! writer.writeByte( intelligenceLock_ );
}
***************
*** 276,280 ****
// Send equipment tooltips to other players as well
! for ( ItemContainer::const_iterator it(content_.begin()); it != content_.end(); ++it )
{
it.data()->sendTooltip( socket );
--- 279,283 ----
// Send equipment tooltips to other players as well
! for ( ItemContainer::const_iterator it( content_.begin() ); it != content_.end(); ++it )
{
it.data()->sendTooltip( socket );
***************
*** 291,295 ****
void cPlayer::talk( const QString& message, UI16 color, UINT8 type, bool autospam, cUOSocket* socket )
{
! Q_UNUSED(autospam);
if ( color == 0xFFFF )
color = saycolor_;
--- 294,298 ----
void cPlayer::talk( const QString& message, UI16 color, UINT8 type, bool autospam, cUOSocket* socket )
{
! Q_UNUSED( autospam );
if ( color == 0xFFFF )
color = saycolor_;
***************
*** 603,607 ****
charName.prepend( gender_ ? tr( "Lady " ) : tr( "Lord " ) );
! QString affix("");
if ( !isIncognito() && guild_ && !guild_->abbreviation().isEmpty() )
--- 606,610 ----
charName.prepend( gender_ ? tr( "Lady " ) : tr( "Lord " ) );
! QString affix( "" );
if ( !isIncognito() && guild_ && !guild_->abbreviation().isEmpty() )
***************
*** 1260,1265 ****
}
! PyObject *cPlayer::getProperty(const QString& name) {
! PY_PROPERTY("account", account_)
/*
\rproperty controlslots The amount of controlslots currently used for this
--- 1263,1269 ----
}
! PyObject* cPlayer::getProperty( const QString& name )
! {
! PY_PROPERTY( "account", account_ )
/*
\rproperty controlslots The amount of controlslots currently used for this
***************
*** 1267,1275 ****
This property is only available for player objects.
*/
! PY_PROPERTY( "controlslots", controlslots() )
! PY_PROPERTY( "logouttime", logoutTime_ )
PY_PROPERTY( "npc", false )
PY_PROPERTY( "lightbonus", fixedLightLevel_ )
! PY_PROPERTY( "objectdelay", objectDelay_ )
PY_PROPERTY( "visrange", visualRange_ )
PY_PROPERTY( "profile", profile_ )
--- 1271,1279 ----
This property is only available for player objects.
*/
! PY_PROPERTY( "controlslots", controlslots() )
! PY_PROPERTY( "logouttime", logoutTime_ )
PY_PROPERTY( "npc", false )
PY_PROPERTY( "lightbonus", fixedLightLevel_ )
! PY_PROPERTY( "objectdelay", objectDelay_ )
PY_PROPERTY( "visrange", visualRange_ )
PY_PROPERTY( "profile", profile_ )
***************
*** 1277,1281 ****
PY_PROPERTY( "dexteritylock", dexterityLock_ )
PY_PROPERTY( "intelligencelock", intelligenceLock_ )
! return cBaseChar::getProperty(name);
}
--- 1281,1285 ----
PY_PROPERTY( "dexteritylock", dexterityLock_ )
PY_PROPERTY( "intelligencelock", intelligenceLock_ )
! return cBaseChar::getProperty( name );
}
***************
*** 1652,1656 ****
cUObject::createTooltip( tooltip, player );
! QString affix(" ");
// Append the (frozen) tag
--- 1656,1660 ----
cUObject::createTooltip( tooltip, player );
! QString affix( " " );
// Append the (frozen) tag
Index: guilds.h
==========================================...
[truncated message content] |