Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Same thing, but shorter.
|
|
Tested-by: jurkan.
Reviewed-by: Bertram.
|
|
These were unused parameters and one return type with an ignored 'const'
qualifier.
Reviewed-by: Yohann Ferreira
|
|
The level, character points and correction points are already
initialized by the Character constructor.
The ATTR_GP attribute is either not present, or obtained default value
from mDefaultAttributes. In both cases it makes no sense to set it to 0.
Reviewed-by: Yohann Ferreira
|
|
The account server sends out a random number, which is
additionally used for hashing the password.
Reviewed by Bertram
|
|
This resolves http://bugs.manasource.org/view.php?id=321
Reviewed-by: Jaxad0127, VUT
|
|
By default XML::Document will use the ResourceManager to resolve the
file name you pass to it. There is no point in disabling that
functionality only to resolve it manually.
Reviewed-by: Jared Adams
|
|
Just seems a bit more organized to me.
|
|
A bunch of variables that were continuously requested from the
configuration are now members of the AccountHandler.
Reviewed-by: Freeyorp
|
|
* Rely on the fact that a std::string is empty by default
* Use std::string::empty() rather than comparing to ""
* Construct with std::string() rather than from ""
Reviewed-by: Bertram
|
|
Nicer as members where there is clear ownership, initialization and
scope.
Reviewed-by: Freeyorp
|
|
Easier to understand than a std::pair with its 'first' and 'second'
members, and it also provides an implicit constructor so that
AttributeValue is implicitly constructed from a double.
Reviewed-by: Freeyorp
|
|
(trivial patch)
|
|
A C++ developer should be able to recognize a constructor and a
destructor by just looking at it, so let's stop writing down the
obvious. :)
|
|
Reviewed-by: Freeyorp.
|
|
As the protocol version isn't something the maintainers should
set, I removed the net_clientVersion irrelevant option, replaced
by the corresponding define PROTOCOL_VERSION
in the manaserv_protocol.h file.
A corresponding change in the client will be made.
N.B.: Now, the Enet version is also reported in the log.
Reviewed-by: Jaxad.
|
|
It was too close from the Position class and it leads to
making the server handle one or another type through the
code. Still bugged me many times while making changes.
Reviewed-by: Jaxad.
|
|
Trivial.
|
|
Resolves: Mana-Mantis #278.
|
|
I turned the vector storing character data into a map,
keeping the character's slot.
Fixed a memleak along the way.
Reviewed-by: Crush.
|
|
Changes:
============================================================
For the account server:
------------------------------------------------------------
Old -> New
------------------------------------------------------------
net_accountServerAddress,
net_listenHost -> net_accountHost
net_accountServerPort -> net_accountListenToClientPort
net_accountServerPort +1 -> net_accountListenToGamePort
For the game server:
------------------------------------------------------------
Old -> New
------------------------------------------------------------
net_gameServerAddress -> net_gameHost
net_gameServerPort -> net_gameListenToClientPort
For the chat server:
------------------------------------------------------------
Old -> New
------------------------------------------------------------
-> net_chatHost
net_accountServerPort + 2 -> net_chatListenToClientPort
Special fallback feature, as requested by Freeyorp:
When the net_accountListenToClientPort (default to 9601)
is set, the 3 others ports will automatically offset from it,
if they're not set, following this rule:
net_accountListenToGamePort = net_accountListenToClientPort + 1
net_chatListenToClientPort = net_accountListenToClientPort + 2
net_gameListenToClientPort = net_accountListenToClientPort + 3
Resolves: Mana-Mantis #216.
Reviewed-by: Jaxad0127.
|
|
Reviewed-by: Bertram
|
|
Reviewed-by: CodyMartin.
|
|
Also added an header to the autoattack.{h,cpp} files.
Big but trivial fix.
|
|
When registering or logging, The client is hashing the password
for sending it safely. And the server is hashing it also
to store it the same way. Hence, the password ends hashed twice,
which is correct because the server can't trust the client anyway.
At unregister attempt, the server wasn't hashing the password
before comparing it.
Also while on it, I made the corresponding SQL query use the try catch
method and only delete the account in memory when it's also done
on the Db.
Reviewed-by: thorbjorn, Freeyorp.
|
|
Mainly for consistency with the client, and the general consensus was
that these numbered versions were clearer.
|
|
This is for developing/testing an experimental new resource manager that
downloads only the files it needs on demand.
Currently only used by the Mana Mobile project. Regular Mana client
ignores the setting.
Reviewed-by: Jared Adams
|
|
Also made random code format clean-ups.
Resolves: Mana-Mantis #217
Reviewed-by: Jaxad0127.
|
|
Reviewed-by: Thorbjorn.
|
|
Also moved the trim() function into the utils namespace
where it belongs more, and made some random code cleanups.
Reviewed-by: Thorbjorn.
|
|
Reviewed-by: Freeyorp, Thorbjorn.
|
|
attributes and attribute respectively.
|
|
TODO: The game-server also needs to keep track of this for when new attributes
or attributes not in the default scope need to be created.
Also hopefully fix attribute calculation order for derived attributes. Still
hardcoded for now.
Reviewed-by: Bertram.
|
|
I also made it required to start properly since it's now the case.
Reviewed-by: Jaxad0127.
|
|
Attribute system:
Structure is no longer completely hardcoded. Attributes and structure is
defined by new xml file (defaulting to stats.xml)
Structure defines non-base modifications to an attribute, to be used by
modifiers from items, effects, etc.
Calculating the base value for core attributes is still done in C++ (and for
such fundamental elements the only reason I can think of to do it any other
way is perhaps being able to quickly change scripts without a compile could be
useful for testing, but such things are a low priority anyway)
Item structure:
Modifiers are now through triggers rather than single events. This also
removes hardcoded types - an item could be both able to be equipped and be
able to be activated.
Item activation no longer consumes by default, this must be specified by the
property <consumes /> inside the trigger.
Currently only attribute modifications, autoattacks, and consumes are defined
as effects, but stubs for others do exist. Autoattacks are currently
non-functional, and this should be rectified with some urgency.
Auto Attacks:
AutoAttacks are now separate entities, though not fully complete, nor fully
integrated with all beings yet. Integration with the Character class is
urgent, integration with other Being children less so.
When fully integrated this will allow for multiple autoattacks, through
equipping multiple items with this as an equip effect or even through other
means if needed.
Equipment structure:
As ItemClass types are no longer hardcoded, so too are equip types. An item
have multiple ways to be equipped across multiple equipment slots with any
number in each slot. Character maximums are global but configurable.
Miscellaneous:
Speed, money, and weight are now attributes.
Some managers have been changed into classes such that their associated
classes can have them as friends, to avoid (ab)use of public accessors.
The serialise procedure should also be set as a friend of Character (both in
the account- and game- server) as well; having public accessors returning
iterators is simply ridiculous.
Some start for such cleanups have been made, but this is not the primary focus
here. Significant work will need to be done before this is resolved
completely, but the start is there.
BuySell::registerPlayerItems() has been completely disabled temporarily. The
previous function iterated through equipment, yet in the context I think it is
intended to fill items? I have been unable to update this function to fit the
modifications made to the Inventory/Equipment/Possessions, as I am unsure what
exactly what it should be doing.
ItemClass::mSpriteId was previously unused, so had been removed, but I
notice that it was used when transmitting equipment to nearby clients.
Experimentation showed that this value was never set to anything other than
0, and so has been left out of the ItemManager rewrite.
I am not entirely sure what is happening here, but it should be worth looking
into at a later time, as I am not sure how equipment appearences would be sent
otherwise.
|
|
The client would otherwise not know which update host to use after
registration.
Also, the update host is now always sent, even if it is empty. This
makes the message contents more deterministic.
Reviewed-by: Jared Adams
|
|
|
|
dfc6875e - doesn't work out the way I planned.
|
|
using the permission manager in the account-server.
|
|
if defaultUpdateHost is not set
|
|
http://update.manasouce.org/ when non is set)
|
|
The only reason it was a DALStorage was because it used to implement the
Storage interface, but that interface got removed a long time ago.
|
|
Also updated the headers to refer to the GPL by URL instead of
suggesting to contact the FSF by snail mail, as per the latest
GPL usage instructions.
|
|
|
|
|
|
support
|
|
|
|
defines.h, and removing some overheading along the way.
|
|
The previous method was broken because it set the "last time" to the
current time when the client connected. So login would fail when the
username and password were sent within a second from connecting, which
is not desirable.
If I'd have fixed this by setting the "last time" to login time minus
one second, then an attacker would just need to reconnect for each login
attempt. So now it uses an IP address based approach, where each IP can
only try to log in once per second.
|