Commit graph

172 commits

Author SHA1 Message Date
turleypol
6a2bd7c705 Merge remote-tracking branch 'origin/master' into vector_classes
* origin/master: (93 commits)
  Add support for dictionary creation (#277)
  Add do-while statement (#276)
  Add foreach loops (#275)
  New compiler: array initialization (#274)
  Disambiguator: figure out if label is a case statement dispatch selector, or should apply to a statement within the case dispatch group's block. (#273)
  New compiler: Add support for case statements (#272)
  Change "logical" to "bitwise". (#258)
  Fix divide-by-zero errors, and mask FormatError if it were thrown in a destructor. (#271)
  Add break and continue statements. (#270)
  New compiler: assignment to local and global variables. (#269)
  Add support for while loops (#268)
  Optimize if statements, and emit module functions in legacy order (#267)
  Optimizations: binary operators (#266)
  Add binary operators (#265)
  Add support for const declarations (#264)
  Handle default parameter values, pass-by-name, and return statements in functions. (#263)
  Add limited support for user functions (#262)
  New compiler: add return and exit statements (#261)
  Add support for if-then-else statements (#259)
  OG compiler: set module to Mod_Basic when a token is an identifier (#257)
  ...
2020-09-06 20:14:26 +02:00
Fernando Rozenblit
4f3da669aa
Refactor suspicious activity warnings and suppress B1 overflow warnings (#249)
* Refactored the reporting of suspicious activities
* Only show warnings about B1 packet overflow if ShowWarningGump is enabled
2020-08-29 09:39:18 +02:00
Fernando Rozenblit
815bb6f856
Cmake and zlib cleanup (#219)
* Added explicit path to the lib/ folder.

* Added use_zlib() function to the cmake files. Changed the remaining cmake files to use POL_EXT_LIB_DIR.

* Removed relative path to zlib. It seems we were always using our zlib header (even when linking to the system zlib on linux!).
2020-08-14 22:16:02 +02:00
Fernando Rozenblit
af19074ed4
Update to cpp14 (#188)
* use c++14 on linux, visual studio still undefined which means highest
available

* removed make_unique.h due to c++14 no more needed

* stumbled across pre c++14 code

* Removed use of boost::make_unique<> (updated to C++14)

Co-authored-by: turleypol <turley@polserver.com>
2020-08-05 20:28:07 +02:00
AsY!um-
673d991d8a Added two new members to polcore()
- polcore().last_character_serial returns last character serial assigned by core
- polcore().last_item_serial returns last item serial assigned by core.
2020-08-04 14:14:01 +02:00
turleypol
1eedfb7a5e Merge remote-tracking branch 'origin/master' into vector_classes
* origin/master: (84 commits)
  store skillid in the attributes if available
  added docs for checkskill change
  use the correct id as skillid
  CheckSkill() accepts now also attribute name instead of skillid
  Move StoredToken to its own cpp/h
  Items can now be created with an assigned quality from an itemdescriptor (#161)
  *** OG Compiler: decouple web script preprocessing from FileContents
  fix optimizer bug: can stop optimizing prematurely if pre- or post-decrement operators are present
  Fix a bug in the legacy compiler .ecl output
  Move compiler to Legacy namespace
  Allow discord notification to fail and still have a successful build. It will otherwise always fail on forks, because it needs a github secret.
  Ensure textentry_uoemod is not overwritten
  fixed potential out of bound read
  escript_grammar.cmake from Turley
  generated lib/EscriptGrammar from grammar
  EscriptGrammar from escript-antlr repo commit  ef133e3a3a3184936e93493c863b7b995cdf4737 (#162)
  Incorporate ANTLR into the cmake build.
  Fix luck mod being assigned to luck from itemdesc files Fixed swing speed increase being printed twice when saving items. Fixed spelling mistake in docs.
  Style fix
  - Fix up docs. - Change modifier calculation to correctly use double. - Change rounding calculation as per Turley's suggestion.
  ...
2020-08-02 13:18:54 +02:00
Kevin Eady
c10e724ea1 Ensure textentry_uoemod is not overwritten
Fixes: #163
2020-07-28 19:08:14 +02:00
turleypol
a81ddaf816 MultiDef min/max Vec3d 2020-05-31 19:11:42 +02:00
turleypol
875f44a584 removed make_unique.h due to c++14 no more needed 2020-04-17 14:53:39 +02:00
turleypol
eab9710f98 fixed realms
moved getPosNdParam to uoexecutor
2020-04-13 15:45:19 +02:00
turleypol
1f220bb048 modules done 2020-04-12 13:36:07 +02:00
Fernando Rozenblit
6ae7095a9f Added supporting_multi() to UObject. Fixed a lot of code. Still too much to go. 2020-04-05 00:05:04 +02:00
turleypol
9cd43476eb interface extensions, converted core/create and directly called
functions
2020-04-04 17:22:24 +02:00
Kevin Eady
12d6186d10
Script option enhancements (#118)
* Fix SCRIPTOPT_CAN_ACCESS_OFFLINE_MOBILES

* Add SCRIPTOPT_SURVIVE_ATTACHED_DISCONNECT

* wip beginning work on templatization

* Use PolModule in pol-specific modules

* wip, creating PolModule with getXYZParam

* wip 1, moving getXYZ to UOExecutor

* compilable with PolObjectImp / PolApplicObj

* add type guard

* wip, change signatures

change signatures of script_method, script_method_id, and
custom_script_method

* compilable (windows)

* linux fixes

* namespace fixes

* remove uoexhelp

* formatting

* compilable

- move can_access_offline_mobiles back to uoexec
- add guildscrobj and partyscrobj sources
- move EGuildRefObjImp and EPartyRefObjImp
- wip, implement asUOExec
- formatting uoexec.cpp,.h

* finish uoexec() helper

* some cleanup
2020-02-08 09:21:35 +01:00
turleypol
20b2e0475e
Merge pull request #109 from polserver/hotfix/Custom_House_Restore_Commit
Several custom house fixes
2019-12-28 18:30:37 +01:00
turleypol
98db5aa846 CloseCustomHouse hook gets called when client disconnects 2019-12-28 13:55:25 +01:00
turleypol
1c8aae80d4 missed one stop after changing method to be non static 2019-12-22 14:32:09 +01:00
turleypol
0e339f3ca0 fixed bug with wrong gump response length check (pkt 0xB1) introduced with unicode support 2019-12-15 14:34:19 +01:00
Kevin Eady
5c0fb7c4ea First support for .em-parsed module function tbls
- Create module parser custom target
- Include generated tables in .cpp sources
- Standardize module function names based off .em names
2019-10-17 22:37:26 +02:00
turleypol
ef5e4021eb i think its not correct to terminate gump strings with null. 2019-09-01 22:27:20 +02:00
turleypol
0859c84eac guessing tooltips and gump packets
use newer ninja for travis
2019-08-17 17:26:55 +02:00
Kevin Eady
c002cdd5c3 Remove osmodule includes 2019-03-15 00:58:55 +01:00
Kevin Eady
44f2ebbe90 Refactor to make os_module private in UOExecutor 2019-03-11 21:37:51 +01:00
Admin-Yukiko
4a1c08b6da Change HideWarningGump and HideWarningItem to ShowWarningGump and ShowWarningItem. (#85)
* Changed: pol.cfg settings HideWarningGump and HideWarningItem to ShowWarningGump and ShowWarningItem. This positive logic is consistent with all other console output settings.
Default is zero (0). The output will not be displayed unless set to one (1).

* Set default behaviour for ShowWarningGump and ShowWarningItem to display warnings (1).

* Added ShowWarningGump and ShowWarningItem settings to pol.cfg.example.
2019-03-09 11:40:31 +01:00
Adriano Nogueira
ca04166dd1 Hide warning gump and item drop. Added HideWarningGump and HideWarningItem into pol.cfg. Default value 0. 2019-02-18 16:52:29 -03:00
Fernando Rozenblit
189e73f335 ugly fix... 2019-02-07 18:00:26 +01:00
Fernando Rozenblit
978fca5029 Removed undefined behavior when shifting left a signed char 2019-02-07 17:53:49 +01:00
Kevin Eady
76b80f104c Cast the sellprice to uint64 2019-01-17 20:15:35 +01:00
Kevin Eady
2de0e812ac Change to uint64 for temporary results 2019-01-17 19:49:39 +01:00
Kevin Eady
964d3e5340 Handle overflow from vendor purchases 2019-01-17 11:51:42 +01:00
turleypol
9cfb4ec5a5 moved pkt headers into network folder 2018-12-30 21:35:54 +01:00
turleypol
25dae4fc21 fixed namespaces of moved files 2018-12-22 00:32:47 +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
dd7379524b PolCore().internal(6, scriptname)
logs name and memoryusage of variables for given script into
log/scriptmemory.log.
Globals, locals and all current call stacks.
scriptname has to be the relative path from root with ecl ending.
Precondition is an existing .dbg file for the given script, this will
be created by compiling the script with -x
2018-12-09 16:13:37 +01:00
turleypol
ffa0ef1360 added PolCore().internal(5)
logs memoryusage in bytes of each script instance into
log/memoryusagescripts.log
2018-12-02 22:01:55 +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
turleypol
a5e6206164 Added cmake option to run clang-tidy
used everywhere nullptr
2018-10-09 16:36:35 +02:00
turleypol
0a39af15a1 Changed classes to be final if possible, removed override macro 2018-10-09 09:47:27 +02:00
esdete
b9a31d3560 clang formatting 2018-07-31 16:16:19 +02:00
esdete
dc2d29b433 NULL to nullptr 2018-07-31 14:30:29 +02:00
esdete
6fd8ddfc69 make_unique ported from c++14 2018-07-31 11:39:30 +02:00
esdete
af675c65a1 First minor changes c++11.
Try commit, if the direction of changes is compliant with Core Devs Team
2018-07-30 23:02:15 +02:00
GIB
e047e34ef2 List statics (#64)
Added new functions for getting statics with in a range that have certain restraints
2018-07-30 09:58:22 +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
6107184258 only one global config include exists now 2018-06-17 18:31:55 +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