mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-09-24 09:12:56 -04:00
Fix #781
If killer can't be determined, highest damage dealer is the killer.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user