Skip to content

Commit

Permalink
[Commands] #reload Command Overhaul. (#2162)
Browse files Browse the repository at this point in the history
* [Commands] #reload Command Overhaul.
- Consolidated #reloadaa, #reloadallrules, #reloadcontentflags, #reloademote, #reloadlevelmods, #reloadmerchants, #reloadperlexportsettings, #reloadqst, #reloadstatic, #reloadtitles, #relaodtraps, #reloadworld, and #reloadzps in to one command.
- #reload has 15 different sub commands you may use, including Log Settings and Tasks reloading.
- All the reload commands are a part of the Developer Tools Menu messages now, as well as part of the documentation.
- Fixes the commands that weren't actually sending their packet to zone server to globally reload stuff.
- Added Variables table reloading to command.

* Consistency.

* Hot reload.

* Final big push.
  • Loading branch information
Kinglykrab authored May 10, 2022
1 parent 209b0eb commit d120cf8
Show file tree
Hide file tree
Showing 29 changed files with 1,081 additions and 523 deletions.
75 changes: 41 additions & 34 deletions common/servertalk.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,15 @@
#define ServerOP_UpdateSpawn 0x003f
#define ServerOP_SpawnStatusChange 0x0040
#define ServerOP_DropClient 0x0041 // DropClient
#define ServerOP_ReloadTasks 0x0060
#define ServerOP_DepopAllPlayersCorpses 0x0061
#define ServerOP_ReloadTitles 0x0062
#define ServerOP_QGlobalUpdate 0x0063
#define ServerOP_QGlobalDelete 0x0064
#define ServerOP_DepopPlayerCorpse 0x0065
#define ServerOP_RequestTellQueue 0x0066 // client asks for it's tell queues
#define ServerOP_ChangeSharedMem 0x0067
#define ServerOP_WebInterfaceEvent 0x0068
#define ServerOP_WebInterfaceSubscribe 0x0069
#define ServerOP_WebInterfaceUnsubscribe 0x0070
#define ServerOP_DepopAllPlayersCorpses 0x0060
#define ServerOP_QGlobalUpdate 0x0061
#define ServerOP_QGlobalDelete 0x0062
#define ServerOP_DepopPlayerCorpse 0x0063
#define ServerOP_RequestTellQueue 0x0064 // client asks for it's tell queues
#define ServerOP_ChangeSharedMem 0x0065
#define ServerOP_WebInterfaceEvent 0x0066
#define ServerOP_WebInterfaceSubscribe 0x0067
#define ServerOP_WebInterfaceUnsubscribe 0x0068

#define ServerOP_RaidAdd 0x0100 //in use
#define ServerOP_RaidRemove 0x0101 //in use
Expand Down Expand Up @@ -213,27 +211,36 @@
#define ServerOP_LauncherZoneStatus 0x3002
#define ServerOP_DoZoneCommand 0x3003

#define ServerOP_UCSMessage 0x4000
#define ServerOP_UCSMailMessage 0x4001
#define ServerOP_ReloadRules 0x4002
#define ServerOP_ReloadRulesWorld 0x4003
#define ServerOP_CameraShake 0x4004
#define ServerOP_QueryServGeneric 0x4005
#define ServerOP_ReloadWorld 0x4006
#define ServerOP_ReloadLogs 0x4007
#define ServerOP_ReloadPerlExportSettings 0x4008
#define ServerOP_UCSServerStatusRequest 0x4009
#define ServerOP_UCSServerStatusReply 0x4010
#define ServerOP_HotReloadQuests 0x4011
#define ServerOP_UpdateSchedulerEvents 0x4012
#define ServerOP_ReloadContentFlags 0x4013
#define ServerOP_ReloadVariablesWorld 0x4014
#define ServerOP_ReloadLevelEXPMods 0x4015
#define ServerOP_ReloadMerchants 0x4016
#define ServerOP_ReloadAAData 0x4017
#define ServerOP_ReloadTraps 0x4018
#define ServerOP_ReloadZonePoints 0x4019
#define ServerOP_ReloadStaticZoneData 0x4020
#define ServerOP_CameraShake 0x4000
#define ServerOP_HotReloadQuests 0x4001
#define ServerOP_QueryServGeneric 0x4002
#define ServerOP_UCSMailMessage 0x4003
#define ServerOP_UCSMessage 0x4004
#define ServerOP_UCSServerStatusReply 0x4005
#define ServerOP_UCSServerStatusRequest 0x4006
#define ServerOP_UpdateSchedulerEvents 0x4007

#define ServerOP_ReloadAAData 0x4100
#define ServerOP_ReloadAlternateCurrencies 0x4101
#define ServerOP_ReloadBlockedSpells 0x4102
#define ServerOP_ReloadContentFlags 0x4103
#define ServerOP_ReloadDoors 0x4104
#define ServerOP_ReloadGroundSpawns 0x4105
#define ServerOP_ReloadLevelEXPMods 0x4106
#define ServerOP_ReloadLogs 0x4107
#define ServerOP_ReloadMerchants 0x4108
#define ServerOP_ReloadNPCEmotes 0x4109
#define ServerOP_ReloadObjects 0x4110
#define ServerOP_ReloadPerlExportSettings 0x4111
#define ServerOP_ReloadRules 0x4112
#define ServerOP_ReloadStaticZoneData 0x4113
#define ServerOP_ReloadTasks 0x4114
#define ServerOP_ReloadTitles 0x4115
#define ServerOP_ReloadTraps 0x4116
#define ServerOP_ReloadVariables 0x4117
#define ServerOP_ReloadVeteranRewards 0x4118
#define ServerOP_ReloadWorld 0x4119
#define ServerOP_ReloadZonePoints 0x4120

#define ServerOP_CZDialogueWindow 0x4500
#define ServerOP_CZLDoNUpdate 0x4501
Expand Down Expand Up @@ -1012,8 +1019,8 @@ struct ServerOP_Consent_Struct {
};

struct ReloadTasks_Struct {
uint32 Command;
uint32 Parameter;
uint8 reload_type;
uint32 task_id;
};

struct ServerDepopAllPlayersCorpses_Struct
Expand Down
43 changes: 20 additions & 23 deletions world/zoneserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -876,29 +876,6 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
client_list.SendClientVersionSummary(srcvss->Name);
break;
}
case ServerOP_ReloadLogs: {
zoneserver_list.SendPacket(pack);
LogSys.LoadLogDatabaseSettings();
break;
}
case ServerOP_ReloadRules: {
zoneserver_list.SendPacket(pack);
RuleManager::Instance()->LoadRules(&database, "default", true);
break;
}
case ServerOP_ReloadContentFlags: {
zoneserver_list.SendPacket(pack);
content_service.SetExpansionContext()->ReloadContentFlags();
break;
}
case ServerOP_ReloadRulesWorld: {
RuleManager::Instance()->LoadRules(&database, "default", true);
break;
}
case ServerOP_ReloadVariablesWorld: {
database.LoadVariables();
break;
}
case ServerOP_FriendsWho: {
auto sfw = (ServerFriendsWho_Struct*) pack->pBuffer;
client_list.SendFriendsWho(sfw, this);
Expand Down Expand Up @@ -1327,11 +1304,21 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
case ServerOP_RaidSay:
case ServerOP_RefreshCensorship:
case ServerOP_ReloadAAData:
case ServerOP_ReloadAlternateCurrencies:
case ServerOP_ReloadBlockedSpells:
case ServerOP_ReloadDoors:
case ServerOP_ReloadGroundSpawns:
case ServerOP_ReloadLevelEXPMods:
case ServerOP_ReloadMerchants:
case ServerOP_ReloadNPCEmotes:
case ServerOP_ReloadObjects:
case ServerOP_ReloadPerlExportSettings:
case ServerOP_ReloadRules:
case ServerOP_ReloadStaticZoneData:
case ServerOP_ReloadTitles:
case ServerOP_ReloadTraps:
case ServerOP_ReloadVariables:
case ServerOP_ReloadVeteranRewards:
case ServerOP_ReloadWorld:
case ServerOP_ReloadZonePoints:
case ServerOP_RezzPlayerAccept:
Expand All @@ -1350,6 +1337,16 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
zoneserver_list.SendPacket(pack);
break;
}
case ServerOP_ReloadContentFlags: {
zoneserver_list.SendPacket(pack);
content_service.SetExpansionContext()->ReloadContentFlags();
break;
}
case ServerOP_ReloadLogs: {
zoneserver_list.SendPacket(pack);
LogSys.LoadLogDatabaseSettings();
break;
}
case ServerOP_ReloadTasks: {
shared_task_manager.LoadTaskData();
zoneserver_list.SendPacket(pack);
Expand Down
Loading

0 comments on commit d120cf8

Please sign in to comment.