|
@@ -265,6 +265,7 @@ import com.l2jserver.gameserver.templates.item.L2WeaponType;
|
|
import com.l2jserver.gameserver.templates.skills.L2EffectType;
|
|
import com.l2jserver.gameserver.templates.skills.L2EffectType;
|
|
import com.l2jserver.gameserver.templates.skills.L2SkillType;
|
|
import com.l2jserver.gameserver.templates.skills.L2SkillType;
|
|
import com.l2jserver.gameserver.util.FloodProtectors;
|
|
import com.l2jserver.gameserver.util.FloodProtectors;
|
|
|
|
+import com.l2jserver.gameserver.util.L2TIntObjectHashMap;
|
|
import com.l2jserver.gameserver.util.PlayerEventStatus;
|
|
import com.l2jserver.gameserver.util.PlayerEventStatus;
|
|
import com.l2jserver.gameserver.util.Point3D;
|
|
import com.l2jserver.gameserver.util.Point3D;
|
|
import com.l2jserver.gameserver.util.Util;
|
|
import com.l2jserver.gameserver.util.Util;
|
|
@@ -704,7 +705,7 @@ public final class L2PcInstance extends L2Playable
|
|
|
|
|
|
protected boolean _inventoryDisable = false;
|
|
protected boolean _inventoryDisable = false;
|
|
|
|
|
|
- protected Map<Integer, L2CubicInstance> _cubics = new FastMap<Integer, L2CubicInstance>().shared();
|
|
|
|
|
|
+ protected L2TIntObjectHashMap<L2CubicInstance> _cubics = new L2TIntObjectHashMap<L2CubicInstance>();
|
|
|
|
|
|
/** Active shots. */
|
|
/** Active shots. */
|
|
protected FastSet<Integer> _activeSoulShots = new FastSet<Integer>().shared();
|
|
protected FastSet<Integer> _activeSoulShots = new FastSet<Integer>().shared();
|
|
@@ -5447,7 +5448,7 @@ public final class L2PcInstance extends L2Playable
|
|
// Unsummon Cubics
|
|
// Unsummon Cubics
|
|
if (!_cubics.isEmpty())
|
|
if (!_cubics.isEmpty())
|
|
{
|
|
{
|
|
- for (L2CubicInstance cubic : _cubics.values())
|
|
|
|
|
|
+ for (L2CubicInstance cubic : _cubics.getValues(new L2CubicInstance[_cubics.size()]))
|
|
{
|
|
{
|
|
cubic.stopAction();
|
|
cubic.stopAction();
|
|
cubic.cancelDisappear();
|
|
cubic.cancelDisappear();
|
|
@@ -7794,7 +7795,7 @@ public final class L2PcInstance extends L2Playable
|
|
|
|
|
|
// Store the reuse delays of remaining skills which
|
|
// Store the reuse delays of remaining skills which
|
|
// lost effect but still under reuse delay. 'restore_type' 1.
|
|
// lost effect but still under reuse delay. 'restore_type' 1.
|
|
- for (int hash : _reuseTimeStamps.keySet())
|
|
|
|
|
|
+ for (int hash : _reuseTimeStamps.keys())
|
|
{
|
|
{
|
|
if (storedSkills.contains(hash))
|
|
if (storedSkills.contains(hash))
|
|
continue;
|
|
continue;
|
|
@@ -9441,7 +9442,7 @@ public final class L2PcInstance extends L2Playable
|
|
if (getCubics() != null)
|
|
if (getCubics() != null)
|
|
{
|
|
{
|
|
boolean removed = false;
|
|
boolean removed = false;
|
|
- for (L2CubicInstance cubic : getCubics().values())
|
|
|
|
|
|
+ for (L2CubicInstance cubic : _cubics.getValues(new L2CubicInstance[_cubics.size()]))
|
|
{
|
|
{
|
|
cubic.stopAction();
|
|
cubic.stopAction();
|
|
delCubic(cubic.getId());
|
|
delCubic(cubic.getId());
|
|
@@ -9457,7 +9458,7 @@ public final class L2PcInstance extends L2Playable
|
|
if (getCubics() != null)
|
|
if (getCubics() != null)
|
|
{
|
|
{
|
|
boolean removed = false;
|
|
boolean removed = false;
|
|
- for (L2CubicInstance cubic : getCubics().values())
|
|
|
|
|
|
+ for (L2CubicInstance cubic : _cubics.getValues(new L2CubicInstance[_cubics.size()]))
|
|
{
|
|
{
|
|
if (cubic.givenByOther())
|
|
if (cubic.givenByOther())
|
|
{
|
|
{
|
|
@@ -9519,7 +9520,7 @@ public final class L2PcInstance extends L2Playable
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public Map<Integer, L2CubicInstance> getCubics()
|
|
|
|
|
|
+ public L2TIntObjectHashMap<L2CubicInstance> getCubics()
|
|
{
|
|
{
|
|
return _cubics;
|
|
return _cubics;
|
|
}
|
|
}
|
|
@@ -9935,7 +9936,7 @@ public final class L2PcInstance extends L2Playable
|
|
|
|
|
|
if (!getCubics().isEmpty())
|
|
if (!getCubics().isEmpty())
|
|
{
|
|
{
|
|
- for (L2CubicInstance cubic : getCubics().values())
|
|
|
|
|
|
+ for (L2CubicInstance cubic : _cubics.getValues(new L2CubicInstance[_cubics.size()]))
|
|
{
|
|
{
|
|
cubic.stopAction();
|
|
cubic.stopAction();
|
|
cubic.cancelDisappear();
|
|
cubic.cancelDisappear();
|
|
@@ -12980,17 +12981,17 @@ public final class L2PcInstance extends L2Playable
|
|
addSkill(SkillTable.getInstance().getInfo(5076, getDeathPenaltyBuffLevel()), false);
|
|
addSkill(SkillTable.getInstance().getInfo(5076, getDeathPenaltyBuffLevel()), false);
|
|
}
|
|
}
|
|
|
|
|
|
- private final FastMap<Integer, TimeStamp> _reuseTimeStamps = new FastMap<Integer, TimeStamp>().shared();
|
|
|
|
|
|
+ private final L2TIntObjectHashMap<TimeStamp> _reuseTimeStamps = new L2TIntObjectHashMap<TimeStamp>();
|
|
private boolean _canFeed;
|
|
private boolean _canFeed;
|
|
private int _eventEffectId = 0;
|
|
private int _eventEffectId = 0;
|
|
private boolean _isInSiege;
|
|
private boolean _isInSiege;
|
|
|
|
|
|
- public Collection<TimeStamp> getReuseTimeStamps()
|
|
|
|
|
|
+ public TimeStamp[] getReuseTimeStamps()
|
|
{
|
|
{
|
|
- return _reuseTimeStamps.values();
|
|
|
|
|
|
+ return _reuseTimeStamps.getValues(new TimeStamp[_reuseTimeStamps.size()]);
|
|
}
|
|
}
|
|
|
|
|
|
- public FastMap<Integer, TimeStamp> getReuseTimeStamp()
|
|
|
|
|
|
+ public L2TIntObjectHashMap<TimeStamp> getReuseTimeStamp()
|
|
{
|
|
{
|
|
return _reuseTimeStamps;
|
|
return _reuseTimeStamps;
|
|
}
|
|
}
|