diff options
-rw-r--r-- | gameserver.cbp | 4 | ||||
-rw-r--r-- | src/account-server/accounthandler.cpp | 2 | ||||
-rw-r--r-- | src/game-server/character.cpp | 8 | ||||
-rw-r--r-- | src/game-server/character.h | 1 | ||||
-rw-r--r-- | src/game-server/inventory.cpp | 9 |
5 files changed, 16 insertions, 8 deletions
diff --git a/gameserver.cbp b/gameserver.cbp index f43ea4ac..7cffe21d 100644 --- a/gameserver.cbp +++ b/gameserver.cbp @@ -139,8 +139,8 @@ <Unit filename="src/game-server/commandhandler.h" /> <Unit filename="src/game-server/effect.cpp" /> <Unit filename="src/game-server/effect.h" /> - <Unit filename="src/game-server/emotemanager.cpp" /> - <Unit filename="src/game-server/emotemanager.h" /> + <Unit filename="src/game-server/emotemanager.cpp" /> + <Unit filename="src/game-server/emotemanager.h" /> <Unit filename="src/game-server/entity.cpp" /> <Unit filename="src/game-server/entity.h" /> <Unit filename="src/game-server/eventlistener.h" /> diff --git a/src/account-server/accounthandler.cpp b/src/account-server/accounthandler.cpp index a9905f7f..c1de5200 100644 --- a/src/account-server/accounthandler.cpp +++ b/src/account-server/accounthandler.cpp @@ -346,7 +346,7 @@ void AccountHandler::handleLoginMessage(AccountClient &client, MessageIn &msg) // Check whether the last login attempt for this IP is still too fresh const int address = client.getIP(); - const time_t now = time(nullptr); + const time_t now = time(NULL); IPsToTime::const_iterator it = mLastLoginAttemptForIP.find(address); if (it != mLastLoginAttemptForIP.end()) { diff --git a/src/game-server/character.cpp b/src/game-server/character.cpp index 52cc73f9..b16d3977 100644 --- a/src/game-server/character.cpp +++ b/src/game-server/character.cpp @@ -49,10 +49,10 @@ #include <limits.h> // Experience curve related values -const float CharacterComponent::EXPCURVE_EXPONENT = 3.0f; -const float CharacterComponent::EXPCURVE_FACTOR = 10.0f; -const float CharacterComponent::LEVEL_SKILL_PRECEDENCE_FACTOR = 0.75f; -const float CharacterComponent::EXP_LEVEL_FLEXIBILITY = 1.0f; +const float CharacterComponent::EXPCURVE_EXPONENT = 2.5f; +const float CharacterComponent::EXPCURVE_FACTOR = 20.0f; +const float CharacterComponent::LEVEL_SKILL_PRECEDENCE_FACTOR = 0.85f; +const float CharacterComponent::EXP_LEVEL_FLEXIBILITY = 3.0f; Script::Ref CharacterComponent::mDeathCallback; Script::Ref CharacterComponent::mDeathAcceptedCallback; diff --git a/src/game-server/character.h b/src/game-server/character.h index 704122db..a6ea6db4 100644 --- a/src/game-server/character.h +++ b/src/game-server/character.h @@ -469,6 +469,7 @@ class CharacterComponent : public Component sigc::signal<void, Entity &> signal_disconnected; + private: bool specialUseCheck(SpecialMap::iterator it); diff --git a/src/game-server/inventory.cpp b/src/game-server/inventory.cpp index bec5961b..e33e94a1 100644 --- a/src/game-server/inventory.cpp +++ b/src/game-server/inventory.cpp @@ -224,7 +224,14 @@ unsigned Inventory::insert(unsigned itemId, unsigned amount) break; } - item->useTrigger(mCharacter, ITT_IN_INVY); + if (item) + { + // EVIL HACK!! This allows to prevent sending the item to client. + // We need this hack for money items in lpc! + // REVERT THIS AS SOON AS POSSIBLE + if (item->useTrigger(mCharacter, ITT_IN_INVY)) + return amount; + } // Send that first, before checking potential removals if (invMsg.getLength() > 2) |