private void UpdateNpcRequirements() { foreach (var npc in allQuestNpcs.Values) { var talkarray = npcdata.GetTalkArray(npc.ObjectId); var routine = npcdata.GetRoutine(npc.ObjectId); UpdateNpcRequirements(npc, talkarray, routine); } }
private void ProcessDefaultNPCs(ref NPC npc) { var routine = npcdata.GetRoutine(npc.ObjectId); switch (routine) { case newTalkRoutines.Talk_Princess1: case newTalkRoutines.Talk_Bikke: case newTalkRoutines.Talk_Bahamut: case newTalkRoutines.Talk_ElfDocUnne: case newTalkRoutines.Talk_GiveItemOnFlag: case newTalkRoutines.Talk_TradeItems: case newTalkRoutines.Talk_GiveItemOnItem: case newTalkRoutines.Talk_Astos: case newTalkRoutines.Talk_Chaos: ProcessQuestNpc(ref npc); break; case newTalkRoutines.Talk_Nerrick: Tiles[npc.Coord.x, npc.Coord.y].Tile = SCBitFlags.Tnt; ProcessQuestNpc(ref npc); break; case newTalkRoutines.NoOW_Floater: Tiles[npc.Coord.x, npc.Coord.y].Tile = SCBitFlags.Floater; break; case newTalkRoutines.NoOW_Chime: Tiles[npc.Coord.x, npc.Coord.y].Tile = SCBitFlags.Chime; break; case newTalkRoutines.NoOW_Canoe: Tiles[npc.Coord.x, npc.Coord.y].Tile = SCBitFlags.Canoe; break; default: if (npc.ObjectId == ObjectId.Princess1 || npc.ObjectId == ObjectId.Vampire || npc.ObjectId == ObjectId.ElfDoc || npc.ObjectId == ObjectId.Unne) { ProcessQuestNpc(ref npc); } break; } }
private void EnableNPCSwatter(NPCdata npcdata) { for (int i = 0; i < npcdata.GetNPCCount(); i++) { if (npcdata.GetRoutine((ObjectId)i) == newTalkRoutines.Talk_norm) { npcdata.SetRoutine((ObjectId)i, newTalkRoutines.Talk_kill); } } // Protect Lute and Rod Plate npcdata.SetRoutine(ObjectId.LutePlate, newTalkRoutines.Talk_norm); npcdata.SetRoutine(ObjectId.RodPlate, newTalkRoutines.Talk_norm); }