mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
[Bug Fix] Fix Group Leadership (#4214)
* [Bug Fix] Fix Group Leadership # Notes - We were not sending anything to `group_leaders` table if we did not already have an existing row. # Video * Update database.cpp
This commit is contained in:
parent
109940fc0c
commit
ab8ac81df6
@ -1114,14 +1114,12 @@ void Database::SetGroupLeaderName(uint32 group_id, const std::string& name)
|
|||||||
|
|
||||||
e.leadername = name;
|
e.leadername = name;
|
||||||
|
|
||||||
const int updated_leader = GroupLeadersRepository::UpdateOne(*this, e);
|
if (e.gid) {
|
||||||
|
GroupLeadersRepository::UpdateOne(*this, e);
|
||||||
if (!updated_leader) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
e.gid = group_id;
|
e.gid = group_id;
|
||||||
e.leadername = name;
|
|
||||||
e.marknpc = std::string();
|
e.marknpc = std::string();
|
||||||
e.leadershipaa = std::string();
|
e.leadershipaa = std::string();
|
||||||
e.maintank = std::string();
|
e.maintank = std::string();
|
||||||
@ -1130,7 +1128,7 @@ void Database::SetGroupLeaderName(uint32 group_id, const std::string& name)
|
|||||||
e.mentoree = std::string();
|
e.mentoree = std::string();
|
||||||
e.mentor_percent = 0;
|
e.mentor_percent = 0;
|
||||||
|
|
||||||
GroupLeadersRepository::UpdateOne(*this, e);
|
GroupLeadersRepository::InsertOne(*this, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Database::GetGroupLeaderName(uint32 group_id)
|
std::string Database::GetGroupLeaderName(uint32 group_id)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user