Commit graph

28 commits

Author SHA1 Message Date
Kevin Eady
ac97667b3b
Corpse equipment changes; Fix support of MaxItems 0 for containers (#635)
* Implementation

* Add core-changes

* Fix warnings

* Fix support of MaxItems 0 for "unlimited" in containers

* add initial tests

* Update core-changes
2024-03-24 10:17:35 +01:00
turleypol
08bd3c7ce5
Savefile rewrite (#601)
* rewrite of saving, replaced operator way with a generic add method, thus
not everywhere the formating of the savefiles is hardcoded.
since its the last spot which uses the old formating lib, remobed the
lib

* removed cmake of old format lib

* testscripts for load/save of UObject,Item,Armor,Weapon

* fixed: member faster_cast_recovery and faster_cast_recovery_mod getter returned
a wrong value

* wrong/missing docs

* test containers, lockable, map, spellbooks
fixed save bug in map and spellbook
removed ancient savestrategy experiments

* added corpse test
splitted testfiles

* fixed loading (ancient bug) and saving (PR bug) of Reportables
added tests for houses, boats, accounts and chars

* fixed include

* fix shutdown leak

* added npc tests
upload complete coretest folder also on failure

* do not write and load RegisteredHouse for NPCs two times
readded extra newline between accounts

* tests for guild, party, realm
added resource cfgs, but a test is not really possible since nothing of
interest is stored

* added datafile, storage test

* activated resource loading, 25year old bug, but since the stored values
are senseless it makes no real difference.
added a few wtf comments
catch all exceptions during formatting of log lines

* replaced .write with explixit .begin, .end and .comment.
for leftovers.txt the StreamSaver was also used, since the format is
different use directly ofstream

* added corechanges
2024-01-24 18:49:06 +01:00
Kevin Eady
ecec3a2206
reworked get_item and its undo behaviour (#514)
* reworked get_item and its undo behaviour.
old position gets stored and in case of failures restored

* removed ancient container content defines

* Fix some packet oddities
- dropitem: Success sent after rejections
- getitem: Double Delete Item packet due to item->extricate

* Store container serial when creating GottenInfo

* Add tests

* add socket mutex to disconnect checks

* Use mutable socket mutex

* add core changes

---------

Co-authored-by: turleypol <turley@polserver.com>
2023-05-23 17:07:23 +02:00
turleypol
983c6a3c73 first round for scripted object class methods 2018-10-13 00:03:40 +02:00
esdete
dc2d29b433 NULL to nullptr 2018-07-31 14:30:29 +02:00
turleypol
dbb25bdb62
Include and buildsystem cleanup (#45)
Include cleanup
Reworked buildsystem (Linux only)
Removed dynamic libs, Linux now again uses static linking (like windows)
2018-01-29 21:55:48 +01:00
turley
a983d25e4e removed bool members and replaced them with flags.
Further decrease memory foodprint.
2016-12-07 23:34:16 +01:00
turley
189cad3479 Formating everything
Authors are not forced to use the clang-format setting, but should
atleast be inspired by the style.
The only thing which is now not allowed are tabs for ident/alignment!
2016-02-19 19:26:35 +01:00
Gabriele Tozzi
d1ac902926 Documentation: reformatted headers for DoxyGen 2016-01-28 14:52:40 +01:00
Thomas Volkert
1dd2200c6b Renamed endian.h to clib_endian.h to avoid redefinition problems in
system files and the general hiding of the endian.h from the system
2015-08-31 20:01:31 +02:00
frozenblit
8bb74967cf Fixed (non-)disappearing items from corpses 2014-12-07 21:38:16 +01:00
frozenblit
a704a90208 Another round of stl_inc.h cleanups 2014-11-01 22:27:42 +01:00
frozenblit
39bd45f60d Separating wornitems and corpses from containers
I created new headers to see if we can reduce the include hell that
we're in.
2014-10-31 00:02:41 +01:00
frozenblit
afd4006959 Fixed another crash bug with corpses
When an item was destroyed, the list of equipped items on the corpse was
not updated and there was a dangling pointer left there.

Changed UContainer::remove() to virtual and made an override for it in
UCorpse. This should fix it.
2014-10-30 21:01:45 +01:00
frozenblit
b8382d7955 Cleanup of corpse code
Improved the generation of corpse cloth packets by just checking the
equipped items. (Should speed up crowded areas with many corpses which
have items inside)

The corpse clothing will be sent again to nearby chars if items are
added.

Ensured that the equipped layer is reloaded if the shard restarts.
2014-09-21 21:15:54 +02:00
frozenblit
b9fdfa1e07 Fixed possible crash in corpses involving layers
Buffer overrun was occurring when an item had a tile_layer larger than
25. This is the likely reason behind some crashes.

Moved valid_equip_layer() from Character to the namespace Items.

There were calls to PutItemOnLayer() which didn't check if the item had
a proper layer, so I've added asserts to make sure this won't happen
again.
2014-09-21 15:41:20 +02:00
turley
e0b722a93b fixed several uninitialized variables 2014-08-30 12:25:08 +02:00
turley
b2572d69f7 fixed size estimation. MoveObjectToLocation on a boat now unregisteres the boat first thus small changes are also possible. 2014-07-05 09:40:15 +00:00
turley
331792c755 added more memoryusage estimation 2014-06-07 09:00:37 +00:00
turley
fb873de803 decoupled headers to optimize a bit the build time 2014-05-03 09:06:19 +00:00
turley
99d7dc3037 namespaces...finally :)
Hard part is finished every file is touched. Namespaces are currently rough named by directory name.
Maybe we could split it more
2013-12-21 09:10:46 +00:00
turley
7085a8470f new StreamSaver class used for saving 2013-10-06 14:45:10 +00:00
frozenblit
eca7477429 Fixed duplicated items being saved. Changed the wrapper to call its own class, avoiding confusion because of the virtuals. 2013-09-22 19:58:22 +00:00
frozenblit
d7b7deabf7 Changed a few serializations to use the new format library. Things should still be working, but be REALLY careful with the save files until we have more tests!! 2013-09-21 21:06:30 +00:00
dsourc
81a1911113 Mountpieces will not be copied into corpses during character death anymore even if they are non movable 2013-09-16 21:29:00 +00:00
muaddib_pol
bef3da26d2 - UObject->Color_Ext : Removed, and when used is replaced with ctBEu16() calls. This includes read/write of /data files. 2011-11-28 05:40:48 +00:00
turley
0a0d152294 crypto cleanup - Tomi
polcfg cleanup - Tomi
gargoyle flying counts as mounted
fixes for faces
fixes of cliloc msgs
added 0xbf:0x0f handle
2009-12-04 12:49:26 +00:00
muaddib_pol
49072c3c41 + To-Do file updates
+ Beginning of Mobile and Module source file organization
+ Makefile.Gcc updates
2009-09-06 14:11:24 +00:00
Renamed from pol-core/pol/corpse.cpp (Browse further)