From: Laszlo T. <ave...@us...> - 2004-04-04 20:39:37
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/CREImporter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10148 Modified Files: CREImp.cpp Log Message: Changed CREImp to reflect the inventory changes Index: CREImp.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/CREImporter/CREImp.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** CREImp.cpp 29 Mar 2004 23:52:29 -0000 1.25 --- CREImp.cpp 4 Apr 2004 20:27:05 -0000 1.26 *************** *** 327,335 **** // Reading inventory ! act->inventory = new Inventory(); std::vector<CREItem*> items; str->Seek( act->ItemsOffset, GEM_STREAM_START ); ! for (int i = 0; i < act->ItemsCount; i++) { items.push_back( GetItem() ); } --- 327,335 ---- // Reading inventory ! // act->inventory = new Inventory(); std::vector<CREItem*> items; str->Seek( act->ItemsOffset, GEM_STREAM_START ); ! for (size_t i = 0; i < act->ItemsCount; i++) { items.push_back( GetItem() ); } *************** *** 341,347 **** if (index != 0xFFFF) ! act->inventory->SetSlotItem( items[index], i ); } ! act->inventory->dump(); --- 341,347 ---- if (index != 0xFFFF) ! act->inventory.SetSlotItem( items[index], i ); } ! act->inventory.dump(); *************** *** 350,364 **** str->Seek( act->KnownSpellsOffset, GEM_STREAM_START ); ! for (int i = 0; i < act->KnownSpellsCount; i++) { act->spellbook->AddKnownSpell( GetKnownSpell() ); } str->Seek( act->MemorizedSpellsOffset, GEM_STREAM_START ); ! for (int i = 0; i < act->MemorizedSpellsCount; i++) { act->spellbook->AddMemorizedSpell( GetMemorizedSpell() ); } str->Seek( act->SpellMemorizationOffset, GEM_STREAM_START ); ! for (int i = 0; i < act->SpellMemorizationCount; i++) { act->spellbook->AddSpellMemorization( GetSpellMemorization() ); } --- 350,364 ---- str->Seek( act->KnownSpellsOffset, GEM_STREAM_START ); ! for (size_t i = 0; i < act->KnownSpellsCount; i++) { act->spellbook->AddKnownSpell( GetKnownSpell() ); } str->Seek( act->MemorizedSpellsOffset, GEM_STREAM_START ); ! for (size_t i = 0; i < act->MemorizedSpellsCount; i++) { act->spellbook->AddMemorizedSpell( GetMemorizedSpell() ); } str->Seek( act->SpellMemorizationOffset, GEM_STREAM_START ); ! for (size_t i = 0; i < act->SpellMemorizationCount; i++) { act->spellbook->AddSpellMemorization( GetSpellMemorization() ); } |