mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
Export clear_npctype_cache as both lua/perl general functions.
This commit is contained in:
parent
6e0a214bcc
commit
8b1262b198
@ -3353,6 +3353,22 @@ XS(XS__disablerecipe)
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
XS(XS__clear_npctype_cache);
|
||||
XS(XS__clear_npctype_cache)
|
||||
{
|
||||
dXSARGS;
|
||||
|
||||
if (items != 1) {
|
||||
Perl_croak(aTHX_ "Usage: clear_npctype_cache(npc_id)");
|
||||
}
|
||||
else {
|
||||
int32 npctype_id = (int32)SvIV(ST(0));
|
||||
quest_manager.ClearNPCTypeCache(npctype_id);
|
||||
}
|
||||
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
/*
|
||||
This is the callback perl will look for to setup the
|
||||
quest package's XSUBs
|
||||
@ -3573,6 +3589,7 @@ EXTERN_C XS(boot_quest)
|
||||
newXS(strcpy(buf, "crosszonemessageplayerbyname"), XS__crosszonemessageplayerbyname, file);
|
||||
newXS(strcpy(buf, "enablerecipe"), XS__enablerecipe, file);
|
||||
newXS(strcpy(buf, "disablerecipe"), XS__disablerecipe, file);
|
||||
newXS(strcpy(buf, "clear_npctype_cache"), XS__clear_npctype_cache, file);
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
|
||||
@ -1060,6 +1060,10 @@ bool lua_disable_recipe(uint32 recipe_id) {
|
||||
return quest_manager.DisableRecipe(recipe_id);
|
||||
}
|
||||
|
||||
void lua_clear_npctype_cache(int npctype_id) {
|
||||
quest_manager.ClearNPCTypeCache(npctype_id);
|
||||
}
|
||||
|
||||
luabind::scope lua_register_general() {
|
||||
return luabind::namespace_("eq")
|
||||
[
|
||||
@ -1226,7 +1230,8 @@ luabind::scope lua_register_general() {
|
||||
luabind::def("map_opcodes", &lua_map_opcodes),
|
||||
luabind::def("clear_opcode", &lua_clear_opcode),
|
||||
luabind::def("enable_recipe", &lua_enable_recipe),
|
||||
luabind::def("disable_recipe", &lua_disable_recipe)
|
||||
luabind::def("disable_recipe", &lua_disable_recipe),
|
||||
luabind::def("clear_npctype_cache", &lua_clear_npctype_cache)
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -2908,6 +2908,12 @@ bool QuestManager::DisableRecipe(uint32 recipe_id)
|
||||
return (success);
|
||||
}
|
||||
|
||||
void QuestManager::ClearNPCTypeCache(int npctype_id) {
|
||||
if (zone) {
|
||||
zone->ClearNPCTypeCache(npctype_id);
|
||||
}
|
||||
}
|
||||
|
||||
Client *QuestManager::GetInitiator() const {
|
||||
if(!quests_running_.empty()) {
|
||||
running_quest e = quests_running_.top();
|
||||
|
||||
@ -233,6 +233,7 @@ public:
|
||||
void CrossZoneMessagePlayerByName(uint32 Type, const char *CharName, const char *Message);
|
||||
bool EnableRecipe(uint32 recipe_id);
|
||||
bool DisableRecipe(uint32 recipe_id);
|
||||
void ClearNPCTypeCache(int npctype_id);
|
||||
|
||||
Client *GetInitiator() const;
|
||||
NPC *GetNPC() const;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user