-
Notifications
You must be signed in to change notification settings - Fork 178
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
Feature: RapidTransport, check for cooldown and handle payment #331
base: develop
Are you sure you want to change the base?
Conversation
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.
Too many magic numbers, also rebase would be neato
Source/NexusForever.WorldServer/Game/Spell/SpellEffectHandler.cs
Outdated
Show resolved
Hide resolved
Source/NexusForever.WorldServer/Game/Spell/SpellEffectHandler.cs
Outdated
Show resolved
Hide resolved
Source/NexusForever.WorldServer/Network/Message/Handler/CharacterHandler.cs
Outdated
Show resolved
Hide resolved
Source/NexusForever.WorldServer/Network/Message/Handler/CharacterHandler.cs
Outdated
Show resolved
Hide resolved
Source/NexusForever.WorldServer/Network/Message/Handler/CharacterHandler.cs
Outdated
Show resolved
Hide resolved
Source/NexusForever.WorldServer/Network/Message/Handler/CharacterHandler.cs
Outdated
Show resolved
Hide resolved
Source/NexusForever.WorldServer/Network/Message/Handler/CharacterHandler.cs
Outdated
Show resolved
Hide resolved
Source/NexusForever.WorldServer/Network/Message/Handler/CharacterHandler.cs
Outdated
Show resolved
Hide resolved
612064d
to
d816411
Compare
@mifrgr Did you forget to add [GameData] to the TaxiRoute table in the GameTableManager? without adding that i cannot get this to work. |
Yeah, I did, thanks, I will edit this when I'm at home |
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.
All requested changes should be done now
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.
Validate before actions, not after them.
Source/NexusForever.WorldServer/Game/Spell/SpellEffectHandler.cs
Outdated
Show resolved
Hide resolved
Source/NexusForever.WorldServer/Network/Message/Handler/CharacterHandler.cs
Outdated
Show resolved
Hide resolved
Source/NexusForever.WorldServer/Network/Message/Handler/CharacterHandler.cs
Outdated
Show resolved
Hide resolved
|
||
|
||
//Check requirement for RapidTransport(ServiceToken) | ||
if (cooldown > 0 && session.AccountCurrencyManager.CanAfford(AccountCurrencyType.ServiceToken, serviceTokenPrice)) |
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.
cooldown
does not provide error message, is it intentional, because client should not be able to use it at when on cooldown, and informing "cheater" is not important? I think it is at least worth a comment.
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.
The opcode that the client sends is the same regardless of whether the spell is on cooldown or not. So even if a cheater tried to get the RT for money, the server would still deduct the service tokens because it checks whether the spell is on cooldown. Cheating would be completely pointless in this case.
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.
validations should be before performing the action
Source/NexusForever.WorldServer/Game/Spell/SpellEffectHandler.cs
Outdated
Show resolved
Hide resolved
cc51904
to
e291e4d
Compare
f5bb7da
to
bda7aef
Compare
bda7aef
to
a4fdaaf
Compare
8f09c5c
to
a82a0eb
Compare
2e9bc4e
to
4581660
Compare
From what I can see these checks should be handled in a prerequisite handler, id 269 is only used by spells 82922 and 82956. |
Added entry to load GameTable Clean up Add check for payment in the spell effect handler delete space Fix Build fail Rename for alternate use Rename after Check failed Use .NET library instead of creation function Delete space
4581660
to
b23c247
Compare
Handles payment and and check for cooldown. Thanks to Kirmmin for his help! And all the reviewers, too!