Changed doEventDrop method attacker parameter to Creature.
This commit is contained in:
parent
62e806f672
commit
13b9f0c499
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -516,7 +516,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -512,7 +512,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -512,7 +512,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -512,7 +512,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -511,7 +511,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -511,7 +511,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -511,7 +511,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -511,7 +511,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -511,7 +511,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -511,7 +511,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -511,7 +511,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -486,7 +486,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -486,7 +486,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -512,7 +512,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -512,7 +512,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -512,7 +512,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -514,7 +514,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -514,7 +514,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -514,7 +514,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -516,7 +516,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -515,7 +515,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -520,7 +520,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.EventDropHolder;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
@ -44,7 +45,7 @@ public class EventDropManager
|
||||
EVENT_DROPS.remove(longTimeEvent);
|
||||
}
|
||||
|
||||
public void doEventDrop(PlayerInstance player, Attackable attackable)
|
||||
public void doEventDrop(Creature attacker, Attackable attackable)
|
||||
{
|
||||
if (EVENT_DROPS.isEmpty())
|
||||
{
|
||||
@ -52,12 +53,13 @@ public class EventDropManager
|
||||
}
|
||||
|
||||
// Event items drop only for players.
|
||||
if ((player == null) || attackable.isFakePlayer())
|
||||
if ((attacker == null) || !attacker.isPlayable() || attackable.isFakePlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
final PlayerInstance player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
{
|
||||
return;
|
||||
|
@ -520,7 +520,7 @@ public class Attackable extends Npc
|
||||
else
|
||||
{
|
||||
doItemDrop((maxDealer != null) && maxDealer.isOnline() ? maxDealer : lastAttacker);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker.getActingPlayer(), this);
|
||||
EventDropManager.getInstance().doEventDrop(lastAttacker, this);
|
||||
}
|
||||
|
||||
if (!getMustRewardExpSP())
|
||||
|
Loading…
Reference in New Issue
Block a user