mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[Quest API] Add TrackNPC to Perl/Lua. (#2272)
* [Quest API] Add TrackNPC to Perl/Lua. - Add quest::tracknpc(entity_id) to Perl. - Add eq.track_npc(entity_id) to Lua. - This will allow server operators to arbitrarily Track NPCs for clients with scripts. - Modified tracking to auto turn off and tell you that you discovered your target if within 10 units, this is to allow scripted Tracking to turn off without the need for the Tracking skill. * Remove unnecessary DoTracking() call. * Update client.cpp
This commit is contained in:
@@ -3392,16 +3392,18 @@ std::string lua_commify(std::string number) {
|
||||
return commify(number);
|
||||
}
|
||||
|
||||
bool lua_check_name_filter(std::string name)
|
||||
{
|
||||
bool lua_check_name_filter(std::string name) {
|
||||
return database.CheckNameFilter(name);
|
||||
}
|
||||
|
||||
void lua_discord_send(std::string webhook_name, std::string message)
|
||||
{
|
||||
void lua_discord_send(std::string webhook_name, std::string message) {
|
||||
zone->SendDiscordMessage(webhook_name, message);
|
||||
}
|
||||
|
||||
void lua_track_npc(uint32 entity_id) {
|
||||
quest_manager.TrackNPC(entity_id);
|
||||
}
|
||||
|
||||
#define LuaCreateNPCParse(name, c_type, default_value) do { \
|
||||
cur = table[#name]; \
|
||||
if(luabind::type(cur) != LUA_TNIL) { \
|
||||
@@ -3857,6 +3859,7 @@ luabind::scope lua_register_general() {
|
||||
luabind::def("commify", &lua_commify),
|
||||
luabind::def("check_name_filter", &lua_check_name_filter),
|
||||
luabind::def("discord_send", &lua_discord_send),
|
||||
luabind::def("track_npc", &lua_track_npc),
|
||||
|
||||
/*
|
||||
Cross Zone
|
||||
|
||||
Reference in New Issue
Block a user