mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-20 13: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)
|
void Raid::SetGroupLeader(const char *who, bool glFlag)
|
||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
std::string query = StringFormat("UPDATE raid_members SET isgroupleader = %lu WHERE name = '%s'",
|
||||||
char* query = 0;
|
(unsigned long)glFlag, who);
|
||||||
MYSQL_RES *result;
|
auto results = database.QueryDatabase(query);
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
safe_delete_array(query);
|
|
||||||
LearnMembers();
|
LearnMembers();
|
||||||
VerifyRaid();
|
VerifyRaid();
|
||||||
|
|
||||||
//if(glFlag == true){ //we're setting the flag
|
|
||||||
//this->SendMakeGroupLeaderPacket(who);
|
|
||||||
//}
|
|
||||||
|
|
||||||
ServerPacket *pack = new ServerPacket(ServerOP_RaidGroupLeader, sizeof(ServerRaidGeneralAction_Struct));
|
ServerPacket *pack = new ServerPacket(ServerOP_RaidGroupLeader, sizeof(ServerRaidGeneralAction_Struct));
|
||||||
ServerRaidGeneralAction_Struct *rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
ServerRaidGeneralAction_Struct *rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||||
rga->rid = GetID();
|
rga->rid = GetID();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user