mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
[Commands] Cleanup #reloadaa Command. (#2120)
* [Commands] Cleanup #reloadaa Command. - Cleanup messages. - Remove unncessary file_exists command from file. - Make reloading of Alternate Advancement data global instead of zone specific. * Update worldserver.cpp * Update worldserver.cpp
This commit is contained in:
parent
bf1d05d639
commit
86568e9292
@ -229,6 +229,7 @@
|
|||||||
#define ServerOP_ReloadContentFlags 0x4013
|
#define ServerOP_ReloadContentFlags 0x4013
|
||||||
#define ServerOP_ReloadVariablesWorld 0x4014
|
#define ServerOP_ReloadVariablesWorld 0x4014
|
||||||
#define ServerOP_ReloadMerchants 0x4016
|
#define ServerOP_ReloadMerchants 0x4016
|
||||||
|
#define ServerOP_ReloadAAData 0x4017
|
||||||
#define ServerOP_ReloadStaticZoneData 0x4020
|
#define ServerOP_ReloadStaticZoneData 0x4020
|
||||||
|
|
||||||
#define ServerOP_CZDialogueWindow 0x4500
|
#define ServerOP_CZDialogueWindow 0x4500
|
||||||
|
|||||||
@ -889,6 +889,11 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
|||||||
zoneserver_list.SendPacket(pack);
|
zoneserver_list.SendPacket(pack);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ServerOP_ReloadAAData:
|
||||||
|
{
|
||||||
|
zoneserver_list.SendPacket(pack);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case ServerOP_ReloadMerchants:
|
case ServerOP_ReloadMerchants:
|
||||||
{
|
{
|
||||||
zoneserver_list.SendPacket(pack);
|
zoneserver_list.SendPacket(pack);
|
||||||
|
|||||||
@ -285,7 +285,7 @@ int command_init(void)
|
|||||||
command_add("raidloot", "[All|GroupLeader|RaidLeader|Selected] - Sets your Raid Loot Type if you have permission to do so.", AccountStatus::Player, command_raidloot) ||
|
command_add("raidloot", "[All|GroupLeader|RaidLeader|Selected] - Sets your Raid Loot Type if you have permission to do so.", AccountStatus::Player, command_raidloot) ||
|
||||||
command_add("randomfeatures", "- Temporarily randomizes the Facial Features of your target", AccountStatus::QuestTroupe, command_randomfeatures) ||
|
command_add("randomfeatures", "- Temporarily randomizes the Facial Features of your target", AccountStatus::QuestTroupe, command_randomfeatures) ||
|
||||||
command_add("refreshgroup", "- Refreshes Group for you or your player target.", AccountStatus::Player, command_refreshgroup) ||
|
command_add("refreshgroup", "- Refreshes Group for you or your player target.", AccountStatus::Player, command_refreshgroup) ||
|
||||||
command_add("reloadaa", "Reloads AA data", AccountStatus::GMMgmt, command_reloadaa) ||
|
command_add("reloadaa", "Reloads Alternate Advancement data globally", AccountStatus::GMMgmt, command_reloadaa) ||
|
||||||
command_add("reloadallrules", "Executes a reload of all rules globally.", AccountStatus::QuestTroupe, command_reloadallrules) ||
|
command_add("reloadallrules", "Executes a reload of all rules globally.", AccountStatus::QuestTroupe, command_reloadallrules) ||
|
||||||
command_add("reloadcontentflags", "Executes a reload of all expansion and content flags", AccountStatus::QuestTroupe, command_reloadcontentflags) ||
|
command_add("reloadcontentflags", "Executes a reload of all expansion and content flags", AccountStatus::QuestTroupe, command_reloadcontentflags) ||
|
||||||
command_add("reloademote", "Reloads NPC Emotes", AccountStatus::QuestTroupe, command_reloademote) ||
|
command_add("reloademote", "Reloads NPC Emotes", AccountStatus::QuestTroupe, command_reloademote) ||
|
||||||
|
|||||||
@ -3,15 +3,9 @@
|
|||||||
|
|
||||||
void command_reloadaa(Client *c, const Seperator *sep)
|
void command_reloadaa(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
c->Message(Chat::White, "Reloading Alternate Advancement Data...");
|
c->Message(Chat::White, "Attempted to reload Alternate Advancement data globally.");
|
||||||
zone->LoadAlternateAdvancement();
|
auto pack = new ServerPacket(ServerOP_ReloadAAData, 0);
|
||||||
c->Message(Chat::White, "Alternate Advancement Data Reloaded");
|
worldserver.SendPacket(pack);
|
||||||
entity_list.SendAlternateAdvancementStats();
|
safe_delete(pack);
|
||||||
}
|
|
||||||
|
|
||||||
inline bool file_exists(const std::string &name)
|
|
||||||
{
|
|
||||||
std::ifstream f(name.c_str());
|
|
||||||
return f.good();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2021,7 +2021,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
AccountStatus::GMAdmin,
|
AccountStatus::GMAdmin,
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Content flags (and expansion) reloaded for {}.",
|
"Content flags (and expansion) reloaded for {}{}.",
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({})",
|
"{} ({})",
|
||||||
zone->GetLongName(),
|
zone->GetLongName(),
|
||||||
@ -2030,7 +2030,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
(
|
(
|
||||||
zone->GetInstanceID() ?
|
zone->GetInstanceID() ?
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Instance ID: {}",
|
" (Instance ID {})",
|
||||||
zone->GetInstanceID()
|
zone->GetInstanceID()
|
||||||
) :
|
) :
|
||||||
""
|
""
|
||||||
@ -2073,7 +2073,35 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
parse->LoadPerlEventExportSettings(parse->perl_event_export_settings);
|
parse->LoadPerlEventExportSettings(parse->perl_event_export_settings);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ServerOP_ReloadAAData: {
|
||||||
|
if (zone) {
|
||||||
|
worldserver.SendEmoteMessage(
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
AccountStatus::GMAdmin,
|
||||||
|
Chat::Yellow,
|
||||||
|
fmt::format(
|
||||||
|
"Alternate Advancement data reloaded for {}{}.",
|
||||||
|
fmt::format(
|
||||||
|
"{} ({})",
|
||||||
|
zone->GetLongName(),
|
||||||
|
zone->GetZoneID()
|
||||||
|
),
|
||||||
|
(
|
||||||
|
zone->GetInstanceID() ?
|
||||||
|
fmt::format(
|
||||||
|
" (Instance ID {})",
|
||||||
|
zone->GetInstanceID()
|
||||||
|
) :
|
||||||
|
""
|
||||||
|
)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
|
||||||
|
zone->LoadAlternateAdvancement();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case ServerOP_ReloadMerchants: {
|
case ServerOP_ReloadMerchants: {
|
||||||
if (zone) {
|
if (zone) {
|
||||||
worldserver.SendEmoteMessage(
|
worldserver.SendEmoteMessage(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user