From bd57c3027b78bf1995198fe2953447e7104fba99 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 3 Aug 2015 21:38:50 +0000 Subject: [PATCH] Dropped NPC parameter from OnNpcSocialActionSee. --- .../l2jserver/gameserver/model/actor/L2Character.java | 2 +- .../impl/character/npc/OnNpcSocialActionSee.java | 10 +--------- .../com/l2jserver/gameserver/model/quest/Quest.java | 10 ++++------ 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java b/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java index 8a47765761..0caebc305a 100644 --- a/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java +++ b/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java @@ -6666,7 +6666,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe final L2Npc npcMob = (L2Npc) npc; if ((npcMob.isInsideRadius(this, 150, true, true))) // 150 radius? { - EventDispatcher.getInstance().notifyEventAsync(new OnNpcSocialActionSee(npcMob, getActingPlayer(), id), npcMob); + EventDispatcher.getInstance().notifyEventAsync(new OnNpcSocialActionSee(getActingPlayer(), id), npcMob); } } } diff --git a/trunk/java/com/l2jserver/gameserver/model/events/impl/character/npc/OnNpcSocialActionSee.java b/trunk/java/com/l2jserver/gameserver/model/events/impl/character/npc/OnNpcSocialActionSee.java index e12550d582..90215b6d65 100644 --- a/trunk/java/com/l2jserver/gameserver/model/events/impl/character/npc/OnNpcSocialActionSee.java +++ b/trunk/java/com/l2jserver/gameserver/model/events/impl/character/npc/OnNpcSocialActionSee.java @@ -18,7 +18,6 @@ */ package com.l2jserver.gameserver.model.events.impl.character.npc; -import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.events.EventType; import com.l2jserver.gameserver.model.events.impl.IBaseEvent; @@ -28,22 +27,15 @@ import com.l2jserver.gameserver.model.events.impl.IBaseEvent; */ public class OnNpcSocialActionSee implements IBaseEvent { - private final L2Npc _npc; private final L2PcInstance _caster; private final int _actionId; - public OnNpcSocialActionSee(L2Npc npc, L2PcInstance caster, int actionId) + public OnNpcSocialActionSee(L2PcInstance caster, int actionId) { - _npc = npc; _caster = caster; _actionId = actionId; } - public L2Npc getTarget() - { - return _npc; - } - public L2PcInstance getCaster() { return _caster; diff --git a/trunk/java/com/l2jserver/gameserver/model/quest/Quest.java b/trunk/java/com/l2jserver/gameserver/model/quest/Quest.java index ad1a9dc4b3..f9141b6de5 100644 --- a/trunk/java/com/l2jserver/gameserver/model/quest/Quest.java +++ b/trunk/java/com/l2jserver/gameserver/model/quest/Quest.java @@ -761,16 +761,15 @@ public class Quest extends AbstractScript implements IIdentifiable } /** - * @param npc * @param caster * @param actionId */ - public final void notifySocialActionSee(L2Npc npc, L2PcInstance caster, int actionId) + public final void notifySocialActionSee(L2PcInstance caster, int actionId) { String res = null; try { - res = onSocialActionSee(npc, caster, actionId); + res = onSocialActionSee(caster, actionId); } catch (Exception e) { @@ -1227,12 +1226,11 @@ public class Quest extends AbstractScript implements IIdentifiable } /** - * @param npc the NPC that saw the social action * @param caster the player who used the social action * @param actionId the actual action id that was used * @return */ - public String onSocialActionSee(L2Npc npc, L2PcInstance caster, int actionId) + public String onSocialActionSee(L2PcInstance caster, int actionId) { return null; } @@ -2059,7 +2057,7 @@ public class Quest extends AbstractScript implements IIdentifiable */ public void addSocialActionSeeId(int... npcIds) { - setNpcSocialActionSeeId(event -> notifySocialActionSee(event.getTarget(), event.getCaster(), event.getActionId()), npcIds); + setNpcSocialActionSeeId(event -> notifySocialActionSee(event.getCaster(), event.getActionId()), npcIds); } /**