When you accidentally switch your trinket in the shop, press undo but still you get 120 second cd
It's annoying. And there is no reason why this should be right?
It's annoying. And there is no reason why this should be right?
It's probably just how they programmed it. It was probably decided a while back to just reset cooldown on any switch instead of having exceptions because its just easier to code. That or the undo button is actually coded to reset money and then rebuy the item, as opposed to just reverting your inventory in time. The second would mean that the action is coded as a buy so, since you're buying a new trinket it does the cooldown. Although unlikely, it could also be a bug(not sure, im a noob that barely changes trinkets). Anyways the point is, they would probably have to rewrite a lot of the item shop to fix this(or if they coded it right in the first place, just one section. Although I find that unlikely because of how I have seen them t have coded interactions before. Being that instead of writing one piece of code to be used in multiple places, they code it manually in different places resulting in minute differentiations, or spagetti code)
I have no idea about programming but i believe riot can fix this. Edit: And i dont really get what you're trying to say. When i use zhonyas, sell it and undo then the cd is not reset or anything, it will just be the same like before i sold it
Well, there's your problem. Making uninformed judgments of belief is never a good idea.
i laugh at the retards talking about code. yall are so stupid thinking u know the code and shit. like wtf are u even talking about? a vague idea of what u think "code" is? lul
And what exactly according to you has been said wrong?
ur dumbass assumptions of how "it is coded"
ur dumbass assumptions of how "it is coded"
While it may not be exactly what's happen, it's not a bad set of assumptions to start with. His assumption covers a default case for all items rather than individual exceptions/niche cases, as well as the concept of code reuse between buying and undoing items. It's a pretty reasonable guess, and it wouldn't surprise me if any Rioter looking to change the behavior starts with a similar set of assumptions.
"Ur dumbass assumptions"? I haven't yet so far assumed anything in this debate. Also while I haven't seen their code, one can judge from their very usual excuses of how the outdated code of old client stands in their way of efficiency that it's on many areas spaghetti, hardly readable and inefficient.
Altonius assumed it may be caused by undo button being coded as re-buy, which isn't farfetched. Using such go-around solutions is pretty common in programming should one be careful with consequences and be able to test and debug unintended conseqeunces caused by forgotten interactions with the reused system.
Altonius also assumed it may be that any kind of item manpulation in shop, be it buying, selling or undoing purchases, triggers the switch (obviously meant the module that handles this) witch would cause certain cd-based items to go on cooldown as if they were freshly bought, as he assumed it would be easier to code. Which it would. However yet again this would require it being cured for cases of unintended consequences but yet again it's nothing unheard of to do it this way (though I'd guess most good programmers would rather avoid it as it seems like bringing more trouble than help).
I agree he maybe exaggerates about how there would be a lot of code to rewrite, but he has good reasons to not think it was programmed as it should've been sacrificing convinience of the programmer for reliablity. In the end, Yasuo's Windwall used to be line of minions and it teleports projectiles away rather than destroying them.
Items with actives like Zhonyas and GA probably have independent counters (basically just a bit of code that counts until it reaches a certain number). So once you use it, it starts this counter and no matter how many times you sell, rebuy, undo this counter will keep going at its pace and the game only looks at that counter to see what the cd should be on.
The trinkets instead probably force reset their counter any time you switch to avoid an abuse case unique to them. For example, if it checked a hard counter that never reset like with zhonyas, then someone could hypothetically buy blue trinket and use it, then swap to green trinket and use both charges, then swap to red trinket and use it, then go back to blue or green trinket and their cd's would be up because they were counting the whole time.
The alternative he's suggesting is how the undo button works in the shop (from a programming standpoint).
What most players expect that it does it to simply revert the values to whatever they were before we hit undo. If we had a red trinket off cd and accidentally bought blue, then it looks at a stored value and goes "oh he had a red trinket off cd, ok let's just put it back".
It's possible that instead, the game doesn't store any value to "revert" back to other than which item was bought/sold. What would happen in this case is that the game looks and sees "Oh he had a red trinket. Ok I will add the price of the green trinket back to his gold (0g) and I will rebuy red trinket." Since this was coded as you buying red trinket, it resets the cd timer as if you had switched to it normally. With an item like zhonyas, the hard counter is separate from the buying process so the cd would be however low it based on when you last used it regardless.
Spaghetti code is just a term for poor programming habits (like storing a value in a bunch of locations and calling from them arbitrarily). Let's say you're at your friend's house and he tells you to go get his disc-version of a game out of the other room. But instead of keeping all of his games in their cases, in a stack, and in a single location; they are spread out all over the house and sometimes in each others' cases (My friend does this when he wants to play a different game, but can't be bothered to go get the actual case for the game he's taking out of the console). So you go and find the case of the game in the bathroom after checking four different areas, but it's actually a different game that he just put in the wrong case.
tldr; It's an issue of organization and structure, and yes it can be fixed. It's just a matter of whether or not Riot will actually do it because of how much back-tracking is involved and how many new issues might arise from how the parts they rewrite will interaction non-rewritten parts. A complete overhaul of the entire game's code would yield the best results all-around given how old it is and how far it's come, but would also take an enormous amount of time, so the fix will probably just be adding another exception, thus adding to the spaghetti code.
Hope this helps.
Using -------
Works as a line split...
Might be easier to use then >
I didn't know how to use it, and an empty block quote was easier than losing my train of thought by stopping to research the boards formatting syntax.
It worked fine as far as I'm concerned.
just an FYI
no offense intended.
I'm pretty sure instead of undoing you can just buy back the tricket that you want and the cd won't rest
It is made this way so people don't abuse switching trinkets to reset its cooldown.
And about "Why not just transfer CD while switching?"
IIRC, wards and sweepers have different CD, and then there is charge system on wards. So it will simply not work.
It is made this way so people don't abuse switching trinkets to reset its cooldown.
And about "Why not just transfer CD while switching?"
IIRC, wards and sweepers have different CD, and then there is charge system on wards. So it will simply not work.
^Basically explained what I had trouble bringing into words.
The only thing that could work is a percentile thing, but I am not sure since I haven't thought of it completely. I feel like that could be abused for some reason.
He's talking about Undo button that's supposed to revert unintended purchase and the button wouldn't/shouldn't work in case he would purchase another trinket, use it and then went to shop hoping to revert it.
It would be nice if it kept whatever percentage of completion you had on the previous trinket transferred over to the new one.
Wasn't there a bug linked to this to give GA timer a reset?
There is always a way to program it not to, but that'll be on the pile of things Riot would have to do and has very little to no priority to them.
The moral of the story is...
Dont play with it
, or you will go blind.