[Release/OpenNos] Prestige System

07/23/2018 22:22 0Lucifer0#31
He just don’t understand what he is doing... he put random code in a random place if this compile he just complain that it doesn’t do what he want...seriously you should better learn development it will take you less than 2 hours to understand how a if statement work...
Moreover the code will work if you fix those little mistake like All=> Any
But you don’t even understand how the sendpacket work...
07/23/2018 23:07 Saber none#32
Quote:
Originally Posted by 0Lucifer0 View Post
He just don’t understand what he is doing... he put random code in a random place if this compile he just complain that it doesn’t do what he want...seriously you should better learn development it will take you less than 2 hours to understand how a if statement work...
Moreover the code will work if you fix those little mistake like All=> Any
But you don’t even understand how the sendpacket work...
would you mind explaining me what (i => i.value.type = inventoryType.Wear) is exactly doing ? i have never used that => operator so it would be nice if you could give me a quick explanation what this piece of code is doing :)
07/23/2018 23:41 0Lucifer0#33
Quote:
Originally Posted by mix0067@ View Post
would you mind explaining me what (i => i.value.type = inventoryType.Wear) is exactly doing ? i have never used that => operator so it would be nice if you could give me a quick explanation what this piece of code is doing :)
It just split the variable and the statements for a linq query. i here is a variable unit of Inventory. Dont have the code right now but I guess if Inventory is a list of iteminstance, i is an iteminstance. You can call it another name. Most of linq query of opennos use s as an variable name because I was too lazy to put a better name and in most of case at the beginning it was for session.
07/24/2018 00:22 Blowa#34
Quote:
Originally Posted by mix0067@ View Post
would you mind explaining me what (i => i.value.type = inventoryType.Wear) is exactly doing ? i have never used that => operator so it would be nice if you could give me a quick explanation what this piece of code is doing :)
[Only registered and activated users can see links. Click Here To Register...]
=> Operator is used in C# for lambdas.
Linq support predicates, as C# support lambdas and lambdas can be used as predicates, you can simply create a lambda within the linq query.

Within a lambda, captured parameters are given, splitted by a coma, before the => operator
After that => operator it's simply the "functional part" of a lambda
[Only registered and activated users can see links. Click Here To Register...]

You can also use => Operator for expression body members on :

C# 7 :
Constructor
Finalizer
Property Set
Indexer

C# 6 :
Method
Property Get


Btw, a little "=> operator C#" to google would have answer to your question.
07/24/2018 08:11 Saber none#35
Quote:
Originally Posted by val77 View Post
[Only registered and activated users can see links. Click Here To Register...]
=> Operator is used in C# for lambdas.
Linq support predicates, as C# support lambdas and lambdas can be used as predicates, you can simply create a lambda within the linq query.

Within a lambda, captured parameters are given, splitted by a coma, before the => operator
After that => operator it's simply the "functional part" of a lambda
[Only registered and activated users can see links. Click Here To Register...]

You can also use => Operator for expression body members on :

C# 7 :
Constructor
Finalizer
Property Set
Indexer

C# 6 :
Method
Property Get


Btw, a little "=> operator C#" to google would have answer to your question.
I know that i could have googled it, but thats axactly what i wanted to avoid to do because mostly what google is telling me is just confusing me more and if that is the case i need to ask someone and thats why i asked lucifer to EXPLAIN it to me what that part of the if statement stands for and what it is doing there.
07/24/2018 10:20 Blowa#36
Quote:
Originally Posted by mix0067@ View Post
I know that i could have googled it, but thats axactly what i wanted to avoid to do because mostly what google is telling me is just confusing me more and if that is the case i need to ask someone and thats why i asked lucifer to EXPLAIN it to me what that part of the if statement stands for and what it is doing there.
(i => i.value.type == inventoryType.Wear)


actual captured element for each value within the Enumerable

Lambda predicate that returns a boolean
In most case, predicates are evaluating the captured element to define if the element fits our "expectations" or not.

In this case, the captured element needs to be an item (i.Value) of type Wear (i.Value.Type == InventoryType.Wear)

Last thing, lambdas are just "functions" without an explicit symbol (oftenly called anonymous functions), it's not only in C# ;)
C++ supports lambdas, Javascript too, Java too, Rust...

PS : I don't get how google can confuse you since it's just linking you the official documentation which is DESIGNED to be READ
07/24/2018 11:58 Saber none#37
Quote:
Originally Posted by val77 View Post
(i => i.value.type == inventoryType.Wear)


actual captured element for each value within the Enumerable

Lambda predicate that returns a boolean
In most case, predicates are evaluating the captured element to define if the element fits our "expectations" or not.

In this case, the captured element needs to be an item (i.Value) of type Wear (i.Value.Type == InventoryType.Wear)

Last thing, lambdas are just "functions" without an explicit symbol (oftenly called anonymous functions), it's not only in C# ;)
C++ supports lambdas, Javascript too, Java too, Rust...

PS : I don't get how google can confuse you since it's just linking you the official documentation which is DESIGNED to be READ
And now i can understand it THANKS :) Ik i am a strange guy things that should help me mostly confuse me i have no idea why. Anyway i appreciate that you and lucifer helped me out with that :)
08/02/2018 00:50 Tbp123#38
I've just seen it, but I would recommend to add a new row in the database and have a prestige system well implemented like each prestige you get things bonus, like hp and etc.

Anyways, good job, I don't find why people in EPvP just comes to threads that are at least a bit helpful, or theads that are just asking, this is a forum not a place to throw trash to ppl.

also here you have some of my things. feel free to ask something if you want

[Only registered and activated users can see links. Click Here To Register...]
08/02/2018 02:37 0Lucifer0#39
Quote:
Originally Posted by Tbp123 View Post
I've just seen it, but I would recommend to add a new row in the database and have a prestige system well implemented like each prestige you get things bonus, like hp and etc.

Anyways, good job, I don't find why people in EPvP just comes to threads that are at least a bit helpful, or theads that are just asking, this is a forum not a place to throw trash to ppl.

also here you have some of my things. feel free to ask something if you want

[Only registered and activated users can see links. Click Here To Register...]
Yes but adding a new migrations risk to be too difficult for them.
08/02/2018 03:01 Tbp123#40
Well, that's a fact, but everyone can learn :D
08/02/2018 03:52 ImTheReal#41
Quote:
Originally Posted by Tbp123 View Post
Well, that's a fact, but everyone can learn :D
Adding a new column is a good way to do it but, even if i would do a tutorial on that one people like redbull would spam the shit in here like "CODE DOESNT WORK"
This System was a SIMPLE one, nothing which a pro should use. Although it could help some people to at least learn a bit about coding.

I did my prestige system also in a different way ofc, but this is a simple way to do it and mostly it is a helper to understand codes and learn to do things by urself.

But thank you really much for ur comment! :)
08/15/2018 12:04 redbull2905#42
[Only registered and activated users can see links. Click Here To Register...]
I have more than just make the stats and add the +1 on the name as soon as we make the order someone wants to help me ? I really have trouble with these last two trucs
08/15/2018 12:49 0Lucifer0#43
You need to add it to the packet not to the name or people will be able to cheat. Moreover there are issues in your code.
Ps: truc doesn’t mean anything
08/15/2018 19:04 Saber none#44
Quote:
Originally Posted by 0Lucifer0 View Post
You need to add it to the packet not to the name or people will be able to cheat. Moreover there are issues in your code.
Ps: truc doesn’t mean anything
i guess he was talking about his last lines, but even that wouldnt make much sense
08/15/2018 22:16 0Lucifer0#45
He is taking about the last 2 things. With google translate which didn’t translated truc and he didn’t read after google translation.... he basicly want to have the prestige in the name and do something with stats. But the name var shouldn’t be changed and there is no details of what he want to do on stats...