Dropped NPC parameter from OnNpcSocialActionSee.
This commit is contained in:
parent
a90ac81efc
commit
bd57c3027b
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user