Store most popular IBaseEvent to reduce object creation.
This commit is contained in:
@@ -66,7 +66,11 @@ public class LargeCocoon extends AbstractNpcAI
|
||||
{
|
||||
case "attack":
|
||||
{
|
||||
onCreatureAttacked(new OnCreatureAttacked(player, npc, null));
|
||||
final OnCreatureAttacked attackEvent = new OnCreatureAttacked();
|
||||
attackEvent.setAttacker(player);
|
||||
attackEvent.setTarget(npc);
|
||||
attackEvent.setSkill(null);
|
||||
onCreatureAttacked(attackEvent);
|
||||
break;
|
||||
}
|
||||
case "attackPowerful":
|
||||
|
Reference in New Issue
Block a user