Skip to content

Prevent users from buying more than they can retreive.#223

Merged
Suprcode merged 1 commit into
Suprcode:masterfrom
ryantaplin:Patches
Nov 21, 2016
Merged

Prevent users from buying more than they can retreive.#223
Suprcode merged 1 commit into
Suprcode:masterfrom
ryantaplin:Patches

Conversation

@ryantaplin
Copy link
Copy Markdown

No description provided.

@Suprcode
Copy link
Copy Markdown
Owner

i dont understand these changes. why are you limiting purchase quantity to 99, and what is this line trying to do?

if (((decimal)(Quantity * Product.Count) / Product.Info.StackSize) > 5) return;

why 5?

@ryantaplin
Copy link
Copy Markdown
Author

ryantaplin commented Nov 19, 2016

Following same format as client side code

    if (((decimal)(Quantity * Item.Count) / Item.Info.StackSize) > 5) Quantity = ((5 * Item.Info.StackSize) / Item.Count) > 99 ? Quantity = 99 : Quantity = (byte)((5 * Item.Info.StackSize) / Item.Count);
    if (Quantity >= 99) Quantity = 99;
    if (Item.Stock != 0 && Quantity > Item.Stock) Quantity = (byte)Item.Stock;

Also the stack size has to be <= 5 because the mail box can only hold of 5 items/stacks I assume.

NoName Mir is having overflow issues and people are trying to buy something like 120 mounts by modifying the client to exceed the limit. The overflow issue isn't our problem but the fact you can buy up to 255 items shouldn't be happening.

If they try to buy > 80 stacks they will get inventory full message (this shouldn't get to this point anyway).

@Suprcode

@ryantaplin
Copy link
Copy Markdown
Author

Decided what to do with this yet? I think this needs to be done server side however maybe remove the 99 cap? It will then just be a 255 cap.

@Suprcode
Copy link
Copy Markdown
Owner

99 cap is because ui only supports up to 99 so is ok. will accept when im
next at a pc

On Sun, 20 Nov 2016, 10:15 p.m. Ryan, notifications@github.com wrote:

Decided what to do with this yet? I think this needs to be done server
side however maybe remove the 99 cap? It will then just be a 255 cap.


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#223 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AJgJah0E-3LZjnwYXezDYPTHo0Baid3Wks5rAMZ4gaJpZM4K3WQ7
.

@ryantaplin
Copy link
Copy Markdown
Author

ryantaplin commented Nov 20, 2016

Ok cool, by the way I think the UI fits 3 digit numbers fine.

untitled

@PocketDevelop
Copy link
Copy Markdown
Contributor

Don't be fucking with my game shop you cunts :)

On 20 Nov 2016, at 22:20, Ryan notifications@github.com wrote:

Ok cool, by the way I think the UI fits 3 digit numbers fine.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@ryantaplin
Copy link
Copy Markdown
Author

Do a better job next time then @ElijahLOMCN 😂 joking.

@PocketDevelop
Copy link
Copy Markdown
Contributor

Game shop is the most comprehensive feature in the game I often suggested we call it Gameshop and have one of its features as 'Play Mir while you shop'

On 21 Nov 2016, at 08:03, Ryan notifications@github.com wrote:

Do a better job next time then @ElijahLOMCN 😂 joking.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@lodos3
Copy link
Copy Markdown
Contributor

lodos3 commented Nov 21, 2016 via email

@lodos3
Copy link
Copy Markdown
Contributor

lodos3 commented Nov 21, 2016 via email

@Suprcode Suprcode merged commit 059b078 into Suprcode:master Nov 21, 2016
@ryantaplin
Copy link
Copy Markdown
Author

@lodos3 Not really looked into it. Jamie done it in his marble files and said it was a fairly difficult task.

@lodos3
Copy link
Copy Markdown
Contributor

lodos3 commented Nov 21, 2016 via email

@Suprcode
Copy link
Copy Markdown
Owner

easier said than done. it's a rewrite of the entire text control to stop it drawing above everything.

@ryantaplin ryantaplin deleted the Patches branch May 10, 2017 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants