mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-18 19:41:30 +00:00
Added #reloadmerchants for zone-based merchant refreshing.
This commit is contained in:
parent
6ed3301110
commit
8e9fa38197
@ -317,6 +317,7 @@ int command_init(void)
|
|||||||
command_add("reloadallrules", "Executes a reload of all rules.", 80, command_reloadallrules) ||
|
command_add("reloadallrules", "Executes a reload of all rules.", 80, command_reloadallrules) ||
|
||||||
command_add("reloademote", "Reloads NPC Emotes", 80, command_reloademote) ||
|
command_add("reloademote", "Reloads NPC Emotes", 80, command_reloademote) ||
|
||||||
command_add("reloadlevelmods", nullptr, 255, command_reloadlevelmods) ||
|
command_add("reloadlevelmods", nullptr, 255, command_reloadlevelmods) ||
|
||||||
|
command_add("reloadmerchants", nullptr, 255, command_reloadmerchants) ||
|
||||||
command_add("reloadperlexportsettings", nullptr, 255, command_reloadperlexportsettings) ||
|
command_add("reloadperlexportsettings", nullptr, 255, command_reloadperlexportsettings) ||
|
||||||
command_add("reloadqst", " - Clear quest cache (any argument causes it to also stop all timers)", 150, command_reloadqst) ||
|
command_add("reloadqst", " - Clear quest cache (any argument causes it to also stop all timers)", 150, command_reloadqst) ||
|
||||||
command_add("reloadrulesworld", "Executes a reload of all rules in world specifically.", 80, command_reloadworldrules) ||
|
command_add("reloadrulesworld", "Executes a reload of all rules in world specifically.", 80, command_reloadworldrules) ||
|
||||||
@ -2996,6 +2997,11 @@ void command_reloadworld(Client *c, const Seperator *sep)
|
|||||||
safe_delete(pack);
|
safe_delete(pack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void command_reloadmerchants(Client *c, const Seperator *sep) {
|
||||||
|
zone->ReloadMerchants();
|
||||||
|
c->Message(15, "Reloading merchants.");
|
||||||
|
}
|
||||||
|
|
||||||
void command_reloadlevelmods(Client *c, const Seperator *sep)
|
void command_reloadlevelmods(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
if (sep->arg[1][0] == 0)
|
if (sep->arg[1][0] == 0)
|
||||||
|
|||||||
@ -224,6 +224,7 @@ void command_reloadaa(Client *c, const Seperator *sep);
|
|||||||
void command_reloadallrules(Client *c, const Seperator *sep);
|
void command_reloadallrules(Client *c, const Seperator *sep);
|
||||||
void command_reloademote(Client* c, const Seperator *sep);
|
void command_reloademote(Client* c, const Seperator *sep);
|
||||||
void command_reloadlevelmods(Client *c, const Seperator *sep);
|
void command_reloadlevelmods(Client *c, const Seperator *sep);
|
||||||
|
void command_reloadmerchants(Client *c, const Seperator *sep);
|
||||||
void command_reloadperlexportsettings(Client *c, const Seperator *sep);
|
void command_reloadperlexportsettings(Client *c, const Seperator *sep);
|
||||||
void command_reloadqst(Client *c, const Seperator *sep);
|
void command_reloadqst(Client *c, const Seperator *sep);
|
||||||
void command_reloadstatic(Client *c, const Seperator *sep);
|
void command_reloadstatic(Client *c, const Seperator *sep);
|
||||||
|
|||||||
@ -2272,6 +2272,18 @@ void Zone::ReloadWorld(uint32 Option){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Zone::ReloadMerchants() {
|
||||||
|
std::list<NPC*> npc_list;
|
||||||
|
entity_list.GetNPCList(npc_list);
|
||||||
|
|
||||||
|
for(std::list<NPC*>::iterator itr = npc_list.begin(); itr != npc_list.end(); ++itr) {
|
||||||
|
NPC* npc = *itr;
|
||||||
|
if (npc->MerchantType != 0) {
|
||||||
|
zone->LoadNewMerchantData(npc->MerchantType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Zone::LoadTickItems()
|
void Zone::LoadTickItems()
|
||||||
{
|
{
|
||||||
tick_items.clear();
|
tick_items.clear();
|
||||||
|
|||||||
@ -209,6 +209,7 @@ public:
|
|||||||
void LoadAlternateCurrencies();
|
void LoadAlternateCurrencies();
|
||||||
void LoadNPCEmotes(LinkedList<NPC_Emote_Struct*>* NPCEmoteList);
|
void LoadNPCEmotes(LinkedList<NPC_Emote_Struct*>* NPCEmoteList);
|
||||||
void ReloadWorld(uint32 Option);
|
void ReloadWorld(uint32 Option);
|
||||||
|
void ReloadMerchants();
|
||||||
|
|
||||||
Map* zonemap;
|
Map* zonemap;
|
||||||
WaterMap* watermap;
|
WaterMap* watermap;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user