mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +00:00
SetGroupleader converted to QueryDatabase
This commit is contained in:
parent
dfcddac2ef
commit
11e08c9b67
@ -168,21 +168,13 @@ void Raid::MoveMember(const char *name, uint32 newGroup)
|
||||
|
||||
void Raid::SetGroupLeader(const char *who, bool glFlag)
|
||||
{
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = 0;
|
||||
MYSQL_RES *result;
|
||||
if (database.RunQuery(query,MakeAnyLenString(&query, "UPDATE raid_members SET isgroupleader=%lu WHERE name='%s'", (unsigned long)glFlag, who),errbuf,&result)){
|
||||
mysql_free_result(result);
|
||||
}
|
||||
std::string query = StringFormat("UPDATE raid_members SET isgroupleader = %lu WHERE name = '%s'",
|
||||
(unsigned long)glFlag, who);
|
||||
auto results = database.QueryDatabase(query);
|
||||
|
||||
safe_delete_array(query);
|
||||
LearnMembers();
|
||||
VerifyRaid();
|
||||
|
||||
//if(glFlag == true){ //we're setting the flag
|
||||
//this->SendMakeGroupLeaderPacket(who);
|
||||
//}
|
||||
|
||||
ServerPacket *pack = new ServerPacket(ServerOP_RaidGroupLeader, sizeof(ServerRaidGeneralAction_Struct));
|
||||
ServerRaidGeneralAction_Struct *rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
rga->rid = GetID();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user