-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Version 12.71 update #3748
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
Version 12.71 update #3748
Conversation
logging in now possible both ways - legacy and webService\nClient 12 will crash on login because the server still sends 10.98 packets.
Not necessary unless you run multiworld loginserver. Not present in current tfs either.
updated otb to version 12. You need special spr/dat to play with 10.98 now. Client 12 will still crash in most situations.
Version 12 is ready for testing. To log in, use Znote AAC with this change applied: Please post bugs if you find any. Known bugs:
Known missing features:
Things to adjust:
|
I would just like to say that you try to make both items.otb the same 🙏🏼 |
It looks like a great job! |
action bars and saved containers fully functional now |
@@ -356,16 +372,31 @@ void ProtocolGame::onRecvFirstMessage(NetworkMessage& msg) | |||
writeToOutputBuffer(opcodeMessage); | |||
} | |||
|
|||
msg.skipBytes(1); // gamemaster flag | |||
// Change packet verifying mode for QT clients | |||
if (version >= 1111 && operatingSystem >= CLIENTOS_QT_LINUX && operatingSystem <= CLIENTOS_QT_MAC) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we aren't allowing <= 1111, so I guess this check is redundant and checksum mode should be sequence by default, which would also delete enum for CHECKSUM_SEQUENCE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otclient compatible with protocol 1271 still uses adler32
version check is required to send "only x protocol allowed" message properly (it needs a proper header)
qt client was using checksums early too
wasn't otclient supposed to be the base client for tfs by the way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well then I would say otc should be fixed to act like qt client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well then I would say otc should be fixed to act like qt client.
Is there development on their behalf? OTC shouldn't block TFS but it would be nice to have them move together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been testing it for days already, everything fine so far
context for most recent commit: the "risky" symbol (the spark under guild emblem) is no longer used, the "helpers" packet got repurposed to show locker search results, which resulted in client crash when inviting to party. This commit fixed that. |
@@ -77,7 +77,7 @@ bool IOLoginData::loginserverAuthentication(const std::string& name, const std:: | |||
{ | |||
Database& db = Database::getInstance(); | |||
|
|||
DBResult_ptr result = db.storeQuery(fmt::format("SELECT `id`, `name`, `password`, `secret`, `type`, `premium_ends_at` FROM `accounts` WHERE `name` = {:s}", db.escapeString(name))); | |||
DBResult_ptr result = db.storeQuery(fmt::format("SELECT `id`, `name`, `password`, `secret`, `type`, `premium_ends_at` FROM `accounts` WHERE `name` = {:s} OR `email` = {:s}", db.escapeString(name), db.escapeString(name))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this faster than:
DBResult_ptr result = db.storeQuery(fmt::format("SELECT `id`, `name`, `password`, `secret`, `type`, `premium_ends_at` FROM `accounts` WHERE `name` = {:s} OR `email` = {:s}", db.escapeString(name), db.escapeString(name))); | |
DBResult_ptr result = db.storeQuery(fmt::format("SELECT `id`, `name`, `password`, `secret`, `type`, `premium_ends_at` FROM `accounts` WHERE {:s} IN(`name`, `email`)", db.escapeString(name))); |
IN statements saves us an db.escapestring, but perhaps it breaks index scanning?
Perhaps we should make an index that stores both name and email.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just store the result of db.escapeString
if you don't want to call it twice
@@ -104,8 +104,7 @@ bool IOLoginData::loginserverAuthentication(const std::string& name, const std:: | |||
uint32_t IOLoginData::gameworldAuthentication(const std::string& accountName, const std::string& password, std::string& characterName, std::string& token, uint32_t tokenTime) | |||
{ | |||
Database& db = Database::getInstance(); | |||
|
|||
DBResult_ptr result = db.storeQuery(fmt::format("SELECT `id`, `password`, `secret` FROM `accounts` WHERE `name` = {:s}", db.escapeString(accountName))); | |||
DBResult_ptr result = db.storeQuery(fmt::format("SELECT `id`, `password`, `secret` FROM `accounts` WHERE `name` = {:s} OR `email` = {:s}", db.escapeString(accountName), db.escapeString(accountName))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See suggestion iologindata.cpp#80
@@ -71,6 +71,8 @@ class Tile; | |||
static constexpr int32_t EVENT_CREATURECOUNT = 10; | |||
static constexpr int32_t EVENT_CREATURE_THINK_INTERVAL = 1000; | |||
static constexpr int32_t EVENT_CHECK_CREATURE_INTERVAL = (EVENT_CREATURE_THINK_INTERVAL / EVENT_CREATURECOUNT); | |||
static constexpr uint32_t CREATURE_ID_MIN = 0x10000000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this have to do with protocol 12? Should be a separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it actually does and I think he explained why, there were some changes regarding ids in new client I believe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is 74 commits in this commit history, 17+? of which are cleanups.
Since this is a big PR, we want to do a proper merge (this will give you credit for each commit instead of just one squashed one).
But we need each commit to be purpose specific and well explained, some commits could have a better description, some commits could be squashed together. (etc, 1 cleanup commit if any instead of 17, with a deeper description of what that involves).
A rebase against otland/master will remake these commits to follow after the latest commit in master branch, by using git rebase -i master
(after the local master branch is up to date with otland/master) you can resort the order of your commits, and by changing pick #hash
to squash #hash
will squash a commit to its previous commit.
I suggest you play around with this in a version12_c
branch, so this becomes a backup branch while your learning the ropes.
Normal rebase to get your commits after master: https://www.youtube.com/watch?v=f1wnYdLEpgI
In your branch, you have synced your branch to master, these commits are cluttered between your own feature branch commits, for instance the commits at october 23: https://github.com/Zbizu/forgottenserver/commits/version12_b
A regular rebase will make all the commits in your feature branch appear neatly organized after the commits in master. This is a pretty simple and straightforward.
Then we can do interactive rebase to reorder, edit and squash various commits in your branch: https://www.youtube.com/watch?v=ElRzTuYln0M
To make your branch commit history tidy, clean and ready for merge.
If you have any questions using git, ask away, I'm happy to help.
Rebasing 74 commits is quite a big challenge.
Why this PR was closed? I don't think #3784 should be merged as mostly work was done by Zbizu and not by Evil Puncker itself. If you don't want to squash all your commits by topics, I think (but I'm no one in this community, so my opinion may not be the same as the moderators) you could at least make a single commit with a proper description (similar to the description from this PR). You can do that doing git reset --soft origin/master and git commit again. Pretty easy (I'm sure you know it as you are an excellent programmer). |
@lucasgrizante I agree with you. But I think Zbizu closed this PR because he don't want to continue it. But perhaps he is working on a new branch to do the rebase or build a better commit structure. I did suggest to him to work on a |
Description
Work in progress. It's working but the code is nowhere near its final form. Treat it as a sketch, a proof of concept for now.Visit #3747 to take part of important decision regarding this change.The code is ready for testing! Details can be found in comments below.
Changes Proposed
10.98 backwards compatibilityThis feature was voted out.cid
)@admin
as your email btw or if you're running otclient, still use your account name)Issues addressed: #3492, followup to #3671
Credits
Special thanks to: