]> jfr.im git - irc/gameservirc.git/commit
I implemented a mock forest driver and found a problem in using the singleton design...
authorkainazzzo <redacted>
Fri, 25 Sep 2009 21:42:57 +0000 (21:42 +0000)
committerkainazzzo <redacted>
Fri, 25 Sep 2009 21:42:57 +0000 (21:42 +0000)
commit9920617b5f77fa9d420300fdc9bfe5357938eecf
tree722a829c16587b01cefd7fe0f811d8dc9c92df54
parentfadef98f7224d1af5e95d756224bb5e84bc95cef
I implemented a mock forest driver and found a problem in using the singleton design pattern for InventoryManager. When two instances of FilePlayerDAO were instantiated, inventory was reloaded from the players.dat file. I had to check to see if the player had inventory before loading all data from players.dat. It's dirty, but it works... I'm starting to wonder if an inventoryDAO would be best

git-svn-id: https://svn.code.sf.net/p/gameservirc/code/trunk@540 bc333340-6410-0410-a689-9d09f3c113fa
gameserv-2.0/data/players.dat
gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/File/FilePlayerDAO.h
gameserv-2.0/libgameservgldl/src/DataLayer/File/FilePlayerDAO.cpp
gameserv-2.0/libgameservgldl/src/GameLayer/FightGL.cpp
gameserv-2.0/testdriver/main.cpp