If killer can't be determined, highest damage dealer is the killer.
This commit is contained in:
CharonInferar
2014-06-04 19:18:41 +02:00
parent b9bc929d2c
commit dc5345faea
+5 -2
View File
@@ -33,8 +33,11 @@ public class DeathState extends AIState {
NGECore.getInstance().aiService.awardExperience(actor);
NGECore.getInstance().aiService.awardGcw(actor);
actor.getCreature().setAttachment("radial_filename", "npc/corpse");
//NGECore.getInstance().scriptService.callScript("scripts/radial/npc/corpse", "", "createRadial", NGECore.getInstance(), actor.getCreature().getKiller(), actor.getCreature(), new Vector<RadialOptions>());
NGECore.getInstance().lootService.DropLoot((CreatureObject)(actor.getCreature().getKiller()),(TangibleObject)(actor.getCreature()));
//NGECore.getInstance().scriptService.callScript("scripts/radial/npc/corpse", "", "createRadial", NGECore.getInstance(), actor.getCreature().getKiller(), actor.getCreature(), new Vector<RadialOptions>());
CreatureObject killer = (CreatureObject)actor.getCreature().getKiller();
if (killer==null)
killer = actor.getHighestDamageDealer();
NGECore.getInstance().lootService.DropLoot(killer,(TangibleObject)(actor.getCreature()));
actor.scheduleDespawn();
return 0;
}