-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Quest API] Add ScaleNPC(npc_level) to Perl and Lua. #1238
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ghost
commented
Feb 9, 2021
- Add $npc->ScaleNPC(npc_level) to Perl.
- Add npc:ScaleNPC(npc_level) to Lua.
Akkadius
approved these changes
Feb 9, 2021
joligario
added a commit
that referenced
this pull request
Mar 1, 2021
* Formatting NPC validation macro. * Identify OP_ClearLeadershipAbilities/OP_ClearAA for Tit * Add expedition repositories * Explicitly pass database pointers to repository methods * First pass * Second pass * Third pass * Fix linux compile warnings * Fourth pass * Move TaskManager::LoadTaskSets() loading to repositories * Refactor and move TaskManager::LoadTasks to load from repositories * Migrate TaskManager::LoadClientState to repository methods * Another pass * Move ClientTaskState::RemoveTask to repository methods * Move ClientTaskState::RemoveTaskByTaskID to repository methods * More refactors * More cleanups * Logging cleanups * More logging * More cleanup * Correct one missed repository pointer * Split task classes into their own cpp/h files to speed up incremental compilation and make things easier to maintain * More cleanups * Improve GM command interface UI * Typo [skip ci] * Add Anon/AFK methods to Perl and Lua. * Yet more cleanup * Update CMakeLists.txt * Update task_client_state.cpp * Private member prefixes for proximities and goal lists * Enforce some naming limits people were getting around * PR comments * Update perl_questitem.cpp (#1227) Add category tags for quest_item methods. * [Quest API] Perl Raid Annotations (#1226) Added categories tags for raid methods. * [Quest API] Perl Client Annotations (#1224) * Update perl_client.cpp Added category tags for client methods. * Update perl_client.cpp Now with less iis! (Thanks KK) * Update perl_client.cpp Now with fewer slashes! * Update perl_client.cpp Now with fewer tabs! * Provide more search paths for luajit (#1216) The include folder on my system is /usr/include/luajit-2.0, added some extra library names since mine was /usr/lib64/libluajit-5.1.so * [Door Opening] Rule to let configure Animal Door Opening (#1231) * Add rule configuration for letting animals open doors or not * Handle one more spot * Make adjustments and add mob property that serves as a check as to whether a mob entity can open doors or not * Push attribute to mob window * [Repositories] Insert repository improvements (#1236) * Insert repository improvements * Remove no longer necessary code, remove license banner since we have a license at the repo level * Update template comments * [Hotfix] Remove test branch fields from repo * Update repo with latest template [skip ci] * Move data aliases after null checks for safety [skip ci] * [Quest API] Add Mob-based data bucket methods to Perl/Lua. (#1237) * Add Mob-based data bucket methods to Perl/Lua. * Update mob.cpp * Update perl_mob.cpp * Add ScaleNPC() to Perl and Lua. (#1238) * Add category tags for corpse methods (#1234) Add category tags for corpse methods. * Add category tags for Object methods. (#1232) Add category tags for Object methods. * Add category tags to new client methods. (#1233) Add category tags to new client methods. * [Lua/Cmake] Prefer LuaJIT over normal Lua (#1235) * Add a separate FindLuaJit.cmake * Remove LuaJit from our modified FindLua51.cmake * Make use of the new FindLuaJit The reason for splitting them up like this is so we can have a preference for LuaJIT that's not determined by the search order in FindLua51.cmake as well as giving the server operators the choice to prefer normal Lua with the EQEMU_PREFER_LUA cmake option * Very simple implementation of Sneak Pull * Change modified sneak pull assist range to a rule. Fixed formatting on decls. * Fixed missing argument - oops * More formatting * Add comment. * Add include to PATH_SUFFIXES for Windows builds (#1246) * LuaJIT calls it lua51.lib/dll on Windows ... (#1247) * Remove unused files idk where these came from, NUKE EM! * Revert "[BUG] Fix for Group Leader Disband Issue" This reverts commit f854137. * Fix va_list leaks in MakeAnyLenString/AppendAnyLenString (#1240) Slowly leaking memory for ages! clang-tidy complained about it * Fix some leaks of groups/raids (#1242) These cases probably are exceedingly rare, but they still need to be accounted for. (As in, I don't think anyone has run into these cases too often to cause problems) * Fix for issue in movement manager where a drop aggro can happen and processing continues. * [Quest API] Resolves traindiscs and scribespells issues in Perl/Lua. (#1249) * [Experience] Add exp mod to npc types to let a server op change the exp modifier (#1252) * Add exp mod to npc types to let a server op change the exp modifier a npc gives (useful for custom content) * Updated version.h * [Quest API] Perl Group Annotations (#1261) Added category tag annotations for group methods. * Add string util search_deliminated_string (#1260) This function takes a string of deliminated an see if another string is one of those This function also verifies it's not finding a substring * [Quest API] Perl Mob Annotations (#1258) Added category tag annotations for mob methods. * Fix NPC Scale Manager leaking (#1254) It should be fine to init further down after the early returns. This wasn't really a leak that affected performance, but mainly moving to shutup valgrind * [Quest API] Perl NPC Annotations (#1245) Added category tag annotations for NPC methods. * [Quest API] Perl Door Annotations (#1241) Add category type annotations to door methods. * [Quest API] Perl Hate Entry Annotations (#1244) Added category tag annotations for Hate Entry methods. * [Quest API] Perl Entity List Annotations (#1243) Added category tag annotations for perl entity list methods. * [Cleanup] use std::make_unique (#1259) * Convert common/eq_limits.cpp to use make_unique * Convert common/net/console_server.cpp to use make_unique * Convert common/net/servertalk_client_connection.cpp to use make_unique * Convert common/net/servertalk_legacy_client_connection.cpp to use make_unique * Convert common/net/servertalk_server.cpp to use make_unique * Convert common/net/websocket_server.cpp to use make_unique * Convert common/net/websocket_server_connection.cpp to use make_unique * Convert common/shareddb.cpp to use make_unique * Convert eqlaunch/worldserver.cpp to use make_unique * Convert loginserver/server_manager.cpp to use make_unique * Convert loginserver/world_server.cpp to use make_unique * Convert queryserv/worldserver.cpp to use make_unique * Convert ucs/worldserver.cpp to use make_unique * Convert world/clientlist.cpp to use make_unique * Convert world/expedition.cpp to use make_unique * Convert world/launcher_link.cpp to use make_unique * Convert world/login_server.cpp to use make_unique * Convert world/main.cpp to use make_unique * Convert world/ucs.cpp to use make_unique * Convert world/web_interface.cpp to use make_unique * Convert world/zonelist.cpp to use make_unique * Convert world/zoneserver.cpp to use make_unique * Convert zone/client.cpp to use make_unique * Convert zone/corpse.cpp to use make_unique * Convert zone/dynamiczone.cpp to use make_unique * Convert zone/expedition.cpp to use make_unique * Convert zone/main.cpp to use make_unique * Convert zone/mob_ai.cpp to use make_unique * Convert zone/mob_movement_manager.cpp to use make_unique * Convert zone/pathfinder_nav_mesh.cpp to use make_unique * Convert zone/worldserver.cpp to use make_unique * [Cleanup] Nuke Make/AppendAnyLenString (#1251) * Add a std::string overload for Database::SetMQDetectionFlag * Replace calls to MakeAnyLenString in client_packet.cpp At least the SetMQDetectionFlag ones * Replace MakeAnyLenString calls in client_process At least SetMQDectectionFlag ones * Replace MakeAnyLenString in embparser fmtlib actually is gross here, oh well. * Replace MakeAnyLenString in merc * Replace MakeAnyLenString in inventory Also if'd out an unfinished implementation of Client::GetItemLinkHash * Replace AppendAnyLenString in zonelist * Replace AppendAnyLenString in zonelist * Replace MakeAnyLenString in clientlist * Nuke MakeAnyLenString/AppendAnyLenString * Fix formatting string in zonelist * Convert NPC Spell AI from int16 to uint16. (#1262) * [Library] Update zlibng (#1255) * Update zlibng * Set cmake path more directly in zlibng to hopefully fix an issue with the build on drone * I'm dumb, missing / in path * Mackal helps with a dumb gitignore issue * Adding all the files, not sure what's ignoring them and im tired of looking * Some tweaks to zlibng build to hopefully get it to build properly. works on msvc now * Fix SQL for NPC Spells. (#1265) * Fix SQL for NPC Spells. * Update 2021_02_15_npc_spell_entries_unsigned.sql * [Quest API] Add IsHorse() to Perl and Lua. (#1264) * Initialize Mob::PhR * Fix deletes in DBcore::Open These are arrays! * zlib-ng1.dll ends up in a different path (#1268) * Fix zlibng paths for appveyor Co-authored-by: Kinglykrab <kinglykrab@gmail.com> Co-authored-by: Michael Cook (mackal) <mcook@mackal.net> Co-authored-by: Akkadius <akkadius1@gmail.com> Co-authored-by: TurmoilToad <TurmoilToad@gmail.com> Co-authored-by: Noudess <noudess@gmail.com> Co-authored-by: KimLS <KLS@peqtgc.com>
joligario
added a commit
that referenced
this pull request
Mar 6, 2021
* Formatting NPC validation macro. * Identify OP_ClearLeadershipAbilities/OP_ClearAA for Tit * Add expedition repositories * Explicitly pass database pointers to repository methods * First pass * Second pass * Third pass * Fix linux compile warnings * Fourth pass * Move TaskManager::LoadTaskSets() loading to repositories * Refactor and move TaskManager::LoadTasks to load from repositories * Migrate TaskManager::LoadClientState to repository methods * Another pass * Move ClientTaskState::RemoveTask to repository methods * Move ClientTaskState::RemoveTaskByTaskID to repository methods * More refactors * More cleanups * Logging cleanups * More logging * More cleanup * Correct one missed repository pointer * Split task classes into their own cpp/h files to speed up incremental compilation and make things easier to maintain * More cleanups * Improve GM command interface UI * Typo [skip ci] * Add Anon/AFK methods to Perl and Lua. * Yet more cleanup * Update CMakeLists.txt * Update task_client_state.cpp * Private member prefixes for proximities and goal lists * Enforce some naming limits people were getting around * PR comments * Update perl_questitem.cpp (#1227) Add category tags for quest_item methods. * [Quest API] Perl Raid Annotations (#1226) Added categories tags for raid methods. * [Quest API] Perl Client Annotations (#1224) * Update perl_client.cpp Added category tags for client methods. * Update perl_client.cpp Now with less iis! (Thanks KK) * Update perl_client.cpp Now with fewer slashes! * Update perl_client.cpp Now with fewer tabs! * Provide more search paths for luajit (#1216) The include folder on my system is /usr/include/luajit-2.0, added some extra library names since mine was /usr/lib64/libluajit-5.1.so * [Door Opening] Rule to let configure Animal Door Opening (#1231) * Add rule configuration for letting animals open doors or not * Handle one more spot * Make adjustments and add mob property that serves as a check as to whether a mob entity can open doors or not * Push attribute to mob window * [Repositories] Insert repository improvements (#1236) * Insert repository improvements * Remove no longer necessary code, remove license banner since we have a license at the repo level * Update template comments * [Hotfix] Remove test branch fields from repo * Update repo with latest template [skip ci] * Move data aliases after null checks for safety [skip ci] * [Quest API] Add Mob-based data bucket methods to Perl/Lua. (#1237) * Add Mob-based data bucket methods to Perl/Lua. * Update mob.cpp * Update perl_mob.cpp * Add ScaleNPC() to Perl and Lua. (#1238) * Add category tags for corpse methods (#1234) Add category tags for corpse methods. * Add category tags for Object methods. (#1232) Add category tags for Object methods. * Add category tags to new client methods. (#1233) Add category tags to new client methods. * [Lua/Cmake] Prefer LuaJIT over normal Lua (#1235) * Add a separate FindLuaJit.cmake * Remove LuaJit from our modified FindLua51.cmake * Make use of the new FindLuaJit The reason for splitting them up like this is so we can have a preference for LuaJIT that's not determined by the search order in FindLua51.cmake as well as giving the server operators the choice to prefer normal Lua with the EQEMU_PREFER_LUA cmake option * Very simple implementation of Sneak Pull * Change modified sneak pull assist range to a rule. Fixed formatting on decls. * Fixed missing argument - oops * More formatting * Add comment. * Add include to PATH_SUFFIXES for Windows builds (#1246) * LuaJIT calls it lua51.lib/dll on Windows ... (#1247) * Remove unused files idk where these came from, NUKE EM! * Revert "[BUG] Fix for Group Leader Disband Issue" This reverts commit f854137. * Fix va_list leaks in MakeAnyLenString/AppendAnyLenString (#1240) Slowly leaking memory for ages! clang-tidy complained about it * Fix some leaks of groups/raids (#1242) These cases probably are exceedingly rare, but they still need to be accounted for. (As in, I don't think anyone has run into these cases too often to cause problems) * Fix for issue in movement manager where a drop aggro can happen and processing continues. * [Quest API] Resolves traindiscs and scribespells issues in Perl/Lua. (#1249) * [Experience] Add exp mod to npc types to let a server op change the exp modifier (#1252) * Add exp mod to npc types to let a server op change the exp modifier a npc gives (useful for custom content) * Updated version.h * [Quest API] Perl Group Annotations (#1261) Added category tag annotations for group methods. * Add string util search_deliminated_string (#1260) This function takes a string of deliminated an see if another string is one of those This function also verifies it's not finding a substring * [Quest API] Perl Mob Annotations (#1258) Added category tag annotations for mob methods. * Fix NPC Scale Manager leaking (#1254) It should be fine to init further down after the early returns. This wasn't really a leak that affected performance, but mainly moving to shutup valgrind * [Quest API] Perl NPC Annotations (#1245) Added category tag annotations for NPC methods. * [Quest API] Perl Door Annotations (#1241) Add category type annotations to door methods. * [Quest API] Perl Hate Entry Annotations (#1244) Added category tag annotations for Hate Entry methods. * [Quest API] Perl Entity List Annotations (#1243) Added category tag annotations for perl entity list methods. * [Cleanup] use std::make_unique (#1259) * Convert common/eq_limits.cpp to use make_unique * Convert common/net/console_server.cpp to use make_unique * Convert common/net/servertalk_client_connection.cpp to use make_unique * Convert common/net/servertalk_legacy_client_connection.cpp to use make_unique * Convert common/net/servertalk_server.cpp to use make_unique * Convert common/net/websocket_server.cpp to use make_unique * Convert common/net/websocket_server_connection.cpp to use make_unique * Convert common/shareddb.cpp to use make_unique * Convert eqlaunch/worldserver.cpp to use make_unique * Convert loginserver/server_manager.cpp to use make_unique * Convert loginserver/world_server.cpp to use make_unique * Convert queryserv/worldserver.cpp to use make_unique * Convert ucs/worldserver.cpp to use make_unique * Convert world/clientlist.cpp to use make_unique * Convert world/expedition.cpp to use make_unique * Convert world/launcher_link.cpp to use make_unique * Convert world/login_server.cpp to use make_unique * Convert world/main.cpp to use make_unique * Convert world/ucs.cpp to use make_unique * Convert world/web_interface.cpp to use make_unique * Convert world/zonelist.cpp to use make_unique * Convert world/zoneserver.cpp to use make_unique * Convert zone/client.cpp to use make_unique * Convert zone/corpse.cpp to use make_unique * Convert zone/dynamiczone.cpp to use make_unique * Convert zone/expedition.cpp to use make_unique * Convert zone/main.cpp to use make_unique * Convert zone/mob_ai.cpp to use make_unique * Convert zone/mob_movement_manager.cpp to use make_unique * Convert zone/pathfinder_nav_mesh.cpp to use make_unique * Convert zone/worldserver.cpp to use make_unique * [Cleanup] Nuke Make/AppendAnyLenString (#1251) * Add a std::string overload for Database::SetMQDetectionFlag * Replace calls to MakeAnyLenString in client_packet.cpp At least the SetMQDetectionFlag ones * Replace MakeAnyLenString calls in client_process At least SetMQDectectionFlag ones * Replace MakeAnyLenString in embparser fmtlib actually is gross here, oh well. * Replace MakeAnyLenString in merc * Replace MakeAnyLenString in inventory Also if'd out an unfinished implementation of Client::GetItemLinkHash * Replace AppendAnyLenString in zonelist * Replace AppendAnyLenString in zonelist * Replace MakeAnyLenString in clientlist * Nuke MakeAnyLenString/AppendAnyLenString * Fix formatting string in zonelist * Convert NPC Spell AI from int16 to uint16. (#1262) * [Library] Update zlibng (#1255) * Update zlibng * Set cmake path more directly in zlibng to hopefully fix an issue with the build on drone * I'm dumb, missing / in path * Mackal helps with a dumb gitignore issue * Adding all the files, not sure what's ignoring them and im tired of looking * Some tweaks to zlibng build to hopefully get it to build properly. works on msvc now * Fix SQL for NPC Spells. (#1265) * Fix SQL for NPC Spells. * Update 2021_02_15_npc_spell_entries_unsigned.sql * [Quest API] Add IsHorse() to Perl and Lua. (#1264) * Initialize Mob::PhR * Fix ReloadQuest on Shutdown crash related to encounters Basically, EntityList::RemoveAllEncounters is called before ReloadQuests resulting in stale pointers in the lua_encounters map. We just have to remove the entry from the map. * We want GetEncounterName here instead * Fix deletes in DBcore::Open These are arrays! * [Cleanup] Make Client::Clearance less gross It's still pretty gross, but the bits ASan really hated are less gross * Don't take pet guard off when PC is summoned * Remove pet move/follow on non-GM summon PCy * [Quest API] Add GetHateClosest() and GetHateListByDistance(distance) to Perl/Lua. * zlib-ng1.dll ends up in a different path (#1268) * Fix zlibng paths for appveyor * Fix stack-buffer-overflow thanks to StopLFP ==1674==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffb47f3068 at pc 0x7f64ee1f531e bp 0x7fffb47f2f50 sp 0x7fffb47f2700 READ of size 432 at 0x7fffb47f3068 thread T0 #0 0x7f64ee1f531d (/lib/x86_64-linux-gnu/libasan.so.5+0x3f31d) #1 0x55c78e8d002e in WorldServer::UpdateLFP(unsigned int, unsigned char, unsigned char, unsigned int, unsigned int, unsigned int, char const*, GroupLFPMemberEntry*) ../zone/worldserver.cpp:3166 #2 0x55c78e8d01d9 in WorldServer::StopLFP(unsigned int) ../zone/worldserver.cpp:3180 * Use casts to silence ASan complaints I don't think these are actually causing any real problems, ASan complains about them though since it's kind of a code smell I guess and a potential source of problems. But our case is fine, so cast to silence them. * Fix database connection pointer bucket consistency * Fix heap-use-after-free issue with groups ==2317==ERROR: AddressSanitizer: heap-use-after-free on address 0x6170000633c0 at pc 0x55ed1d8e8d8b bp 0x7ffda4bef580 sp 0x7ffda4bef578 WRITE of size 8 at 0x6170000633c0 thread T0 #0 0x55ed1d8e8d8a in Group::SetLeader(Mob*) ../zone/groups.h:80 #1 0x55ed1d8e8d8a in Group::DisbandGroup(bool) ../zone/groups.cpp:1016 ASan didn't like this * Fix strcpy-param-overlap with GetGroupLeadershipInfo calls ==1810==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x7ffef04baf90,0x7ffef04baf98) and [0x7ffef04baf90, 0x7ffef04baf98) overlap #0 0x7f163bb9509e (/lib/x86_64-linux-gnu/libasan.so.5+0x4f09e) #1 0x5652caed27b3 in Client::Handle_Connect_OP_ZoneEntry(EQApplicationPacket const*) ../zone/client_packet.cpp:1535 ==1918==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x7ffddc8057c0,0x7ffddc8057c8) and [0x7ffddc8057c0, 0x7ffddc8057c8) overlap #0 0x7fc61ee0e09e (/lib/x86_64-linux-gnu/libasan.so.5+0x4f09e) #1 0x56023c149698 in WorldServer::HandleMessage(unsigned short, EQ::Net::Packet const&) ../zone/worldserver.cpp:1055 * Port SpawnGroup stuff to unique_ptr to fix leak This was leaking on #repop, unsure of other cases, smart pointers should cover us though. Direct leak of 3600 byte(s) in 18 object(s) allocated from: #0 0x7f2b3dbe0d30 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0xead30) #1 0x5645dc7c9dff in ZoneDatabase::LoadSpawnGroups(char const*, unsigned short, SpawnGroupList*) ../zone/spawngroup.cpp:241 #2 0x5645dc9db3f5 in Zone::Depop(bool) ../zone/zone.cpp:1746 #3 0x5645dca1ba6b in Zone::Repop(unsigned int) ../zone/zone.cpp:1777 #4 0x5645db4624b7 in command_repop(Client*, Seperator const*) ../zone/command.cpp:5683 Indirect leak of 6552 byte(s) in 273 object(s) allocated from: #0 0x7f26f2ff8d30 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0xead30) #1 0x558d00490bc6 in __gnu_cxx::new_allocator<std::_List_node<SpawnEntry*> >::allocate(unsigned long, void const*) /usr/include/c++/8/ext/new_allocator.h:111 #2 0x558d00490bc6 in std::allocator_traits<std::allocator<std::_List_node<SpawnEntry*> > >::allocate(std::allocator<std::_List_node<SpawnEntry*> >&, unsigned long) /usr/include/c++/8/bits/alloc_traits.h:436 #3 0x558d00490bc6 in std::__cxx11::_List_base<SpawnEntry*, std::allocator<SpawnEntry*> >::_M_get_node() /usr/include/c++/8/bits/stl_list.h:450 #4 0x558d00490bc6 in std::_List_node<SpawnEntry*>* std::__cxx11::list<SpawnEntry*, std::allocator<SpawnEntry*> >::_M_create_node<SpawnEntry* const&>(SpawnEntry* const&) /usr/include/c++/8/bits/stl_list.h:642 #5 0x558d00490bc6 in void std::__cxx11::list<SpawnEntry*, std::allocator<SpawnEntry*> >::_M_insert<SpawnEntry* const&>(std::_List_iterator<SpawnEntry*>, SpawnEntry* const&) /usr/include/c++/8/bits/stl_list.h:1903 #6 0x558d00490bc6 in std::__cxx11::list<SpawnEntry*, std::allocator<SpawnEntry*> >::push_back(SpawnEntry* const&) /usr/include/c++/8/bits/stl_list.h:1220 #7 0x558d00490bc6 in SpawnGroup::AddSpawnEntry(SpawnEntry*) ../zone/spawngroup.cpp:122 #8 0x558d00490bc6 in ZoneDatabase::LoadSpawnGroups(char const*, unsigned short, SpawnGroupList*) ../zone/spawngroup.cpp:291 #9 0x558d006a1465 in Zone::Depop(bool) ../zone/zone.cpp:1746 #10 0x558d006e1adb in Zone::Repop(unsigned int) ../zone/zone.cpp:1777 * Clean up MOTD processing * Nuke ZoneDatabase::GetEventLogs This wasn't called anywhere and was throwing format-overflow warnings * Clean up Merc::LoadMerc lastname processing This is still less than ideal, but client's name restrictions should prevent this from being an actual problem * Clean up last name handling in NPC::PetOnSpawn Same as last time Co-authored-by: Kinglykrab <kinglykrab@gmail.com> Co-authored-by: Michael Cook (mackal) <mcook@mackal.net> Co-authored-by: Akkadius <akkadius1@gmail.com> Co-authored-by: TurmoilToad <TurmoilToad@gmail.com> Co-authored-by: Noudess <noudess@gmail.com> Co-authored-by: KimLS <KLS@peqtgc.com>
joligario
added a commit
that referenced
this pull request
Mar 7, 2021
* Formatting NPC validation macro. * Identify OP_ClearLeadershipAbilities/OP_ClearAA for Tit * Add expedition repositories * Explicitly pass database pointers to repository methods * First pass * Second pass * Third pass * Fix linux compile warnings * Fourth pass * Move TaskManager::LoadTaskSets() loading to repositories * Refactor and move TaskManager::LoadTasks to load from repositories * Migrate TaskManager::LoadClientState to repository methods * Another pass * Move ClientTaskState::RemoveTask to repository methods * Move ClientTaskState::RemoveTaskByTaskID to repository methods * More refactors * More cleanups * Logging cleanups * More logging * More cleanup * Correct one missed repository pointer * Split task classes into their own cpp/h files to speed up incremental compilation and make things easier to maintain * More cleanups * Improve GM command interface UI * Typo [skip ci] * Add Anon/AFK methods to Perl and Lua. * Yet more cleanup * Update CMakeLists.txt * Update task_client_state.cpp * Private member prefixes for proximities and goal lists * Enforce some naming limits people were getting around * PR comments * Update perl_questitem.cpp (#1227) Add category tags for quest_item methods. * [Quest API] Perl Raid Annotations (#1226) Added categories tags for raid methods. * [Quest API] Perl Client Annotations (#1224) * Update perl_client.cpp Added category tags for client methods. * Update perl_client.cpp Now with less iis! (Thanks KK) * Update perl_client.cpp Now with fewer slashes! * Update perl_client.cpp Now with fewer tabs! * Provide more search paths for luajit (#1216) The include folder on my system is /usr/include/luajit-2.0, added some extra library names since mine was /usr/lib64/libluajit-5.1.so * [Door Opening] Rule to let configure Animal Door Opening (#1231) * Add rule configuration for letting animals open doors or not * Handle one more spot * Make adjustments and add mob property that serves as a check as to whether a mob entity can open doors or not * Push attribute to mob window * [Repositories] Insert repository improvements (#1236) * Insert repository improvements * Remove no longer necessary code, remove license banner since we have a license at the repo level * Update template comments * [Hotfix] Remove test branch fields from repo * Update repo with latest template [skip ci] * Move data aliases after null checks for safety [skip ci] * [Quest API] Add Mob-based data bucket methods to Perl/Lua. (#1237) * Add Mob-based data bucket methods to Perl/Lua. * Update mob.cpp * Update perl_mob.cpp * Add ScaleNPC() to Perl and Lua. (#1238) * Add category tags for corpse methods (#1234) Add category tags for corpse methods. * Add category tags for Object methods. (#1232) Add category tags for Object methods. * Add category tags to new client methods. (#1233) Add category tags to new client methods. * [Lua/Cmake] Prefer LuaJIT over normal Lua (#1235) * Add a separate FindLuaJit.cmake * Remove LuaJit from our modified FindLua51.cmake * Make use of the new FindLuaJit The reason for splitting them up like this is so we can have a preference for LuaJIT that's not determined by the search order in FindLua51.cmake as well as giving the server operators the choice to prefer normal Lua with the EQEMU_PREFER_LUA cmake option * Very simple implementation of Sneak Pull * Change modified sneak pull assist range to a rule. Fixed formatting on decls. * Fixed missing argument - oops * More formatting * Add comment. * Add include to PATH_SUFFIXES for Windows builds (#1246) * LuaJIT calls it lua51.lib/dll on Windows ... (#1247) * Remove unused files idk where these came from, NUKE EM! * Revert "[BUG] Fix for Group Leader Disband Issue" This reverts commit f854137. * Fix va_list leaks in MakeAnyLenString/AppendAnyLenString (#1240) Slowly leaking memory for ages! clang-tidy complained about it * Fix some leaks of groups/raids (#1242) These cases probably are exceedingly rare, but they still need to be accounted for. (As in, I don't think anyone has run into these cases too often to cause problems) * Fix for issue in movement manager where a drop aggro can happen and processing continues. * [Quest API] Resolves traindiscs and scribespells issues in Perl/Lua. (#1249) * [Experience] Add exp mod to npc types to let a server op change the exp modifier (#1252) * Add exp mod to npc types to let a server op change the exp modifier a npc gives (useful for custom content) * Updated version.h * [Quest API] Perl Group Annotations (#1261) Added category tag annotations for group methods. * Add string util search_deliminated_string (#1260) This function takes a string of deliminated an see if another string is one of those This function also verifies it's not finding a substring * [Quest API] Perl Mob Annotations (#1258) Added category tag annotations for mob methods. * Fix NPC Scale Manager leaking (#1254) It should be fine to init further down after the early returns. This wasn't really a leak that affected performance, but mainly moving to shutup valgrind * [Quest API] Perl NPC Annotations (#1245) Added category tag annotations for NPC methods. * [Quest API] Perl Door Annotations (#1241) Add category type annotations to door methods. * [Quest API] Perl Hate Entry Annotations (#1244) Added category tag annotations for Hate Entry methods. * [Quest API] Perl Entity List Annotations (#1243) Added category tag annotations for perl entity list methods. * [Cleanup] use std::make_unique (#1259) * Convert common/eq_limits.cpp to use make_unique * Convert common/net/console_server.cpp to use make_unique * Convert common/net/servertalk_client_connection.cpp to use make_unique * Convert common/net/servertalk_legacy_client_connection.cpp to use make_unique * Convert common/net/servertalk_server.cpp to use make_unique * Convert common/net/websocket_server.cpp to use make_unique * Convert common/net/websocket_server_connection.cpp to use make_unique * Convert common/shareddb.cpp to use make_unique * Convert eqlaunch/worldserver.cpp to use make_unique * Convert loginserver/server_manager.cpp to use make_unique * Convert loginserver/world_server.cpp to use make_unique * Convert queryserv/worldserver.cpp to use make_unique * Convert ucs/worldserver.cpp to use make_unique * Convert world/clientlist.cpp to use make_unique * Convert world/expedition.cpp to use make_unique * Convert world/launcher_link.cpp to use make_unique * Convert world/login_server.cpp to use make_unique * Convert world/main.cpp to use make_unique * Convert world/ucs.cpp to use make_unique * Convert world/web_interface.cpp to use make_unique * Convert world/zonelist.cpp to use make_unique * Convert world/zoneserver.cpp to use make_unique * Convert zone/client.cpp to use make_unique * Convert zone/corpse.cpp to use make_unique * Convert zone/dynamiczone.cpp to use make_unique * Convert zone/expedition.cpp to use make_unique * Convert zone/main.cpp to use make_unique * Convert zone/mob_ai.cpp to use make_unique * Convert zone/mob_movement_manager.cpp to use make_unique * Convert zone/pathfinder_nav_mesh.cpp to use make_unique * Convert zone/worldserver.cpp to use make_unique * [Cleanup] Nuke Make/AppendAnyLenString (#1251) * Add a std::string overload for Database::SetMQDetectionFlag * Replace calls to MakeAnyLenString in client_packet.cpp At least the SetMQDetectionFlag ones * Replace MakeAnyLenString calls in client_process At least SetMQDectectionFlag ones * Replace MakeAnyLenString in embparser fmtlib actually is gross here, oh well. * Replace MakeAnyLenString in merc * Replace MakeAnyLenString in inventory Also if'd out an unfinished implementation of Client::GetItemLinkHash * Replace AppendAnyLenString in zonelist * Replace AppendAnyLenString in zonelist * Replace MakeAnyLenString in clientlist * Nuke MakeAnyLenString/AppendAnyLenString * Fix formatting string in zonelist * Convert NPC Spell AI from int16 to uint16. (#1262) * [Library] Update zlibng (#1255) * Update zlibng * Set cmake path more directly in zlibng to hopefully fix an issue with the build on drone * I'm dumb, missing / in path * Mackal helps with a dumb gitignore issue * Adding all the files, not sure what's ignoring them and im tired of looking * Some tweaks to zlibng build to hopefully get it to build properly. works on msvc now * Fix SQL for NPC Spells. (#1265) * Fix SQL for NPC Spells. * Update 2021_02_15_npc_spell_entries_unsigned.sql * [Quest API] Add IsHorse() to Perl and Lua. (#1264) * Initialize Mob::PhR * Fix ReloadQuest on Shutdown crash related to encounters Basically, EntityList::RemoveAllEncounters is called before ReloadQuests resulting in stale pointers in the lua_encounters map. We just have to remove the entry from the map. * We want GetEncounterName here instead * Fix deletes in DBcore::Open These are arrays! * [Cleanup] Make Client::Clearance less gross It's still pretty gross, but the bits ASan really hated are less gross * Don't take pet guard off when PC is summoned * Remove pet move/follow on non-GM summon PCy * [Quest API] Add GetHateClosest() and GetHateListByDistance(distance) to Perl/Lua. * zlib-ng1.dll ends up in a different path (#1268) * Fix zlibng paths for appveyor * Fix stack-buffer-overflow thanks to StopLFP ==1674==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffb47f3068 at pc 0x7f64ee1f531e bp 0x7fffb47f2f50 sp 0x7fffb47f2700 READ of size 432 at 0x7fffb47f3068 thread T0 #0 0x7f64ee1f531d (/lib/x86_64-linux-gnu/libasan.so.5+0x3f31d) #1 0x55c78e8d002e in WorldServer::UpdateLFP(unsigned int, unsigned char, unsigned char, unsigned int, unsigned int, unsigned int, char const*, GroupLFPMemberEntry*) ../zone/worldserver.cpp:3166 #2 0x55c78e8d01d9 in WorldServer::StopLFP(unsigned int) ../zone/worldserver.cpp:3180 * Use casts to silence ASan complaints I don't think these are actually causing any real problems, ASan complains about them though since it's kind of a code smell I guess and a potential source of problems. But our case is fine, so cast to silence them. * Fix database connection pointer bucket consistency * Fix heap-use-after-free issue with groups ==2317==ERROR: AddressSanitizer: heap-use-after-free on address 0x6170000633c0 at pc 0x55ed1d8e8d8b bp 0x7ffda4bef580 sp 0x7ffda4bef578 WRITE of size 8 at 0x6170000633c0 thread T0 #0 0x55ed1d8e8d8a in Group::SetLeader(Mob*) ../zone/groups.h:80 #1 0x55ed1d8e8d8a in Group::DisbandGroup(bool) ../zone/groups.cpp:1016 ASan didn't like this * Fix strcpy-param-overlap with GetGroupLeadershipInfo calls ==1810==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x7ffef04baf90,0x7ffef04baf98) and [0x7ffef04baf90, 0x7ffef04baf98) overlap #0 0x7f163bb9509e (/lib/x86_64-linux-gnu/libasan.so.5+0x4f09e) #1 0x5652caed27b3 in Client::Handle_Connect_OP_ZoneEntry(EQApplicationPacket const*) ../zone/client_packet.cpp:1535 ==1918==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x7ffddc8057c0,0x7ffddc8057c8) and [0x7ffddc8057c0, 0x7ffddc8057c8) overlap #0 0x7fc61ee0e09e (/lib/x86_64-linux-gnu/libasan.so.5+0x4f09e) #1 0x56023c149698 in WorldServer::HandleMessage(unsigned short, EQ::Net::Packet const&) ../zone/worldserver.cpp:1055 * Port SpawnGroup stuff to unique_ptr to fix leak This was leaking on #repop, unsure of other cases, smart pointers should cover us though. Direct leak of 3600 byte(s) in 18 object(s) allocated from: #0 0x7f2b3dbe0d30 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0xead30) #1 0x5645dc7c9dff in ZoneDatabase::LoadSpawnGroups(char const*, unsigned short, SpawnGroupList*) ../zone/spawngroup.cpp:241 #2 0x5645dc9db3f5 in Zone::Depop(bool) ../zone/zone.cpp:1746 #3 0x5645dca1ba6b in Zone::Repop(unsigned int) ../zone/zone.cpp:1777 #4 0x5645db4624b7 in command_repop(Client*, Seperator const*) ../zone/command.cpp:5683 Indirect leak of 6552 byte(s) in 273 object(s) allocated from: #0 0x7f26f2ff8d30 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0xead30) #1 0x558d00490bc6 in __gnu_cxx::new_allocator<std::_List_node<SpawnEntry*> >::allocate(unsigned long, void const*) /usr/include/c++/8/ext/new_allocator.h:111 #2 0x558d00490bc6 in std::allocator_traits<std::allocator<std::_List_node<SpawnEntry*> > >::allocate(std::allocator<std::_List_node<SpawnEntry*> >&, unsigned long) /usr/include/c++/8/bits/alloc_traits.h:436 #3 0x558d00490bc6 in std::__cxx11::_List_base<SpawnEntry*, std::allocator<SpawnEntry*> >::_M_get_node() /usr/include/c++/8/bits/stl_list.h:450 #4 0x558d00490bc6 in std::_List_node<SpawnEntry*>* std::__cxx11::list<SpawnEntry*, std::allocator<SpawnEntry*> >::_M_create_node<SpawnEntry* const&>(SpawnEntry* const&) /usr/include/c++/8/bits/stl_list.h:642 #5 0x558d00490bc6 in void std::__cxx11::list<SpawnEntry*, std::allocator<SpawnEntry*> >::_M_insert<SpawnEntry* const&>(std::_List_iterator<SpawnEntry*>, SpawnEntry* const&) /usr/include/c++/8/bits/stl_list.h:1903 #6 0x558d00490bc6 in std::__cxx11::list<SpawnEntry*, std::allocator<SpawnEntry*> >::push_back(SpawnEntry* const&) /usr/include/c++/8/bits/stl_list.h:1220 #7 0x558d00490bc6 in SpawnGroup::AddSpawnEntry(SpawnEntry*) ../zone/spawngroup.cpp:122 #8 0x558d00490bc6 in ZoneDatabase::LoadSpawnGroups(char const*, unsigned short, SpawnGroupList*) ../zone/spawngroup.cpp:291 #9 0x558d006a1465 in Zone::Depop(bool) ../zone/zone.cpp:1746 #10 0x558d006e1adb in Zone::Repop(unsigned int) ../zone/zone.cpp:1777 * Clean up MOTD processing * Nuke ZoneDatabase::GetEventLogs This wasn't called anywhere and was throwing format-overflow warnings * Clean up Merc::LoadMerc lastname processing This is still less than ideal, but client's name restrictions should prevent this from being an actual problem * Clean up last name handling in NPC::PetOnSpawn Same as last time * Fix copy and paste error Co-authored-by: Kinglykrab <kinglykrab@gmail.com> Co-authored-by: Michael Cook (mackal) <mcook@mackal.net> Co-authored-by: Akkadius <akkadius1@gmail.com> Co-authored-by: TurmoilToad <TurmoilToad@gmail.com> Co-authored-by: Noudess <noudess@gmail.com> Co-authored-by: KimLS <KLS@peqtgc.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.