changeset 26:565af5d2002a

Account for the fact that a single NPC ID can instantiate more than one gender.
author James D. Callahan III <jcallahan@curse.com>
date Wed, 16 May 2012 12:35:19 -0500
parents e681130c2144
children 120740b8a54f
files Main.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Main.lua	Wed May 16 12:13:56 2012 -0500
+++ b/Main.lua	Wed May 16 12:35:19 2012 -0500
@@ -736,7 +736,8 @@
                 break
             end
         end
-        npc.gender = GENDER_NAMES[_G.UnitSex("target")] or "UNDEFINED"
+        npc.genders = npc.genders or {}
+        npc.genders[GENDER_NAMES[_G.UnitSex("target")] or "UNDEFINED"] = true
         npc.is_pvp = _G.UnitIsPVP("target") and true or nil
         npc.reaction = ("%s:%s:%s"):format(_G.UnitLevel("player"), _G.UnitFactionGroup("player"), REACTION_NAMES[_G.UnitReaction("player", "target")])
         npc.encounter_data = npc.encounter_data or {}