Michael Cook (mackal)
29cdca380f
Fix copy and paste error
2021-03-06 19:58:18 -05:00
Alex
e5f5db69b4
Merge pull request #1280 from EQEmu/bug_fix/strcpy_overlap_GetGroupLeadershipInfo
...
[ASan] Fix strcpy-param-overlap with GetGroupLeadershipInfo calls
2021-03-05 19:24:42 -08:00
Alex
d635e69ee3
Merge pull request #1283 from EQEmu/cleanup/Wformat-overflow
...
[Cleanup] Make code -Wformat-overflow safe
2021-03-05 19:23:48 -08:00
Alex
a1531aa057
Merge pull request #1282 from EQEmu/bug_fix/spawngroup_leak_repop
...
[Leak] Port SpawnGroup stuff to unique_ptr to fix leak
2021-03-05 19:23:00 -08:00
Alex
b24ba221e9
Merge pull request #1279 from EQEmu/bug_fix/group_delete
...
[ASan] Fix heap-use-after-free issue with groups
2021-03-05 19:20:34 -08:00
Alex
253f0594e4
Merge pull request #1278 from EQEmu/akkadius/fix-skill-caps-loading-consistency
...
[Bugfix] Fix Skill Caps Loading References
2021-03-05 19:20:11 -08:00
Alex
184128a79b
Merge pull request #1275 from EQEmu/bug_fix/stack-buffer-overflow_StopLFP
...
[ASan] Fix stack-buffer-overflow thanks to StopLFP
2021-03-05 19:17:12 -08:00
Alex
93869dbef6
Merge pull request #1273 from EQEmu/hate_list_quest_api
...
[Quest API] Add GetHateClosest() and GetHateListByDistance(distance) to Perl and Lua.
2021-03-05 19:16:38 -08:00
Alex
af82a6c5d5
Merge pull request #1272 from noudess/master
...
[Bug Fix] Do not summon pet or set new pet state when PC summoned by a mob
2021-03-05 19:16:03 -08:00
Alex
c954c08c07
Merge pull request #1267 from EQEmu/bug_fix/realodquest_encounter_crash
...
[Crash] Fix ReloadQuest on Shutdown crash related to encounters
2021-03-05 19:13:58 -08:00
Michael Cook (mackal)
0b8220be32
Clean up last name handling in NPC::PetOnSpawn
...
Same as last time
2021-03-05 15:51:59 -05:00
Michael Cook (mackal)
f7d40ec88e
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
2021-03-05 15:43:06 -05:00
Michael Cook (mackal)
316336d1cf
Nuke ZoneDatabase::GetEventLogs
...
This wasn't called anywhere and was throwing format-overflow warnings
2021-03-05 15:25:32 -05:00
Michael Cook (mackal)
224c26620e
Clean up MOTD processing
2021-03-05 15:24:40 -05:00
Michael Cook (mackal)
c6d5864aa9
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
2021-03-02 12:39:04 -05:00
Michael Cook (mackal)
c45395be95
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
2021-02-28 21:42:51 -05:00
Michael Cook (mackal)
6d47351d15
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
2021-02-28 21:40:50 -05:00
Akkadius
450c748299
Fix database connection pointer bucket consistency
2021-02-28 19:31:46 -06:00
Michael Cook (mackal)
b82f376bfb
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
2021-02-28 17:50:07 -05:00
Alex
af517be184
Merge branch 'master' into hate_list_quest_api
2021-02-25 22:58:41 -05:00
Kinglykrab
1af1b7bbdc
[Quest API] Add GetHateClosest() and GetHateListByDistance(distance) to Perl/Lua.
2021-02-25 22:53:33 -05:00
Noudess
1f3ce2b34d
Remove pet move/follow on non-GM summon PCy
2021-02-25 12:12:25 -05:00
Noudess
2f239fd6a3
Don't take pet guard off when PC is summoned
2021-02-25 07:38:16 -05:00
Michael Cook (mackal)
3e7d4d1d6b
We want GetEncounterName here instead
2021-02-24 02:52:15 -05:00
Michael Cook (mackal)
43fade82e5
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.
2021-02-24 01:03:38 -05:00
Michael Cook (mackal)
3630f3ec38
Initialize Mob::PhR
2021-02-23 22:34:14 -05:00
Alex
66d24ff419
[Quest API] Add IsHorse() to Perl and Lua. ( #1264 )
2021-02-23 20:50:06 -06:00
Alex
e6dee96266
Convert NPC Spell AI from int16 to uint16. ( #1262 )
2021-02-23 18:33:33 -06:00
Michael Cook (mackal)
86ce506956
[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
2021-02-23 18:32:19 -06:00
Michael Cook (mackal)
7a46a6595c
[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
2021-02-23 18:30:46 -06:00
TurmoilToad
fa9478ac44
[Quest API] Perl Entity List Annotations ( #1243 )
...
Added category tag annotations for perl entity list methods.
2021-02-23 12:03:16 -06:00
TurmoilToad
cc7904e1bc
[Quest API] Perl Hate Entry Annotations ( #1244 )
...
Added category tag annotations for Hate Entry methods.
2021-02-23 12:02:51 -06:00
TurmoilToad
dba69abefc
[Quest API] Perl Door Annotations ( #1241 )
...
Add category type annotations to door methods.
2021-02-23 12:00:11 -06:00
TurmoilToad
041879c4e6
[Quest API] Perl NPC Annotations ( #1245 )
...
Added category tag annotations for NPC methods.
2021-02-23 11:59:57 -06:00
Michael Cook (mackal)
0887eb0976
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
2021-02-23 11:59:03 -06:00
TurmoilToad
f8edde9587
[Quest API] Perl Mob Annotations ( #1258 )
...
Added category tag annotations for mob methods.
2021-02-23 11:54:01 -06:00
TurmoilToad
1cfdd7e4a2
[Quest API] Perl Group Annotations ( #1261 )
...
Added category tag annotations for group methods.
2021-02-23 11:51:51 -06:00
Alex
bf3593a60d
[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
2021-02-23 11:50:38 -06:00
Alex
65704274cb
[Quest API] Resolves traindiscs and scribespells issues in Perl/Lua. ( #1249 )
2021-02-14 19:15:09 -05:00
Michael Cook (mackal)
1bc9e8aff2
Merge pull request #1239 from noudess/sneak-pull
...
[Game Play Mechanic] Very simple implementation of Sneak Pull
2021-02-14 18:04:30 -05:00
KimLS
c23da55b95
Fix for issue in movement manager where a drop aggro can happen and processing continues.
2021-02-14 13:08:33 -08:00
Michael Cook (mackal)
2a37785a7c
Merge pull request #1248 from EQEmu/remove_unused_files
...
[Cleanup] Remove unused files
2021-02-14 14:20:40 -05:00
Michael Cook (mackal)
0ef01165ea
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)
2021-02-12 02:07:58 -06:00
Akkadius
6e765e7ddc
Revert "[BUG] Fix for Group Leader Disband Issue"
...
This reverts commit f854137ca029fa6e90cab5133bd8ee6194f8e1cb.
2021-02-12 02:05:20 -06:00
Michael Cook (mackal)
8b4a886d01
Remove unused files
...
idk where these came from, NUKE EM!
2021-02-12 02:42:03 -05:00
Noudess
d7d9c73e5e
Add comment.
2021-02-09 11:32:13 -05:00
Noudess
d90d680e8a
More formatting
2021-02-09 11:24:25 -05:00
Noudess
baa53e134a
Fixed missing argument - oops
2021-02-09 10:00:17 -05:00
Noudess
3bafc5b3f4
Change modified sneak pull assist range to a rule. Fixed formatting on decls.
2021-02-09 09:50:22 -05:00
Noudess
b2e4e91fbd
Very simple implementation of Sneak Pull
2021-02-09 08:31:35 -05:00