Commit graph

103 commits

Author SHA1 Message Date
turleypol
9d2bf0ec60
replaced all uppercase hex formatting with lowercase variant (#645) 2024-05-05 09:13:12 +02:00
turleypol
f3c3958384
Unknown realm in startloc crashes on char creation (#628)
* unknown realm defined in startlocations now stops starting the core

* core changes
2024-03-03 11:51:37 +01:00
Lukáš Novotný
d6bde75dec
Add proxy protocol support (#623)
* Add proxy protocol support

* style fix

* more style changes

* hopefully final style fixes

* Implement AllowProxy instead of UseProxyProtocol

* Style fix

* Fix initialization warning; remove unused header

* Fix boost warning (thanks @KevinEady)
2024-02-21 21:41:17 +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
turleypol
d848deae18
POLLOG* macros use the new formatting (#598)
* POLLOG* macros use the new formatting
removed all old logging functions

* removed old fmt lib from everything except StreamWriter
removed unneeded functions

* fixed review comments
2024-01-16 17:55:42 +01:00
turleypol
0e675c516a
use new formatter for ERROR_PRINT, added ERROR_PRINTLN (#595)
* use new formatter for ERROR_PRINT, added ERROR_PRINTLN

* remove old log define

* fix comments
2024-01-12 06:51:44 +01:00
turleypol
43b776b94d
New format lib version (#592)
* renamed include guard to be able to use both format lib versions in
parallel

* build Fmt lib and link it into clib

* use std::string instead of format Writer for logging
added variant "2" for logging with new fmt lib

* use new logging variant for two logs

* always add \n to flush log, lets see if the assumption holds

* use new lib for tostring

* replaced all INFO_PRINTS in clib

* formatter for Token, BObject and BObjectImp

* started with bsccript

* use function instead of actual object for logging

* remaining bscript, started plib

* logvariant without newline added, more template magic

* format support for base types, added test for format padding
new version for fdump

* chanhed ecompile/runecl fixed compilation with ESCRIPT_PROFILE

* rewrite INFO_PRINT in plib,poltool/uoconvert/uotool

* replaced remaining INFO_PRINTS, renamed macros INFO_PRINT for logging
without newline, INFO_PRINTLN for newline addition.
Replaced also INFO_PRINT_TRACE and renamed it to INFO_PRINTLN_TRACE

* gitignore for fmt lib

* cleanup vim leftovers
2024-01-10 18:29:10 +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
f99ab2dbaf
switched internals of realms, changed packetdefs (#432)
* switched internals of realms, changed packetdefs

* restructured ListenPoint a bit

* moved actual listenpt code to private method

* simplified listenptr loop and the same for guilds to fix ancient fixme

* added todo for future us
2021-10-26 10:52:13 +02:00
turleypol
f211e16658
wrappers for realm/uworld methods accepting Posclasses. (#428)
* wrappers for realm/uworld methods accepting Posclasses.

* switched memoryorder of realm zone

* fixed nullptr check

* renamed Realm::getzone to getzone_grid

* moved getzone to Realm

* testclient: xfixed multiple full pkts
2021-09-18 19:15:54 +02:00
turleypol
7ee1b64e19
replaced baseclass x,y,z,realm members with Pos4d. (#420)
* replaced baseclass x,y,z,realm members with Pos4d.
Adapted the code, no changes except making the compiler happy

* review changes

* Fixed gotten_item

* fixed copy&waste
2021-09-10 20:17:25 +02:00
Eric Swanson
81ad68df2e
Core version is now a semantic version, starting at 100.0.0 (#337)
* Core version is now a semantic version, starting at 100.0.0

* Remove 'POL' prefix from POL_VERSION_ID

* re-add dash in between version str and name in POL_VERSION_ID

Co-authored-by: Fernando Rozenblit <rozenblit@gmail.com>
2020-10-18 03:35:17 -07:00
Fernando Rozenblit
c49f5b4abb
Reorganize regions and realms (#228)
* Moved realms.h and realms.cpp to realms/..

* Moved regions into their own folder
2020-08-17 22:29:07 +02:00
turleypol
c60fee7541 a promise can only be set one time 2019-03-10 11:54:34 +01:00
turleypol
5ce0f612fa if worldsave fails to write files dont commit them (rename old files),
shows also a more detailed error.
2019-03-10 10:32:31 +01:00
turleypol
e1b14dcd00 moved polfile/uofile files into plib to cleanup atleast a bit the
compile dependencies
2018-12-21 20:27:05 +01:00
turleypol
4f40aa7997 removed Clib::decint and used Clib::tostring, changed Clib::hexint to
template function for all integers
2018-10-28 09:31:58 +01:00
esdete
dc2d29b433 NULL to nullptr 2018-07-31 14:30:29 +02:00
turleypol
c71c4965c8 git revision fetch is now part of the build process instead of
configure step
2018-06-18 10:27:01 +02:00
turleypol
d135860d71 fixed compiler warnings 2018-06-03 13:48:33 +02:00
turleypol
5c0c611617 Worldsave is now also changed to use task pool, thus completly removed
openmp dependency
2018-04-29 19:13:11 +02:00
Gabriele Tozzi
b72f725e02 Whitespace fixes 2018-04-03 04:13:03 +02:00
Gabriele Tozzi
94cd6c4f60 Merge branch 'master' of https://github.com/polserver/polserver
Finally starting to align code base :)

Conflicts:
	cmake/env/pol_global_config.h.in
	docs/docs.polserver.com/pol100/corechanges.xml
	pol-core/clib/Debugging/ExceptionParser.cpp
	pol-core/clib/pol_global_config_win.h
	pol-core/clib/strexcpt.cpp
	pol-core/doc/core-changes.txt
	pol-core/pol/module/filemod.cpp
	pol-core/pol/module/uomod2.cpp
	pol-core/pol/pol.cpp
	pol-core/pol/uimport.cpp
2018-04-02 17:05:50 +02:00
turleypol
3afc41241b
CMake on windows (#48)
CMake can now also be used for windows
2018-02-24 22:34:55 +01: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
turleypol
798eda5b63 Cleanup of header includes. 2018-01-01 21:52:14 +01:00
turley
65231f9bfd use faster overload for string find with single characters 2016-12-15 13:34:06 +01:00
turley
c855a27815 Added new baseclass for uobject
contains only minimum data and can be created with arbritary data.
This reduces memory overhead for each los-check.
Plus minor cleanup
2016-12-12 22:21:59 +01:00
turley
c725415cd2 possible nullptr dereference during errorhandling 2016-12-09 17:43:12 +01:00
turley
a983d25e4e removed bool members and replaced them with flags.
Further decrease memory foodprint.
2016-12-07 23:34:16 +01:00
Gabriele Tozzi
dcd1991bdd Merging POL_BUILD_DATE and POL_BUILD_TIME
Together into POL_BUILD_DATETIME.
Breaks bakcward compatibility on a minor feature, nobody should notice.
Updated the changelog anyway.
2016-02-23 23:40:17 +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
turley
92cc1b4d70 Use weakptr to uoexecutor in the threaded sql call
changed client class from ref_counted to also hold like the uoexecutor a weakptr, use it in the ClientObjImp.
Renamed NPCRef to NpcRef like its been told since years in a TODO comment
fixed some warnings from VS2015
2016-02-10 23:09:05 +01:00
Gabriele Tozzi
d1ac902926 Documentation: reformatted headers for DoxyGen 2016-01-28 14:52:40 +01:00
turley
0293599380 Corrected some virtual overrides, re-activated corresponding warning.
Plus some other warning corrections
2015-12-26 17:39:58 +01:00
Thomas Volkert
98bac9485c Removed polver.cpp/.h and use POL_BUILD_TARGET instead 2015-11-06 20:21:32 +01:00
Thomas Volkert
626aae0e10 Introduced POL_BUILD_DATE and POL_BUILD_TIME 2015-11-06 17:36:07 +01:00
Thomas Volkert
f665ec682a Removed global variables "progver" and "polver" - also removed all
references to them
2015-11-06 16:50:31 +01:00
Thomas Volkert
6a632b2de9 Use global POL_VERSION_ID to identify the POL revision 2015-11-06 16:22:14 +01:00
Thomas Volkert
202e7f1496 Merge remote-tracking branch 'origin/cmake'
Conflicts:
	pol-core/.gitignore
2015-10-31 19:52:33 +01:00
turley
dfd65e30cd Moved plib realm to pol 2015-09-18 19:11:46 +02:00
frozenblit
fe41d6a019 Fixed bug where items could have character serials 2015-09-06 23:35:40 +02: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
turley
65fe073971 Gotten by pointer for items and chars made optional 2015-05-16 11:09:26 +02:00
turley
7a531357fe Updated Memoryusage profiler 2015-01-19 18:18:21 +01:00
turley
64d8fdb310 Moved npc files into mobiles dir, changed the namespace accordingly
removed some old code
2015-01-16 19:44:07 +01:00
turley
34de10d10c small interface cleanup of the realm class 2015-01-09 19:26:17 +01:00
turley
e8b46466fa Simplified WorldIterator more
completely removed wrldsize header
simplified more headers
changed zone_convert* parameter from non-const reference to pointer, to make the caller clear that it will change.
2015-01-03 10:15:31 +01:00
turley
c302eb9415 Namespace fixes and header cleanup 2015-01-02 17:55:12 +01:00
turley
79dff37246 Splitted gamestate external. 2015-01-02 14:46:44 +01:00