Minor PaperdollCache improvements.
This commit is contained in:
@@ -84,13 +84,12 @@ public final class PaperdollCache
|
||||
|
||||
public int getMaxSetEnchant(PlayerInstance player)
|
||||
{
|
||||
int maxSetEnchant = _maxSetEnchant;
|
||||
if (maxSetEnchant >= 0)
|
||||
if (_maxSetEnchant >= 0)
|
||||
{
|
||||
return maxSetEnchant;
|
||||
return _maxSetEnchant;
|
||||
}
|
||||
|
||||
maxSetEnchant = 0;
|
||||
int maxSetEnchant = 0;
|
||||
for (ItemInstance item : _paperdollItems)
|
||||
{
|
||||
for (ArmorSet set : ArmorSetData.getInstance().getSets(item.getId()))
|
||||
|
@@ -934,6 +934,8 @@ public class ItemInstance extends WorldObject
|
||||
applyEnchantStats();
|
||||
_storedInDb = false;
|
||||
|
||||
getActingPlayer().getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
|
||||
// Notify to Scripts
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnItemEnchantAdd(getActingPlayer(), this));
|
||||
}
|
||||
|
@@ -255,7 +255,6 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
}
|
||||
});
|
||||
}
|
||||
player.getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
player.broadcastUserInfo(); // update user info
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user