Minor PurgePlayerHolder cleanup.
This commit is contained in:
parent
04fbe1c4f8
commit
8d1ef5edf3
@ -62,7 +62,7 @@ public class CrumaTowerPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class CrumaTowerPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class DragonValleyPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class DragonValleyPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class OrcBarracksPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class OrcBarracksPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class PlainsOfTheLizardmenPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class PlainsOfTheLizardmenPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class SelMahumBasePurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class SelMahumBasePurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class SilentValleyPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class SilentValleyPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class TowerOfInsolencePurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class TowerOfInsolencePurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15330,7 +15330,7 @@ public class Player extends Playable
|
|||||||
st.setInt(2, category);
|
st.setInt(2, category);
|
||||||
st.setInt(3, data.getPoints());
|
st.setInt(3, data.getPoints());
|
||||||
st.setInt(4, data.getKeys());
|
st.setInt(4, data.getKeys());
|
||||||
st.setInt(5, data.getMaxPeriodicKeys());
|
st.setInt(5, data.getRemainingKeys());
|
||||||
st.addBatch();
|
st.addBatch();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -23,13 +23,13 @@ public class PurgePlayerHolder
|
|||||||
{
|
{
|
||||||
private final int _points;
|
private final int _points;
|
||||||
private final int _keys;
|
private final int _keys;
|
||||||
private int _getMaxPeriodicKeys;
|
private int _remainingKeys;
|
||||||
|
|
||||||
public PurgePlayerHolder(int points, int keys, int remainingKeys)
|
public PurgePlayerHolder(int points, int keys, int remainingKeys)
|
||||||
{
|
{
|
||||||
_points = points;
|
_points = points;
|
||||||
_keys = keys;
|
_keys = keys;
|
||||||
_getMaxPeriodicKeys = remainingKeys;
|
_remainingKeys = remainingKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPoints()
|
public int getPoints()
|
||||||
@ -42,12 +42,12 @@ public class PurgePlayerHolder
|
|||||||
return _keys;
|
return _keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxPeriodicKeys()
|
public int getRemainingKeys()
|
||||||
{
|
{
|
||||||
if ((_keys == 0) && (_getMaxPeriodicKeys == 0))
|
if ((_keys == 0) && (_remainingKeys == 0))
|
||||||
{
|
{
|
||||||
_getMaxPeriodicKeys += 40;
|
_remainingKeys = 40;
|
||||||
}
|
}
|
||||||
return _getMaxPeriodicKeys;
|
return _remainingKeys;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public class ExSubjugationList implements IClientOutgoingPacket
|
|||||||
packet.writeD(integerPurgePlayerHolderEntry.getKey());
|
packet.writeD(integerPurgePlayerHolderEntry.getKey());
|
||||||
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getPoints() : 0);
|
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getPoints() : 0);
|
||||||
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getKeys() : 0);
|
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getKeys() : 0);
|
||||||
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getMaxPeriodicKeys() : 40);
|
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getRemainingKeys() : 40);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ public class CrumaTowerPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class CrumaTowerPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class DragonValleyPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class DragonValleyPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class GiantCavePurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class GiantCavePurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class OrcBarracksPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class OrcBarracksPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class PlainsOfTheLizardmenPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class PlainsOfTheLizardmenPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class SelMahumBasePurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class SelMahumBasePurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class SilentValleyPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class SilentValleyPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class TowerOfInsolencePurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class TowerOfInsolencePurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15510,7 +15510,7 @@ public class Player extends Playable
|
|||||||
st.setInt(2, category);
|
st.setInt(2, category);
|
||||||
st.setInt(3, data.getPoints());
|
st.setInt(3, data.getPoints());
|
||||||
st.setInt(4, data.getKeys());
|
st.setInt(4, data.getKeys());
|
||||||
st.setInt(5, data.getMaxPeriodicKeys());
|
st.setInt(5, data.getRemainingKeys());
|
||||||
st.addBatch();
|
st.addBatch();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -23,13 +23,13 @@ public class PurgePlayerHolder
|
|||||||
{
|
{
|
||||||
private final int _points;
|
private final int _points;
|
||||||
private final int _keys;
|
private final int _keys;
|
||||||
private int _getMaxPeriodicKeys;
|
private int _remainingKeys;
|
||||||
|
|
||||||
public PurgePlayerHolder(int points, int keys, int remainingKeys)
|
public PurgePlayerHolder(int points, int keys, int remainingKeys)
|
||||||
{
|
{
|
||||||
_points = points;
|
_points = points;
|
||||||
_keys = keys;
|
_keys = keys;
|
||||||
_getMaxPeriodicKeys = remainingKeys;
|
_remainingKeys = remainingKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPoints()
|
public int getPoints()
|
||||||
@ -42,12 +42,12 @@ public class PurgePlayerHolder
|
|||||||
return _keys;
|
return _keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxPeriodicKeys()
|
public int getRemainingKeys()
|
||||||
{
|
{
|
||||||
if ((_keys == 0) && (_getMaxPeriodicKeys == 0))
|
if ((_keys == 0) && (_remainingKeys == 0))
|
||||||
{
|
{
|
||||||
_getMaxPeriodicKeys += 40;
|
_remainingKeys = 40;
|
||||||
}
|
}
|
||||||
return _getMaxPeriodicKeys;
|
return _remainingKeys;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public class ExSubjugationList implements IClientOutgoingPacket
|
|||||||
packet.writeD(integerPurgePlayerHolderEntry.getKey());
|
packet.writeD(integerPurgePlayerHolderEntry.getKey());
|
||||||
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getPoints() : 0);
|
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getPoints() : 0);
|
||||||
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getKeys() : 0);
|
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getKeys() : 0);
|
||||||
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getMaxPeriodicKeys() : 40);
|
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getRemainingKeys() : 40);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ public class CrumaTowerPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class CrumaTowerPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class DragonValleyPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class DragonValleyPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class GiantCavePurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class GiantCavePurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class GoddardTerritoryPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class GoddardTerritoryPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class OrcBarracksPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class OrcBarracksPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class PlainsOfTheLizardmenPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class PlainsOfTheLizardmenPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class SelMahumBasePurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class SelMahumBasePurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class SilentValleyPurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class SilentValleyPurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class TowerOfInsolencePurge extends AbstractNpcAI
|
|||||||
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
final int pointsForMob = isHotTime ? PURGE_DATA.getNpcs().get(npc.getId()) * 2 : PURGE_DATA.getNpcs().get(npc.getId());
|
||||||
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
final int currentPurgePoints = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getPoints();
|
||||||
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
final int currentKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys();
|
final int remainingKeys = (killer.getPurgePoints().get(CATEGORY) == null) ? 0 : killer.getPurgePoints().get(CATEGORY).getRemainingKeys();
|
||||||
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
killer.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(Math.min(PURGE_MAX_POINT, currentPurgePoints + pointsForMob), currentKeys, remainingKeys));
|
||||||
lastCategory(killer);
|
lastCategory(killer);
|
||||||
checkPurgeComplete(killer);
|
checkPurgeComplete(killer);
|
||||||
@ -77,7 +77,7 @@ public class TowerOfInsolencePurge extends AbstractNpcAI
|
|||||||
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
final int keys = player.getPurgePoints().get(CATEGORY).getKeys();
|
||||||
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
if ((points >= PURGE_MAX_POINT) && (keys < MAX_KEYS))
|
||||||
{
|
{
|
||||||
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getMaxPeriodicKeys() - 1));
|
player.getPurgePoints().put(CATEGORY, new PurgePlayerHolder(points - PURGE_MAX_POINT, keys + 1, player.getPurgePoints().get(CATEGORY).getRemainingKeys() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15599,7 +15599,7 @@ public class Player extends Playable
|
|||||||
st.setInt(2, category);
|
st.setInt(2, category);
|
||||||
st.setInt(3, data.getPoints());
|
st.setInt(3, data.getPoints());
|
||||||
st.setInt(4, data.getKeys());
|
st.setInt(4, data.getKeys());
|
||||||
st.setInt(5, data.getMaxPeriodicKeys());
|
st.setInt(5, data.getRemainingKeys());
|
||||||
st.addBatch();
|
st.addBatch();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -23,13 +23,13 @@ public class PurgePlayerHolder
|
|||||||
{
|
{
|
||||||
private final int _points;
|
private final int _points;
|
||||||
private final int _keys;
|
private final int _keys;
|
||||||
private int _getMaxPeriodicKeys;
|
private int _remainingKeys;
|
||||||
|
|
||||||
public PurgePlayerHolder(int points, int keys, int remainingKeys)
|
public PurgePlayerHolder(int points, int keys, int remainingKeys)
|
||||||
{
|
{
|
||||||
_points = points;
|
_points = points;
|
||||||
_keys = keys;
|
_keys = keys;
|
||||||
_getMaxPeriodicKeys = remainingKeys;
|
_remainingKeys = remainingKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPoints()
|
public int getPoints()
|
||||||
@ -42,12 +42,12 @@ public class PurgePlayerHolder
|
|||||||
return _keys;
|
return _keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxPeriodicKeys()
|
public int getRemainingKeys()
|
||||||
{
|
{
|
||||||
if ((_keys == 0) && (_getMaxPeriodicKeys == 0))
|
if ((_keys == 0) && (_remainingKeys == 0))
|
||||||
{
|
{
|
||||||
_getMaxPeriodicKeys += 40;
|
_remainingKeys = 40;
|
||||||
}
|
}
|
||||||
return _getMaxPeriodicKeys;
|
return _remainingKeys;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public class ExSubjugationList implements IClientOutgoingPacket
|
|||||||
packet.writeD(integerPurgePlayerHolderEntry.getKey());
|
packet.writeD(integerPurgePlayerHolderEntry.getKey());
|
||||||
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getPoints() : 0);
|
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getPoints() : 0);
|
||||||
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getKeys() : 0);
|
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getKeys() : 0);
|
||||||
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getMaxPeriodicKeys() : 40);
|
packet.writeD(integerPurgePlayerHolderEntry.getValue() != null ? integerPurgePlayerHolderEntry.getValue().getRemainingKeys() : 40);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user