Anonymous
public text v1 · immutableQueryResult *result = NULL; // Just defining our result as a member of QueryResult
result = CharacterDatabase.Query("SELECT guildid FROM characters WHERE guid BETWEEN '1' AND '999999'"); // Runs the query to select the field
uint32 guildid = result->Fetch()->GetUInt32(); //
if(guildid==u%) //
{
Item *item = objmgr.CreateItem( 100601, Plr); // Guild Key 1
Plr->GetItemInterface()->AddItemToFreeSlot(item);
return;
}