mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-28 20:07:56 +00:00
Implemented standardized zone controller scripts (Rule Zone, UseZoneController) Defaulted to true
- When a zone boots, it will spawn an invisible npc by the name of zone_controller - Lua and Perl scripts can be represented with this npc as zone_controller.pl/lua - This NPC's ID is ruled be define ZONE_CONTROLLER_NPC_ID 10 - Two EVENT's uniquely are handled with this NPC/controller (They only work with the zone_controller NPC) - EVENT_SPAWN_ZONE :: All NPC spawns in the zone trigger the controller and pass the following variables: $spawned_entity_id $spawned_npc_id - EVENT_DEATH_ZONE :: All NPC deaths in the zone trigger the controller event and pass the following variables: $killer_id $killer_damage $killer_spell $killer_skill $killed_npc_id
This commit is contained in:
@@ -484,10 +484,17 @@ QuestInterface *QuestParserCollection::GetQIByNPCQuest(uint32 npcid, std::string
|
||||
|
||||
//second look for /quests/zone/npcname.ext (precedence)
|
||||
const NPCType *npc_type = database.LoadNPCTypesData(npcid);
|
||||
if(!npc_type) {
|
||||
if (!npc_type && npcid != ZONE_CONTROLLER_NPC_ID) {
|
||||
return nullptr;
|
||||
}
|
||||
std::string npc_name = npc_type->name;
|
||||
|
||||
std::string npc_name;
|
||||
if (npcid == ZONE_CONTROLLER_NPC_ID){
|
||||
npc_name = "zone_controller";
|
||||
}
|
||||
else{
|
||||
npc_name = npc_type->name;
|
||||
}
|
||||
int sz = static_cast<int>(npc_name.length());
|
||||
for(int i = 0; i < sz; ++i) {
|
||||
if(npc_name[i] == '`') {
|
||||
|
||||
Reference in New Issue
Block a user