Not sure if it's gonna work or not (dunno if I changed all needed things, since it was fast :D), but try :P
### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Attackable.java (revision 319)
+++ java/net/sf/l2j/gameserver/model/actor/L2Attackable.java (working copy)
@@ -1280,20 +1280,20 @@
* to each Item Identifier dropped</li> <li>If the autoLoot mode is actif and if the L2Character that has killed the L2Attackable is a L2PcInstance, give this or these Item(s) to the L2PcInstance that has killed the L2Attackable</li> <li>If the autoLoot mode isn't actif or if the L2Character
* that has killed the L2Attackable is not a L2PcInstance, add this or these Item(s) in the world as a visible object at the position where mob was last</li><BR>
* <BR>
- * @param mainDamageDealer The L2Character that made the most damage.
+ * @param lastAttacker The L2Character that made the last hit.
*/
- public void doItemDrop(L2Character mainDamageDealer)
+ public void doItemDrop(L2Character lastAttacker)
{
- doItemDrop(getTemplate(), mainDamageDealer);
+ doItemDrop(getTemplate(), lastAttacker);
}
- public void doItemDrop(L2NpcTemplate npcTemplate, L2Character mainDamageDealer)
+ public void doItemDrop(L2NpcTemplate npcTemplate, L2Character lastAttacker)
{
- if (mainDamageDealer == null)
- return;
+ L2PcInstance player = null;
+ if (lastAttacker instanceof L2PcInstance) player = (L2PcInstance)lastAttacker;
+ if (lastAttacker instanceof L2Summon) player = ((L2Summon)lastAttacker).getOwner();
// Don't drop anything if the last attacker or owner isn't L2PcInstance
- L2PcInstance player = mainDamageDealer.getActingPlayer();
if (player == null)
return;