So I have another loot system I use for events and what not, works great, however I want it to be specific for a race, so they only receive relevant equipment for their current race. Gargoyle, elf Human.

I put in the below statement to assume LastKiller as PlayerMobile, then check player mobile for race type and if it meets the race it should provide the artifact. So it compiles, no errors, looks correct but the results are non existent. The Elf killing the zombie doesn't get the artifact.

(to note, If i drop ArtifactValidate.GiveArtifact(this); right into
Code:
if (!Summoned && !NoKillAwards && !m_HasGeneratedLoot)
without the race check and it does work, so the loot system is good, im just doing something wrong.


Code:
      if (!Summoned && !NoKillAwards && !m_HasGeneratedLoot)
       {
         m_HasGeneratedLoot = true;
         GenerateLoot(false);
         if (LastKiller is PlayerMobile)
         {
           PlayerMobile from = LastKiller as PlayerMobile;  
           if (from.Race == Race.Elf)
             ArtifactValidate.GiveArtifact(this);
         }
       }
 
Back