Yes, although I'd change update character... it's pointless how I wrote multiple copies.
Just do...
public static void ModifyCharacter(uint Who, string Where, object Value)
{
now just do the .set code using Value.ToString();
}
Mysql always uses commands as a string anyways so there's no point in forcing to different types only to have it change back to a string. just use a generic object and then convert it to a string. Will then work with any variable.
That's how my ModifyXXXXX methods work in my new source. They work flawlessly so far.
The only time that might not work is if you
A: try to fill in a field with an incorrect value (IE: set Level = BWAHAHHA)
B: call a class/structure vs a value (IE Sending itemInfo instead of ItemInfo.Plus)
It all comes down to sane coding as you add features but tbh as I have the methods atm is simply... stupid.
Just do...
public static void ModifyCharacter(uint Who, string Where, object Value)
{
now just do the .set code using Value.ToString();
}
Mysql always uses commands as a string anyways so there's no point in forcing to different types only to have it change back to a string. just use a generic object and then convert it to a string. Will then work with any variable.
That's how my ModifyXXXXX methods work in my new source. They work flawlessly so far.
The only time that might not work is if you
A: try to fill in a field with an incorrect value (IE: set Level = BWAHAHHA)
B: call a class/structure vs a value (IE Sending itemInfo instead of ItemInfo.Plus)
It all comes down to sane coding as you add features but tbh as I have the methods atm is simply... stupid.