mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Add #dz lockouts remove command
This allows clearing a character's lockouts Adds client RemoveAllExpeditionLockouts methods and exposes to lua api
This commit is contained in:
@@ -1530,6 +1530,20 @@ void Expedition::SendWorldGetOnlineMembers()
|
||||
worldserver.SendPacket(pack.get());
|
||||
}
|
||||
|
||||
void Expedition::RemoveAllCharacterLockouts(std::string character_name, std::string expedition_name)
|
||||
{
|
||||
uint32_t pack_size = sizeof(ServerExpeditionCharacterName_Struct);
|
||||
auto pack = std::unique_ptr<ServerPacket>(new ServerPacket(ServerOP_ExpeditionRemoveCharLockouts, pack_size));
|
||||
auto buf = reinterpret_cast<ServerExpeditionCharacterName_Struct*>(pack->pBuffer);
|
||||
strn0cpy(buf->character_name, character_name.c_str(), sizeof(buf->character_name));
|
||||
buf->expedition_name[0] = '\0';
|
||||
if (!expedition_name.empty())
|
||||
{
|
||||
strn0cpy(buf->expedition_name, expedition_name.c_str(), sizeof(buf->expedition_name));
|
||||
}
|
||||
worldserver.SendPacket(pack.get());
|
||||
}
|
||||
|
||||
void Expedition::HandleWorldMessage(ServerPacket* pack)
|
||||
{
|
||||
switch (pack->opcode)
|
||||
@@ -1719,6 +1733,16 @@ void Expedition::HandleWorldMessage(ServerPacket* pack)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ServerOP_ExpeditionRemoveCharLockouts:
|
||||
{
|
||||
auto buf = reinterpret_cast<ServerExpeditionCharacterName_Struct*>(pack->pBuffer);
|
||||
Client* client = entity_list.GetClientByName(buf->character_name);
|
||||
if (client)
|
||||
{
|
||||
client->RemoveAllExpeditionLockouts(buf->expedition_name);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user