View Single Post
  #12  
Old 07-12-2011, 07:51 PM
Criimson
Hill Giant
 
Join Date: Sep 2006
Posts: 172
Default

Quote:
Originally Posted by lerxst2112 View Post
The problem with striving to be low impact is that the code will move forward and your patches will no longer be relevant and they will be increasingly difficult for people to use or they will be forgotten.

If you want people to be able to use this for more than a short time, your best bet is to do things "the right way" with the goal of getting them accepted into the official codebase. If your intent is to have something set on a bot specific basis then adding it to each bot in the table seems like the right thing to me. Either way you do it, it will require a database update to be applied.
I totally agree with this. However, I am not sure that doing it this way is "the wrong way". Right now I am testing reading and writing to the DB and trying to do it in a way that allows for many players to have various settings.

How it is finalized is yet to be determined.

I did figure out how to read. As I was looking at the command to write I was hit with inspiration. I love it when that happens.

Code:
std::string errorMessage;
char* Query = 0;
uint32 bot_id = this->GetBotID(); 
int runeCheck = 0;

runeCheck = (database.RunQuery(Query, MakeAnyLenString(&Query, "SELECT `auto_rune` FROM `peq`.`bot_variables` WHERE `botID` = '%i';", bot_id)));
//Say("auto_rune is '%i'", runeCheck);
safe_delete_array(Query);
if (runeCheck == 0){
	continue;
}
This worked well.

Criimson
Reply With Quote