Skip to content
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

Catching up #1285

Merged
merged 119 commits into from
Mar 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
963b8fd
Formatting NPC validation macro.
Kinglykrab Feb 2, 2021
42b34bb
Identify OP_ClearLeadershipAbilities/OP_ClearAA for Tit
mackal Feb 5, 2021
c8dfb72
Merge pull request #1222 from EQEmu/feature/op_clearaa_tit
mackal Feb 5, 2021
7fe0bba
Add expedition repositories
Akkadius Feb 6, 2021
3455863
Merge pull request #1220 from EQEmu/perl_npc_formatting
Akkadius Feb 6, 2021
b7f7c66
Merge pull request #1223 from EQEmu/akkadius/update-repositories-expe…
Akkadius Feb 6, 2021
e8ab176
Explicitly pass database pointers to repository methods
Akkadius Feb 6, 2021
b7983d4
First pass
Akkadius Feb 6, 2021
4039cb1
Second pass
Akkadius Feb 6, 2021
aeb0dbc
Third pass
Akkadius Feb 6, 2021
c194e2a
Fix linux compile warnings
Akkadius Feb 6, 2021
8d863a5
Fourth pass
Akkadius Feb 6, 2021
11eab9c
Move TaskManager::LoadTaskSets() loading to repositories
Akkadius Feb 6, 2021
32aeb61
Refactor and move TaskManager::LoadTasks to load from repositories
Akkadius Feb 6, 2021
83b279b
Migrate TaskManager::LoadClientState to repository methods
Akkadius Feb 6, 2021
9816608
Another pass
Akkadius Feb 6, 2021
19e9c0b
Move ClientTaskState::RemoveTask to repository methods
Akkadius Feb 6, 2021
fac75a3
Move ClientTaskState::RemoveTaskByTaskID to repository methods
Akkadius Feb 6, 2021
65f2f82
More refactors
Akkadius Feb 6, 2021
8d7fdd6
More cleanups
Akkadius Feb 6, 2021
d83dc33
Logging cleanups
Akkadius Feb 6, 2021
ed9f155
More logging
Akkadius Feb 6, 2021
18e9c4d
Merge pull request #1225 from EQEmu/akkadius/repository-improvements
Akkadius Feb 6, 2021
b017930
More cleanup
Akkadius Feb 6, 2021
55d4865
Correct one missed repository pointer
Akkadius Feb 7, 2021
ff5ea82
Split task classes into their own cpp/h files to speed up incremental…
Akkadius Feb 7, 2021
053bdb8
More cleanups
Akkadius Feb 7, 2021
5fba138
Improve GM command interface UI
Akkadius Feb 7, 2021
8414973
Typo [skip ci]
Akkadius Feb 7, 2021
fac9c34
Add Anon/AFK methods to Perl and Lua.
Kinglykrab Feb 7, 2021
0c53307
Yet more cleanup
Akkadius Feb 7, 2021
f429df3
Update CMakeLists.txt
Akkadius Feb 7, 2021
01f69bc
Update task_client_state.cpp
Akkadius Feb 7, 2021
00902d8
Private member prefixes for proximities and goal lists
Akkadius Feb 7, 2021
6621338
Enforce some naming limits people were getting around
mackal Feb 7, 2021
9f5ce8e
PR comments
Akkadius Feb 7, 2021
b184a5d
Merge pull request #1229 from EQEmu/akkadius/task-code-cleanup
Akkadius Feb 8, 2021
13303a1
Merge pull request #1230 from EQEmu/bug_fix/name_enforcement
Akkadius Feb 8, 2021
8f77020
Merge pull request #1228 from EQEmu/anon_afk_client
Akkadius Feb 8, 2021
ecc1dd9
Update perl_questitem.cpp (#1227)
TurmoilToad Feb 8, 2021
da7b5b3
[Quest API] Perl Raid Annotations (#1226)
TurmoilToad Feb 8, 2021
ca9756a
[Quest API] Perl Client Annotations (#1224)
TurmoilToad Feb 8, 2021
672c09e
Provide more search paths for luajit (#1216)
mackal Feb 8, 2021
694d380
[Door Opening] Rule to let configure Animal Door Opening (#1231)
Akkadius Feb 8, 2021
96b65b8
[Repositories] Insert repository improvements (#1236)
Akkadius Feb 9, 2021
eedd5e2
[Hotfix] Remove test branch fields from repo
Akkadius Feb 9, 2021
dcc921e
Update repo with latest template [skip ci]
Akkadius Feb 9, 2021
ef0398e
Move data aliases after null checks for safety [skip ci]
Akkadius Feb 9, 2021
f2b67ae
[Quest API] Add Mob-based data bucket methods to Perl/Lua. (#1237)
Kinglykrab Feb 9, 2021
8f89f38
Add ScaleNPC() to Perl and Lua. (#1238)
Kinglykrab Feb 9, 2021
52a3591
Add category tags for corpse methods (#1234)
TurmoilToad Feb 9, 2021
0dcaea1
Add category tags for Object methods. (#1232)
TurmoilToad Feb 9, 2021
ed71543
Add category tags to new client methods. (#1233)
TurmoilToad Feb 9, 2021
10ffcf1
[Lua/Cmake] Prefer LuaJIT over normal Lua (#1235)
mackal Feb 9, 2021
b2e4e91
Very simple implementation of Sneak Pull
noudess Feb 9, 2021
3bafc5b
Change modified sneak pull assist range to a rule. Fixed formatting …
noudess Feb 9, 2021
baa53e1
Fixed missing argument - oops
noudess Feb 9, 2021
d90d680
More formatting
noudess Feb 9, 2021
d7d9c73
Add comment.
noudess Feb 9, 2021
d33f806
Add include to PATH_SUFFIXES for Windows builds (#1246)
mackal Feb 11, 2021
507bbe8
LuaJIT calls it lua51.lib/dll on Windows ... (#1247)
mackal Feb 11, 2021
8b4a886
Remove unused files
mackal Feb 12, 2021
6e765e7
Revert "[BUG] Fix for Group Leader Disband Issue"
Akkadius Feb 12, 2021
f9923ff
Fix va_list leaks in MakeAnyLenString/AppendAnyLenString (#1240)
mackal Feb 12, 2021
0ef0116
Fix some leaks of groups/raids (#1242)
mackal Feb 12, 2021
2a37785
Merge pull request #1248 from EQEmu/remove_unused_files
mackal Feb 14, 2021
c23da55
Fix for issue in movement manager where a drop aggro can happen and p…
KimLS Feb 14, 2021
1bc9e8a
Merge pull request #1239 from noudess/sneak-pull
mackal Feb 14, 2021
6570427
[Quest API] Resolves traindiscs and scribespells issues in Perl/Lua. …
Kinglykrab Feb 15, 2021
bf3593a
[Experience] Add exp mod to npc types to let a server op change the e…
KimLS Feb 23, 2021
1cfdd7e
[Quest API] Perl Group Annotations (#1261)
TurmoilToad Feb 23, 2021
74ce20b
Add string util search_deliminated_string (#1260)
mackal Feb 23, 2021
f8edde9
[Quest API] Perl Mob Annotations (#1258)
TurmoilToad Feb 23, 2021
0887eb0
Fix NPC Scale Manager leaking (#1254)
mackal Feb 23, 2021
041879c
[Quest API] Perl NPC Annotations (#1245)
TurmoilToad Feb 23, 2021
dba69ab
[Quest API] Perl Door Annotations (#1241)
TurmoilToad Feb 23, 2021
cc7904e
[Quest API] Perl Hate Entry Annotations (#1244)
TurmoilToad Feb 23, 2021
fa9478a
[Quest API] Perl Entity List Annotations (#1243)
TurmoilToad Feb 23, 2021
7a46a65
[Cleanup] use std::make_unique (#1259)
mackal Feb 24, 2021
86ce506
[Cleanup] Nuke Make/AppendAnyLenString (#1251)
mackal Feb 24, 2021
e6dee96
Convert NPC Spell AI from int16 to uint16. (#1262)
Kinglykrab Feb 24, 2021
2957f50
[Library] Update zlibng (#1255)
KimLS Feb 24, 2021
2346b0f
Fix SQL for NPC Spells. (#1265)
Kinglykrab Feb 24, 2021
66d24ff
[Quest API] Add IsHorse() to Perl and Lua. (#1264)
Kinglykrab Feb 24, 2021
3630f3e
Initialize Mob::PhR
mackal Feb 24, 2021
43fade8
Fix ReloadQuest on Shutdown crash related to encounters
mackal Feb 24, 2021
3e7d4d1
We want GetEncounterName here instead
mackal Feb 24, 2021
7349f99
Fix deletes in DBcore::Open
mackal Feb 25, 2021
ab005e5
[Cleanup] Make Client::Clearance less gross
mackal Feb 25, 2021
2f239fd
Don't take pet guard off when PC is summoned
noudess Feb 25, 2021
1f3ce2b
Remove pet move/follow on non-GM summon PCy
noudess Feb 25, 2021
1af1b7b
[Quest API] Add GetHateClosest() and GetHateListByDistance(distance) …
Kinglykrab Feb 26, 2021
af517be
Merge branch 'master' into hate_list_quest_api
Kinglykrab Feb 26, 2021
aaf4100
zlib-ng1.dll ends up in a different path (#1268)
mackal Feb 27, 2021
05c407f
Fix zlibng paths for appveyor
mackal Feb 27, 2021
8de9e86
Merge pull request #1266 from EQEmu/bug_fix/init_PhR
mackal Feb 27, 2021
11d0da9
Merge pull request #1274 from EQEmu/bug_fix/zlibng-pathfix
mackal Feb 27, 2021
66f8941
Merge pull request #1270 from EQEmu/bug_fix/dbcore_wrong_delete
mackal Feb 27, 2021
b82f376
Fix stack-buffer-overflow thanks to StopLFP
mackal Feb 28, 2021
cafae9d
Use casts to silence ASan complaints
mackal Feb 28, 2021
450c748
Fix database connection pointer bucket consistency
Akkadius Mar 1, 2021
6d47351
Fix heap-use-after-free issue with groups
mackal Mar 1, 2021
c45395b
Fix strcpy-param-overlap with GetGroupLeadershipInfo calls
mackal Mar 1, 2021
c6d5864
Port SpawnGroup stuff to unique_ptr to fix leak
mackal Mar 2, 2021
224c266
Clean up MOTD processing
mackal Mar 5, 2021
316336d
Nuke ZoneDatabase::GetEventLogs
mackal Mar 5, 2021
f7d40ec
Clean up Merc::LoadMerc lastname processing
mackal Mar 5, 2021
0b8220b
Clean up last name handling in NPC::PetOnSpawn
mackal Mar 5, 2021
c954c08
Merge pull request #1267 from EQEmu/bug_fix/realodquest_encounter_crash
KimLS Mar 6, 2021
fdca333
Merge pull request #1271 from EQEmu/cleanup/world_client_clearance
KimLS Mar 6, 2021
af82a6c
Merge pull request #1272 from noudess/master
KimLS Mar 6, 2021
93869db
Merge pull request #1273 from EQEmu/hate_list_quest_api
KimLS Mar 6, 2021
184128a
Merge pull request #1275 from EQEmu/bug_fix/stack-buffer-overflow_Sto…
KimLS Mar 6, 2021
02517bf
Merge pull request #1276 from EQEmu/cleanup/uv_handle_cast_deletes
KimLS Mar 6, 2021
253f059
Merge pull request #1278 from EQEmu/akkadius/fix-skill-caps-loading-c…
KimLS Mar 6, 2021
b24ba22
Merge pull request #1279 from EQEmu/bug_fix/group_delete
KimLS Mar 6, 2021
a1531aa
Merge pull request #1282 from EQEmu/bug_fix/spawngroup_leak_repop
KimLS Mar 6, 2021
d635e69
Merge pull request #1283 from EQEmu/cleanup/Wformat-overflow
KimLS Mar 6, 2021
e5f5db6
Merge pull request #1280 from EQEmu/bug_fix/strcpy_overlap_GetGroupLe…
KimLS Mar 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 15 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ FIND_PACKAGE(MariaDB)
FIND_PACKAGE(ZLIB)
FIND_PACKAGE(OpenSSL)
FIND_PACKAGE(Lua51)
FIND_PACKAGE(LuaJit)
FIND_PACKAGE(PerlLibs)
FIND_PACKAGE(Sodium)
FIND_PACKAGE(mbedTLS)
Expand Down Expand Up @@ -87,6 +88,12 @@ ELSE()
MESSAGE(STATUS "* Lua: MISSING *")
ENDIF()

IF(LuaJit_FOUND)
MESSAGE(STATUS "* LuaJIT: FOUND *")
ELSE()
MESSAGE(STATUS "* LuaJIT: MISSING *")
ENDIF()

IF(PerlLibs_FOUND)
MESSAGE(STATUS "* Perl: FOUND *")
ELSE()
Expand Down Expand Up @@ -122,6 +129,7 @@ OPTION(EQEMU_BUILD_LOGIN "Build the login server." ON)
OPTION(EQEMU_BUILD_HC "Build the headless client." OFF)
OPTION(EQEMU_BUILD_TESTS "Build utility tests." OFF)
OPTION(EQEMU_BUILD_CLIENT_FILES "Build Client Import/Export Data Programs." ON)
OPTION(EQEMU_PREFER_LUA "Build with normal Lua even if LuaJIT is found." OFF)

IF(EQEMU_COMMANDS_LOGGING)
ADD_DEFINITIONS(-DCOMMANDS_LOGGING)
Expand Down Expand Up @@ -212,7 +220,12 @@ ELSE()
SET(SODIUM_LIBRARY_ENABLED OFF)
ENDIF()

IF(Lua51_FOUND)
IF(LUAJIT_FOUND AND NOT (EQEMU_PREFER_LUA AND Lua51_FOUND))
SET(LUA_LIBRARY_TYPE " LuaJIT")
SET(LUA_LIBRARY_ENABLED ON)
SET(LUA_LIBRARY_LIBS ${LUAJIT_LIBRARY} luabind)
SET(LUA_LIBRARY_INCLUDE ${LUAJIT_INCLUDE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/libs/luabind")
ELSEIF(Lua51_FOUND )
SET(LUA_LIBRARY_TYPE " Lua 5.1")
SET(LUA_LIBRARY_ENABLED ON)
SET(LUA_LIBRARY_LIBS ${LUA_LIBRARY} luabind)
Expand All @@ -239,6 +252,7 @@ IF(ZLIB_FOUND)
SET(ZLIB_LIBRARY_TYPE "zlib-ng")
SET(ZLIB_LIBRARY_LIBS "zlibstatic")
SET(ZLIB_LIBRARY_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/libs/zlibng")
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_BINARY_DIR}/libs/zlibng")
ELSE()
SET(ZLIB_LIBRARY_TYPE " zlib")
SET(ZLIB_LIBRARY_LIBS ${ZLIB_LIBRARY})
Expand Down
4 changes: 2 additions & 2 deletions appveyor-bots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ build:
verbosity: minimal
after_build:
- cmd: >-
7z a build_x64-bots.zip C:\projects\eqemu\build\bin\RelWithDebInfo\*.exe C:\projects\eqemu\build\bin\RelWithDebInfo\*.dll C:\projects\eqemu\build\bin\RelWithDebInfo\*.pdb
7z a build_x64-bots.zip C:\projects\eqemu\build\bin\RelWithDebInfo\*.exe C:\projects\eqemu\build\bin\RelWithDebInfo\*.dll C:\projects\eqemu\build\bin\RelWithDebInfo\*.pdb C:\projects\eqemu\build\libs\zlibng\RelWithDebInfo\*.dll

appveyor PushArtifact build_x64-bots.zip
appveyor PushArtifact build_x64-bots.zip
4 changes: 2 additions & 2 deletions appveyor-no-bots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ build:
verbosity: minimal
after_build:
- cmd: >-
7z a build_x64-no-bots.zip C:\projects\eqemu\build\bin\RelWithDebInfo\*.exe C:\projects\eqemu\build\bin\RelWithDebInfo\*.dll C:\projects\eqemu\build\bin\RelWithDebInfo\*.pdb
7z a build_x64-no-bots.zip C:\projects\eqemu\build\bin\RelWithDebInfo\*.exe C:\projects\eqemu\build\bin\RelWithDebInfo\*.dll C:\projects\eqemu\build\bin\RelWithDebInfo\*.pdb C:\projects\eqemu\build\libs\zlibng\RelWithDebInfo\*.dll

appveyor PushArtifact build_x64-no-bots.zip
appveyor PushArtifact build_x64-no-bots.zip
4 changes: 2 additions & 2 deletions cmake/FindLua51.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ locations other than lua/
find_path(LUA_INCLUDE_DIR lua.h
HINTS
ENV LUA_DIR
PATH_SUFFIXES include/lua51 include/lua5.1 include/lua-5.1 include/lua include/luajit include
PATH_SUFFIXES include/lua51 include/lua5.1 include/lua-5.1 include/lua include
PATHS
~/Library/Frameworks
/Library/Frameworks
Expand All @@ -49,7 +49,7 @@ find_path(LUA_INCLUDE_DIR lua.h
)

find_library(LUA_LIBRARY
NAMES lua51 lua5.1 lua-5.1 lua luajit
NAMES lua51 lua5.1 lua-5.1 lua
HINTS
ENV LUA_DIR
PATH_SUFFIXES lib
Expand Down
91 changes: 91 additions & 0 deletions cmake/FindLuaJit.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# Modified from the FindLua51 that comes with CMake

#[=======================================================================[.rst:
FindLuaJit
---------



Locate LuaJit library This module defines

::

LUAJIT_FOUND, if false, do not try to link to Lua
LUAJIT_LIBRARIES
LUAJIT_INCLUDE_DIR, where to find lua.h
LUAJIT_VERSION_STRING, the version of Lua found (since CMake 2.8.8)



Note that the expected include convention is

::

#include "lua.h"

and not

::

#include <lua/lua.h>

This is because, the lua location is not standardized and may exist in
locations other than lua/
#]=======================================================================]

find_path(LUAJIT_INCLUDE_DIR lua.h
HINTS
ENV LUA_DIR
PATH_SUFFIXES include/luajit include/luajit-2.0 include/luajit-2.1 include
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)

find_library(LUAJIT_LIBRARY
NAMES luajit51 luajit5.1 luajit-5.1 luajit lua51
HINTS
ENV LUA_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
)

if(LUAJIT_LIBRARY)
# include the math library for Unix
if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
find_library(LUAJIT_MATH_LIBRARY m)
set( LUAJIT_LIBRARIES "${LUAJIT_LIBRARY};${LUAJIT_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
else()
set( LUAJIT_LIBRARIES "${LUAJIT_LIBRARY}" CACHE STRING "Lua Libraries")
endif()
endif()

if(LUAJIT_INCLUDE_DIR AND EXISTS "${LUAJIT_INCLUDE_DIR}/lua.h")
file(STRINGS "${LUAJIT_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")

string(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUAJIT_VERSION_STRING "${lua_version_str}")
unset(lua_version_str)
endif()

include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
# handle the QUIETLY and REQUIRED arguments and set LUAJIT_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJit
REQUIRED_VARS LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR
VERSION_VAR LUAJIT_VERSION_STRING)

mark_as_advanced(LUAJIT_INCLUDE_DIR LUAJIT_LIBRARIES LUAJIT_LIBRARY LUAJIT_MATH_LIBRARY)

14 changes: 12 additions & 2 deletions common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ SET(repositories
repositories/base/base_character_currency_repository.h
repositories/base/base_character_data_repository.h
repositories/base/base_character_disciplines_repository.h
repositories/base/base_character_expedition_lockouts_repository.h
repositories/base/base_character_inspect_messages_repository.h
repositories/base/base_character_item_recast_repository.h
repositories/base/base_character_languages_repository.h
Expand All @@ -166,11 +167,16 @@ SET(repositories
repositories/base/base_char_recipe_list_repository.h
repositories/base/base_completed_tasks_repository.h
repositories/base/base_content_flags_repository.h
repositories/base/base_damageshieldtypes_repository.h
repositories/base/base_data_buckets_repository.h
repositories/base/base_db_str_repository.h
repositories/base/base_discovered_items_repository.h
repositories/base/base_doors_repository.h
repositories/base/base_dynamic_zones_repository.h
repositories/base/base_eventlog_repository.h
repositories/base/base_expeditions_repository.h
repositories/base/base_expedition_lockouts_repository.h
repositories/base/base_expedition_members_repository.h
repositories/base/base_faction_base_data_repository.h
repositories/base/base_faction_list_repository.h
repositories/base/base_faction_list_mod_repository.h
Expand Down Expand Up @@ -267,7 +273,6 @@ SET(repositories
repositories/base/base_traps_repository.h
repositories/base/base_tributes_repository.h
repositories/base/base_tribute_levels_repository.h
repositories/base/base_variables_repository.h
repositories/base/base_veteran_reward_templates_repository.h
repositories/base/base_zone_repository.h
repositories/base/base_zone_points_repository.h
Expand Down Expand Up @@ -306,6 +311,7 @@ SET(repositories
repositories/character_currency_repository.h
repositories/character_data_repository.h
repositories/character_disciplines_repository.h
repositories/character_expedition_lockouts_repository.h
repositories/character_inspect_messages_repository.h
repositories/character_item_recast_repository.h
repositories/character_languages_repository.h
Expand All @@ -324,11 +330,16 @@ SET(repositories
repositories/char_recipe_list_repository.h
repositories/completed_tasks_repository.h
repositories/content_flags_repository.h
repositories/damageshieldtypes_repository.h
repositories/data_buckets_repository.h
repositories/db_str_repository.h
repositories/discovered_items_repository.h
repositories/doors_repository.h
repositories/dynamic_zones_repository.h
repositories/eventlog_repository.h
repositories/expeditions_repository.h
repositories/expedition_lockouts_repository.h
repositories/expedition_members_repository.h
repositories/faction_base_data_repository.h
repositories/faction_list_repository.h
repositories/faction_list_mod_repository.h
Expand Down Expand Up @@ -425,7 +436,6 @@ SET(repositories
repositories/traps_repository.h
repositories/tributes_repository.h
repositories/tribute_levels_repository.h
repositories/variables_repository.h
repositories/veteran_reward_templates_repository.h
repositories/zone_repository.h
repositories/zone_points_repository.h
Expand Down
14 changes: 14 additions & 0 deletions common/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,20 @@ bool Database::SetMQDetectionFlag(const char* accountname, const char* character
return results.RowsAffected() != 0;
}

bool Database::SetMQDetectionFlag(const char* accountname, const char* charactername, const std::string &hacked, const char* zone) {
//Utilize the "hacker" table, but also give zone information.
auto query = fmt::format("INSERT INTO hackers(account, name, hacked, zone) values('{}', '{}', '{}', '{}')",
accountname, charactername, hacked, zone);
auto results = QueryDatabase(query);

if (!results.Success())
{
return false;
}

return results.RowsAffected() != 0;
}

uint8 Database::GetRaceSkill(uint8 skillid, uint8 in_race)
{
uint16 race_cap = 0;
Expand Down
19 changes: 1 addition & 18 deletions common/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,6 @@ namespace EQ
class InventoryProfile;
}

struct EventLogDetails_Struct {
uint32 id;
char accountname[64];
uint32 account_id;
int16 status;
char charactername[64];
char targetname[64];
char timestamp[64];
char descriptiontype[64];
char details[128];
};

struct CharacterEventLog_Struct {
uint32 count;
uint8 eventid;
EventLogDetails_Struct eld[255];
};

struct npcDecayTimes_Struct {
uint16 minlvl;
uint16 maxlvl;
Expand Down Expand Up @@ -128,6 +110,7 @@ class Database : public DBcore {
bool SaveCharacterCreate(uint32 character_id, uint32 account_id, PlayerProfile_Struct *pp);
bool SetHackerFlag(const char *accountname, const char *charactername, const char *hacked);
bool SetMQDetectionFlag(const char *accountname, const char *charactername, const char *hacked, const char *zone);
bool SetMQDetectionFlag(const char *accountname, const char *charactername, const std::string &hacked, const char *zone);
bool UpdateName(const char *oldname, const char *newname);
bool CopyCharacter(
std::string source_character_name,
Expand Down
2 changes: 1 addition & 1 deletion common/database_instances.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ void Database::FlagInstanceByGroupLeader(uint32 zone, int16 version, uint32 char

char ln[128];
memset(ln, 0, 128);
strcpy(ln, GetGroupLeadershipInfo(gid, ln));
GetGroupLeadershipInfo(gid, ln);
uint32 l_charid = GetCharacterID((const char*)ln);
uint16 l_id = GetInstanceID(zone, l_charid, version);

Expand Down
8 changes: 4 additions & 4 deletions common/dbcore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ bool DBcore::Open(
)
{
LockMutex lock(&MDatabase);
safe_delete(pHost);
safe_delete(pUser);
safe_delete(pPassword);
safe_delete(pDatabase);
safe_delete_array(pHost);
safe_delete_array(pUser);
safe_delete_array(pPassword);
safe_delete_array(pDatabase);
pHost = strcpy(new char[strlen(iHost) + 1], iHost);
pUser = strcpy(new char[strlen(iUser) + 1], iUser);
pPassword = strcpy(new char[strlen(iPassword) + 1], iPassword);
Expand Down
4 changes: 2 additions & 2 deletions common/eq_limits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ void EQ::inventory::InitializeDynamicLookups() {
continue;

// direct manipulation of lookup indices is safe so long as (int)ClientVersion::<mob> == (int)MobVersion::<mob>
inventory_dynamic_nongm_lookup_entries[iter] = std::unique_ptr<LookupEntry>(new LookupEntry(inventory_static_lookup_entries[iter]));
inventory_dynamic_nongm_lookup_entries[iter] = std::make_unique<LookupEntry>(inventory_static_lookup_entries[iter]);

// clamp affected fields to the lowest standard
inventory_dynamic_nongm_lookup_entries[iter]->InventoryTypeSize.Bank = Titanium::invtype::BANK_SIZE; // bank size
Expand Down Expand Up @@ -864,7 +864,7 @@ void EQ::inventory::InitializeDynamicLookups() {
}

// direct manipulation of lookup indices is safe so long as (int)ClientVersion::<client> == (int)MobVersion::<client>
inventory_dynamic_gm_lookup_entries[iter] = std::unique_ptr<LookupEntry>(new LookupEntry(inventory_static_lookup_entries[iter]));
inventory_dynamic_gm_lookup_entries[iter] = std::make_unique<LookupEntry>(inventory_static_lookup_entries[iter]);

inventory_dynamic_gm_lookup_entries[iter]->PossessionsBitmask = 0; // we'll fix later
inventory_dynamic_gm_lookup_entries[iter]->CorpseBitmask = 0; // we'll fix later
Expand Down
2 changes: 0 additions & 2 deletions common/eqemu_logsys.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ namespace Logs {
Loot,
Expeditions,
DynamicZones,
Group,
MaxCategoryID /* Don't Remove this */
};

Expand Down Expand Up @@ -200,7 +199,6 @@ namespace Logs {
"Loot",
"Expeditions",
"DynamicZones",
"Group",
};
}

Expand Down
2 changes: 1 addition & 1 deletion common/event/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace EQ {
void Stop() {
if (m_timer) {
uv_close((uv_handle_t*)m_timer, [](uv_handle_t* handle) {
delete handle;
delete (uv_timer_t *)handle;
});
m_timer = nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion common/net/console_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

EQ::Net::ConsoleServer::ConsoleServer(const std::string &addr, int port)
{
m_server.reset(new EQ::Net::TCPServer());
m_server = std::make_unique<EQ::Net::TCPServer>();
m_server->Listen(addr, port, false, [this](std::shared_ptr<EQ::Net::TCPConnection> connection) {
ConsoleServerConnection *c = new ConsoleServerConnection(this, connection);
m_connections.insert(std::make_pair(c->GetUUID(), std::unique_ptr<ConsoleServerConnection>(c)));
Expand Down
2 changes: 1 addition & 1 deletion common/net/servertalk_client_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "../eqemu_logsys.h"

EQ::Net::ServertalkClient::ServertalkClient(const std::string &addr, int port, bool ipv6, const std::string &identifier, const std::string &credentials)
: m_timer(std::unique_ptr<EQ::Timer>(new EQ::Timer(100, true, std::bind(&EQ::Net::ServertalkClient::Connect, this))))
: m_timer(std::make_unique<EQ::Timer>(100, true, std::bind(&EQ::Net::ServertalkClient::Connect, this)))
{
m_port = port;
m_ipv6 = ipv6;
Expand Down
2 changes: 1 addition & 1 deletion common/net/servertalk_legacy_client_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "../eqemu_logsys.h"

EQ::Net::ServertalkLegacyClient::ServertalkLegacyClient(const std::string &addr, int port, bool ipv6)
: m_timer(std::unique_ptr<EQ::Timer>(new EQ::Timer(100, true, std::bind(&EQ::Net::ServertalkLegacyClient::Connect, this))))
: m_timer(std::make_unique<EQ::Timer>(100, true, std::bind(&EQ::Net::ServertalkLegacyClient::Connect, this)))
{
m_port = port;
m_ipv6 = ipv6;
Expand Down
Loading