Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv14030
Modified Files:
TmpEff.h accounts.h items.cpp resources.h tmpeff.cpp
uobject.cpp wolf.dsp wolfpack.pro world.cpp
Removed Files:
pfactory.cpp pfactory.h
Log Message:
Implemented serialization of effects to the database (experimental!).
Index: TmpEff.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/TmpEff.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** TmpEff.h 12 Sep 2003 15:28:59 -0000 1.38
--- TmpEff.h 12 Sep 2003 15:39:55 -0000 1.39
***************
*** 52,56 ****
// Wolfpack includes
#include "typedefs.h"
- #include "iserialization.h"
#include "singleton.h"
--- 52,55 ----
***************
*** 136,139 ****
--- 135,139 ----
public:
cDelayedHideChar( SERIAL serial );
+ cDelayedHideChar();
void Expire();
QString objectID() const { return "cDelayedHideChar"; }
Index: accounts.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/accounts.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** accounts.h 9 Sep 2003 23:09:30 -0000 1.31
--- accounts.h 12 Sep 2003 15:39:55 -0000 1.32
***************
*** 35,40 ****
#define __ACCOUNTS_H__
-
- #include "iserialization.h"
#include "typedefs.h"
#include "singleton.h"
--- 35,38 ----
Index: items.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v
retrieving revision 1.350
retrieving revision 1.351
diff -C2 -d -r1.350 -r1.351
*** items.cpp 11 Sep 2003 12:22:24 -0000 1.350
--- items.cpp 12 Sep 2003 15:39:55 -0000 1.351
***************
*** 37,41 ****
#include "network/uosocket.h"
#include "network/uotxpackets.h"
- #include "iserialization.h"
#include "items.h"
#include "tilecache.h"
--- 37,40 ----
Index: resources.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/resources.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** resources.h 27 Aug 2003 20:35:10 -0000 1.17
--- resources.h 12 Sep 2003 15:39:55 -0000 1.18
***************
*** 34,38 ****
#include "definable.h"
- #include "iserialization.h"
#include "items.h"
#include "wptargetrequests.h"
--- 34,37 ----
Index: tmpeff.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/tmpeff.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** tmpeff.cpp 12 Sep 2003 15:29:00 -0000 1.62
--- tmpeff.cpp 12 Sep 2003 15:39:55 -0000 1.63
***************
*** 39,43 ****
#include "globals.h"
#include "srvparams.h"
- #include "iserialization.h"
#include "network.h"
#include "wpdefmanager.h"
--- 39,42 ----
***************
*** 188,191 ****
--- 187,192 ----
sourSer = atol( result[offset++] );
destSer = atol( result[offset++] );
+
+ serializable = true;
}
***************
*** 308,312 ****
while( it != teffects.end() )
{
! (*it)->save( id++ );
++it;
}
--- 309,315 ----
while( it != teffects.end() )
{
! if( (*it)->isSerializable() )
! (*it)->save( id++ );
!
++it;
}
***************
*** 326,329 ****
--- 329,337 ----
}
+ cDelayedHideChar::cDelayedHideChar()
+ {
+ setSerializable( true );
+ }
+
void cDelayedHideChar::Expire()
{
***************
*** 334,369 ****
pc->setHidden( 1 );
pc->resend( true );
- }
-
- // cTimedSpellAction
- cTimedSpellAction::cTimedSpellAction( SERIAL serial, UI08 nAction )
- {
- if( !isCharSerial( serial ) )
- {
- character = INVALID_SERIAL;
- return;
- }
-
- // Display the animation once
- P_CHAR pc = FindCharBySerial( serial );
- if( !pc )
- {
- character = INVALID_SERIAL;
- return;
- }
- pc->action( nAction );
-
- // Save our data
- character = serial;
- action = nAction;
- serializable = false;
- expiretime = uiCurrentTime + 750;
- }
-
- // Insert a new action if there are more than 75 ticks left
- void cTimedSpellAction::Expire()
- {
- if( character != INVALID_SERIAL )
- TempEffects::instance()->insert( new cTimedSpellAction( character, action ) );
}
--- 342,345 ----
Index: uobject.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/uobject.cpp,v
retrieving revision 1.112
retrieving revision 1.113
diff -C2 -d -r1.112 -r1.113
*** uobject.cpp 7 Sep 2003 19:07:47 -0000 1.112
--- uobject.cpp 12 Sep 2003 15:39:55 -0000 1.113
***************
*** 36,40 ****
#include "coord.h"
#include "uobject.h"
- #include "iserialization.h"
#include "globals.h"
#include "network.h"
--- 36,39 ----
Index: wolf.dsp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v
retrieving revision 1.228
retrieving revision 1.229
diff -C2 -d -r1.228 -r1.229
*** wolf.dsp 12 Sep 2003 15:29:00 -0000 1.228
--- wolf.dsp 12 Sep 2003 15:39:55 -0000 1.229
***************
*** 195,202 ****
# Begin Source File
- SOURCE=.\iserialization.cpp
- # End Source File
- # Begin Source File
-
SOURCE=.\itemid.cpp
# End Source File
--- 195,198 ----
***************
*** 271,278 ****
# Begin Source File
- SOURCE=.\serxmlfile.cpp
- # End Source File
- # Begin Source File
-
SOURCE=.\skills.cpp
# End Source File
--- 267,270 ----
***************
*** 571,607 ****
# Begin Source File
- SOURCE=.\iserialization.h
-
- !IF "$(CFG)" == "wolf - Win32 Release"
-
- # PROP Ignore_Default_Tool 1
- # Begin Custom Build - MOCing iserialization.h...
- InputDir=.
- InputPath=.\iserialization.h
- InputName=iserialization
-
- "$(InputDir)\moc_$(InputName).cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- %qtdir%\bin\moc.exe $(InputDir)\$(InputName).h -o $(InputDir)\moc_$(InputName).cpp
-
- # End Custom Build
-
- !ELSEIF "$(CFG)" == "wolf - Win32 Debug"
-
- # PROP Ignore_Default_Tool 1
- # Begin Custom Build - MOCing iserialization.h...
- InputDir=.
- InputPath=.\iserialization.h
- InputName=iserialization
-
- "$(InputDir)\moc_$(InputName).cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- %qtdir%\bin\moc.exe $(InputDir)\$(InputName).h -o $(InputDir)\moc_$(InputName).cpp
-
- # End Custom Build
-
- !ENDIF
-
- # End Source File
- # Begin Source File
-
SOURCE=.\itemid.h
# End Source File
--- 563,566 ----
***************
*** 807,814 ****
# Begin Source File
- SOURCE=.\serxmlfile.h
- # End Source File
- # Begin Source File
-
SOURCE=.\singleton.h
# End Source File
--- 766,769 ----
***************
*** 1235,1242 ****
SOURCE=.\moc_gumps.cpp
- # End Source File
- # Begin Source File
-
- SOURCE=.\moc_iserialization.cpp
# End Source File
# Begin Source File
--- 1190,1193 ----
Index: wolfpack.pro
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v
retrieving revision 1.158
retrieving revision 1.159
diff -C2 -d -r1.158 -r1.159
*** wolfpack.pro 11 Sep 2003 16:19:50 -0000 1.158
--- wolfpack.pro 12 Sep 2003 15:39:55 -0000 1.159
***************
*** 92,96 ****
house.h \
inlines.h \
- iserialization.h \
itemid.h \
items.h \
--- 92,95 ----
***************
*** 100,104 ****
network.h \
npc.h \
- pfactory.h \
platform.h \
persistentbroker.h \
--- 99,102 ----
***************
*** 114,118 ****
speech.h \
srvparams.h \
- serxmlfile.h \
skills.h \
stream.h \
--- 112,115 ----
***************
*** 158,162 ****
gumps.cpp \
house.cpp \
- iserialization.cpp \
itemid.cpp \
items.cpp \
--- 155,158 ----
***************
*** 169,173 ****
npc.cpp \
encryption.cpp \
- pfactory.cpp \
persistentbroker.cpp \
persistentobject.cpp \
--- 165,168 ----
***************
*** 177,181 ****
resources.cpp \
sectors.cpp \
- serxmlfile.cpp \
scriptmanager.cpp \
skills.cpp \
--- 172,175 ----
Index: world.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** world.cpp 12 Sep 2003 15:29:00 -0000 1.43
--- world.cpp 12 Sep 2003 15:39:56 -0000 1.44
***************
*** 37,41 ****
#include "dbdriver.h"
#include "progress.h"
- #include "iserialization.h"
#include "persistentbroker.h"
#include "accounts.h"
--- 37,40 ----
***************
*** 190,195 ****
persistentBroker->connect( SrvParams->databaseHost(), SrvParams->databaseName(), SrvParams->databaseUsername(), SrvParams->databasePassword() );
-
- ISerialization* archive = cPluginFactory::serializationArchiver( "xml" );
QString objectID;
--- 189,192 ----
--- pfactory.cpp DELETED ---
--- pfactory.h DELETED ---
|