aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--src/communication.cc3
-rw-r--r--src/crskill.cc4
3 files changed, 5 insertions, 6 deletions
diff --git a/README.md b/README.md
index 3b574a8..05c0f78 100644
--- a/README.md
+++ b/README.md
@@ -5,9 +5,9 @@ This is the result of manually decompiling the leaked Tibia 7.7 server binary in
The legal status of decompiled and rewritten code is a gray area. While the project contains no original assets or code, CipSoft may still view this as a violation of their claimed intellectual property rights, due to the original binary not being willfully released. As the author, I release this code into the public domain, relinquishing all rights and claims to it (see `LICENSE.txt`).
## Changes
-- The most important change was fixing thread interations. The original binary relied on some old Linux threading library, most likely LinuxThreads, which assigned different process ids to different threads, among other quirks. The fix is small and contained in commit d359c0a.
+- The most important change was fixing thread interactions. The original binary relied on some old Linux threading library, most likely LinuxThreads, which assigned different process ids to different threads, among other quirks. The fix is small and contained in commit d359c0a.
-- Custom RSA routines were replaced with OpenSSL's libcrypto. I didn't bother to translate the decompiled routines because it would be annoying to get write and could end up with security issues. This introduces the **ONLY** dependency required to compile but is fairly simple to get it installed on most Linux distros. For example, on Debian you can use `apt install libssl-dev`.
+- Custom RSA routines were replaced with OpenSSL's libcrypto. I didn't bother to translate the decompiled routines because it would be annoying to get right and could end up with security issues. This introduces the **ONLY** dependency required to compile but is fairly simple to get it installed on most Linux distros. For example, on Debian you can use `apt install libssl-dev`.
## Future
I had a small *TODO* list with a few things to attempt after the server was up and running but I think that trying to modernize it further or get it to run on Windows wouldn't really add any value, plus it would probably require a lot of extra time. My commitment is to fix all reported bugs and perhaps string handling/building which is kind of a disaster. Exceptions are already too engraved into the codebase, to the point it would make more sense to rewrite everything without them rather than attempting to remove them.
diff --git a/src/communication.cc b/src/communication.cc
index b373900..af5b171 100644
--- a/src/communication.cc
+++ b/src/communication.cc
@@ -926,7 +926,8 @@ bool HandleLogin(TConnection *Connection){
#if TIBIA772
// IMPORTANT(fusion): With 7.72, the terminal type and version are brought
// outside the asymmetric data. This is probably to maintain some level of
- // backwards compatibility, given that 7.7 was the first encrypted protocol.
+ // backwards compatibility with versions before 7.7, given that it was the
+ // first encrypted protocol.
TerminalType = (int)InputBuffer.readWord();
TerminalVersion = (int)InputBuffer.readWord();
#endif
diff --git a/src/crskill.cc b/src/crskill.cc
index 27655a9..e098b25 100644
--- a/src/crskill.cc
+++ b/src/crskill.cc
@@ -669,9 +669,7 @@ void TSkillAdd::Advance(int Range){
int Max = this->Max + Increment;
int Act = this->Act + Increment;
- // TODO(fusion): I'm not sure this is right. Do we fill health and mana when
- // the player levels up?
- if(Act < Max){
+ if(Act > Max){
Act = Max;
}