Minor PaperdollCache improvements.
This commit is contained in:
parent
e47e7d2759
commit
a4ee2b9a0f
@ -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()))
|
||||
|
@ -925,10 +925,13 @@ public class ItemInstance extends WorldObject
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clearEnchantStats();
|
||||
_enchantLevel = enchantLevel;
|
||||
applyEnchantStats();
|
||||
_storedInDb = false;
|
||||
|
||||
getActingPlayer().getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -255,7 +255,6 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
}
|
||||
});
|
||||
}
|
||||
player.getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
player.broadcastUserInfo(); // update user info
|
||||
}
|
||||
break;
|
||||
|
@ -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()))
|
||||
|
@ -926,10 +926,13 @@ public class ItemInstance extends WorldObject
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clearEnchantStats();
|
||||
_enchantLevel = enchantLevel;
|
||||
applyEnchantStats();
|
||||
_storedInDb = false;
|
||||
|
||||
getActingPlayer().getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -255,7 +255,6 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
}
|
||||
});
|
||||
}
|
||||
player.getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
player.broadcastUserInfo(); // update user info
|
||||
}
|
||||
break;
|
||||
|
@ -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()))
|
||||
|
@ -926,10 +926,13 @@ public class ItemInstance extends WorldObject
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clearEnchantStats();
|
||||
_enchantLevel = enchantLevel;
|
||||
applyEnchantStats();
|
||||
_storedInDb = false;
|
||||
|
||||
getActingPlayer().getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -255,7 +255,6 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
}
|
||||
});
|
||||
}
|
||||
player.getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
player.broadcastUserInfo(); // update user info
|
||||
}
|
||||
break;
|
||||
|
@ -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()))
|
||||
|
@ -926,10 +926,13 @@ public class ItemInstance extends WorldObject
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clearEnchantStats();
|
||||
_enchantLevel = enchantLevel;
|
||||
applyEnchantStats();
|
||||
_storedInDb = false;
|
||||
|
||||
getActingPlayer().getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -255,7 +255,6 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
}
|
||||
});
|
||||
}
|
||||
player.getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
player.broadcastUserInfo(); // update user info
|
||||
}
|
||||
break;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -257,7 +257,6 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
}
|
||||
});
|
||||
}
|
||||
player.getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
player.broadcastUserInfo(); // update user info
|
||||
}
|
||||
break;
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -257,7 +257,6 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
}
|
||||
});
|
||||
}
|
||||
player.getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
player.broadcastUserInfo(); // update user info
|
||||
}
|
||||
break;
|
||||
|
@ -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()))
|
||||
|
@ -926,10 +926,13 @@ public class ItemInstance extends WorldObject
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clearEnchantStats();
|
||||
_enchantLevel = enchantLevel;
|
||||
applyEnchantStats();
|
||||
_storedInDb = false;
|
||||
|
||||
getActingPlayer().getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -255,7 +255,6 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
}
|
||||
});
|
||||
}
|
||||
player.getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
player.broadcastUserInfo(); // update user info
|
||||
}
|
||||
break;
|
||||
|
@ -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()))
|
||||
|
@ -926,10 +926,13 @@ public class ItemInstance extends WorldObject
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clearEnchantStats();
|
||||
_enchantLevel = enchantLevel;
|
||||
applyEnchantStats();
|
||||
_storedInDb = false;
|
||||
|
||||
getActingPlayer().getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -255,7 +255,6 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
}
|
||||
});
|
||||
}
|
||||
player.getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
player.broadcastUserInfo(); // update user info
|
||||
}
|
||||
break;
|
||||
|
@ -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()))
|
||||
|
@ -926,10 +926,13 @@ public class ItemInstance extends WorldObject
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clearEnchantStats();
|
||||
_enchantLevel = enchantLevel;
|
||||
applyEnchantStats();
|
||||
_storedInDb = false;
|
||||
|
||||
getActingPlayer().getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -255,7 +255,6 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
}
|
||||
});
|
||||
}
|
||||
player.getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
player.broadcastUserInfo(); // update user info
|
||||
}
|
||||
break;
|
||||
|
@ -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()))
|
||||
|
@ -926,10 +926,13 @@ public class ItemInstance extends WorldObject
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clearEnchantStats();
|
||||
_enchantLevel = enchantLevel;
|
||||
applyEnchantStats();
|
||||
_storedInDb = false;
|
||||
|
||||
getActingPlayer().getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -255,7 +255,6 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
}
|
||||
});
|
||||
}
|
||||
player.getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
player.broadcastUserInfo(); // update user info
|
||||
}
|
||||
break;
|
||||
|
@ -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()))
|
||||
|
@ -926,10 +926,13 @@ public class ItemInstance extends WorldObject
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clearEnchantStats();
|
||||
_enchantLevel = enchantLevel;
|
||||
applyEnchantStats();
|
||||
_storedInDb = false;
|
||||
|
||||
getActingPlayer().getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -257,7 +257,6 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
}
|
||||
});
|
||||
}
|
||||
player.getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
player.broadcastUserInfo(); // update user info
|
||||
}
|
||||
break;
|
||||
|
@ -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()))
|
||||
|
@ -926,10 +926,13 @@ public class ItemInstance extends WorldObject
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clearEnchantStats();
|
||||
_enchantLevel = enchantLevel;
|
||||
applyEnchantStats();
|
||||
_storedInDb = false;
|
||||
|
||||
getActingPlayer().getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -257,7 +257,6 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
}
|
||||
});
|
||||
}
|
||||
player.getInventory().getPaperdollCache().clearMaxSetEnchant();
|
||||
player.broadcastUserInfo(); // update user info
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user