Skip to content

Commit

Permalink
Catching up (#1277)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
7 people committed Mar 1, 2021
1 parent 41ffd95 commit 8ba18d9
Show file tree
Hide file tree
Showing 470 changed files with 34,802 additions and 25,508 deletions.
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 @@ -150,6 +150,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 @@ -168,11 +169,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 @@ -269,7 +275,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 @@ -308,6 +313,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 @@ -326,11 +332,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 @@ -427,7 +438,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
1 change: 1 addition & 0 deletions common/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,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
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 @@ -856,7 +856,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 @@ -927,7 +927,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/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
2 changes: 1 addition & 1 deletion common/net/servertalk_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void EQ::Net::ServertalkServer::Listen(const ServertalkServerOptions& opts)
m_encrypted = opts.encrypted;
m_credentials = opts.credentials;
m_allow_downgrade = opts.allow_downgrade;
m_server.reset(new EQ::Net::TCPServer());
m_server = std::make_unique<EQ::Net::TCPServer>();
m_server->Listen(opts.port, opts.ipv6, [this](std::shared_ptr<EQ::Net::TCPConnection> connection) {
m_unident_connections.push_back(std::make_shared<ServertalkServerConnection>(connection, this, m_encrypted, m_allow_downgrade));
});
Expand Down
8 changes: 4 additions & 4 deletions common/net/websocket_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ struct EQ::Net::WebsocketServer::Impl

EQ::Net::WebsocketServer::WebsocketServer(const std::string &addr, int port)
{
_impl.reset(new Impl());
_impl->server.reset(new EQ::Net::TCPServer());
_impl = std::make_unique<Impl>();
_impl->server = std::make_unique<EQ::Net::TCPServer>();
_impl->server->Listen(addr, port, false, [this](std::shared_ptr<EQ::Net::TCPConnection> connection) {
auto wsc = _impl->ws_server.get_connection();
WebsocketServerConnection *c = new WebsocketServerConnection(this, connection, wsc);
Expand All @@ -53,7 +53,7 @@ EQ::Net::WebsocketServer::WebsocketServer(const std::string &addr, int port)
return websocketpp::lib::error_code();
});

_impl->ping_timer.reset(new EQ::Timer(5000, true, [this](EQ::Timer *t) {
_impl->ping_timer = std::make_unique<EQ::Timer>(5000, true, [this](EQ::Timer *t) {
auto iter = _impl->connections.begin();

while (iter != _impl->connections.end()) {
Expand All @@ -67,7 +67,7 @@ EQ::Net::WebsocketServer::WebsocketServer(const std::string &addr, int port)

iter++;
}
}));
});

_impl->methods.insert(std::make_pair("login", MethodHandlerEntry(std::bind(&WebsocketServer::Login, this, std::placeholders::_1, std::placeholders::_2), 0)));
_impl->methods.insert(std::make_pair("subscribe", MethodHandlerEntry(std::bind(&WebsocketServer::Subscribe, this, std::placeholders::_1, std::placeholders::_2), 0)));
Expand Down
2 changes: 1 addition & 1 deletion common/net/websocket_server_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ EQ::Net::WebsocketServerConnection::WebsocketServerConnection(WebsocketServer *p
std::shared_ptr<TCPConnection> connection,
std::shared_ptr<websocket_connection> ws_connection)
{
_impl.reset(new Impl());
_impl = std::make_unique<Impl>();
_impl->parent = parent;
_impl->connection = connection;
_impl->id = EQ::Util::UUID::Generate().ToString();
Expand Down
Loading

0 comments on commit 8ba18d9

Please sign in to comment.