Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Wuzix
I think he might be high on something since I also don't really understand what he is trying to say.
Probably, but I think he meant to say excited haha. Pretty sure the two words work interchangeably in Brazilian.
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Probably, I mean, it would be weird if he actually was anxious o_O
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
Probably, I mean, it would be weird if he actually was anxious o_O
I mean, I'm excited. Not anxious, my bad.
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Navigator search works (for now) as good as possible.
The rooms I have:
http://i.imgur.com/XIjpfcI.png
When I search on "Josh":
http://i.imgur.com/q2WPuU7.png
When I search on my player name (Raiden):
http://i.imgur.com/N2fz67f.png
(don't get fooled, the "Search users" thing doesn't do anything)
Super small snippet:
PHP Code:
dbConnection.SetQuery("SELECT * FROM rooms WHERE name LIKE [MENTION=111754]search[/MENTION] OR owner_id IN (SELECT id FROM players WHERE username LIKE [MENTION=111754]search[/MENTION])");
dbConnection.AddParameter( [MENTION=111754]search[/MENTION]", "%" + search + "%");
result = dbConnection.GetTable();
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Love the mention inside your code tag :)
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Dear developer,
Aurora Emulator is a projectname of Mikey (@EvilCoder). You should change your name because it already exist.
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Yesser
Dear developer,
Aurora Emulator is a projectname of Mikey (@EvilCoder). You should change your name because it already exist.
Dear not developer of (both?) Aurora(s),
The person in question can ask that same question by himself. However, it's not like his emulator is that known by everybody. In fact it's forgotten and out dated.
(I actually had to Google it first to make sure I didn't post anything stupid. As it turns out: I'm glad I did!)
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Yesser
Dear developer,
Aurora Emulator is a projectname of Mikey (@EvilCoder). You should change your name because it already exist.
If it was active, well known or something, I would've known it. Since it's not, I didn't and so I won't change it.
If that owner wants me to rename it, I'd be glad to. But then that person has to ask it for himself.
Quote:
Originally Posted by
Joopie
Love the mention inside your code tag :)
Urgh why is this still a thing? RZ should fix this... why would you want to mention anybody in a CODE/PHP tag lol.
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
A small update:
Rooms before room icon save:
http://i.imgur.com/SLmgUka.png
What I change the icon into:
http://i.imgur.com/dG6XWkG.png
Rooms after room icon save:
http://i.imgur.com/N5edzZv.png
(NOTE: IGNORE the UberEmu and Bfly githubs, NO code is taken from it, only reference to packets!)
PHP Code:
string query = "UPDATE rooms SET ";
MySqlParameter[] parameters = new MySqlParameter[columns.Length + 1];
for (int i = 0; i < columns.Length && i < values.Length; i++)
{
if (i > 0)
query += ", ";
query += $"{columns[i]} = @{columns[i]}";
parameters[i] = new MySqlParameter($"@{columns[i]}", values[i]);
}
query += " WHERE id = @ roomId";
parameters[parameters.Length - 1] = new MySqlParameter("@ roomId", Id);
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
A small update:
Rooms before room icon save:
http://i.imgur.com/SLmgUka.png
What I change the icon into:
http://i.imgur.com/dG6XWkG.png
Rooms after room icon save:
http://i.imgur.com/N5edzZv.png
(NOTE: IGNORE the UberEmu and Bfly githubs, NO code is taken from it, only reference to packets!)
PHP Code:
string query = "UPDATE rooms SET ";
MySqlParameter[] parameters = new MySqlParameter[columns.Length + 1];
for (int i = 0; i < columns.Length && i < values.Length; i++)
{
if (i > 0)
query += ", ";
query += $"{columns[i]} = @{columns[i]}";
parameters[i] = new MySqlParameter($"@{columns[i]}", values[i]);
}
query += " WHERE id = @ roomId";
parameters[parameters.Length - 1] = new MySqlParameter("@ roomId", Id);
What the fuck is this injectable query...
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
saamus
What the fuck is this injectable query...
How is it injectable if I use MySqlParameter? Also, please don't quote my whole post if it's a big post with images.
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
I think use += for the string query is not the best way.
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Amariconao
I think use += for the string query is not the best way.
Then what? There's no way to generate a query based on parameters of a function (which will only be made in the emulator, without user input, and the user input there is is stored in MySqlParameter) without using +=.
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
Then what? There's no way to generate a query based on parameters of a function (which will only be made in the emulator, without user input, and the user input there is is stored in MySqlParameter) without using +=.
I said for concat string, i always prefer to use a stringbuilder or something like that
https://stackoverflow.com/questions/...tenate-strings
Re: [V9] [R35] Aurora Emulator [C#] [NHibernate] [DotNetty] [Log4net]
Quote:
Originally Posted by
Amariconao
So what does the StringBuilder class do better than a "+=" operator in this scenario?