Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv18229
Modified Files:
TmpEff.h dbl_single_click.cpp dragdrop.cpp items.cpp log.cpp
res.rc srvparams.cpp srvparams.h targetactions.cpp
targetactions.h tmpeff.cpp
Log Message:
Removed DyeTubs and Bandages from Source and added some missing methods to PySocket and PyChar.
Index: TmpEff.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/TmpEff.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** TmpEff.h 12 Sep 2003 15:39:55 -0000 1.39
--- TmpEff.h 15 Sep 2003 12:49:05 -0000 1.40
***************
*** 187,223 ****
typedef SingletonHolder<cTempEffects> TempEffects;
- // cRepeatAction
- class cRepeatAction: public cTempEffect
- {
- private:
- SERIAL _mage;
- UINT8 _anim;
- UINT32 _delay;
- public:
- cRepeatAction( P_CHAR mage, UINT8 anim, UINT32 delay );
- virtual void Expire();
- };
-
- class cDelayedHeal: public cTempEffect
- {
- private:
- UINT16 amount;
- public:
- cDelayedHeal( P_CHAR pSource, P_CHAR pTarget, UINT16 _amount );
- virtual void Expire();
- };
-
-
- class AbstractAI;
-
- class cStablemasterRefreshTimer: public cTempEffect
- {
- private:
- P_NPC m_npc;
- AbstractAI* m_interface;
- public:
- cStablemasterRefreshTimer( P_NPC m_npc, AbstractAI* m_interface, UINT32 time );
- virtual void Expire();
- };
-
#endif
--- 187,189 ----
Index: dbl_single_click.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbl_single_click.cpp,v
retrieving revision 1.224
retrieving revision 1.225
diff -C2 -d -r1.224 -r1.225
*** dbl_single_click.cpp 11 Sep 2003 16:19:50 -0000 1.224
--- dbl_single_click.cpp 15 Sep 2003 12:49:05 -0000 1.225
***************
*** 379,383 ****
return;
! // Drinks (This needs some other effects as well)
case 105:
pc_currchar->soundEffect( 0x30 + RandomNum( 0, 1 ) );
--- 379,383 ----
return;
! // Drinks
case 105:
pc_currchar->soundEffect( 0x30 + RandomNum( 0, 1 ) );
***************
*** 386,414 ****
return;
- case 202:
- // if ( pi->id() == 0x14F0 || pi->id() == 0x1869 ) // Check for Deed/Teleporter + Guild Type
- // {
- // pc_currchar->setFx1( pi->serial() );
- // StonePlacement(socket);
- // return;
- // }
- // else if (pi->id() == 0x0ED5) // Check for Guildstone + Guild Type
- // {
- // pc_currchar->setFx1( pi->serial() );
- // cGuildStone *pStone = dynamic_cast<cGuildStone*>(pi);
- // if ( pStone != NULL )
- // pStone->Menu(s, 1);
- // return;
- // }
- // else
- // Console::instance()->send("Unhandled guild item type named: %s with ID of: %X", pi->name().ascii(), pi->id());
- return;
- // End of guild stuff
-
- // PlayerVendors deed
- case 217:
- qWarning("Player Vendor code is gone, sorry... implement in python");
- break;
-
case 222: // player clicks on a house item (sign) to set ban/friendlists, rename
{
--- 386,389 ----
***************
*** 445,460 ****
return;
- // Dying tub
- case 406:
- socket->sysMessage( tr( "What do you want to dye?" ) );
- socket->attachTarget( new cDyeTarget( pi->color() ) );
- return;
-
- case 1000: // Ripper...bank checks
- {
- socket->sysMessage(tr("To cash this, you need to drop it on a banker."));
- return;
- }
-
// 1001: Sword Weapons (Swordsmanship)
case 1001:
--- 420,423 ----
***************
*** 665,675 ****
// }
// return; // alchemy
- case 0x0E21: // healing
- {
- cSkHealing* target = new cSkHealing( pi->serial() );
- socket->attachTarget( target );
- socket->sysMessage( tr("Who will you use the bandages on?") );
- }
- return;
case 0x14FB:
case 0x14FC:
--- 628,631 ----
Index: dragdrop.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dragdrop.cpp,v
retrieving revision 1.200
retrieving revision 1.201
diff -C2 -d -r1.200 -r1.201
*** dragdrop.cpp 13 Sep 2003 13:37:15 -0000 1.200
--- dragdrop.cpp 15 Sep 2003 12:49:05 -0000 1.201
***************
*** 147,164 ****
// ==== Grabbing the Item is allowed here ====
- // Remove eventual item-bonusses if we're unequipping something
- if( pItem->container() && pItem->container()->isChar() )
- {
- P_CHAR wearer = dynamic_cast<P_CHAR>( pItem->container() );
-
- // resend the stat window
- if( wearer && wearer->objectType() == enPlayer )
- {
- P_PLAYER pp = dynamic_cast<P_PLAYER>(wearer);
- if( pp->socket() )
- pp->socket()->sendStatWindow();
- }
- }
-
// Send the user a pickup sound if we're picking it up
// From a container/paperdoll
--- 147,150 ----
***************
*** 201,204 ****
--- 187,204 ----
else
pItem->removeFromCont( true );
+
+ // Remove eventual item-bonusses if we're unequipping something
+ if( pItem->container() && pItem->container()->isChar() )
+ {
+ P_CHAR wearer = dynamic_cast<P_CHAR>( pItem->container() );
+
+ // resend the stat window
+ if( wearer && wearer->objectType() == enPlayer )
+ {
+ P_PLAYER pp = dynamic_cast<P_PLAYER>(wearer);
+ if( pp->socket() )
+ pp->socket()->sendStatWindow();
+ }
+ }
// The item was in a multi
Index: items.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v
retrieving revision 1.352
retrieving revision 1.353
diff -C2 -d -r1.352 -r1.353
*** items.cpp 14 Sep 2003 16:31:48 -0000 1.352
--- items.cpp 15 Sep 2003 12:49:05 -0000 1.353
***************
*** 2354,2357 ****
--- 2354,2358 ----
// Flags
+ else GET_PROPERTY( "dye", dye() ? 1 : 0 )
else GET_PROPERTY( "decay", priv_ & 0x01 ? 0 : 1 )
else GET_PROPERTY( "newbie", priv_ & 0x02 ? 1 : 0 )
Index: log.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/log.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** log.cpp 15 Sep 2003 02:00:41 -0000 1.4
--- log.cpp 15 Sep 2003 12:49:05 -0000 1.5
***************
*** 69,76 ****
if ( !d.exists(path) )
{
! Console::instance()->ChangeColor( WPC_YELLOW );
! Console::instance()->send( "WARNING: " );
! Console::instance()->ChangeColor( WPC_NORMAL );
! Console::instance()->send( QString("log path (%1) doesn't exist, creating\n").arg(path) );
d.mkdir( path );
}
--- 69,73 ----
if ( !d.exists(path) )
{
! Console::instance()->log( LOG_WARNING, QString("log path (%1) doesn't exist, creating.\n").arg(path) );
d.mkdir( path );
}
***************
*** 83,90 ****
if( !logfile.open( IO_WriteOnly | IO_Append | IO_Translate ) )
{
! Console::instance()->ChangeColor( WPC_RED );
! Console::instance()->send( "ERROR: " );
! Console::instance()->ChangeColor( WPC_NORMAL );
! Console::instance()->send( QString( "Couldn't open logfile '%1'\n" ).arg( path + filename ) );
return false;
}
--- 80,84 ----
if( !logfile.open( IO_WriteOnly | IO_Append | IO_Translate ) )
{
! Console::instance()->log( LOG_ERROR, QString( "Couldn't open logfile '%1'\n" ).arg( path + filename ) );
return false;
}
Index: res.rc
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/res.rc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** res.rc 27 Aug 2003 00:50:08 -0000 1.14
--- res.rc 15 Sep 2003 12:49:05 -0000 1.15
***************
*** 1,4 ****
--- 1,5 ----
//Microsoft Developer Studio generated resource script.
//
+ #include "resrc1.h"
#define APSTUDIO_READONLY_SYMBOLS
***************
*** 8,11 ****
--- 9,16 ----
//
#include "resource.h"
+
+ /////////////////////////////////////////////////////////////////////////////
+ #undef APSTUDIO_READONLY_SYMBOLS
+
/////////////////////////////////////////////////////////////////////////////
//
***************
*** 14,18 ****
VS_VERSION_INFO VERSIONINFO
! FILEVERSION 12,9,1,0
PRODUCTVERSION 13,0,0,0
FILEFLAGSMASK 0x3fL
--- 19,23 ----
VS_VERSION_INFO VERSIONINFO
! FILEVERSION 12,9,4,0
PRODUCTVERSION 13,0,0,0
FILEFLAGSMASK 0x3fL
***************
*** 33,37 ****
VALUE "CompanyName", "Wolfpack Development Team\0"
VALUE "FileDescription", "Ultima Online Server Emulator\0"
! VALUE "FileVersion", "12, 9, 1, 0\0"
VALUE "InternalName", "\0"
VALUE "LegalCopyright", "© 2002-2003 Wolfpack Dev. Team\0"
--- 38,42 ----
VALUE "CompanyName", "Wolfpack Development Team\0"
VALUE "FileDescription", "Ultima Online Server Emulator\0"
! VALUE "FileVersion", "12, 9, 4, 0\0"
VALUE "InternalName", "\0"
VALUE "LegalCopyright", "© 2002-2003 Wolfpack Dev. Team\0"
***************
*** 58,59 ****
--- 63,104 ----
// remains consistent on all systems.
IDI_ICON2 ICON DISCARDABLE "icon2.ico"
+
+ #ifdef APSTUDIO_INVOKED
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // TEXTINCLUDE
+ //
+
+ 1 TEXTINCLUDE DISCARDABLE
+ BEGIN
+ "resrc1.h\0"
+ END
+
+ 2 TEXTINCLUDE DISCARDABLE
+ BEGIN
+ "#include ""resource.h""\r\n"
+ "\0"
+ END
+
+ 3 TEXTINCLUDE DISCARDABLE
+ BEGIN
+ "\r\n"
+ "\0"
+ END
+
+ #endif // APSTUDIO_INVOKED
+
+ ////////////////////////////////////////////////////////////////////////////
+
+
+
+ #ifndef APSTUDIO_INVOKED
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // Generated from the TEXTINCLUDE 3 resource.
+ //
+
+
+ /////////////////////////////////////////////////////////////////////////////
+ #endif // not APSTUDIO_INVOKED
+
Index: srvparams.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/srvparams.cpp,v
retrieving revision 1.88
retrieving revision 1.89
diff -C2 -d -r1.88 -r1.89
*** srvparams.cpp 9 Sep 2003 23:09:30 -0000 1.88
--- srvparams.cpp 15 Sep 2003 12:49:05 -0000 1.89
***************
*** 132,136 ****
skillDelay_ = getNumber("Game Speed", "SkillDelay", 7, true);
skillLevel_ = getNumber("Game Speed", "SkillLevel", 3, true);
- bandageDelay_ = getNumber("Game Speed", "BandageDelay", 6, true);
maxStealthSteps_ = getNumber("Game Speed", "Max Stealth Steps", 10, true);
runningStamSteps_ = getNumber("Game Speed", "Running Stamina Steps", 15, true);
--- 132,135 ----
***************
*** 160,164 ****
lootdecayswithcorpse_ = getBool("General", "Loot Decays With Corpse", true, true);
invisTimer_ = getDouble("General", "InvisTimer", 60, true);
- bandageInCombat_ = getBool("General", "Bandage In Combat", true, true);
poisonTimer_ = getNumber("General", "PoisonTimer", 180, true);
hungerDamage_ = getNumber("General", "Hunger Damage", 0, true);
--- 159,162 ----
Index: srvparams.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/srvparams.h,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** srvparams.h 9 Sep 2003 23:09:30 -0000 1.56
--- srvparams.h 15 Sep 2003 12:49:05 -0000 1.57
***************
*** 95,100 ****
unsigned short skillDelay_;
int skillLevel_;
- unsigned short bandageDelay_;
- bool bandageInCombat_;
unsigned int poisonTimer_;
signed int maxStealthSteps_;
--- 95,98 ----
***************
*** 204,209 ****
float invisTimer() const;
unsigned short skillDelay() const;
- unsigned short bandageDelay() const;
- bool bandageInCombat() const;
unsigned int poisonTimer() const;
signed int maxStealthSteps() const;
--- 202,205 ----
***************
*** 426,439 ****
{
return skillDelay_;
- }
-
- inline unsigned short cSrvParams::bandageDelay() const
- {
- return bandageDelay_;
- }
-
- inline bool cSrvParams::bandageInCombat() const
- {
- return bandageInCombat_;
}
--- 422,425 ----
Index: targetactions.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/targetactions.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** targetactions.cpp 11 Sep 2003 16:19:50 -0000 1.30
--- targetactions.cpp 15 Sep 2003 12:49:05 -0000 1.31
***************
*** 42,188 ****
#include "player.h"
- bool cSkHealing::responsed( cUOSocket *socket, cUORxTarget *target )
- {
- P_ITEM pBandage = FindItemBySerial( bandageSerial ); // item index of bandage
-
- P_CHAR pTarget = FindCharBySerial( target->serial() );
-
- if( !pTarget )
- {
- socket->sysMessage( tr( "Please select a human being or an animal to heal." ) );
- return true;
- }
-
- P_PLAYER pHealer = socket->player();
-
- // Check for an ongoing fight
- if( !SrvParams->bandageInCombat() && ( pTarget->isAtWar() || pHealer->isAtWar() ) )
- {
- P_CHAR pAttacker = FindCharBySerial( pHealer->attackerSerial() );
- if( pAttacker && pAttacker->isAtWar() )
- {
- socket->sysMessage( tr("You can`t heal while in a fight!") );
- return true;
- }
- }
-
- // Out of range?
- if( !pHealer->inRange( pTarget, 5 ) )
- {
- socket->sysMessage( tr("You are not close enough to apply the bandages.") );
- return true;
- }
-
- // Healing Criminals flags you criminal as well
- if( pHealer->isInnocent() && !pTarget->isInnocent() )
- pHealer->isCriminal();
-
- // Resurrecting
- if( pTarget->isDead() )
- {
- if( pHealer->skillValue( HEALING ) < 800 || pHealer->skillValue( ANATOMY ) < 800 )
- {
- socket->sysMessage( tr( "You are not skilled enough to resurrect." ) );
- return true;
- }
-
- int reschance = static_cast<int>( ( pHealer->skillValue( HEALING ) + pHealer->skillValue( ANATOMY ) ) * 0.17 );
- int rescheck = RandomNum( 1, 100 );
-
- if( pHealer->checkSkill( HEALING, 800, 1000 ) && pHealer->checkSkill( ANATOMY, 800, 1000 ) && reschance <= rescheck )
- socket->sysMessage( tr( "You failed to resurrect the ghost." ) );
- else
- {
- pTarget->resurrect();
- socket->sysMessage( tr( "Because of your skill, you were able to resurrect the ghost." ) );
- }
-
- pBandage->reduceAmount();
-
- return true;
- }
-
- // Cure Poison
- if( pTarget->poisoned() )
- {
- UINT8 firstSkill = HEALING;
- UINT8 secondSkill = ANATOMY;
-
- if( !pTarget->isHuman() )
- {
- firstSkill = VETERINARY;
- secondSkill = ANIMALLORE;
- }
-
- if( pHealer->skillValue( firstSkill ) < 600 || pHealer->skillValue( secondSkill ) < 600 )
- {
- socket->sysMessage( tr("You are not skilled enough to cure poison.") );
- return true;
- }
-
- unsigned int curechance = static_cast<int>( ( pHealer->skillValue( firstSkill ) + pHealer->skillValue( secondSkill ) ) *0.67 );
- unsigned int curecheck = RandomNum( 1, 100 );
- pHealer->checkSkill( firstSkill, 600, 1000 );
- pHealer->checkSkill( secondSkill, 600, 1000 );
-
- if( curechance <= curecheck )
- {
- pTarget->setPoisoned( 0 );
- socket->sysMessage( tr( "Because of your skill, you were able to cure the poison." ) );
- }
- else
- {
- socket->sysMessage( tr( "You fail to cure the poison." ) );
- }
-
- pBandage->reduceAmount();
- return true;
- }
-
- // Normal Healing
- if( pTarget->hitpoints() == pTarget->strength() )
- {
- socket->sysMessage( tr( "That being is not damaged." ) );
- return true;
- }
-
- // Healing Humans
- UINT8 firstSkill = HEALING;
- UINT8 secondSkill = ANATOMY;
-
- if( !pTarget->isHuman() )
- {
- firstSkill = VETERINARY;
- secondSkill = ANIMALLORE;
- }
-
- if( !pHealer->checkSkill( firstSkill, 0, 1000 ) )
- {
- socket->sysMessage( tr( "You apply the bandages, but they barely help!" ) );
- pTarget->setHitpoints( pTarget->hitpoints() + 1 );
- }
- else
- {
- unsigned int healmin = ( ( ( pHealer->skillValue( firstSkill ) / 5 ) + ( pHealer->skillValue( secondSkill ) / 5 ) ) + 3 );
- unsigned int healmax = ( ( ( pHealer->skillValue( firstSkill ) / 5 ) + ( pHealer->skillValue( secondSkill ) / 2 ) ) + 10 );
- unsigned int amount = RandomNum( healmin, healmax );
-
- // We don't heal over the maximum amount.
- if( pTarget->hitpoints() + amount > pTarget->strength() )
- amount = pTarget->strength() - pTarget->hitpoints();
-
- // Show the HitUnarmed Animation and Make the Effect delayed
- pHealer->action( 0x09 );
- cTempEffect *tEff = new cDelayedHeal( pHealer, pTarget, amount );
- tEff->setExpiretime_s( SrvParams->bandageDelay() );
- TempEffects::instance()->insert( tEff );
- }
-
- pHealer->setObjectDelay( SetTimerSec( pHealer->objectDelay(), SrvParams->objectDelay() + SrvParams->bandageDelay() ) );
- pBandage->reduceAmount();
-
- return true;
- }
-
bool cSkLockpicking::responsed( cUOSocket *socket, cUORxTarget *target )
{
--- 42,45 ----
***************
*** 233,260 ****
}
}*/
- return true;
- }
-
- bool cDyeTarget::responsed( cUOSocket* socket, cUORxTarget *target )
- {
- P_ITEM pi = FindItemBySerial(target->serial());
- if ( pi && pi->dye() == 1 )
- {
- P_CHAR pc = pi->getOutmostChar();
- if(pc == socket->player() || pi->isInWorld())
- {//if on ground or currchar is owning the item - AntiChrist
- pi->setColor( static_cast<unsigned short>( color ) );
- pi->update();
- socket->soundEffect( 0x023e, pi );
- }
- else
- {
- socket->sysMessage( tr("That is not yours!!") );
- }
- }
- else
- {
- socket->sysMessage( tr("You can only dye cloth with this.") );
- }
return true;
}
--- 90,93 ----
Index: targetactions.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/targetactions.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** targetactions.h 12 Jan 2003 18:11:32 -0000 1.4
--- targetactions.h 15 Sep 2003 12:49:05 -0000 1.5
***************
*** 36,47 ****
#include "typedefs.h"
- class cSkHealing : public cTargetRequest
- {
- SERIAL bandageSerial;
- public:
- cSkHealing( SERIAL bandage ) : bandageSerial(bandage) {}
- bool responsed( cUOSocket *socket, cUORxTarget *target );
- };
-
class cSkLockpicking : public cTargetRequest
{
--- 36,39 ----
***************
*** 50,61 ****
cSkLockpicking ( SERIAL lockpick ) : lockPick(lockpick) {}
bool responsed( cUOSocket *socket, cUORxTarget *target );
- };
-
- class cDyeTarget : public cTargetRequest
- {
- int color;
- public:
- cDyeTarget( int colorID ) : color(colorID) {}
- bool responsed( cUOSocket* socket, cUORxTarget *target );
};
--- 42,45 ----
Index: tmpeff.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/tmpeff.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -d -r1.63 -r1.64
*** tmpeff.cpp 12 Sep 2003 15:39:55 -0000 1.63
--- tmpeff.cpp 15 Sep 2003 12:49:05 -0000 1.64
***************
*** 344,366 ****
}
- cRepeatAction::cRepeatAction( P_CHAR mage, UINT8 anim, UINT32 delay )
- {
- _mage = mage->serial();
- _anim = anim;
- _delay = delay;
- mage->action( anim );
- expiretime = uiCurrentTime + delay;
- dispellable = false;
- serializable = false;
- }
-
- void cRepeatAction::Expire()
- {
- P_CHAR pMage = FindCharBySerial( _mage );
-
- if( pMage )
- TempEffects::instance()->insert( new cRepeatAction( pMage, _anim, _delay ) );
- }
-
void cTempEffects::insert( cTempEffect *pT )
{
--- 344,347 ----
***************
*** 392,452 ****
teffects.erase( it );
std::make_heap( teffects.begin(), teffects.end(), cTempEffects::ComparePredicate() );
- }
- }
- }
-
- void cDelayedHeal::Expire()
- {
- P_CHAR pSource = FindCharBySerial( destSer );
- P_CHAR pTarget = FindCharBySerial( sourSer );
-
- if( !pSource || !pTarget )
- return;
-
- if( !pSource->inRange( pTarget, 5 ) )
- {
- if( pSource->objectType() == enPlayer )
- {
- P_PLAYER pp = dynamic_cast<P_PLAYER>(pSource);
- if( pp->socket() )
- pp->socket()->sysMessage( tr( "You are standing too far away to apply any bandages." ) );
- }
- return;
- }
- }
-
- cDelayedHeal::cDelayedHeal( P_CHAR pSource, P_CHAR pTarget, UINT16 _amount )
- {
- // Switching them here is important because we want to
- // keep track of our current healing targets
- destSer = pSource->serial();
- sourSer = pTarget->serial();
- amount = _amount;
- objectid = "cDelayedHeal";
- serializable = false;
- dispellable = false;
- }
-
- cStablemasterRefreshTimer::cStablemasterRefreshTimer( P_NPC pNPC, AbstractAI* interface_, UINT32 time )
- {
- m_npc = pNPC;
- m_interface = interface_;
- objectid = "cStablemasterRefreshTimer";
- serializable = false;
- dispellable = false;
- expiretime = uiCurrentTime + time * MY_CLOCKS_PER_SEC;
- }
-
- void cStablemasterRefreshTimer::Expire()
- {
- // lets check if the npc exists, and if the
- // npc ai on the npc is the same like the one which set the timer
- if( m_npc )
- {
- AbstractAI* ai = m_npc->ai();
- if( ai && ai == m_interface )
- {
- Human_Stablemaster* pAI = dynamic_cast< Human_Stablemaster* >(ai);
- pAI->refreshStock();
}
}
--- 373,376 ----
|