diff --git a/path_7_7/src/CMakeLists.txt b/path_7_7/src/CMakeLists.txt index c3d3cd240..6d3bd3f90 100644 --- a/path_7_7/src/CMakeLists.txt +++ b/path_7_7/src/CMakeLists.txt @@ -59,6 +59,7 @@ set(tfs_SRC ${CMAKE_CURRENT_LIST_DIR}/scheduler.cpp ${CMAKE_CURRENT_LIST_DIR}/scriptmanager.cpp ${CMAKE_CURRENT_LIST_DIR}/server.cpp + ${CMAKE_CURRENT_LIST_DIR}/signals.cpp ${CMAKE_CURRENT_LIST_DIR}/spawn.cpp ${CMAKE_CURRENT_LIST_DIR}/spells.cpp ${CMAKE_CURRENT_LIST_DIR}/talkaction.cpp diff --git a/path_7_7/src/game.h b/path_7_7/src/game.h index 67af74b9a..076fd7203 100644 --- a/path_7_7/src/game.h +++ b/path_7_7/src/game.h @@ -466,6 +466,9 @@ class Game Item* getUniqueItem(uint16_t uniqueId); bool addUniqueItem(uint16_t uniqueId, Item* item); void removeUniqueItem(uint16_t uniqueId); + void reloadCommands() { + commands.reload(); + } bool hasEffect(uint8_t effectId); bool hasDistanceEffect(uint8_t effectId); diff --git a/path_7_7/src/itemloader.h b/path_7_7/src/itemloader.h index cd55a50c6..d30d24cfe 100644 --- a/path_7_7/src/itemloader.h +++ b/path_7_7/src/itemloader.h @@ -52,12 +52,6 @@ enum clientVersion_t { CLIENT_VERSION_770 = 3, CLIENT_VERSION_771 = 3, CLIENT_VERSION_772 = 3, - CLIENT_VERSION_780 = 4, - CLIENT_VERSION_790 = 5, - CLIENT_VERSION_792 = 6, - CLIENT_VERSION_800 = 7, - CLIENT_VERSION_810 = 8, - CLIENT_VERSION_811 = 9, }; enum rootattrib_ { diff --git a/path_7_7/src/player.cpp b/path_7_7/src/player.cpp index 8f3961946..550ecc29c 100644 --- a/path_7_7/src/player.cpp +++ b/path_7_7/src/player.cpp @@ -67,6 +67,10 @@ Player::~Player() it.second->decrementReferenceCounter(); } + for (const auto& it : rewardMap) { + it.second->decrementReferenceCounter(); + } + inbox->decrementReferenceCounter(); setWriteItem(nullptr); diff --git a/path_7_7/src/signals.cpp b/path_7_7/src/signals.cpp index fc66c299e..8e5acfc15 100644 --- a/path_7_7/src/signals.cpp +++ b/path_7_7/src/signals.cpp @@ -124,6 +124,9 @@ void Signals::sighupHandler() g_config.reload(); std::cout << "Reloaded config." << std::endl; + g_game.reloadCommands(); + std::cout << "Reloaded commands." << std::endl; + g_creatureEvents->reload(); std::cout << "Reloaded creature scripts." << std::endl;