Retail behavior for premium hennas.
This commit is contained in:
@ -66,10 +66,6 @@ public class PremiumManager
|
||||
{
|
||||
player.setPremiumStatus(false);
|
||||
player.sendPacket(new ExBrPremiumState(player));
|
||||
if (player.getHenna(4) != null)
|
||||
{
|
||||
player.removeHenna(4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,10 +91,6 @@ public class PremiumManager
|
||||
{
|
||||
startExpireTask(player, premiumExpiration - now);
|
||||
}
|
||||
else if (player.getHenna(4) != null)
|
||||
{
|
||||
player.removeHenna(4);
|
||||
}
|
||||
};
|
||||
|
||||
private final Consumer<OnPlayerLogout> playerLogoutEvent = (event) ->
|
||||
@ -211,10 +203,6 @@ public class PremiumManager
|
||||
playerOnline.setPremiumStatus(false);
|
||||
playerOnline.sendPacket(new ExBrPremiumState(playerOnline));
|
||||
stopExpireTask(playerOnline);
|
||||
if (playerOnline.getHenna(4) != null)
|
||||
{
|
||||
playerOnline.removeHenna(4);
|
||||
}
|
||||
}
|
||||
|
||||
// UPDATE CACHE
|
||||
|
@ -7947,12 +7947,12 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (i == 4)
|
||||
{
|
||||
if ((_henna[3] != null) || (henna.getDyeItemId() < 23825) || (henna.getDyeItemId() > 23830))
|
||||
if ((_henna[3] != null) || !henna.isPremium())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ((henna.getDyeItemId() > 23824) && (henna.getDyeItemId() < 23831))
|
||||
else if (henna.isPremium())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ public class L2Henna
|
||||
private final int _dyeId;
|
||||
private final String _dyeName;
|
||||
private final int _dyeItemId;
|
||||
private final boolean _isPremium;
|
||||
private final Map<BaseStats, Integer> _baseStats = new HashMap<>();
|
||||
private final int _wear_fee;
|
||||
private final int _wear_count;
|
||||
@ -50,6 +51,7 @@ public class L2Henna
|
||||
_dyeId = set.getInt("dyeId");
|
||||
_dyeName = set.getString("dyeName");
|
||||
_dyeItemId = set.getInt("dyeItemId");
|
||||
_isPremium = set.getBoolean("isPremium", false);
|
||||
_baseStats.put(BaseStats.STR, set.getInt("str", 0));
|
||||
_baseStats.put(BaseStats.CON, set.getInt("con", 0));
|
||||
_baseStats.put(BaseStats.DEX, set.getInt("dex", 0));
|
||||
@ -91,6 +93,14 @@ public class L2Henna
|
||||
return _dyeItemId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if this dye is premium.
|
||||
*/
|
||||
public boolean isPremium()
|
||||
{
|
||||
return _isPremium;
|
||||
}
|
||||
|
||||
public int getBaseStats(Stats stat)
|
||||
{
|
||||
return _baseStats.getOrDefault(stat, 0);
|
||||
|
@ -361,14 +361,7 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
// activeChar.queryGameGuard();
|
||||
|
||||
// Send Dye Information
|
||||
if (!Config.PREMIUM_SYSTEM_ENABLED && (activeChar.getHenna(4) != null))
|
||||
{
|
||||
activeChar.removeHenna(4);
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendPacket(new HennaInfo(activeChar));
|
||||
}
|
||||
activeChar.sendPacket(new HennaInfo(activeChar));
|
||||
|
||||
// Send Skill list
|
||||
activeChar.sendSkillList();
|
||||
|
Reference in New Issue
Block a user