-
Notifications
You must be signed in to change notification settings - Fork 82
Implement Pickpocket meso drops and fix Mesos Explosion #257
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
Conversation
channel/pools.go
Outdated
| } | ||
|
|
||
| dropPos := pool.instance.calculateFinalDropPos(v.pos) | ||
| pool.dropPool.createDrop(dropSpawnNormal, dropTimeoutNonOwner, mesoAmount, dropPos, true, damager.ID, 0) |
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.
@Hucaru for some reason this drop is raining from the sky vs dropping from monster pos as normal drops do. Any idea what's wrong?
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'm not sure I follow exactly. Is it acting like Ludi bonus stage drop? Or is the drop starting in the sky instead of the ground? Are you able to post a screenshot so I can see the problem?
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.
Yeah, it falls from the top of the screen.
https://prnt.sc/6GrltJCe5E7V
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.
can you test with this set to zero https://github.com/Hucaru/Valhalla/blob/master/channel/field.go#L1041 ? I suspect this is passing a cross product check in the foothold above code for a foothold it shouldn't
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 attempted with that and it's still raining. The drop seems to be making it to the correct foothold, however, the animation isn't right.
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 looks like the drop is coming from a single mob and spreading to all that are hit? I'm assuming this mob is likely the first in the slice, but we are using the indexed position so that doesn't really make sense?
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 think this might happen when there is a mob that shares the same spawn id as the character on the map.
A quick check would be to to have 2 characters with low id's e.g. 1 and 2 and see if when pickpocket is enabled the drops originate from different monsters. When creating the mesos from pickpocket print the mob spawn id you are hitting and find the origin mob and confirm it has the same id as the character.
A quick hack solution would be to start indexing character id's in the database at 1000 cycle mob IDs up to 1000 instead of max int32. This is very dirty and should just be a final resort.
I think the reason this doesn't happen when a mob dies is because we remove the mob before me make the drop.
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.
If this ends up being the issue don't fix in this PR as player character storage in server might need a rework to be part of life pool
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.
Yeah it seems to mostly work fine with any character past the first index.
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.
Ok, then leave it for now and raise a bug ticket to keep track of it. Exact conditions need to be determined before a proper fix can be determined.
This pull request implements a complete and accurate server-side calculation for the Meso Explosion skill, ensuring that damage is based on the actual mesos consumed and using the official formula. It also adds a correct implementation for the Pickpocket skill, allowing mesos to drop from mobs when the skill procs. Additionally, constants for Meso Explosion's damage formula are now centralized, and client-reported damages are validated to prevent abuse.
Meso Explosion Skill Calculation:
channel/damage_calc.go,channel/handlers_client.go,constant/damage.go) [1] [2] [3] [4] [5].constant/damage.gofor maintainability and clarity.Pickpocket Skill Implementation:
channel/pools.go).Client Damage Validation:
channel/damage_calc.go,channel/handlers_client.go) [1] [2].