[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:
Kinglykrab
2022-06-29 15:29:02 -04:00
committed by GitHub
parent 16b31c5a3a
commit 15113f4056
10 changed files with 113 additions and 46 deletions
+9
View File
@@ -3688,3 +3688,12 @@ std::string QuestManager::getenvironmentaldamagename(uint8 damage_type) {
std::string environmental_damage_name = EQ::constants::GetEnvironmentalDamageName(damage_type);
return environmental_damage_name;
}
void QuestManager::TrackNPC(uint32 entity_id) {
QuestManagerCurrentQuestVars();
if (!initiator) {
return;
}
initiator->SetTrackingID(entity_id);
}