Merge pull request #375 from AttorneyOnline/fix_cmdneed

[Bugfix] Fix /need being thrown into the void due to missing arg
This commit is contained in:
stonedDiscord 2024-08-29 22:02:21 +02:00 committed by GitHub
commit eade738e68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,6 +18,7 @@
#include "aoclient.h" #include "aoclient.h"
#include "area_data.h" #include "area_data.h"
#include "config_manager.h"
#include "packet/packet_factory.h" #include "packet/packet_factory.h"
#include "server.h" #include "server.h"
@ -89,7 +90,7 @@ void AOClient::cmdNeed(int argc, QStringList argv)
QString l_sender_area = server->getAreaName(areaId()); QString l_sender_area = server->getAreaName(areaId());
QString l_sender_message = argv.join(" "); QString l_sender_message = argv.join(" ");
server->broadcast(PacketFactory::createPacket("CT", {"=== Advert ===\n[" + l_sender_area + "] needs " + l_sender_message + "."}), Server::TARGET_TYPE::ADVERT); server->broadcast(PacketFactory::createPacket("CT", {ConfigManager::serverTag(), "=== Advert ===\n[" + l_sender_area + "] needs " + l_sender_message + "."}), Server::TARGET_TYPE::ADVERT);
} }
void AOClient::cmdSwitch(int argc, QStringList argv) void AOClient::cmdSwitch(int argc, QStringList argv)