mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 23:01:30 +00:00
UndelegateMainTank converted to QueryDatabase
This commit is contained in:
parent
99fe610f72
commit
b525a32b6e
@ -1571,15 +1571,11 @@ void Group::UnDelegateMainTank(const char *OldMainTankName, uint8 toggle)
|
||||
// informing them of the change and update the group_leaders table.
|
||||
//
|
||||
if(OldMainTankName == MainTankName) {
|
||||
char errbuff[MYSQL_ERRMSG_SIZE];
|
||||
|
||||
char *Query = 0;
|
||||
|
||||
if (!database.RunQuery(Query, MakeAnyLenString(&Query, "UPDATE group_leaders SET maintank='' WHERE gid=%i LIMIT 1",
|
||||
GetID()), errbuff))
|
||||
LogFile->write(EQEMuLog::Error, "Unable to clear group main tank: %s\n", errbuff);
|
||||
|
||||
safe_delete_array(Query);
|
||||
std::string query = StringFormat("UPDATE group_leaders SET maintank = '' WHERE gid = %i LIMIT 1", GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
LogFile->write(EQEMuLog::Error, "Unable to clear group main tank: %s\n", results.ErrorMessage().c_str());
|
||||
|
||||
if(!toggle) {
|
||||
for(uint32 i = 0; i < MAX_GROUP_MEMBERS; ++i) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user