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