gabrielb

VIP_System_Classic_Custom_Addon_By_Gabriel

Apr 27th, 2021
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 155.09 KB | None | 0 0
  1. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/ExIncomingPackets.java
  2. IDEA additional info:
  3. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  4. <+>UTF-8
  5. ===================================================================
  6. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/ExIncomingPackets.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/ExIncomingPackets.java
  7. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/ExIncomingPackets.java (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  8. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/ExIncomingPackets.java (date 1619536846667)
  9. @@ -109,6 +109,9 @@
  10.  import org.l2jmobius.gameserver.network.clientpackets.shuttle.RequestShuttleGetOff;
  11.  import org.l2jmobius.gameserver.network.clientpackets.shuttle.RequestShuttleGetOn;
  12.  import org.l2jmobius.gameserver.network.clientpackets.training.NotifyTrainingRoomEnd;
  13. +import org.l2jmobius.gameserver.network.clientpackets.vip.ExRequestVipInfo;
  14. +import org.l2jmobius.gameserver.network.clientpackets.vip.RequestVipLuckGameInfo;
  15. +import org.l2jmobius.gameserver.network.clientpackets.vip.RequestVipProductList;
  16.  
  17.  /**
  18.   * @author Sdw
  19. @@ -379,11 +382,11 @@
  20.     REQUEST_VIP_ATTENDANCE_CHECK(0x106, RequestVipAttendanceCheck::new, ConnectionState.IN_GAME),
  21.     REQUEST_ITEM_ENSOUL(0x107, RequestItemEnsoul::new, ConnectionState.IN_GAME),
  22.     REQUEST_CASTLE_WAR_SEASON_REWARD(0x108, null, ConnectionState.IN_GAME),
  23. -   REQUEST_VIP_PRODUCT_LIST(0x109, null, ConnectionState.IN_GAME),
  24. -   REQUEST_VIP_LUCKY_GAME_INFO(0x10A, null, ConnectionState.IN_GAME),
  25. +   REQUEST_VIP_PRODUCT_LIST(0x109, RequestVipProductList::new, ConnectionState.IN_GAME),
  26. +   REQUEST_VIP_LUCKY_GAME_INFO(0x10A, RequestVipLuckGameInfo::new, ConnectionState.IN_GAME),
  27.     REQUEST_VIP_LUCKY_GAME_ITEM_LIST(0x10B, null, ConnectionState.IN_GAME),
  28.     REQUEST_VIP_LUCKY_GAME_BONUS(0x10C, null, ConnectionState.IN_GAME),
  29. -   EX_REQUEST_VIP_INFO(0x10D, null, ConnectionState.IN_GAME),
  30. +   EX_REQUEST_VIP_INFO(0x10D, ExRequestVipInfo::new, ConnectionState.IN_GAME),
  31.     REQUEST_CAPTCHA_ANSWER(0x10E, null, ConnectionState.IN_GAME),
  32.     REQUEST_REFRESH_CAPTCHA_IMAGE(0x10F, null, ConnectionState.IN_GAME),
  33.     REQUEST_PLEDGE_SIGN_IN_FOR_OPEN_JOINING_METHOD(0x110, RequestPledgeSignInForOpenJoiningMethod::new, ConnectionState.IN_GAME),
  34. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExBrPremiumState.java
  35. IDEA additional info:
  36. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  37. <+>UTF-8
  38. ===================================================================
  39. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExBrPremiumState.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExBrPremiumState.java
  40. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExBrPremiumState.java    (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  41. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExBrPremiumState.java    (date 1619561836514)
  42. @@ -38,7 +38,7 @@
  43.         OutgoingPackets.EX_BR_PREMIUM_STATE.writeId(packet);
  44.        
  45.         packet.writeD(_player.getObjectId());
  46. -       packet.writeC(_player.hasPremiumStatus() ? 0x01 : 0x00);
  47. +       packet.writeC(_player.hasPremiumStatus() || _player.getVipTier() > 0 ? 0x01 : 0x00 );
  48.         return true;
  49.     }
  50.  }
  51. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/GameServer.java
  52. IDEA additional info:
  53. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  54. <+>UTF-8
  55. ===================================================================
  56. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/GameServer.java
  57. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/GameServer.java    (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  58. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/GameServer.java    (date 1619536592027)
  59. @@ -45,66 +45,7 @@
  60.  import org.l2jmobius.gameserver.data.sql.ClanTable;
  61.  import org.l2jmobius.gameserver.data.sql.CrestTable;
  62.  import org.l2jmobius.gameserver.data.sql.OfflineTraderTable;
  63. -import org.l2jmobius.gameserver.data.xml.ActionData;
  64. -import org.l2jmobius.gameserver.data.xml.AdminData;
  65. -import org.l2jmobius.gameserver.data.xml.AgathionData;
  66. -import org.l2jmobius.gameserver.data.xml.AppearanceItemData;
  67. -import org.l2jmobius.gameserver.data.xml.ArmorSetData;
  68. -import org.l2jmobius.gameserver.data.xml.AttendanceRewardData;
  69. -import org.l2jmobius.gameserver.data.xml.BeautyShopData;
  70. -import org.l2jmobius.gameserver.data.xml.BuyListData;
  71. -import org.l2jmobius.gameserver.data.xml.CategoryData;
  72. -import org.l2jmobius.gameserver.data.xml.ClanHallData;
  73. -import org.l2jmobius.gameserver.data.xml.ClanRewardData;
  74. -import org.l2jmobius.gameserver.data.xml.ClassListData;
  75. -import org.l2jmobius.gameserver.data.xml.CombinationItemsData;
  76. -import org.l2jmobius.gameserver.data.xml.CubicData;
  77. -import org.l2jmobius.gameserver.data.xml.DailyMissionData;
  78. -import org.l2jmobius.gameserver.data.xml.DoorData;
  79. -import org.l2jmobius.gameserver.data.xml.ElementalSpiritData;
  80. -import org.l2jmobius.gameserver.data.xml.EnchantItemData;
  81. -import org.l2jmobius.gameserver.data.xml.EnchantItemGroupsData;
  82. -import org.l2jmobius.gameserver.data.xml.EnchantItemHPBonusData;
  83. -import org.l2jmobius.gameserver.data.xml.EnchantItemOptionsData;
  84. -import org.l2jmobius.gameserver.data.xml.EnchantSkillGroupsData;
  85. -import org.l2jmobius.gameserver.data.xml.EnsoulData;
  86. -import org.l2jmobius.gameserver.data.xml.EquipmentUpgradeData;
  87. -import org.l2jmobius.gameserver.data.xml.EventEngineData;
  88. -import org.l2jmobius.gameserver.data.xml.ExperienceData;
  89. -import org.l2jmobius.gameserver.data.xml.FakePlayerData;
  90. -import org.l2jmobius.gameserver.data.xml.FenceData;
  91. -import org.l2jmobius.gameserver.data.xml.FishingData;
  92. -import org.l2jmobius.gameserver.data.xml.HennaData;
  93. -import org.l2jmobius.gameserver.data.xml.HitConditionBonusData;
  94. -import org.l2jmobius.gameserver.data.xml.InitialEquipmentData;
  95. -import org.l2jmobius.gameserver.data.xml.InitialShortcutData;
  96. -import org.l2jmobius.gameserver.data.xml.ItemCrystallizationData;
  97. -import org.l2jmobius.gameserver.data.xml.KarmaData;
  98. -import org.l2jmobius.gameserver.data.xml.LuckyGameData;
  99. -import org.l2jmobius.gameserver.data.xml.MultisellData;
  100. -import org.l2jmobius.gameserver.data.xml.NpcData;
  101. -import org.l2jmobius.gameserver.data.xml.NpcNameLocalisationData;
  102. -import org.l2jmobius.gameserver.data.xml.OptionData;
  103. -import org.l2jmobius.gameserver.data.xml.PetDataTable;
  104. -import org.l2jmobius.gameserver.data.xml.PetSkillData;
  105. -import org.l2jmobius.gameserver.data.xml.PlayerTemplateData;
  106. -import org.l2jmobius.gameserver.data.xml.PlayerXpPercentLostData;
  107. -import org.l2jmobius.gameserver.data.xml.PrimeShopData;
  108. -import org.l2jmobius.gameserver.data.xml.RecipeData;
  109. -import org.l2jmobius.gameserver.data.xml.ResidenceFunctionsData;
  110. -import org.l2jmobius.gameserver.data.xml.SayuneData;
  111. -import org.l2jmobius.gameserver.data.xml.SecondaryAuthData;
  112. -import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
  113. -import org.l2jmobius.gameserver.data.xml.ShuttleData;
  114. -import org.l2jmobius.gameserver.data.xml.SiegeScheduleData;
  115. -import org.l2jmobius.gameserver.data.xml.SkillData;
  116. -import org.l2jmobius.gameserver.data.xml.SkillTreeData;
  117. -import org.l2jmobius.gameserver.data.xml.SpawnData;
  118. -import org.l2jmobius.gameserver.data.xml.StaticObjectData;
  119. -import org.l2jmobius.gameserver.data.xml.TeleportListData;
  120. -import org.l2jmobius.gameserver.data.xml.TeleporterData;
  121. -import org.l2jmobius.gameserver.data.xml.TransformData;
  122. -import org.l2jmobius.gameserver.data.xml.VariationData;
  123. +import org.l2jmobius.gameserver.data.xml.*;
  124.  import org.l2jmobius.gameserver.geoengine.GeoEngine;
  125.  import org.l2jmobius.gameserver.handler.ConditionHandler;
  126.  import org.l2jmobius.gameserver.handler.DailyMissionHandler;
  127. @@ -152,6 +93,7 @@
  128.  import org.l2jmobius.gameserver.model.events.EventDispatcher;
  129.  import org.l2jmobius.gameserver.model.olympiad.Hero;
  130.  import org.l2jmobius.gameserver.model.olympiad.Olympiad;
  131. +import org.l2jmobius.gameserver.model.vip.VipManager;
  132.  import org.l2jmobius.gameserver.model.votereward.VoteSystem;
  133.  import org.l2jmobius.gameserver.network.ClientNetworkManager;
  134.  import org.l2jmobius.gameserver.network.NpcStringId;
  135. @@ -282,7 +224,8 @@
  136.         CommissionManager.getInstance();
  137.         LuckyGameData.getInstance();
  138.         AttendanceRewardData.getInstance();
  139. -      
  140. +        VipData.getInstance();
  141. +
  142.         printSection("Characters");
  143.         ClassListData.getInstance();
  144.         InitialEquipmentData.getInstance();
  145. @@ -299,7 +242,8 @@
  146.         CharSummonTable.getInstance().init();
  147.         BeautyShopData.getInstance();
  148.         MentorManager.getInstance();
  149. -      
  150. +        VipManager.getInstance();
  151. +
  152.         if (Config.FACTION_SYSTEM_ENABLED)
  153.         {
  154.             FactionManager.getInstance();
  155. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
  156. IDEA additional info:
  157. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  158. <+>UTF-8
  159. ===================================================================
  160. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
  161. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java   (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  162. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java   (date 1619538535223)
  163. @@ -21,6 +21,8 @@
  164.  import java.sql.PreparedStatement;
  165.  import java.sql.ResultSet;
  166.  import java.sql.SQLException;
  167. +import java.time.Instant;
  168. +import java.time.temporal.ChronoUnit;
  169.  import java.util.ArrayList;
  170.  import java.util.Arrays;
  171.  import java.util.Calendar;
  172. @@ -199,23 +201,7 @@
  173.  import org.l2jmobius.gameserver.model.eventengine.AbstractEvent;
  174.  import org.l2jmobius.gameserver.model.events.EventDispatcher;
  175.  import org.l2jmobius.gameserver.model.events.EventType;
  176. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayableExpChanged;
  177. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerAbilityPointsChanged;
  178. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerFameChanged;
  179. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerHennaAdd;
  180. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerHennaRemove;
  181. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemEquip;
  182. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
  183. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogout;
  184. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerMenteeStatus;
  185. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerMentorStatus;
  186. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerPKChanged;
  187. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerProfessionCancel;
  188. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerProfessionChange;
  189. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerPvPChanged;
  190. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerPvPKill;
  191. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerReputationChanged;
  192. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSubChange;
  193. +import org.l2jmobius.gameserver.model.events.impl.creature.player.*;
  194.  import org.l2jmobius.gameserver.model.events.listeners.FunctionEventListener;
  195.  import org.l2jmobius.gameserver.model.events.returns.TerminateReturn;
  196.  import org.l2jmobius.gameserver.model.events.timers.TimerHolder;
  197. @@ -278,6 +264,7 @@
  198.  import org.l2jmobius.gameserver.model.stats.Stat;
  199.  import org.l2jmobius.gameserver.model.variables.AccountVariables;
  200.  import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  201. +import org.l2jmobius.gameserver.model.vip.VipManager;
  202.  import org.l2jmobius.gameserver.model.zone.ZoneId;
  203.  import org.l2jmobius.gameserver.model.zone.ZoneType;
  204.  import org.l2jmobius.gameserver.model.zone.type.WaterZone;
  205. @@ -355,6 +342,7 @@
  206.  import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
  207.  import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
  208.  import org.l2jmobius.gameserver.network.serverpackets.sessionzones.TimedHuntingZoneExit;
  209. +import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo;
  210.  import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
  211.  import org.l2jmobius.gameserver.taskmanager.AutoPlayTaskManager;
  212.  import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
  213. @@ -870,7 +858,7 @@
  214.     private final AutoUseSettingsHolder _autoUseSettings = new AutoUseSettingsHolder();
  215.    
  216.     private ScheduledFuture<?> _timedHuntingZoneFinishTask = null;
  217. -  
  218. +    private byte vipTier = 0;
  219.     private final List<QuestTimer> _questTimers = new ArrayList<>();
  220.     private final List<TimerHolder<?>> _timerHolders = new ArrayList<>();
  221.    
  222. @@ -2880,6 +2868,21 @@
  223.     {
  224.         return _inventory.getAdena();
  225.     }
  226. +
  227. +   /**
  228. +    * @return the Gold Coin amount of the PlayerInstance.
  229. +    */
  230. +   public long getGoldCoin()
  231. +   {
  232. +       return _inventory.getGoldCoin();
  233. +   }
  234. +   /**
  235. +    * @return the Silver Coin of the PlayerInstance.
  236. +    */
  237. +   public long getSilverCoin()
  238. +   {
  239. +       return _inventory.getSilverCoin();
  240. +   }
  241.    
  242.     /**
  243.      * @return the Ancient Adena amount of the PlayerInstance.
  244. @@ -6565,8 +6568,10 @@
  245.             {
  246.                 return null;
  247.             }
  248. -          
  249. -           if (player.isGM())
  250. +
  251. +            EventDispatcher.getInstance().notifyEventAsync(new OnPlayerLoad(player), player);
  252. +
  253. +            if (player.isGM())
  254.             {
  255.                 final long masks = player.getVariables().getLong(COND_OVERRIDE_KEY, PlayerCondOverride.getAllExceptionsMask());
  256.                 player.setOverrideCond(masks);
  257. @@ -6659,7 +6664,8 @@
  258.             player.setOnlineStatus(true, false);
  259.            
  260.             PlayerAutoSaveTaskManager.getInstance().add(player);
  261. -       }
  262. +
  263. +        }
  264.         catch (Exception e)
  265.         {
  266.             LOGGER.log(Level.SEVERE, "Failed loading character.", e);
  267. @@ -9941,8 +9947,9 @@
  268.         {
  269.             LOGGER.log(Level.SEVERE, "", e);
  270.         }
  271. -      
  272. +
  273.         EventDispatcher.getInstance().notifyEventAsync(new OnPlayerLogin(this), this);
  274. +
  275.         if (isMentee())
  276.         {
  277.             // Notify to scripts
  278. @@ -14242,4 +14249,44 @@
  279.         }
  280.         return 0;
  281.     }
  282. +    public byte getVipTier() {
  283. +        return vipTier;
  284. +    }
  285. +
  286. +    public void setVipTier(byte vipTier) {
  287. +        this.vipTier = vipTier;
  288. +    }
  289. +
  290. +    public long getVipPoints()
  291. +    {
  292. +        return getAccountVariables().getLong(AccountVariables.VIP_POINTS, 0L);
  293. +    }
  294. +
  295. +    public long getVipTierExpiration() {
  296. +        return getAccountVariables().getLong(AccountVariables.VIP_EXPIRATION, 0L);
  297. +    }
  298. +
  299. +    public void setVipTierExpiration(long expiration) {
  300. +        getAccountVariables().set(AccountVariables.VIP_EXPIRATION, expiration);
  301. +    }
  302. +
  303. +    public void updateVipPoints(long points) {
  304. +        if(points == 0) {
  305. +            return;
  306. +        }
  307. +        var currentVipTier = VipManager.getInstance().getVipTier(getVipPoints());
  308. +        getAccountVariables().set(AccountVariables.VIP_POINTS, getVipPoints() + points);
  309. +        var newTier = VipManager.getInstance().getVipTier(getVipPoints());
  310. +        if(newTier != currentVipTier) {
  311. +            vipTier = newTier;
  312. +            if(newTier > 0) {
  313. +                getAccountVariables().set(AccountVariables.VIP_EXPIRATION, Instant.now().plus(30, ChronoUnit.DAYS).toEpochMilli());
  314. +                VipManager.getInstance().manageTier(this);
  315. +            } else {
  316. +                getAccountVariables().set(AccountVariables.VIP_EXPIRATION, 0L);
  317. +            }
  318. +        }
  319. +        getAccountVariables().storeMe(); //force to store to prevent falty purchases after a crash.
  320. +        sendPacket(new ReceiveVipInfo(this));
  321. +    }
  322.  }
  323. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java
  324. IDEA additional info:
  325. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  326. <+>UTF-8
  327. ===================================================================
  328. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java
  329. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java  (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  330. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/variables/AccountVariables.java  (date 1619536553343)
  331. @@ -37,11 +37,16 @@
  332.     private static final String SELECT_QUERY = "SELECT * FROM account_gsdata WHERE account_name = ?";
  333.     private static final String DELETE_QUERY = "DELETE FROM account_gsdata WHERE account_name = ?";
  334.     private static final String INSERT_QUERY = "INSERT INTO account_gsdata (account_name, var, value) VALUES (?, ?, ?)";
  335. -  
  336. +   private static final String DELETE_QUERY_VAR = "DELETE FROM account_gsdata where var = ?";
  337. +
  338.     // Public variable names
  339.     public static final String HWID = "HWID";
  340.     public static final String HWIDSLIT_VAR = " ";
  341. -  
  342. +   public static final String VIP_POINTS = "VipPoints";
  343. +   public static final String VIP_TIER = "VipTier";
  344. +   public static final String VIP_EXPIRATION = "VipExpiration";
  345. +   public static final String VIP_ITEM_BOUGHT = "Vip_Item_Bought";
  346. +
  347.     private final String _accountName;
  348.    
  349.     public AccountVariables(String accountName)
  350. @@ -143,4 +148,28 @@
  351.         }
  352.         return true;
  353.     }
  354. +
  355. +    /**
  356. +     * Delete all entries for an requested var
  357. +     * @param var
  358. +     * @return success
  359. +     */
  360. +   public static boolean deleteVipPurchases(String var)
  361. +   {
  362. +       try (Connection con = DatabaseFactory.getConnection())
  363. +       {
  364. +           // Clear previous entries.
  365. +           try (PreparedStatement st = con.prepareStatement(DELETE_QUERY_VAR))
  366. +           {
  367. +               st.setString(1, var);
  368. +               st.execute();
  369. +           }
  370. +       }
  371. +       catch (Exception e)
  372. +       {
  373. +           LOGGER.log(Level.WARNING, "AccountVariables: Couldn't delete vip variables!", e);
  374. +           return false;
  375. +       }
  376. +       return true;
  377. +   }
  378.  }
  379. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExBRNewIconCashBtnWnd.java
  380. IDEA additional info:
  381. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  382. <+>UTF-8
  383. ===================================================================
  384. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExBRNewIconCashBtnWnd.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExBRNewIconCashBtnWnd.java
  385. new file mode 100644
  386. --- /dev/null   (date 1619536553418)
  387. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExBRNewIconCashBtnWnd.java   (date 1619536553418)
  388. @@ -0,0 +1,27 @@
  389. +package org.l2jmobius.gameserver.network.serverpackets;
  390. +
  391. +import org.l2jmobius.commons.network.PacketWriter;
  392. +import org.l2jmobius.gameserver.network.OutgoingPackets;
  393. +
  394. +/**
  395. + * @author Gabriel Costa Souza
  396. + * Discord: Gabriel 'GCS'#2589
  397. + * Skype - email: gabriel_costa25@hotmail.com
  398. + */
  399. +public class ExBRNewIconCashBtnWnd implements IClientOutgoingPacket
  400. +{
  401. +    private final short active;
  402. +
  403. +    public ExBRNewIconCashBtnWnd(short active)
  404. +    {
  405. +        this.active = active;
  406. +    }
  407. +
  408. +    @Override
  409. +    public boolean write(PacketWriter packet)
  410. +    {
  411. +        OutgoingPackets.EX_BR_NEW_ICON_CASH_BTN_WND.writeId(packet);
  412. +        packet.writeH(active);
  413. +        return true;
  414. +    }
  415. +}
  416. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/vip/ReceiveVipLuckyGameInfo.java
  417. IDEA additional info:
  418. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  419. <+>UTF-8
  420. ===================================================================
  421. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/vip/ReceiveVipLuckyGameInfo.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/vip/ReceiveVipLuckyGameInfo.java
  422. new file mode 100644
  423. --- /dev/null   (date 1619536553415)
  424. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/vip/ReceiveVipLuckyGameInfo.java (date 1619536553415)
  425. @@ -0,0 +1,54 @@
  426. +/*
  427. + * This file is part of the L2J Mobius project.
  428. + *
  429. + * This program is free software: you can redistribute it and/or modify
  430. + * it under the terms of the GNU General Public License as published by
  431. + * the Free Software Foundation, either version 3 of the License, or
  432. + * (at your option) any later version.
  433. + *
  434. + * This program is distributed in the hope that it will be useful,
  435. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  436. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  437. + * General Public License for more details.
  438. + *
  439. + * You should have received a copy of the GNU General Public License
  440. + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  441. + */
  442. +package org.l2jmobius.gameserver.network.serverpackets.vip;
  443. +
  444. +import org.l2jmobius.commons.network.PacketWriter;
  445. +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
  446. +import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
  447. +import org.l2jmobius.gameserver.model.variables.AccountVariables;
  448. +import org.l2jmobius.gameserver.model.vip.VipManager;
  449. +import org.l2jmobius.gameserver.network.OutgoingPackets;
  450. +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
  451. +
  452. +import java.time.Instant;
  453. +import java.time.temporal.ChronoUnit;
  454. +
  455. +/**
  456. + * @author Gabriel Costa Souza
  457. + * Discord: Gabriel 'GCS'#2589
  458. + * Skype - email: gabriel_costa25@hotmail.com
  459. + */
  460. +public class ReceiveVipLuckyGameInfo implements IClientOutgoingPacket
  461. +{
  462. +    private final PlayerInstance _player;
  463. +    private final int LCOIN = 91663;
  464. +
  465. +    public ReceiveVipLuckyGameInfo(PlayerInstance player)
  466. +    {
  467. +        _player = player;
  468. +    }
  469. +   @Override
  470. +   public boolean write(PacketWriter packet)
  471. +   {
  472. +        OutgoingPackets.RECIVE_VIP_LUCKY_GAME_INFO.writeId(packet);
  473. +        packet.writeC(1); // enabled
  474. +        packet.writeH((int) _player.getAdena());
  475. +        ItemInstance item = _player.getInventory().getItemByItemId(LCOIN);
  476. +        packet.writeH(item == null? 0 : (int) item.getCount()); //L Coin count
  477. +       return true;
  478. +   }
  479. +}
  480. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/PlayerInventory.java
  481. IDEA additional info:
  482. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  483. <+>UTF-8
  484. ===================================================================
  485. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/PlayerInventory.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/PlayerInventory.java
  486. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/PlayerInventory.java   (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  487. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/PlayerInventory.java   (date 1619537795545)
  488. @@ -53,6 +53,8 @@
  489.    
  490.     private final PlayerInstance _owner;
  491.     private ItemInstance _adena;
  492. +   private ItemInstance _goldCoin;
  493. +   private ItemInstance _silverCoin;
  494.     private ItemInstance _ancientAdena;
  495.     private ItemInstance _beautyTickets;
  496.     private Collection<Integer> _blockItems = null;
  497. @@ -92,6 +94,16 @@
  498.     {
  499.         return _adena != null ? _adena.getCount() : 0;
  500.     }
  501. +
  502. +   public long getGoldCoin()
  503. +   {
  504. +       return _goldCoin != null ? _goldCoin.getCount() : 0;
  505. +   }
  506. +
  507. +   public long getSilverCoin()
  508. +   {
  509. +       return _silverCoin != null ? _silverCoin.getCount() : 0;
  510. +   }
  511.    
  512.     public ItemInstance getAncientAdenaInstance()
  513.     {
  514. @@ -403,6 +415,14 @@
  515.             {
  516.                 _adena = addedItem;
  517.             }
  518. +           else if ((addedItem.getId() == SILVER_COIN) && !addedItem.equals(_silverCoin))
  519. +           {
  520. +                _silverCoin = addedItem;
  521. +           }
  522. +           else if ((addedItem.getId() == GOLD_COIN) && !addedItem.equals(_goldCoin))
  523. +           {
  524. +                _goldCoin = addedItem;
  525. +           }
  526.             else if ((addedItem.getId() == ANCIENT_ADENA_ID) && !addedItem.equals(_ancientAdena))
  527.             {
  528.                 _ancientAdena = addedItem;
  529. @@ -467,6 +487,14 @@
  530.             {
  531.                 _adena = item;
  532.             }
  533. +            else if ((item.getId() == SILVER_COIN) && !item.equals(_silverCoin))
  534. +            {
  535. +                _silverCoin = item;
  536. +            }
  537. +            else if ((item.getId() == GOLD_COIN) && !item.equals(_goldCoin))
  538. +            {
  539. +                _goldCoin = item;
  540. +            }
  541.             else if ((item.getId() == ANCIENT_ADENA_ID) && !item.equals(_ancientAdena))
  542.             {
  543.                 _ancientAdena = item;
  544. @@ -515,11 +543,23 @@
  545.     {
  546.         final ItemInstance item = super.transferItem(process, objectId, count, target, actor, reference);
  547.        
  548. +       if ((_adena != null) && ((_adena.getCount() <= 0) || (_adena.getOwnerId() != getOwnerId())))
  549. +       {
  550. +           _adena = null;
  551. +       }
  552. +       if ((_silverCoin != null) && ((_silverCoin.getCount() <= 0) || (_silverCoin.getOwnerId() != getOwnerId())))
  553. +       {
  554. +            _silverCoin = null;
  555. +       }
  556. +       if ((_goldCoin != null) && ((_goldCoin.getCount() <= 0) || (_goldCoin.getOwnerId() != getOwnerId())))
  557. +       {
  558. +            _goldCoin = null;
  559. +       }
  560.         if ((_adena != null) && ((_adena.getCount() <= 0) || (_adena.getOwnerId() != getOwnerId())))
  561.         {
  562.             _adena = null;
  563.         }
  564. -      
  565. +
  566.         if ((_ancientAdena != null) && ((_ancientAdena.getCount() <= 0) || (_ancientAdena.getOwnerId() != getOwnerId())))
  567.         {
  568.             _ancientAdena = null;
  569. @@ -573,6 +613,14 @@
  570.         {
  571.             _adena = null;
  572.         }
  573. +       if ((_silverCoin != null) && (_silverCoin.getCount() <= 0))
  574. +       {
  575. +            _silverCoin = null;
  576. +       }
  577. +       if ((_goldCoin != null) && (_goldCoin.getCount() <= 0))
  578. +       {
  579. +            _goldCoin = null;
  580. +       }
  581.        
  582.         if ((_ancientAdena != null) && (_ancientAdena.getCount() <= 0))
  583.         {
  584. @@ -637,6 +685,14 @@
  585.         {
  586.             _adena = null;
  587.         }
  588. +       if ((_silverCoin != null) && ((_silverCoin.getCount() <= 0) || (_silverCoin.getOwnerId() != getOwnerId())))
  589. +       {
  590. +            _silverCoin = null;
  591. +       }
  592. +       if ((_goldCoin != null) && ((_goldCoin.getCount() <= 0) || (_goldCoin.getOwnerId() != getOwnerId())))
  593. +       {
  594. +            _goldCoin = null;
  595. +       }
  596.        
  597.         if ((_ancientAdena != null) && ((_ancientAdena.getCount() <= 0) || (_ancientAdena.getOwnerId() != getOwnerId())))
  598.         {
  599. @@ -670,6 +726,16 @@
  600.         {
  601.             _adena = null;
  602.         }
  603. +
  604. +       if ((_silverCoin != null) && ((_silverCoin.getCount() <= 0) || (_silverCoin.getOwnerId() != getOwnerId())))
  605. +       {
  606. +            _silverCoin = null;
  607. +       }
  608. +
  609. +       if ((_goldCoin != null) && ((_goldCoin.getCount() <= 0) || (_goldCoin.getOwnerId() != getOwnerId())))
  610. +       {
  611. +            _goldCoin = null;
  612. +       }
  613.        
  614.         if ((_ancientAdena != null) && ((_ancientAdena.getCount() <= 0) || (_ancientAdena.getOwnerId() != getOwnerId())))
  615.         {
  616. @@ -720,6 +786,14 @@
  617.         {
  618.             _adena = null;
  619.         }
  620. +       else if (item.getId() == SILVER_COIN)
  621. +       {
  622. +           _silverCoin = null;
  623. +       }
  624. +       else if (item.getId() == GOLD_COIN)
  625. +       {
  626. +           _goldCoin = null;
  627. +       }
  628.         else if (item.getId() == ANCIENT_ADENA_ID)
  629.         {
  630.             _ancientAdena = null;
  631. @@ -771,6 +845,8 @@
  632.     {
  633.         super.restore();
  634.         _adena = getItemByItemId(ADENA_ID);
  635. +       _silverCoin = getItemByItemId(SILVER_COIN);
  636. +       _goldCoin = getItemByItemId(GOLD_COIN);
  637.         _ancientAdena = getItemByItemId(ANCIENT_ADENA_ID);
  638.         _beautyTickets = getItemByItemId(BEAUTY_TICKET_ID);
  639.     }
  640. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java
  641. IDEA additional info:
  642. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  643. <+>UTF-8
  644. ===================================================================
  645. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java
  646. --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  647. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java (date 1619536339475)
  648. @@ -66,6 +66,7 @@
  649.         EffectHandler.getInstance().registerHandler("BlockSkill", BlockSkill::new);
  650.         EffectHandler.getInstance().registerHandler("BlockTarget", BlockTarget::new);
  651.         EffectHandler.getInstance().registerHandler("Bluff", Bluff::new);
  652. +       EffectHandler.getInstance().registerHandler("VipUp", VipUp::new);
  653.         EffectHandler.getInstance().registerHandler("BonusDropAdena", BonusDropAdena::new);
  654.         EffectHandler.getInstance().registerHandler("BonusDropAmount", BonusDropAmount::new);
  655.         EffectHandler.getInstance().registerHandler("BonusDropRate", BonusDropRate::new);
  656. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRPresentBuyProduct.java
  657. IDEA additional info:
  658. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  659. <+>UTF-8
  660. ===================================================================
  661. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRPresentBuyProduct.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRPresentBuyProduct.java
  662. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRPresentBuyProduct.java    (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  663. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRPresentBuyProduct.java    (date 1619543947835)
  664. @@ -88,6 +88,12 @@
  665.         player.addRequest(new PrimeShopRequest(player));
  666.        
  667.         final PrimeShopGroup item = PrimeShopData.getInstance().getItem(_brId);
  668. +
  669. +       if(item.isVipGift()){
  670. +           player.sendMessage("You cannot gift a Vip Gift!");
  671. +           return;
  672. +        }
  673. +
  674.         if (validatePlayer(item, _count, player))
  675.         {
  676.             final int price = (item.getPrice() * _count);
  677. @@ -116,6 +122,8 @@
  678.                     return;
  679.                 }
  680.                 player.setPrimePoints(player.getPrimePoints() - price);
  681. +               if(Config.VIP_SYSTEM_PRIME_AFFECT)
  682. +                   player.updateVipPoints(price);
  683.             }
  684.            
  685.             player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.SUCCESS));
  686. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java
  687. IDEA additional info:
  688. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  689. <+>UTF-8
  690. ===================================================================
  691. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java
  692. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java   (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  693. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java   (date 1619556307890)
  694. @@ -17,6 +17,8 @@
  695.  package org.l2jmobius.gameserver.network.clientpackets.primeshop;
  696.  
  697.  import java.util.Calendar;
  698. +import java.util.LinkedList;
  699. +import java.util.List;
  700.  
  701.  import org.l2jmobius.Config;
  702.  import org.l2jmobius.commons.network.PacketReader;
  703. @@ -24,9 +26,11 @@
  704.  import org.l2jmobius.gameserver.data.xml.PrimeShopData;
  705.  import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
  706.  import org.l2jmobius.gameserver.model.actor.request.PrimeShopRequest;
  707. +import org.l2jmobius.gameserver.model.holders.ItemHolder;
  708.  import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
  709.  import org.l2jmobius.gameserver.model.primeshop.PrimeShopGroup;
  710.  import org.l2jmobius.gameserver.model.primeshop.PrimeShopItem;
  711. +import org.l2jmobius.gameserver.model.variables.AccountVariables;
  712.  import org.l2jmobius.gameserver.network.GameClient;
  713.  import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
  714.  import org.l2jmobius.gameserver.network.serverpackets.primeshop.ExBRBuyProduct;
  715. @@ -72,39 +76,56 @@
  716.         final PrimeShopGroup item = PrimeShopData.getInstance().getItem(_brId);
  717.         if (validatePlayer(item, _count, player))
  718.         {
  719. -           final int price = (item.getPrice() * _count);
  720. -           final int paymentId = validatePaymentId(item, price);
  721. -           if (paymentId < 0)
  722. -           {
  723. -               player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
  724. -               player.removeRequest(PrimeShopRequest.class);
  725. -               return;
  726. -           }
  727. -           else if (paymentId > 0)
  728. -           {
  729. -               if (!player.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, player, true))
  730. -               {
  731. -                   player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
  732. -                   player.removeRequest(PrimeShopRequest.class);
  733. -                   return;
  734. -               }
  735. -           }
  736. -           else if (paymentId == 0)
  737. -           {
  738. -               if (player.getPrimePoints() < price)
  739. -               {
  740. -                   player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
  741. -                   player.removeRequest(PrimeShopRequest.class);
  742. -                   return;
  743. -               }
  744. -               player.setPrimePoints(player.getPrimePoints() - price);
  745. -           }
  746. -          
  747. +
  748. +           boolean hasItems = true;
  749. +           //First loop to validate all items
  750. +            for (ItemHolder itemHolder : validatePaymentId(item)) {
  751. +                final int paymentId = itemHolder.getId();
  752. +                final long price = itemHolder.getCount() * _count;
  753. +                if (paymentId < 0)
  754. +                {
  755. +                    hasItems = false;
  756. +                }else if(paymentId > 0){
  757. +                    if(player.getInventory().getInventoryItemCount(paymentId,0) < price){
  758. +                        hasItems = false;
  759. +                    }
  760. +                }else{ // this is always 0
  761. +                    if (player.getPrimePoints() < price)
  762. +                    {
  763. +                        hasItems = false;
  764. +                    }
  765. +                }
  766. +            }
  767. +
  768. +            if(!hasItems){
  769. +                player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
  770. +                player.removeRequest(PrimeShopRequest.class);
  771. +                return;
  772. +            }
  773. +
  774. +            // Second loop, only if all criteria has been met!
  775. +            // this should always be reached if player has all the coins needed for the purchase
  776. +            for (ItemHolder itemHolder : validatePaymentId(item)) {
  777. +                final int paymentId = itemHolder.getId();
  778. +                final long price = itemHolder.getCount() * _count;
  779. +                if (paymentId > 0)
  780. +                {
  781. +                    player.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, player, true);
  782. +                }
  783. +                else if (paymentId == 0)
  784. +                {
  785. +                    player.setPrimePoints(player.getPrimePoints() - (int) price);
  786. +                    if (Config.VIP_SYSTEM_PRIME_AFFECT)
  787. +                        player.updateVipPoints(price);
  788. +                }
  789. +            }
  790. +
  791.             for (PrimeShopItem subItem : item.getItems())
  792.             {
  793.                 player.addItem("PrimeShop", subItem.getId(), subItem.getCount() * _count, player, true);
  794.             }
  795. -          
  796. +            if(item.isVipGift())
  797. +                player.getAccountVariables().set(AccountVariables.VIP_ITEM_BOUGHT, Calendar.getInstance().getTimeInMillis());
  798.             player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.SUCCESS));
  799.             player.sendPacket(new ExBRGamePoint(player));
  800.         }
  801. @@ -168,8 +189,13 @@
  802.             player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.AFTER_SALE_DATE));
  803.             return false;
  804.         }
  805. -      
  806. -       final int weight = item.getWeight() * count;
  807. +
  808. +        if(item.getVipTier() > player.getVipTier() || item.isVipGift() && !canReceiveGift(player, item)) {
  809. +            player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.SOLD_OUT));
  810. +            return false;
  811. +        }
  812. +
  813. +        final int weight = item.getWeight() * count;
  814.         final long slots = item.getCount() * count;
  815.         if (player.getInventory().validateWeight(weight))
  816.         {
  817. @@ -187,24 +213,59 @@
  818.        
  819.         return true;
  820.     }
  821. +
  822. +    /**
  823. +     * Check if player can receive Gift from L2 Store
  824. +     * @param player player in question
  825. +     * @param item requested item.
  826. +     * @return true if player can receive gift item.
  827. +     */
  828. +   private static boolean canReceiveGift(PlayerInstance player, PrimeShopGroup item){
  829. +        if(!Config.VIP_SYSTEM_ENABLED)
  830. +            return false;
  831. +       if(player.getVipTier() <= 0)
  832. +           return false;
  833. +       else if(item.getVipTier() != player.getVipTier()) {
  834. +           player.sendMessage("This item is not for your vip tier!");
  835. +            return false;
  836. +        } else{
  837. +           long timeBought = player.getAccountVariables().getLong(AccountVariables.VIP_ITEM_BOUGHT, 0L);
  838. +            return timeBought <= 0;
  839. +        }
  840. +    }
  841.    
  842. -   private static int validatePaymentId(PrimeShopGroup item, long amount)
  843. +   private static List<ItemHolder> validatePaymentId(PrimeShopGroup item)
  844.     {
  845. +
  846. +       List<ItemHolder> temp = new LinkedList<>();
  847.         switch (item.getPaymentType())
  848.         {
  849.             case 0: // Prime points
  850.             {
  851. -               return 0;
  852. +               if(item.getVipTier() > 0){
  853. +                   if(item.getPrice() > 0){
  854. +                        temp.add(new ItemHolder(Inventory.GOLD_COIN ,item.getPrice()));
  855. +                    }
  856. +                   if(item.getSilverCoin() > 0){
  857. +                        temp.add(new ItemHolder(Inventory.SILVER_COIN , item.getSilverCoin()));
  858. +                    }
  859. +                }else{
  860. +                    temp.add(new ItemHolder(0 ,item.getPrice())); // prime points
  861. +                }
  862. +               return temp;
  863.             }
  864.             case 1: // Adenas
  865.             {
  866. -               return Inventory.ADENA_ID;
  867. +                temp.add(new ItemHolder(Inventory.ADENA_ID ,item.getPrice())); // Is this even used????
  868. +                return temp;
  869.             }
  870.             case 2: // Hero coins
  871.             {
  872. -               return HERO_COINS;
  873. -           }
  874. +                temp.add(new ItemHolder(HERO_COINS, item.getPrice())); // Is this even used????
  875. +                return temp;
  876. +            }
  877.         }
  878. -       return -1;
  879. +       temp.add(new ItemHolder(-1,-1));
  880. +       return temp;
  881.     }
  882.  }
  883. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/55000-55099.xml
  884. IDEA additional info:
  885. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  886. <+>UTF-8
  887. ===================================================================
  888. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/55000-55099.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/55000-55099.xml
  889. --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/55000-55099.xml  (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  890. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/55000-55099.xml  (date 1619547449166)
  891. @@ -283,36 +283,327 @@
  892.         <!-- The right to VIP 1st level chest. Acquired XP/ SP +3%, item drop rate +3%. -->
  893.         <icon>BranchIcon.Icon.g_skill_vip1</icon>
  894.         <operateType>P</operateType>
  895. +        <hitTime>500</hitTime>
  896. +        <effects>
  897. +            <effect name="ExpModify">
  898. +                <amount>3</amount>
  899. +            </effect>
  900. +            <effect name="SpModify">
  901. +                <amount>3</amount>
  902. +            </effect>
  903. +            <effect name="BonusDropRate">
  904. +                <amount>50</amount>
  905. +                <mode>PER</mode>
  906. +            </effect>
  907. +        </effects>
  908.     </skill>
  909.     <skill id="55025" toLevel="1" name="VIP Level 2">
  910.         <!-- The right to VIP 2nd level chest. Acquired XP/ SP +7%, item drop rate +7%. World chat on any level, number of usage attempts +3. -->
  911.         <icon>BranchIcon.Icon.g_skill_vip2</icon>
  912.         <operateType>P</operateType>
  913. +        <hitTime>500</hitTime>
  914. +        <effects>
  915. +            <effect name="ExpModify">
  916. +                <amount>7</amount>
  917. +            </effect>
  918. +            <effect name="SpModify">
  919. +                <amount>7</amount>
  920. +            </effect>
  921. +            <effect name="BonusDropRate">
  922. +                <amount>150</amount>
  923. +                <mode>PER</mode>
  924. +            </effect>
  925. +            <effect name="WorldChatPoints">
  926. +                <amount>3</amount>
  927. +                <mode>DIFF</mode>
  928. +            </effect>
  929. +        </effects>
  930.     </skill>
  931.     <skill id="55026" toLevel="1" name="VIP Level 3">
  932.         <!-- The right to VIP 3rd level chest. Acquired XP/ SP +15%, item drop rate +15%. Experience loss and chance to lose items upon death is -10%. World chat on any level, number of usage attempts +3. -->
  933.         <icon>BranchIcon.Icon.g_skill_vip3</icon>
  934.         <operateType>P</operateType>
  935. +        <hitTime>500</hitTime>
  936. +        <effects>
  937. +            <effect name="ExpModify">
  938. +                <amount>15</amount>
  939. +            </effect>
  940. +            <effect name="SpModify">
  941. +                <amount>15</amount>
  942. +            </effect>
  943. +            <effect name="BonusDropRate">
  944. +                <amount>200</amount>
  945. +                <mode>PER</mode>
  946. +            </effect>
  947. +            <effect name="WorldChatPoints">
  948. +                <amount>3</amount>
  949. +                <mode>DIFF</mode>
  950. +            </effect>
  951. +        </effects>
  952.     </skill>
  953.     <skill id="55027" toLevel="1" name="VIP Level 4">
  954.         <!-- The right to VIP 4th level chest. Acquired XP/ SP +25%, item drop rate +15%. Experience loss and chance to lose items upon death is -15%. World chat on any level, number of usage attempts +5. -->
  955.         <icon>BranchIcon.Icon.g_skill_vip4</icon>
  956.         <operateType>P</operateType>
  957. +        <hitTime>500</hitTime>
  958. +        <effects>
  959. +            <effect name="ExpModify">
  960. +                <amount>25</amount>
  961. +            </effect>
  962. +            <effect name="SpModify">
  963. +                <amount>25</amount>
  964. +            </effect>
  965. +            <effect name="FishingExpSpBonus">
  966. +                <amount>20</amount>
  967. +                <mode>PER</mode>
  968. +            </effect>
  969. +            <effect name="BonusDropRate">
  970. +                <amount>250</amount>
  971. +                <mode>PER</mode>
  972. +            </effect>
  973. +            <effect name="WorldChatPoints">
  974. +                <amount>5</amount>
  975. +                <mode>DIFF</mode>
  976. +            </effect>
  977. +            <effect name="ReduceDropPenalty">
  978. +                <deathPenalty>-15</deathPenalty>
  979. +                <mode>PER</mode>
  980. +            </effect>
  981. +        </effects>
  982.     </skill>
  983.     <skill id="55028" toLevel="1" name="VIP Level 5">
  984.         <!-- The right to VIP 5th level chest. Acquired XP/ SP +30%, item drop rate +30%. Experience loss and chance to lose items upon death -20%. PvE damage is increased. World chat on any level, number of usage attempts +10. -->
  985.         <icon>BranchIcon.Icon.g_skill_vip5</icon>
  986.         <operateType>P</operateType>
  987. +        <hitTime>500</hitTime>
  988. +        <effects>
  989. +            <effect name="ExpModify">
  990. +                <amount>30</amount>
  991. +            </effect>
  992. +            <effect name="SpModify">
  993. +                <amount>30</amount>
  994. +            </effect>
  995. +            <effect name="BonusDropRate">
  996. +                <amount>250</amount>
  997. +                <mode>PER</mode>
  998. +            </effect>
  999. +            <effect name="WorldChatPoints">
  1000. +                <amount>10</amount>
  1001. +                <mode>DIFF</mode>
  1002. +            </effect>
  1003. +            <effect name="ReduceDropPenalty">
  1004. +                <deathPenalty>-20</deathPenalty>
  1005. +                <mode>PER</mode>
  1006. +            </effect>
  1007. +            <effect name="PveMagicalSkillDamageBonus">
  1008. +                <amount>10</amount>
  1009. +                <mode>PER</mode>
  1010. +            </effect>
  1011. +            <effect name="PvePhysicalAttackDamageBonus">
  1012. +                <amount>10</amount>
  1013. +                <mode>PER</mode>
  1014. +            </effect>
  1015. +            <effect name="PvePhysicalSkillDamageBonus">
  1016. +                <amount>10</amount>
  1017. +                <mode>PER</mode>
  1018. +            </effect>
  1019. +            <effect name="PvePhysicalSkillDamageBonus">
  1020. +                <amount>10</amount>
  1021. +                <mode>PER</mode>
  1022. +            </effect>
  1023. +            <effect name="PveRaidMagicalSkillDamageBonus">
  1024. +                <amount>10</amount>
  1025. +                <mode>PER</mode>
  1026. +            </effect>
  1027. +            <effect name="PveRaidPhysicalAttackDamageBonus">
  1028. +                <amount>10</amount>
  1029. +                <mode>PER</mode>
  1030. +            </effect>
  1031. +            <effect name="PveRaidPhysicalSkillDamageBonus">
  1032. +                <amount>10</amount>
  1033. +                <mode>PER</mode>
  1034. +            </effect>
  1035. +            <effect name="FishingExpSpBonus">
  1036. +                <amount>20</amount>
  1037. +                <mode>PER</mode>
  1038. +            </effect>
  1039. +        </effects>
  1040.     </skill>
  1041.     <skill id="55029" toLevel="1" name="VIP Level 6">
  1042.         <!-- The right to VIP 6th level chest. Acquired XP/ SP +30%, item drop rate +30%. Experience loss and chance to lose items upon death -20%. PvE damage is increased, STR/ DEX/ CON/ INT/ WIT/ MEN +2. World chat on any level, number of usage attempts +10. -->
  1043.         <icon>BranchIcon.Icon.g_skill_vip6</icon>
  1044. -       <operateType>P</operateType>
  1045. +        <operateType>P</operateType>
  1046. +        <hitTime>500</hitTime>
  1047. +        <effects>
  1048. +            <effect name="ExpModify">
  1049. +                <amount>30</amount>
  1050. +            </effect>
  1051. +            <effect name="SpModify">
  1052. +                <amount>30</amount>
  1053. +            </effect>
  1054. +            <effect name="BonusDropRate">
  1055. +                <amount>250</amount>
  1056. +                <mode>PER</mode>
  1057. +            </effect>
  1058. +            <effect name="WorldChatPoints">
  1059. +                <amount>10</amount>
  1060. +                <mode>DIFF</mode>
  1061. +            </effect>
  1062. +            <effect name="ReduceDropPenalty">
  1063. +                <deathPenalty>-20</deathPenalty>
  1064. +                <mode>PER</mode>
  1065. +            </effect>
  1066. +            <effect name="PveMagicalSkillDamageBonus">
  1067. +                <amount>15</amount>
  1068. +                <mode>PER</mode>
  1069. +            </effect>
  1070. +            <effect name="PvePhysicalAttackDamageBonus">
  1071. +                <amount>15</amount>
  1072. +                <mode>PER</mode>
  1073. +            </effect>
  1074. +            <effect name="PvePhysicalSkillDamageBonus">
  1075. +                <amount>15</amount>
  1076. +                <mode>PER</mode>
  1077. +            </effect>
  1078. +            <effect name="PvePhysicalSkillDamageBonus">
  1079. +                <amount>15</amount>
  1080. +                <mode>PER</mode>
  1081. +            </effect>
  1082. +            <effect name="PveRaidMagicalSkillDamageBonus">
  1083. +                <amount>15</amount>
  1084. +                <mode>PER</mode>
  1085. +            </effect>
  1086. +            <effect name="PveRaidPhysicalAttackDamageBonus">
  1087. +                <amount>15</amount>
  1088. +                <mode>PER</mode>
  1089. +            </effect>
  1090. +            <effect name="PveRaidPhysicalSkillDamageBonus">
  1091. +                <amount>15</amount>
  1092. +                <mode>PER</mode>
  1093. +            </effect>
  1094. +            <effect name="FishingExpSpBonus">
  1095. +                <amount>20</amount>
  1096. +                <mode>PER</mode>
  1097. +            </effect>
  1098. +            <effect name="StatUp">
  1099. +                <amount>1</amount>
  1100. +                <stat>STR</stat>
  1101. +            </effect>
  1102. +            <effect name="StatUp">
  1103. +                <amount>1</amount>
  1104. +                <stat>INT</stat>
  1105. +            </effect>
  1106. +            <effect name="StatUp">
  1107. +                <amount>1</amount>
  1108. +                <stat>CON</stat>
  1109. +            </effect>
  1110. +            <effect name="StatUp">
  1111. +                <amount>1</amount>
  1112. +                <stat>DEX</stat>
  1113. +            </effect>
  1114. +            <effect name="StatUp">
  1115. +                <amount>1</amount>
  1116. +                <stat>MEN</stat>
  1117. +            </effect>
  1118. +            <effect name="StatUp">
  1119. +                <amount>1</amount>
  1120. +                <stat>WIT</stat>
  1121. +            </effect>
  1122. +        </effects>
  1123.     </skill>
  1124.     <skill id="55030" toLevel="1" name="VIP Level 7">
  1125.         <!-- The right to VIP 7th level chest. Acquired XP/ SP +30%, item drop rate +30%. Experience loss and chance to lose items upon death -20%. PvE/ PvP damage is increased, STR/ DEX/ CON/ INT/ WIT/ MEN +2. World chat on any level, number of usage attempts +10. -->
  1126.         <icon>BranchIcon.Icon.g_skill_vip7</icon>
  1127. -       <operateType>P</operateType>
  1128. +        <operateType>P</operateType>
  1129. +        <hitTime>500</hitTime>
  1130. +        <effects>
  1131. +            <effect name="ExpModify">
  1132. +                <amount>30</amount>
  1133. +            </effect>
  1134. +            <effect name="SpModify">
  1135. +                <amount>30</amount>
  1136. +            </effect>
  1137. +            <effect name="BonusDropRate">
  1138. +                <amount>250</amount>
  1139. +                <mode>PER</mode>
  1140. +            </effect>
  1141. +            <effect name="WorldChatPoints">
  1142. +                <amount>10</amount>
  1143. +                <mode>DIFF</mode>
  1144. +            </effect>
  1145. +            <effect name="ReduceDropPenalty">
  1146. +                <deathPenalty>-20</deathPenalty>
  1147. +                <mode>PER</mode>
  1148. +            </effect>
  1149. +            <effect name="PveMagicalSkillDamageBonus">
  1150. +                <amount>15</amount>
  1151. +                <mode>PER</mode>
  1152. +            </effect>
  1153. +            <effect name="PvePhysicalAttackDamageBonus">
  1154. +                <amount>15</amount>
  1155. +                <mode>PER</mode>
  1156. +            </effect>
  1157. +            <effect name="PvePhysicalSkillDamageBonus">
  1158. +                <amount>15</amount>
  1159. +                <mode>PER</mode>
  1160. +            </effect>
  1161. +            <effect name="PvePhysicalSkillDamageBonus">
  1162. +                <amount>15</amount>
  1163. +                <mode>PER</mode>
  1164. +            </effect>
  1165. +            <effect name="PveRaidMagicalSkillDamageBonus">
  1166. +                <amount>15</amount>
  1167. +                <mode>PER</mode>
  1168. +            </effect>
  1169. +            <effect name="PveRaidPhysicalAttackDamageBonus">
  1170. +                <amount>15</amount>
  1171. +                <mode>PER</mode>
  1172. +            </effect>
  1173. +            <effect name="PveRaidPhysicalSkillDamageBonus">
  1174. +                <amount>15</amount>
  1175. +                <mode>PER</mode>
  1176. +            </effect>
  1177. +            <effect name="PvpMagicalSkillDamageBonus">
  1178. +                <amount>5</amount>
  1179. +                <mode>PER</mode>
  1180. +            </effect>
  1181. +            <effect name="PvpPhysicalAttackDamageBonus">
  1182. +                <amount>5</amount>
  1183. +                <mode>PER</mode>
  1184. +            </effect>
  1185. +            <effect name="PvpPhysicalSkillDamageBonus">
  1186. +                <amount>5</amount>
  1187. +                <mode>PER</mode>
  1188. +            </effect>
  1189. +            <effect name="FishingExpSpBonus">
  1190. +                <amount>20</amount>
  1191. +                <mode>PER</mode>
  1192. +            </effect>
  1193. +            <effect name="StatUp">
  1194. +                <amount>2</amount>
  1195. +                <stat>STR</stat>
  1196. +            </effect>
  1197. +            <effect name="StatUp">
  1198. +                <amount>2</amount>
  1199. +                <stat>INT</stat>
  1200. +            </effect>
  1201. +            <effect name="StatUp">
  1202. +                <amount>2</amount>
  1203. +                <stat>CON</stat>
  1204. +            </effect>
  1205. +            <effect name="StatUp">
  1206. +                <amount>2</amount>
  1207. +                <stat>DEX</stat>
  1208. +            </effect>
  1209. +            <effect name="StatUp">
  1210. +                <amount>2</amount>
  1211. +                <stat>MEN</stat>
  1212. +            </effect>
  1213. +            <effect name="StatUp">
  1214. +                <amount>2</amount>
  1215. +                <stat>WIT</stat>
  1216. +            </effect>
  1217. +        </effects>
  1218.     </skill>
  1219.     <skill id="55031" toLevel="1" name="Report Status">
  1220.         <!-- You are suspected to have used an illegal program, and your actions have been restricted. -->
  1221. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/PrimeShopData.java
  1222. IDEA additional info:
  1223. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  1224. <+>UTF-8
  1225. ===================================================================
  1226. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/PrimeShopData.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/PrimeShopData.java
  1227. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/PrimeShopData.java    (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  1228. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/PrimeShopData.java    (date 1619544973502)
  1229. @@ -42,10 +42,12 @@
  1230.  public class PrimeShopData implements IXmlReader
  1231.  {
  1232.     private static final Logger LOGGER = Logger.getLogger(PrimeShopData.class.getName());
  1233. -  
  1234. -   private final Map<Integer, PrimeShopGroup> _primeItems = new LinkedHashMap<>();
  1235. -  
  1236. -   protected PrimeShopData()
  1237. +    private static final int VIP_GIFT_INIT_ID = 100000;
  1238. +
  1239. +    private final Map<Integer, PrimeShopGroup> _primeItems = new LinkedHashMap<>();
  1240. +    private final Map<Integer, PrimeShopGroup> _vipGifts = new LinkedHashMap<>(10);
  1241. +
  1242. +    protected PrimeShopData()
  1243.     {
  1244.         load();
  1245.     }
  1246. @@ -105,12 +107,17 @@
  1247.                                         LOGGER.severe(getClass().getSimpleName() + ": Item template null for itemId: " + itemId + " brId: " + set.getInt("id"));
  1248.                                         return;
  1249.                                     }
  1250. -                                  
  1251. +
  1252.                                     items.add(new PrimeShopItem(itemId, count, item.getWeight(), item.isTradeable() ? 1 : 0));
  1253.                                 }
  1254.                             }
  1255. -                          
  1256. -                           _primeItems.put(set.getInt("id"), new PrimeShopGroup(set, items));
  1257. +                           PrimeShopGroup group = new PrimeShopGroup(set, items);
  1258. +                           if(group.isVipGift()){
  1259. +                                _vipGifts.put(set.getInt("id"), group);
  1260. +                            }else{
  1261. +                                _primeItems.put(set.getInt("id"), group);
  1262. +                            }
  1263. +
  1264.                         }
  1265.                     }
  1266.                 }
  1267. @@ -131,7 +138,10 @@
  1268.    
  1269.     public PrimeShopGroup getItem(int brId)
  1270.     {
  1271. -       return _primeItems.get(brId);
  1272. +       PrimeShopGroup item = _primeItems.get(brId);
  1273. +       if(item == null)
  1274. +           item = _vipGifts.get(brId);
  1275. +       return item;
  1276.     }
  1277.    
  1278.     public Map<Integer, PrimeShopGroup> getPrimeItems()
  1279. @@ -148,4 +158,8 @@
  1280.     {
  1281.         protected static final PrimeShopData INSTANCE = new PrimeShopData();
  1282.     }
  1283. +
  1284. +    public PrimeShopGroup getVipGiftOfTier(byte tier) {
  1285. +        return _vipGifts.get(VIP_GIFT_INIT_ID + tier);
  1286. +    }
  1287.  }
  1288. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java
  1289. IDEA additional info:
  1290. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  1291. <+>UTF-8
  1292. ===================================================================
  1293. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java
  1294. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java  (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  1295. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/DailyTaskManager.java  (date 1619536529658)
  1296. @@ -39,7 +39,9 @@
  1297.  import org.l2jmobius.gameserver.model.holders.SkillHolder;
  1298.  import org.l2jmobius.gameserver.model.holders.SubClassHolder;
  1299.  import org.l2jmobius.gameserver.model.olympiad.Olympiad;
  1300. +import org.l2jmobius.gameserver.model.variables.AccountVariables;
  1301.  import org.l2jmobius.gameserver.model.variables.PlayerVariables;
  1302. +import org.l2jmobius.gameserver.model.vip.VipManager;
  1303.  import org.l2jmobius.gameserver.network.serverpackets.ExVoteSystemInfo;
  1304.  import org.l2jmobius.gameserver.network.serverpackets.ExWorldChatCnt;
  1305.  
  1306. @@ -68,6 +70,7 @@
  1307.         resetRecommends();
  1308.         resetWorldChatPoints();
  1309.         resetTrainingCamp();
  1310. +        checkVip();
  1311.     }
  1312.    
  1313.     @ScheduleTarget
  1314. @@ -81,7 +84,23 @@
  1315.             LOGGER.info("Olympiad System: Data updated.");
  1316.         }
  1317.     }
  1318. -  
  1319. +
  1320. +   private void checkVip(){
  1321. +        // Delete all entries for received gifts
  1322. +        AccountVariables.deleteVipPurchases(AccountVariables.VIP_ITEM_BOUGHT);
  1323. +
  1324. +       // Checks the tier expiration for online players
  1325. +        // offline players get handled on next time they log in.
  1326. +        for (PlayerInstance player : World.getInstance().getPlayers())
  1327. +        {
  1328. +            if(player.getVipTier() > 0) {
  1329. +                VipManager.getInstance().checkVipTierExpiration(player);
  1330. +            }
  1331. +
  1332. +            player.getAccountVariables().restoreMe();
  1333. +        }
  1334. +    }
  1335. +
  1336.     @ScheduleTarget
  1337.     private void onClanLeaderApply()
  1338.     {
  1339. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/PcCafePointsManager.java
  1340. IDEA additional info:
  1341. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  1342. <+>UTF-8
  1343. ===================================================================
  1344. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/PcCafePointsManager.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/PcCafePointsManager.java
  1345. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/PcCafePointsManager.java   (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  1346. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/PcCafePointsManager.java   (date 1619536529693)
  1347. @@ -38,6 +38,11 @@
  1348.         {
  1349.             return;
  1350.         }
  1351. +
  1352. +       if (Config.PC_CAFE_ONLY_VIP && player.getVipTier() <= 0)
  1353. +       {
  1354. +           return;
  1355. +       }
  1356.        
  1357.         if (player.getPcCafePoints() >= Config.PC_CAFE_MAX_POINTS)
  1358.         {
  1359. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/59100-59199.xml
  1360. IDEA additional info:
  1361. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  1362. <+>UTF-8
  1363. ===================================================================
  1364. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/59100-59199.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/59100-59199.xml
  1365. --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/59100-59199.xml  (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  1366. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/59100-59199.xml  (date 1619536517959)
  1367. @@ -139,21 +139,41 @@
  1368.         <icon>BranchIcon.Icon.g_bm_vip_potion_i00</icon>
  1369.         <operateType>A1</operateType>
  1370.         <reuseDelay>1000</reuseDelay>
  1371. +        <effects>
  1372. +            <effect name="VipUp">
  1373. +                <amount>800</amount>
  1374. +            </effect>
  1375. +        </effects>
  1376.     </skill>
  1377.     <skill id="59126" toLevel="1" name="VIP Gain Scroll - 2400">
  1378.         <icon>BranchIcon.Icon.g_bm_vip_potion_i00</icon>
  1379.         <operateType>A1</operateType>
  1380.         <reuseDelay>1000</reuseDelay>
  1381. +        <effects>
  1382. +            <effect name="VipUp">
  1383. +                <amount>2400</amount>
  1384. +            </effect>
  1385. +        </effects>
  1386.     </skill>
  1387.     <skill id="59127" toLevel="1" name="VIP Gain Scroll - 80">
  1388.         <icon>BranchIcon.Icon.g_bm_vip_potion_i00</icon>
  1389.         <operateType>A1</operateType>
  1390.         <reuseDelay>1000</reuseDelay>
  1391. +        <effects>
  1392. +            <effect name="VipUp">
  1393. +                <amount>80</amount>
  1394. +            </effect>
  1395. +        </effects>
  1396.     </skill>
  1397.     <skill id="59128" toLevel="1" name="VIP Gain Scroll - 240">
  1398.         <icon>BranchIcon.Icon.g_bm_vip_potion_i00</icon>
  1399.         <operateType>A1</operateType>
  1400.         <reuseDelay>1000</reuseDelay>
  1401. +        <effects>
  1402. +            <effect name="VipUp">
  1403. +                <amount>240</amount>
  1404. +            </effect>
  1405. +        </effects>
  1406.     </skill>
  1407.     <skill id="59129" toLevel="1" name="Transformation Sealbook: Kat the Cat">
  1408.         <operateType>A1</operateType>
  1409. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/primeshop/PrimeShopGroup.java
  1410. IDEA additional info:
  1411. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  1412. <+>UTF-8
  1413. ===================================================================
  1414. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/primeshop/PrimeShopGroup.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/primeshop/PrimeShopGroup.java
  1415. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/primeshop/PrimeShopGroup.java    (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  1416. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/primeshop/PrimeShopGroup.java    (date 1619548798164)
  1417. @@ -47,7 +47,10 @@
  1418.     private final int _maxBirthday;
  1419.     private final int _restrictionDay;
  1420.     private final int _availableCount;
  1421. -   private final List<PrimeShopItem> _items;
  1422. +   private final boolean _isVipGift;
  1423. +    private final int _vipTier;
  1424. +    private final int _silverCoin;
  1425. +    private final List<PrimeShopItem> _items;
  1426.    
  1427.     public PrimeShopGroup(StatSet set, List<PrimeShopItem> items)
  1428.     {
  1429. @@ -73,6 +76,10 @@
  1430.         _maxBirthday = set.getInt("maxBirthday", 0);
  1431.         _restrictionDay = set.getInt("restrictionDay", 0);
  1432.         _availableCount = set.getInt("availableCount", 0);
  1433. +        _isVipGift = set.getBoolean("isVipGift", false);
  1434. +        _vipTier = set.getInt("vipTier", 0);
  1435. +        _silverCoin = set.getInt("silverCoin", 0);
  1436. +
  1437.         _items = items;
  1438.     }
  1439.    
  1440. @@ -195,9 +202,21 @@
  1441.     {
  1442.         return _availableCount;
  1443.     }
  1444. -  
  1445. -   public List<PrimeShopItem> getItems()
  1446. +
  1447. +    public boolean isVipGift() {
  1448. +        return _isVipGift;
  1449. +    }
  1450. +
  1451. +    public int getVipTier(){
  1452. +       return _vipTier;
  1453. +    }
  1454. +
  1455. +    public List<PrimeShopItem> getItems()
  1456.     {
  1457.         return _items;
  1458.     }
  1459. +
  1460. +   public int getSilverCoin(){
  1461. +       return _silverCoin;
  1462. +    }
  1463.  }
  1464. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java
  1465. IDEA additional info:
  1466. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  1467. <+>UTF-8
  1468. ===================================================================
  1469. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java
  1470. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java   (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  1471. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java   (date 1619561814036)
  1472. @@ -133,6 +133,7 @@
  1473.     private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini";
  1474.     private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini";
  1475.     private static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini";
  1476. +   private static final String CUSTOM_VIP_CONFIG_FILE = "./config/Custom/VipSystem.ini";
  1477.     private static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini";
  1478.     private static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini";
  1479.     private static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini";
  1480. @@ -155,6 +156,7 @@
  1481.    
  1482.     public static boolean ENABLE_ATTENDANCE_REWARDS;
  1483.     public static boolean PREMIUM_ONLY_ATTENDANCE_REWARDS;
  1484. +   public static boolean VIP_ONLY_ATTENDANCE_REWARDS;
  1485.     public static boolean ATTENDANCE_REWARDS_SHARE_ACCOUNT;
  1486.     public static int ATTENDANCE_REWARD_DELAY;
  1487.     public static boolean ATTENDANCE_POPUP_START;
  1488. @@ -1248,6 +1250,7 @@
  1489.     public static boolean PREMIUM_ONLY_FISHING;
  1490.     public static boolean PC_CAFE_ENABLED;
  1491.     public static boolean PC_CAFE_ONLY_PREMIUM;
  1492. +   public static boolean PC_CAFE_ONLY_VIP;
  1493.     public static int PC_CAFE_MAX_POINTS;
  1494.     public static boolean PC_CAFE_ENABLE_DOUBLE_POINTS;
  1495.     public static int PC_CAFE_DOUBLE_POINTS_CHANCE;
  1496. @@ -1255,7 +1258,14 @@
  1497.     public static boolean PC_CAFE_RANDOM_POINT;
  1498.     public static boolean PC_CAFE_REWARD_LOW_EXP_KILLS;
  1499.     public static int PC_CAFE_LOW_EXP_KILLS_CHANCE;
  1500. -   public static boolean SELLBUFF_ENABLED;
  1501. +   public static boolean VIP_SYSTEM_ENABLED;
  1502. +   public static boolean VIP_SYSTEM_PRIME_AFFECT;
  1503. +    public static int VIP_SYSTEM_MAX_TIER;
  1504. +    public static int VIP_SYSTEM_GOLD_DROP_MIN;
  1505. +    public static int VIP_SYSTEM_GOLD_DROP_MAX;
  1506. +    public static int VIP_SYSTEM_SILVER_DROP_MIN;
  1507. +    public static int VIP_SYSTEM_SILVER_DROP_MAX;
  1508. +    public static boolean SELLBUFF_ENABLED;
  1509.     public static int SELLBUFF_MP_MULTIPLER;
  1510.     public static int SELLBUFF_PAYMENT_ID;
  1511.     public static long SELLBUFF_MIN_PRICE;
  1512. @@ -1542,6 +1552,7 @@
  1513.             final PropertiesParser Attandance = new PropertiesParser(ATTENDANCE_CONFIG_FILE);
  1514.             ENABLE_ATTENDANCE_REWARDS = Attandance.getBoolean("EnableAttendanceRewards", false);
  1515.             PREMIUM_ONLY_ATTENDANCE_REWARDS = Attandance.getBoolean("PremiumOnlyAttendanceRewards", false);
  1516. +           VIP_ONLY_ATTENDANCE_REWARDS = Attandance.getBoolean("VIPOnlyAttendanceRewards", false);
  1517.             ATTENDANCE_REWARDS_SHARE_ACCOUNT = Attandance.getBoolean("AttendanceRewardsShareAccount", false);
  1518.             ATTENDANCE_REWARD_DELAY = Attandance.getInt("AttendanceRewardDelay", 30);
  1519.             ATTENDANCE_POPUP_START = Attandance.getBoolean("AttendancePopupStart", true);
  1520. @@ -3229,6 +3240,7 @@
  1521.             final PropertiesParser PcCafe = new PropertiesParser(CUSTOM_PC_CAFE_CONFIG_FILE);
  1522.             PC_CAFE_ENABLED = PcCafe.getBoolean("PcCafeEnabled", false);
  1523.             PC_CAFE_ONLY_PREMIUM = PcCafe.getBoolean("PcCafeOnlyPremium", false);
  1524. +           PC_CAFE_ONLY_VIP = PcCafe.getBoolean("PcCafeOnlyVip", false);
  1525.             PC_CAFE_MAX_POINTS = PcCafe.getInt("MaxPcCafePoints", 200000);
  1526.             if (PC_CAFE_MAX_POINTS < 0)
  1527.             {
  1528. @@ -3256,7 +3268,22 @@
  1529.             {
  1530.                 PC_CAFE_LOW_EXP_KILLS_CHANCE = 100;
  1531.             }
  1532. -          
  1533. +
  1534. +
  1535. +           final PropertiesParser vipSystem = new PropertiesParser(CUSTOM_VIP_CONFIG_FILE);
  1536. +           VIP_SYSTEM_ENABLED = vipSystem.getBoolean("VIPEnabled", false);
  1537. +           if(VIP_SYSTEM_ENABLED) {
  1538. +                VIP_SYSTEM_PRIME_AFFECT = vipSystem.getBoolean("PrimeAffectPoints", false);
  1539. +                VIP_SYSTEM_MAX_TIER = vipSystem.getInt("MaxVipLevel", 7);
  1540. +                VIP_SYSTEM_SILVER_DROP_MIN = vipSystem.getInt("VipSilverDropMin", 1);
  1541. +                VIP_SYSTEM_SILVER_DROP_MAX = vipSystem.getInt("VipSilverDropMax", 5);
  1542. +                VIP_SYSTEM_GOLD_DROP_MIN = vipSystem.getInt("VipGoldenDropMin", 1);
  1543. +                VIP_SYSTEM_GOLD_DROP_MAX = vipSystem.getInt("VipGoldenDropMax", 5);
  1544. +                if (VIP_SYSTEM_MAX_TIER > 7)
  1545. +                    VIP_SYSTEM_MAX_TIER = 7;
  1546. +            }
  1547. +
  1548. +
  1549.             // Load PremiumSystem config file (if exists)
  1550.             final PropertiesParser PremiumSystem = new PropertiesParser(CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE);
  1551.             PREMIUM_SYSTEM_ENABLED = PremiumSystem.getBoolean("EnablePremiumSystem", false);
  1552. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71200-71299.xml
  1553. IDEA additional info:
  1554. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  1555. <+>UTF-8
  1556. ===================================================================
  1557. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71200-71299.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71200-71299.xml
  1558. --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71200-71299.xml   (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  1559. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71200-71299.xml   (date 1619536452486)
  1560. @@ -716,24 +716,36 @@
  1561.     <item id="71268" name="VIP Gain Scroll" type="EtcItem">
  1562.         <!-- Allows to regain 27 VIP Points when used. Cannot be exchanged, dropped or sold in a private store. Can be stored in a private warehouse. -->
  1563.         <set name="icon" val="BranchIcon.Icon.g_bm_vip_potion_i00" />
  1564. -       <set name="default_action" val="SKILL_REDUCE_ON_SKILL_SUCCESS" />
  1565. -       <set name="weight" val="5" />
  1566. -       <set name="is_tradable" val="false" />
  1567. -       <set name="is_dropable" val="false" />
  1568. -       <set name="is_sellable" val="false" />
  1569. -       <set name="is_stackable" val="true" />
  1570. -       <set name="material" val="PAPER" />
  1571. +        <set name="default_action" val="SKILL_REDUCE" />
  1572. +        <set name="material" val="PAPER" />
  1573. +        <set name="weight" val="5" />
  1574. +        <set name="is_tradable" val="false" />
  1575. +        <set name="is_depositable" val="false" />
  1576. +        <set name="immediate_effect" val="true" />
  1577. +        <set name="is_dropable" val="false" />
  1578. +        <set name="is_sellable" val="false" />
  1579. +        <set name="is_stackable" val="true" />
  1580. +        <set name="handler" val="ItemSkills" />
  1581. +        <skills>
  1582. +            <skill id="56096" level="1" /> <!-- VIP Gain Scroll  -->
  1583. +        </skills>
  1584.     </item>
  1585.     <item id="71269" name="Good VIP Gain Scroll" type="EtcItem">
  1586.         <!-- Allows to regain 273 VIP Points when used. Cannot be exchanged, dropped or sold in a private store. Can be stored in a private warehouse. -->
  1587.         <set name="icon" val="BranchIcon.Icon.g_bm_vip_potion_i00" />
  1588. -       <set name="default_action" val="SKILL_REDUCE_ON_SKILL_SUCCESS" />
  1589. -       <set name="weight" val="5" />
  1590. -       <set name="is_tradable" val="false" />
  1591. -       <set name="is_dropable" val="false" />
  1592. -       <set name="is_sellable" val="false" />
  1593. -       <set name="is_stackable" val="true" />
  1594. -       <set name="material" val="PAPER" />
  1595. +        <set name="default_action" val="SKILL_REDUCE" />
  1596. +        <set name="material" val="PAPER" />
  1597. +        <set name="weight" val="5" />
  1598. +        <set name="is_tradable" val="false" />
  1599. +        <set name="is_depositable" val="false" />
  1600. +        <set name="immediate_effect" val="true" />
  1601. +        <set name="is_dropable" val="false" />
  1602. +        <set name="is_sellable" val="false" />
  1603. +        <set name="is_stackable" val="true" />
  1604. +        <set name="handler" val="ItemSkills" />
  1605. +        <skills>
  1606. +            <skill id="56097" level="1" /> <!-- Good VIP Gain Scroll -->
  1607. +        </skills>
  1608.     </item>
  1609.     <item id="71270" name="Venir's Talisman Fragment" type="EtcItem">
  1610.         <!-- Material used to upgrade Venir's Talisman. If upgrade fails, the talisman level value will drop to 1. Cannot be dropped. -->
  1611. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/vip/ReceiveVipProductList.java
  1612. IDEA additional info:
  1613. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  1614. <+>UTF-8
  1615. ===================================================================
  1616. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/vip/ReceiveVipProductList.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/vip/ReceiveVipProductList.java
  1617. new file mode 100644
  1618. --- /dev/null   (date 1619559791688)
  1619. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/vip/ReceiveVipProductList.java   (date 1619559791688)
  1620. @@ -0,0 +1,69 @@
  1621. +package org.l2jmobius.gameserver.network.serverpackets.vip;
  1622. +
  1623. +import org.l2jmobius.Config;
  1624. +import org.l2jmobius.commons.network.PacketWriter;
  1625. +import org.l2jmobius.gameserver.data.xml.PrimeShopData;
  1626. +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
  1627. +import org.l2jmobius.gameserver.model.primeshop.PrimeShopGroup;
  1628. +import org.l2jmobius.gameserver.model.primeshop.PrimeShopItem;
  1629. +import org.l2jmobius.gameserver.network.OutgoingPackets;
  1630. +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
  1631. +
  1632. +
  1633. +import static java.util.Objects.nonNull;
  1634. +
  1635. +
  1636. +public class ReceiveVipProductList implements IClientOutgoingPacket
  1637. +{
  1638. +    private final PlayerInstance _player;
  1639. +
  1640. +    public ReceiveVipProductList(PlayerInstance player)
  1641. +    {
  1642. +        _player = player;
  1643. +    }
  1644. +    @Override
  1645. +    public boolean write(PacketWriter packet)
  1646. +    {
  1647. +        if(!Config.VIP_SYSTEM_ENABLED)
  1648. +            return false;
  1649. +        var products = PrimeShopData.getInstance().getPrimeItems().values();
  1650. +        var gift = PrimeShopData.getInstance().getVipGiftOfTier(_player.getVipTier());
  1651. +
  1652. +        OutgoingPackets.RECIVE_VIP_PRODUCT_LIST.writeId(packet);
  1653. +        packet.writeQ(_player.getAdena());
  1654. +        packet.writeQ(_player.getGoldCoin()); // Gold Coin Amount
  1655. +        packet.writeQ(_player.getSilverCoin()); // Silver Coin Amount
  1656. +        packet.writeC(1); // Show Reward tab
  1657. +
  1658. +        if(nonNull(gift)) {
  1659. +            packet.writeD(products.size() + 1);
  1660. +            writeProduct(gift, packet);
  1661. +        } else {
  1662. +            packet.writeD(products.size());
  1663. +        }
  1664. +
  1665. +        for (var product : products) {
  1666. +            writeProduct(product, packet);
  1667. +        }
  1668. +        return true;
  1669. +    }
  1670. +
  1671. +    private void writeProduct(PrimeShopGroup product, PacketWriter buffer) {
  1672. +        buffer.writeD(product.getBrId());
  1673. +        buffer.writeC(product.getCat());
  1674. +        buffer.writeC(product.getPaymentType());
  1675. +        buffer.writeD(product.getPrice()); // L2 Coin | Gold Coin seems to use the same field based on payment type
  1676. +        buffer.writeD(product.getSilverCoin());
  1677. +        buffer.writeC(product.getPanelType()); // NEW - 6; HOT - 5 ... Unk
  1678. +        buffer.writeC(product.getVipTier());
  1679. +        buffer.writeC(10);
  1680. +
  1681. +        buffer.writeC(product.getItems().size());
  1682. +
  1683. +        for (PrimeShopItem item : product.getItems()) {
  1684. +            buffer.writeD(item.getId());
  1685. +            buffer.writeD((int) item.getCount());
  1686. +        }
  1687. +    }
  1688. +}
  1689. +
  1690. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/vip/RequestVipProductList.java
  1691. IDEA additional info:
  1692. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  1693. <+>UTF-8
  1694. ===================================================================
  1695. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/vip/RequestVipProductList.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/vip/RequestVipProductList.java
  1696. new file mode 100644
  1697. --- /dev/null   (date 1619559791698)
  1698. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/vip/RequestVipProductList.java   (date 1619559791698)
  1699. @@ -0,0 +1,21 @@
  1700. +package org.l2jmobius.gameserver.network.clientpackets.vip;
  1701. +
  1702. +import org.l2jmobius.commons.network.PacketReader;
  1703. +import org.l2jmobius.gameserver.network.GameClient;
  1704. +import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
  1705. +import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipProductList;
  1706. +
  1707. +public class RequestVipProductList implements IClientIncomingPacket {
  1708. +    @Override
  1709. +    public boolean read(GameClient client, PacketReader packet)
  1710. +    {
  1711. +        // Nothing to read
  1712. +        return true;
  1713. +    }
  1714. +
  1715. +    @Override
  1716. +    public void run(GameClient client)
  1717. +    {
  1718. +        client.sendPacket(new ReceiveVipProductList(client.getPlayer()));
  1719. +    }
  1720. +}
  1721. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/PrimeShop.xml
  1722. IDEA additional info:
  1723. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  1724. <+>UTF-8
  1725. ===================================================================
  1726. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/PrimeShop.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/PrimeShop.xml
  1727. --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/PrimeShop.xml (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  1728. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/PrimeShop.xml (date 1619556524078)
  1729. @@ -1,3 +1,73 @@
  1730.  <?xml version="1.0" encoding="UTF-8"?>
  1731. -<list enabled="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/PrimeShop.xsd">
  1732. +<list enabled="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/PrimeShop.xsd">
  1733. +
  1734. +<!--
  1735. + cat 11 = supplies
  1736. + cat 12 = Equipment/outfit
  1737. + cat 13 = VIP
  1738. + cat 14 = Event
  1739. + cat 15 = Reward Coins
  1740. + On Cat 15, golden coins use the same value as "price" and silver uses the value from silverCoin node. -> paymenttype = 0
  1741. + for the price to be used as golden or silver, vipTier needs to be > 0
  1742. +  -->
  1743. +
  1744. +    <item id="2090044" cat="11" paymentType="0" price="30" recommended="4" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0">
  1745. +        <item itemId="71268" count="1" /> <!-- VIP Gain Scroll -->
  1746. +    </item>
  1747. +    <item id="2090045" cat="11" paymentType="0" price="60" recommended="4" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0">
  1748. +        <item itemId="71269" count="1" /> <!-- Good VIP Gain Scroll -->
  1749. +    </item>
  1750. +    <item id="2090046" cat="12" paymentType="0" price="50" recommended="4" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0">
  1751. +        <item itemId="71316" count="1" /> <!-- VIP Gain Scroll - 80 -->
  1752. +    </item>
  1753. +    <item id="2090047" cat="12" paymentType="0" price="100"  recommended="4" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0">
  1754. +        <item itemId="71317" count="1" /> <!-- VIP Gain Scroll - 240 -->
  1755. +    </item>
  1756. +    <item id="2090048" cat="14" paymentType="0" price="333" recommended="4" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0">
  1757. +        <item itemId="71314" count="1" /> <!-- VIP Gain Scroll - 800 -->
  1758. +    </item>
  1759. +    <item id="2090049" cat="14" paymentType="0" price="999" recommended="4" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0" >
  1760. +        <item itemId="71315" count="1" /> <!-- VIP Gain Scroll - 2400 -->
  1761. +    </item>
  1762. +
  1763. +    <item id="2090050" cat="15" paymentType="0" price="0" silverCoin="100" recommended="4" vipTier="7" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0">
  1764. +        <item itemId="71268" count="1" /> <!-- VIP Gain Scroll -->
  1765. +    </item>
  1766. +    <item id="2090051" cat="15" paymentType="0" price="0" silverCoin="200" recommended="4" vipTier="7" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0">
  1767. +        <item itemId="71269" count="1" /> <!-- Good VIP Gain Scroll -->
  1768. +    </item>
  1769. +    <item id="2090052" cat="15" paymentType="0" price="50" silverCoin="0" recommended="4" vipTier="7" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0">
  1770. +        <item itemId="71316" count="1" /> <!-- VIP Gain Scroll - 80 -->
  1771. +    </item>
  1772. +    <item id="2090053" cat="15" paymentType="0" price="100" silverCoin="0" recommended="4" vipTier="7" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0">
  1773. +        <item itemId="71317" count="1" /> <!-- VIP Gain Scroll - 240 -->
  1774. +    </item>
  1775. +    <item id="2090054" cat="15" paymentType="0" price="333" silverCoin="333" recommended="4" vipTier="7" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0">
  1776. +        <item itemId="71314" count="1" /> <!-- VIP Gain Scroll - 800 -->
  1777. +    </item>
  1778. +    <item id="2090055" cat="15" paymentType="0" price="999" silverCoin="999" vipTier="7" recommended="4" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0" >
  1779. +        <item itemId="71315" count="1" /> <!-- VIP Gain Scroll - 2400 -->
  1780. +    </item>
  1781. +
  1782. +    <item id="100001" cat="13" paymentType="0" price="0" recommended="4" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0" isVipGift="true" vipTier="1">
  1783. +        <item itemId="29001" count="1" /> <!-- Daily Present - VIP 1 -->
  1784. +    </item>
  1785. +    <item id="100002" cat="13" paymentType="0" price="0" recommended="4" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0" isVipGift="true" vipTier="2">
  1786. +        <item itemId="29002" count="1" /> <!-- Daily Present - VIP 2 -->
  1787. +    </item>
  1788. +    <item id="100003" cat="13" paymentType="0" price="0" recommended="4" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0" isVipGift="true" vipTier="3">
  1789. +        <item itemId="29003" count="1" /> <!-- Daily Present - VIP 3 -->
  1790. +    </item>
  1791. +    <item id="100004" cat="13" paymentType="0" price="0" recommended="4" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0" isVipGift="true" vipTier="4">
  1792. +        <item itemId="29004" count="1" /> <!-- Daily Present - VIP 4 -->
  1793. +    </item>
  1794. +    <item id="100005" cat="13" paymentType="0" price="0" recommended="4" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0" isVipGift="true" vipTier="5">
  1795. +        <item itemId="29005" count="1" /> <!-- Daily Present - VIP 5 -->
  1796. +    </item>
  1797. +    <item id="100006" cat="13" paymentType="0" price="0" recommended="4" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0" isVipGift="true" vipTier="6">
  1798. +        <item itemId="29006" count="1" /> <!-- Daily Present - VIP 6 -->
  1799. +    </item>
  1800. +    <item id="100007" cat="13" paymentType="0" price="0" recommended="4" startSale="315558000" endSale="2127452400" dayOfWeek="127" startHour="0" startMinute="0" stopHour="23" stopMinute="59" stock="-1" maxStock="-1" salePercent="0" minLevel="0" maxLevel="0" minBirthday="0" maxBirthday="0" restrictionDay="0" availableCount="0" isVipGift="true" vipTier="7">
  1801. +        <item itemId="29007" count="1" /> <!-- Daily Present - VIP 7 -->
  1802. +    </item>
  1803.  </list>
  1804. \ No newline at end of file
  1805. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/vip.xml
  1806. IDEA additional info:
  1807. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  1808. <+>UTF-8
  1809. ===================================================================
  1810. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/vip.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/vip.xml
  1811. new file mode 100644
  1812. --- /dev/null   (date 1619558711367)
  1813. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/vip.xml   (date 1619558711367)
  1814. @@ -0,0 +1,62 @@
  1815. +<?xml version='1.0' encoding='utf-8'?>
  1816. +<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/vip.xsd">
  1817. +    <!--
  1818. +        tier: tier of the vip
  1819. +        points-requires: points required to get to that tier
  1820. +        points-lose: points player will lose after a while.
  1821. +
  1822. +        PS. Client data made for Sylph! Probably works on essence aswell! Might need to check for classic!.
  1823. +
  1824. +l2.ini
  1825. +[VipSystem]
  1826. +UseVipInfoWnd=false
  1827. +
  1828. + -> needs to be true
  1829. +
  1830. +# Prime shop needs to be true aswell!
  1831. +
  1832. +ProductName_Classic-eu.dat
  1833. +44-49 -> L2 Point purchases
  1834. +product_name_begin id=2090044  outer_name=[VIP Gain Scroll]    description=[]  icon=[BranchIcon.Icon.g_bm_vip_potion_i00]  icon_panel=[None]   mainsubject=[]  product_name_end
  1835. +product_name_begin id=2090045  outer_name=[Good VIP Gain Scroll]   description=[]  icon=[BranchIcon.Icon.g_bm_vip_potion_i00]  icon_panel=[None]   mainsubject=[]  product_name_end
  1836. +product_name_begin id=2090046  outer_name=[VIP Gain Scroll - 80]   description=[]  icon=[BranchIcon.Icon.g_bm_vip_potion_i00]  icon_panel=[None]   mainsubject=[]  product_name_end
  1837. +product_name_begin id=2090047  outer_name=[VIP Gain Scroll - 240]  description=[]  icon=[BranchIcon.Icon.g_bm_vip_potion_i00]  icon_panel=[None]   mainsubject=[]  product_name_end
  1838. +product_name_begin id=2090048  outer_name=[VIP Gain Scroll - 800]  description=[]  icon=[BranchIcon.Icon.g_bm_vip_potion_i00]  icon_panel=[None]   mainsubject=[]  product_name_end
  1839. +product_name_begin id=2090049  outer_name=[VIP Gain Scroll - 2400] description=[]  icon=[BranchIcon.Icon.g_bm_vip_potion_i00]  icon_panel=[None]   mainsubject=[]  product_name_end
  1840. +
  1841. +50-55 -> VIP Coin purchases
  1842. +product_name_begin id=2090050  outer_name=[VIP Gain Scroll]    description=[]  icon=[BranchIcon.Icon.g_bm_vip_potion_i00]  icon_panel=[None]   mainsubject=[]  product_name_end
  1843. +product_name_begin id=2090051  outer_name=[Good VIP Gain Scroll]   description=[]  icon=[BranchIcon.Icon.g_bm_vip_potion_i00]  icon_panel=[None]   mainsubject=[]  product_name_end
  1844. +product_name_begin id=2090052  outer_name=[VIP Gain Scroll - 80]   description=[]  icon=[BranchIcon.Icon.g_bm_vip_potion_i00]  icon_panel=[None]   mainsubject=[]  product_name_end
  1845. +product_name_begin id=2090053  outer_name=[VIP Gain Scroll - 240]  description=[]  icon=[BranchIcon.Icon.g_bm_vip_potion_i00]  icon_panel=[None]   mainsubject=[]  product_name_end
  1846. +product_name_begin id=2090054  outer_name=[VIP Gain Scroll - 800]  description=[]  icon=[BranchIcon.Icon.g_bm_vip_potion_i00]  icon_panel=[None]   mainsubject=[]  product_name_end
  1847. +product_name_begin id=2090055  outer_name=[VIP Gain Scroll - 2400] description=[]  icon=[BranchIcon.Icon.g_bm_vip_potion_i00]  icon_panel=[None]   mainsubject=[]  product_name_end
  1848. +
  1849. +
  1850. + -->
  1851. +    
  1852. +    <vip tier="0" points-required="0" points-lose="0">
  1853. +        <bonus/>
  1854. +    </vip>
  1855. +    <vip tier="1" points-required="300" points-lose="300">
  1856. +        <bonus skill="55024"/>
  1857. +    </vip>
  1858. +    <vip tier="2" points-required="1000" points-lose="600">
  1859. +        <bonus skill="55025"/>
  1860. +    </vip>
  1861. +    <vip tier="3" points-required="2000" points-lose="660">
  1862. +        <bonus skill="55026" silverChance="1.0" goldChance="1.0"/>
  1863. +    </vip>
  1864. +    <vip tier="4" points-required="3500" points-lose="1320">
  1865. +        <bonus skill="55027" silverChance="2.0" goldChance="2.0"/>
  1866. +    </vip>
  1867. +    <vip tier="5" points-required="7000" points-lose="2640">
  1868. +        <bonus skill="55028" silverChance="3.5" goldChance="3.5"/>
  1869. +    </vip>
  1870. +    <vip tier="6" points-required="20000" points-lose="5280">
  1871. +        <bonus skill="55029" silverChance="5.0" goldChance="5.0"/>
  1872. +    </vip>
  1873. +    <vip tier="7" points-required="40000" points-lose="10560">
  1874. +        <bonus skill="55030" silverChance="7.0" goldChance="7.0"/>
  1875. +    </vip>
  1876. +</list>
  1877. \ No newline at end of file
  1878. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/xsd/vip.xsd
  1879. IDEA additional info:
  1880. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  1881. <+>UTF-8
  1882. ===================================================================
  1883. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/xsd/vip.xsd b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/xsd/vip.xsd
  1884. new file mode 100644
  1885. --- /dev/null   (date 1619546345647)
  1886. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/xsd/vip.xsd   (date 1619546345647)
  1887. @@ -0,0 +1,26 @@
  1888. +<?xml version="1.0" encoding="UTF-8"?>
  1889. +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  1890. +    <xs:element name="list">
  1891. +        <xs:complexType>
  1892. +            <xs:sequence>
  1893. +                <xs:element name="vip" type="TierInfo" minOccurs="0" maxOccurs="unbounded"/>
  1894. +            </xs:sequence>
  1895. +        </xs:complexType>
  1896. +
  1897. +    </xs:element>
  1898. +
  1899. +    <xs:complexType name="TierInfo">
  1900. +        <xs:sequence>
  1901. +            <xs:element name="bonus" type="TierBonusInfo"/>
  1902. +        </xs:sequence>
  1903. +        <xs:attribute name="tier" type="xs:byte" use="required"/>
  1904. +        <xs:attribute name="points-required" type="xs:long" use="required"/>
  1905. +        <xs:attribute name="points-lose" type="xs:long" use="required"/>
  1906. +    </xs:complexType>
  1907. +
  1908. +    <xs:complexType name="TierBonusInfo">
  1909. +        <xs:attribute name="silverChance" type="xs:float" default="0"/>
  1910. +        <xs:attribute name="goldChance" type="xs:float" default="0"/>
  1911. +        <xs:attribute name="skill" type="xs:int" default="0"/>
  1912. +    </xs:complexType>
  1913. +</xs:schema>
  1914. \ No newline at end of file
  1915. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/VipUp.java
  1916. IDEA additional info:
  1917. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  1918. <+>UTF-8
  1919. ===================================================================
  1920. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/VipUp.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/VipUp.java
  1921. new file mode 100644
  1922. --- /dev/null   (date 1619536339463)
  1923. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/VipUp.java    (date 1619536339463)
  1924. @@ -0,0 +1,62 @@
  1925. +package handlers.effecthandlers;
  1926. +
  1927. +import org.l2jmobius.gameserver.model.StatSet;
  1928. +import org.l2jmobius.gameserver.model.actor.Creature;
  1929. +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
  1930. +import org.l2jmobius.gameserver.model.effects.AbstractEffect;
  1931. +import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
  1932. +import org.l2jmobius.gameserver.model.skills.Skill;
  1933. +
  1934. +/**
  1935. + * @author Gabriel Costa Souza
  1936. + * Discord: Gabriel 'GCS'#2589
  1937. + * Skype - email: gabriel_costa25@hotmail.com
  1938. + */
  1939. +public class VipUp extends AbstractEffect
  1940. +{
  1941. +   private final long _amount;
  1942. +
  1943. +   public VipUp(StatSet params)
  1944. +   {
  1945. +       _amount = params.getLong("amount", 0L);
  1946. +   }
  1947. +
  1948. +    @Override
  1949. +    public boolean isInstant()
  1950. +    {
  1951. +        return true;
  1952. +    }
  1953. +
  1954. +    @Override
  1955. +    public void instant(Creature effector, Creature effected, Skill skill, ItemInstance item)
  1956. +    {
  1957. +        if (effected == null)
  1958. +        {
  1959. +            return;
  1960. +        }
  1961. +
  1962. +        final PlayerInstance player = effected.getActingPlayer();
  1963. +        if (player == null)
  1964. +        {
  1965. +            return;
  1966. +        }
  1967. +
  1968. +        player.updateVipPoints(_amount);
  1969. +    }
  1970. +}
  1971. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/VipSystem.ini
  1972. IDEA additional info:
  1973. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  1974. <+>UTF-8
  1975. ===================================================================
  1976. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/VipSystem.ini b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/VipSystem.ini
  1977. new file mode 100644
  1978. --- /dev/null   (date 1619548454337)
  1979. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/VipSystem.ini    (date 1619548454337)
  1980. @@ -0,0 +1,27 @@
  1981. +# ---------------------------------------------------------------------------
  1982. +# VIP System
  1983. +# ---------------------------------------------------------------------------
  1984. +
  1985. +# VIP System Enabled.
  1986. +# l2.ini
  1987. +# [VipSystem]
  1988. +# UseVipInfoWnd=true
  1989. +# -> needs to be true
  1990. +# Prime shop needs to be true aswell!
  1991. +# Check vip.xml for more info!
  1992. +
  1993. +VIPEnabled = True
  1994. +
  1995. +# Max vip level that can be reached (Client Limitations, lv 8 -> 10 Doesn't exist. If u want to use, make it yourself!)
  1996. +MaxVipLevel = 7
  1997. +
  1998. +# When purchasing from the Prime Shop, the price amount will add to your vip points
  1999. +PrimeAffectPoints = true
  2000. +
  2001. +# Drop Amount of Silver coins if the Vip Tier allows it
  2002. +VipSilverDropMin = 1
  2003. +VipSilverDropMax = 5
  2004. +
  2005. +# Drop Amount of Golden coins if the Vip Tier allows it
  2006. +VipGoldenDropMin = 1
  2007. +VipGoldenDropMax = 5
  2008. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/vip/VipInfo.java
  2009. IDEA additional info:
  2010. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  2011. <+>UTF-8
  2012. ===================================================================
  2013. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/vip/VipInfo.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/vip/VipInfo.java
  2014. new file mode 100644
  2015. --- /dev/null   (date 1619559791693)
  2016. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/vip/VipInfo.java (date 1619559791693)
  2017. @@ -0,0 +1,58 @@
  2018. +package org.l2jmobius.gameserver.model.vip;
  2019. +
  2020. +/**
  2021. + * @author Gabriel Costa Souza
  2022. + * Discord: Gabriel 'GCS'#2589
  2023. + * Skype - email: gabriel_costa25@hotmail.com
  2024. + */
  2025. +public class VipInfo {
  2026. +
  2027. +    private final byte tier;
  2028. +    private final long pointsRequired;
  2029. +    private final long pointsDepreciated;
  2030. +    private float silverCoinChance;
  2031. +    private float goldCoinChance;
  2032. +    private int skill;
  2033. +
  2034. +    public VipInfo(byte tier, long pointsRequired, long pointsDepreciated) {
  2035. +        this.tier = tier;
  2036. +        this.pointsRequired = pointsRequired;
  2037. +        this.pointsDepreciated = pointsDepreciated;
  2038. +    }
  2039. +
  2040. +    public byte getTier() {
  2041. +        return tier;
  2042. +    }
  2043. +
  2044. +    public long getPointsRequired() {
  2045. +        return pointsRequired;
  2046. +    }
  2047. +
  2048. +    public long getPointsDepreciated() {
  2049. +        return pointsDepreciated;
  2050. +    }
  2051. +
  2052. +    public int getSkill() {
  2053. +        return skill;
  2054. +    }
  2055. +
  2056. +    public void setSkill(int skill) {
  2057. +        this.skill = skill;
  2058. +    }
  2059. +
  2060. +    public void setSilverCoinChance(float silverCoinChance) {
  2061. +        this.silverCoinChance = silverCoinChance;
  2062. +    }
  2063. +
  2064. +    public float getSilverCoinChance() {
  2065. +        return silverCoinChance;
  2066. +    }
  2067. +
  2068. +    public void setGoldCoinChance(float goldCoinChance) {
  2069. +        this.goldCoinChance = goldCoinChance;
  2070. +    }
  2071. +
  2072. +    public float getGoldCoinChance() {
  2073. +        return goldCoinChance;
  2074. +    }
  2075. +}
  2076. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
  2077. IDEA additional info:
  2078. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  2079. <+>UTF-8
  2080. ===================================================================
  2081. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java
  2082. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  2083. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java (date 1619537795490)
  2084. @@ -83,6 +83,8 @@
  2085.    
  2086.     // Common Items
  2087.     public static final int ADENA_ID = 57;
  2088. +   public static final int SILVER_COIN = 29983;
  2089. +   public static final int GOLD_COIN = 29984;
  2090.     public static final int ANCIENT_ADENA_ID = 5575;
  2091.     public static final int BEAUTY_TICKET_ID = 36308;
  2092.     public static final int AIR_STONE_ID = 39461;
  2093. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71100-71199.xml
  2094. IDEA additional info:
  2095. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  2096. <+>UTF-8
  2097. ===================================================================
  2098. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71100-71199.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71100-71199.xml
  2099. --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71100-71199.xml   (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  2100. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71100-71199.xml   (date 1619536430589)
  2101. @@ -756,86 +756,131 @@
  2102.     <item id="71177" name="Daily Present - VIP 1" type="EtcItem">
  2103.         <!-- Double-click the item to receive 1 Scroll of Escape, 3 Healing Potions, 5 VIP Coins. -->
  2104.         <set name="icon" val="BranchIcon.Icon.etc_vip_present_i00" />
  2105. -       <set name="default_action" val="PEEL" />
  2106. -       <set name="immediate_effect" val="true" />
  2107. -       <set name="weight" val="10" />
  2108. -       <set name="is_tradable" val="false" />
  2109. -       <set name="is_dropable" val="false" />
  2110. -       <set name="is_sellable" val="false" />
  2111. -       <set name="is_stackable" val="true" />
  2112. -       <set name="material" val="PAPER" />
  2113. +        <set name="default_action" val="PEEL" />
  2114. +        <set name="immediate_effect" val="true" />
  2115. +        <set name="material" val="FISH" />
  2116. +        <set name="is_tradable" val="false" />
  2117. +        <set name="is_dropable" val="false" />
  2118. +        <set name="is_sellable" val="false" />
  2119. +        <set name="is_stackable" val="true" />
  2120. +        <set name="handler" val="ExtractableItems" />
  2121. +        <set name="extractableCountMin" val="2" />
  2122. +        <set name="extractableCountMax" val="2" />
  2123. +        <capsuled_items>
  2124. +            <item id="736" min="1" max="1" chance="100.00"/> <!-- Scroll of Escape -->
  2125. +            <item id="29651" min="3" max="3" chance="100.00"/>  <!-- Healing Potion -->
  2126. +        </capsuled_items>
  2127.     </item>
  2128.     <item id="71178" name="Daily Present - VIP 2" type="EtcItem">
  2129.         <!-- Double-click the item to receive 1 Scroll of Resurrection, 3 Healing Potions, 10 VIP Coins. -->
  2130.         <set name="icon" val="BranchIcon.Icon.etc_vip_present_i01" />
  2131. -       <set name="default_action" val="PEEL" />
  2132. -       <set name="immediate_effect" val="true" />
  2133. -       <set name="weight" val="10" />
  2134. -       <set name="is_tradable" val="false" />
  2135. -       <set name="is_dropable" val="false" />
  2136. -       <set name="is_sellable" val="false" />
  2137. -       <set name="is_stackable" val="true" />
  2138. -       <set name="material" val="PAPER" />
  2139. +        <set name="default_action" val="PEEL" />
  2140. +        <set name="immediate_effect" val="true" />
  2141. +        <set name="material" val="FISH" />
  2142. +        <set name="is_tradable" val="false" />
  2143. +        <set name="is_dropable" val="false" />
  2144. +        <set name="is_sellable" val="false" />
  2145. +        <set name="is_stackable" val="true" />
  2146. +        <set name="handler" val="ExtractableItems" />
  2147. +        <set name="extractableCountMin" val="2" />
  2148. +        <set name="extractableCountMax" val="2" />
  2149. +        <capsuled_items>
  2150. +            <item id="737" min="1" max="1" chance="100.00"/> <!-- Scroll of Resurrection -->
  2151. +            <item id="29651" min="3" max="3" chance="100.00"/>  <!-- Healing Potion -->
  2152. +        </capsuled_items>
  2153.     </item>
  2154.     <item id="71179" name="Daily Present - VIP 3" type="EtcItem">
  2155.         <!-- Double-click the item to receive 1 Scroll of Escape, 1 Scroll of Resurrection, 5 Healing Potions, 15 VIP Coins. -->
  2156.         <set name="icon" val="BranchIcon.Icon.etc_vip_present_i02" />
  2157. -       <set name="default_action" val="PEEL" />
  2158. -       <set name="immediate_effect" val="true" />
  2159. -       <set name="weight" val="10" />
  2160. -       <set name="is_tradable" val="false" />
  2161. -       <set name="is_dropable" val="false" />
  2162. -       <set name="is_sellable" val="false" />
  2163. -       <set name="is_stackable" val="true" />
  2164. -       <set name="material" val="PAPER" />
  2165. +        <set name="default_action" val="PEEL" />
  2166. +        <set name="immediate_effect" val="true" />
  2167. +        <set name="material" val="FISH" />
  2168. +        <set name="is_tradable" val="false" />
  2169. +        <set name="is_dropable" val="false" />
  2170. +        <set name="is_sellable" val="false" />
  2171. +        <set name="is_stackable" val="true" />
  2172. +        <set name="handler" val="ExtractableItems" />
  2173. +        <set name="extractableCountMin" val="3" />
  2174. +        <set name="extractableCountMax" val="3" />
  2175. +        <capsuled_items>
  2176. +            <item id="736" min="1" max="1" chance="100.00"/> <!-- Scroll of Escape -->
  2177. +            <item id="737" min="1" max="1" chance="100.00"/> <!-- Scroll of Resurrection -->
  2178. +            <item id="29651" min="3" max="3" chance="100.00"/>  <!-- Healing Potion -->
  2179. +        </capsuled_items>
  2180.     </item>
  2181.     <item id="71180" name="Daily Present - VIP 4" type="EtcItem">
  2182.         <!-- Double-click the item to receive 1 Scroll of Escape, 1 Scroll of Resurrection, 3 Greater Healing Potions, 25 VIP Coins. -->
  2183.         <set name="icon" val="BranchIcon.Icon.etc_vip_present_i03" />
  2184. -       <set name="default_action" val="PEEL" />
  2185. -       <set name="immediate_effect" val="true" />
  2186. -       <set name="weight" val="10" />
  2187. -       <set name="is_tradable" val="false" />
  2188. -       <set name="is_dropable" val="false" />
  2189. -       <set name="is_sellable" val="false" />
  2190. -       <set name="is_stackable" val="true" />
  2191. -       <set name="material" val="PAPER" />
  2192. +        <set name="default_action" val="PEEL" />
  2193. +        <set name="immediate_effect" val="true" />
  2194. +        <set name="material" val="FISH" />
  2195. +        <set name="is_tradable" val="false" />
  2196. +        <set name="is_dropable" val="false" />
  2197. +        <set name="is_sellable" val="false" />
  2198. +        <set name="is_stackable" val="true" />
  2199. +        <set name="handler" val="ExtractableItems" />
  2200. +        <set name="extractableCountMin" val="3" />
  2201. +        <set name="extractableCountMax" val="3" />
  2202. +        <capsuled_items>
  2203. +            <item id="736" min="1" max="1" chance="100.00"/> <!-- Scroll of Escape -->
  2204. +            <item id="737" min="1" max="1" chance="100.00"/> <!-- Scroll of Resurrection -->
  2205. +            <item id="29652" min="3" max="3" chance="100.00"/>  <!-- Major Healing Potion -->
  2206. +        </capsuled_items>
  2207.     </item>
  2208.     <item id="71181" name="Daily Present - VIP 5" type="EtcItem">
  2209.         <!-- Double-click the item to receive 1 Blessed Scroll of Escape, 3 Greater Healing Potions, 40 VIP Coins. -->
  2210.         <set name="icon" val="BranchIcon.Icon.etc_vip_present_i04" />
  2211. -       <set name="default_action" val="PEEL" />
  2212. -       <set name="immediate_effect" val="true" />
  2213. -       <set name="weight" val="10" />
  2214. -       <set name="is_tradable" val="false" />
  2215. -       <set name="is_dropable" val="false" />
  2216. -       <set name="is_sellable" val="false" />
  2217. -       <set name="is_stackable" val="true" />
  2218. -       <set name="material" val="PAPER" />
  2219. +        <set name="default_action" val="PEEL" />
  2220. +        <set name="immediate_effect" val="true" />
  2221. +        <set name="material" val="FISH" />
  2222. +        <set name="is_tradable" val="false" />
  2223. +        <set name="is_dropable" val="false" />
  2224. +        <set name="is_sellable" val="false" />
  2225. +        <set name="is_stackable" val="true" />
  2226. +        <set name="handler" val="ExtractableItems" />
  2227. +        <set name="extractableCountMin" val="2" />
  2228. +        <set name="extractableCountMax" val="2" />
  2229. +        <capsuled_items>
  2230. +            <item id="91689" min="1" max="1" chance="100.00"/> <!-- Blessed Scroll of Escape -->
  2231. +            <item id="29652" min="3" max="3" chance="100.00"/>  <!-- Major Healing Potion -->
  2232. +        </capsuled_items>
  2233.     </item>
  2234.     <item id="71182" name="Daily Present - VIP 6" type="EtcItem">
  2235.         <!-- Double-click on the item to receive 1 Blessed Scroll of Resurrection, 3 Greater Healing Potions, 100 VIP Coins. -->
  2236.         <set name="icon" val="BranchIcon.Icon.etc_vip_present_i05" />
  2237. -       <set name="default_action" val="PEEL" />
  2238. -       <set name="immediate_effect" val="true" />
  2239. -       <set name="weight" val="10" />
  2240. -       <set name="is_tradable" val="false" />
  2241. -       <set name="is_dropable" val="false" />
  2242. -       <set name="is_sellable" val="false" />
  2243. -       <set name="is_stackable" val="true" />
  2244. -       <set name="material" val="PAPER" />
  2245. +        <set name="default_action" val="PEEL" />
  2246. +        <set name="immediate_effect" val="true" />
  2247. +        <set name="material" val="FISH" />
  2248. +        <set name="is_tradable" val="false" />
  2249. +        <set name="is_dropable" val="false" />
  2250. +        <set name="is_sellable" val="false" />
  2251. +        <set name="is_stackable" val="true" />
  2252. +        <set name="handler" val="ExtractableItems" />
  2253. +        <set name="extractableCountMin" val="2" />
  2254. +        <set name="extractableCountMax" val="2" />
  2255. +        <capsuled_items>
  2256. +            <item id="3936" min="1" max="1" chance="100.00"/> <!-- Blessed Scroll of Resurrection -->
  2257. +            <item id="29652" min="3" max="3" chance="100.00"/>  <!-- Major Healing Potion -->
  2258. +        </capsuled_items>
  2259.     </item>
  2260.     <item id="71183" name="Daily Present - VIP 7" type="EtcItem">
  2261.         <!-- Double-click the item to receive 1 Blessed Scroll of Escape, 1 Blessed Scroll of Resurrection, 3 Greater Healing Potions, 150 VIP Coins. -->
  2262.         <set name="icon" val="BranchIcon.Icon.etc_vip_present_i06" />
  2263. -       <set name="default_action" val="PEEL" />
  2264. -       <set name="immediate_effect" val="true" />
  2265. -       <set name="weight" val="10" />
  2266. -       <set name="is_tradable" val="false" />
  2267. -       <set name="is_dropable" val="false" />
  2268. -       <set name="is_sellable" val="false" />
  2269. -       <set name="is_stackable" val="true" />
  2270. -       <set name="material" val="PAPER" />
  2271. +        <set name="default_action" val="PEEL" />
  2272. +        <set name="immediate_effect" val="true" />
  2273. +        <set name="material" val="FISH" />
  2274. +        <set name="is_tradable" val="false" />
  2275. +        <set name="is_dropable" val="false" />
  2276. +        <set name="is_sellable" val="false" />
  2277. +        <set name="is_stackable" val="true" />
  2278. +        <set name="handler" val="ExtractableItems" />
  2279. +        <set name="extractableCountMin" val="3" />
  2280. +        <set name="extractableCountMax" val="3" />
  2281. +        <capsuled_items>
  2282. +            <item id="91689" min="1" max="1" chance="100.00"/> <!-- Blessed Scroll of Escape -->
  2283. +            <item id="3936" min="1" max="1" chance="100.00"/> <!-- Blessed Scroll of Resurrection -->
  2284. +            <item id="29652" min="3" max="3" chance="100.00"/>  <!-- Major Healing Potion -->
  2285. +        </capsuled_items>
  2286.     </item>
  2287.     <item id="71184" name="Agathion Meliodas" additionalName="Lv. 1" type="Armor">
  2288.         <!-- Activates the power of the Agathion Meliodas. Special abilities may be activated if the Agathion is summoned from the main slot. Can be enchanted up to +7 with the Seven Sins Agathion Growth Book. Cannot be exchanged, dropped, destroyed, or sold. Can be stored in a private warehouse. <Conditions for upgrade>. Enchant to +7 to upgrade to Agathion Meliodas Lv. 2. -->
  2289. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/impl/creature/player/OnPlayerLoad.java
  2290. IDEA additional info:
  2291. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  2292. <+>UTF-8
  2293. ===================================================================
  2294. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/impl/creature/player/OnPlayerLoad.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/impl/creature/player/OnPlayerLoad.java
  2295. new file mode 100644
  2296. --- /dev/null   (date 1619536553300)
  2297. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/impl/creature/player/OnPlayerLoad.java    (date 1619536553300)
  2298. @@ -0,0 +1,30 @@
  2299. +package org.l2jmobius.gameserver.model.events.impl.creature.player;
  2300. +
  2301. +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
  2302. +import org.l2jmobius.gameserver.model.events.EventType;
  2303. +import org.l2jmobius.gameserver.model.events.impl.IBaseEvent;
  2304. +
  2305. +/**
  2306. + * @author Gabriel Costa Souza
  2307. + * Discord: Gabriel 'GCS'#2589
  2308. + * Skype - email: gabriel_costa25@hotmail.com
  2309. + */
  2310. +public class OnPlayerLoad implements IBaseEvent {
  2311. +    private final PlayerInstance _player;
  2312. +
  2313. +    public OnPlayerLoad(PlayerInstance player)
  2314. +    {
  2315. +        _player = player;
  2316. +    }
  2317. +
  2318. +    public PlayerInstance getPlayer()
  2319. +    {
  2320. +        return _player;
  2321. +    }
  2322. +
  2323. +    @Override
  2324. +    public EventType getType()
  2325. +    {
  2326. +        return EventType.ON_PLAYER_LOAD;
  2327. +    }
  2328. +}
  2329. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/VipData.java
  2330. IDEA additional info:
  2331. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  2332. <+>UTF-8
  2333. ===================================================================
  2334. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/VipData.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/VipData.java
  2335. new file mode 100644
  2336. --- /dev/null   (date 1619559791684)
  2337. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/VipData.java  (date 1619559791684)
  2338. @@ -0,0 +1,150 @@
  2339. +package org.l2jmobius.gameserver.data.xml;
  2340. +
  2341. +import org.l2jmobius.Config;
  2342. +import org.l2jmobius.commons.util.IXmlReader;
  2343. +import org.l2jmobius.gameserver.model.RecipeInstance;
  2344. +import org.l2jmobius.gameserver.model.RecipeList;
  2345. +import org.l2jmobius.gameserver.model.RecipeStatInstance;
  2346. +import org.l2jmobius.gameserver.model.StatSet;
  2347. +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
  2348. +import org.l2jmobius.gameserver.model.vip.VipInfo;
  2349. +import org.w3c.dom.Document;
  2350. +import org.w3c.dom.NamedNodeMap;
  2351. +import org.w3c.dom.Node;
  2352. +
  2353. +import java.io.File;
  2354. +import java.util.ArrayList;
  2355. +import java.util.HashMap;
  2356. +import java.util.List;
  2357. +import java.util.Map;
  2358. +import java.util.logging.Logger;
  2359. +
  2360. +import static java.util.Objects.nonNull;
  2361. +
  2362. +/**
  2363. + * @author Gabriel Costa Souza
  2364. + * Discord: Gabriel 'GCS'#2589
  2365. + * Skype - email: gabriel_costa25@hotmail.com
  2366. + */
  2367. +public class VipData implements IXmlReader
  2368. +{
  2369. +   private static final Logger LOGGER = Logger.getLogger(VipData.class.getName());
  2370. +
  2371. +   private final Map<Byte, VipInfo> vipTiers = new HashMap<>();
  2372. +
  2373. +   protected VipData()
  2374. +   {
  2375. +       load();
  2376. +   }
  2377. +  
  2378. +   @Override
  2379. +   public void load()
  2380. +   {
  2381. +        if(!Config.VIP_SYSTEM_ENABLED)
  2382. +            return;
  2383. +        vipTiers.clear();
  2384. +       parseDatapackFile("data/vip.xml");
  2385. +       LOGGER.info(getClass().getSimpleName() + ": Loaded " + vipTiers.size() + " vips.");
  2386. +   }
  2387. +  
  2388. +   @Override
  2389. +   public void parseDocument(Document doc, File f)
  2390. +   {
  2391. +        for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
  2392. +        {
  2393. +            if ("list".equalsIgnoreCase(n.getNodeName()))
  2394. +            {
  2395. +                VIP_FILE: for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
  2396. +                {
  2397. +                    if ("vip".equalsIgnoreCase(d.getNodeName()))
  2398. +                    {
  2399. +                        final NamedNodeMap attrs = d.getAttributes();
  2400. +                        Node att;
  2401. +                        byte tier = -1;
  2402. +                        int required = -1;
  2403. +                        int lose = -1;
  2404. +
  2405. +                        att = attrs.getNamedItem("tier");
  2406. +                        if (att == null)
  2407. +                        {
  2408. +                            LOGGER.severe(getClass().getSimpleName() + ": Missing tier for vip, skipping");
  2409. +                            continue;
  2410. +                        }
  2411. +                        tier = Byte.parseByte(att.getNodeValue());
  2412. +
  2413. +                        att = attrs.getNamedItem("points-required");
  2414. +                        if (att == null)
  2415. +                        {
  2416. +                            LOGGER.severe(getClass().getSimpleName() + ": Missing points-required for vip: " + tier + ", skipping");
  2417. +                            continue;
  2418. +                        }
  2419. +
  2420. +                        required = Integer.parseInt(att.getNodeValue());
  2421. +
  2422. +                        att = attrs.getNamedItem("points-lose");
  2423. +                        if (att == null)
  2424. +                        {
  2425. +                            LOGGER.severe(getClass().getSimpleName() + ": Missing points-lose for vip: " + tier + ", skipping");
  2426. +                            continue;
  2427. +                        }
  2428. +
  2429. +                        lose = Integer.parseInt(att.getNodeValue());
  2430. +
  2431. +                        var vipInfo = new VipInfo(tier, required, lose);
  2432. +
  2433. +
  2434. +                        for (Node c = d.getFirstChild(); c != null; c = c.getNextSibling())
  2435. +                        {
  2436. +                            if ("bonus".equalsIgnoreCase(c.getNodeName()))
  2437. +                            {
  2438. +                                final int skill = Integer.parseInt(c.getAttributes().getNamedItem("skill").getNodeValue());
  2439. +                                final float silverChance = Float.parseFloat(c.getAttributes().getNamedItem("silverChance").getNodeValue());
  2440. +                                final float goldChance = Float.parseFloat(c.getAttributes().getNamedItem("goldChance").getNodeValue());
  2441. +                                try
  2442. +                                {
  2443. +                                    vipInfo.setSkill(skill);
  2444. +                                    vipInfo.setSilverCoinChance(silverChance);
  2445. +                                    vipInfo.setGoldCoinChance(goldChance);
  2446. +                                }
  2447. +                                catch (Exception e)
  2448. +                                {
  2449. +                                    LOGGER.severe(getClass().getSimpleName() + ": Error in bonus parameter for vip: " + tier + ", skipping");
  2450. +                                    continue VIP_FILE;
  2451. +                                }
  2452. +                            }
  2453. +                        }
  2454. +                        vipTiers.put(tier, vipInfo);
  2455. +
  2456. +                    }
  2457. +                }
  2458. +            }
  2459. +        }
  2460. +   }
  2461. +
  2462. +   /**
  2463. +    * Gets the single instance of VipData.
  2464. +    * @return single instance of VipData
  2465. +    */
  2466. +   public static VipData getInstance()
  2467. +   {
  2468. +       return SingletonHolder.INSTANCE;
  2469. +   }
  2470. +  
  2471. +   /**
  2472. +    * The Class SingletonHolder.
  2473. +    */
  2474. +   private static class SingletonHolder
  2475. +   {
  2476. +       protected static final VipData INSTANCE = new VipData();
  2477. +   }
  2478. +
  2479. +
  2480. +   public int getSkillId(byte tier){
  2481. +       return vipTiers.get(tier).getSkill();
  2482. +    }
  2483. +
  2484. +    public Map<Byte, VipInfo> getVipTiers() {
  2485. +        return vipTiers;
  2486. +    }
  2487. +}
  2488. +
  2489. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/vip/ReceiveVipInfo.java
  2490. IDEA additional info:
  2491. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  2492. <+>UTF-8
  2493. ===================================================================
  2494. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/vip/ReceiveVipInfo.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/vip/ReceiveVipInfo.java
  2495. new file mode 100644
  2496. --- /dev/null   (date 1619536553411)
  2497. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/vip/ReceiveVipInfo.java  (date 1619536553411)
  2498. @@ -0,0 +1,56 @@
  2499. +/*
  2500. + * This file is part of the L2J Mobius project.
  2501. + *
  2502. + * This program is free software: you can redistribute it and/or modify
  2503. + * it under the terms of the GNU General Public License as published by
  2504. + * the Free Software Foundation, either version 3 of the License, or
  2505. + * (at your option) any later version.
  2506. + *
  2507. + * This program is distributed in the hope that it will be useful,
  2508. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  2509. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2510. + * General Public License for more details.
  2511. + *
  2512. + * You should have received a copy of the GNU General Public License
  2513. + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  2514. + */
  2515. +package org.l2jmobius.gameserver.network.serverpackets.vip;
  2516. +
  2517. +import org.l2jmobius.Config;
  2518. +import org.l2jmobius.commons.network.PacketWriter;
  2519. +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
  2520. +import org.l2jmobius.gameserver.model.vip.VipManager;
  2521. +import org.l2jmobius.gameserver.network.OutgoingPackets;
  2522. +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
  2523. +
  2524. +import java.time.Instant;
  2525. +import java.time.temporal.ChronoUnit;
  2526. +
  2527. +public class ReceiveVipInfo implements IClientOutgoingPacket
  2528. +{
  2529. +    private final PlayerInstance _player;
  2530. +
  2531. +    public ReceiveVipInfo(PlayerInstance player)
  2532. +    {
  2533. +        _player = player;
  2534. +    }
  2535. +   @Override
  2536. +   public boolean write(PacketWriter packet)
  2537. +   {
  2538. +        if(!Config.VIP_SYSTEM_ENABLED)
  2539. +            return false;
  2540. +        var vipManager = VipManager.getInstance();
  2541. +        var vipTier = _player.getVipTier();
  2542. +        var vipDuration = (int) ChronoUnit.SECONDS.between(Instant.now(), Instant.ofEpochMilli(_player.getVipTierExpiration()));
  2543. +
  2544. +        OutgoingPackets.RECIVE_VIP_INFO.writeId(packet);
  2545. +       packet.writeC(vipTier);
  2546. +       packet.writeQ(_player.getVipPoints());
  2547. +       packet.writeD(vipDuration);
  2548. +       packet.writeQ(vipManager.getPointsToLevel((byte)(vipTier+1)));
  2549. +       packet.writeQ(vipManager.getPointsDepreciatedOnLevel(vipTier));
  2550. +       packet.writeC(vipTier);
  2551. +       packet.writeQ(vipManager.getPointsToLevel(vipTier));
  2552. +       return true;
  2553. +   }
  2554. +}
  2555. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/vip/RequestVipLuckGameInfo.java
  2556. IDEA additional info:
  2557. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  2558. <+>UTF-8
  2559. ===================================================================
  2560. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/vip/RequestVipLuckGameInfo.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/vip/RequestVipLuckGameInfo.java
  2561. new file mode 100644
  2562. --- /dev/null   (date 1619559791667)
  2563. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/vip/RequestVipLuckGameInfo.java  (date 1619559791667)
  2564. @@ -0,0 +1,22 @@
  2565. +package org.l2jmobius.gameserver.network.clientpackets.vip;
  2566. +
  2567. +
  2568. +import org.l2jmobius.commons.network.PacketReader;
  2569. +import org.l2jmobius.gameserver.network.GameClient;
  2570. +import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
  2571. +import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipLuckyGameInfo;
  2572. +
  2573. +public class RequestVipLuckGameInfo implements IClientIncomingPacket {
  2574. +    @Override
  2575. +    public boolean read(GameClient client, PacketReader packet)
  2576. +    {
  2577. +        // Nothing to read
  2578. +        return true;
  2579. +    }
  2580. +
  2581. +    @Override
  2582. +    public void run(GameClient client)
  2583. +    {
  2584. +        client.sendPacket(new ReceiveVipLuckyGameInfo(client.getPlayer()));
  2585. +    }
  2586. +}
  2587. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/vip/ExRequestVipInfo.java
  2588. IDEA additional info:
  2589. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  2590. <+>UTF-8
  2591. ===================================================================
  2592. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/vip/ExRequestVipInfo.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/vip/ExRequestVipInfo.java
  2593. new file mode 100644
  2594. --- /dev/null   (date 1619559791671)
  2595. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/vip/ExRequestVipInfo.java    (date 1619559791671)
  2596. @@ -0,0 +1,22 @@
  2597. +package org.l2jmobius.gameserver.network.clientpackets.vip;
  2598. +
  2599. +import org.l2jmobius.commons.network.PacketReader;
  2600. +import org.l2jmobius.gameserver.network.GameClient;
  2601. +import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
  2602. +import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo;
  2603. +
  2604. +public class ExRequestVipInfo implements IClientIncomingPacket {
  2605. +    @Override
  2606. +    public boolean read(GameClient client, PacketReader packet)
  2607. +    {
  2608. +        // Nothing to read
  2609. +        return true;
  2610. +    }
  2611. +
  2612. +    @Override
  2613. +    public void run(GameClient client)
  2614. +    {
  2615. +        client.sendPacket(new ReceiveVipInfo(client.getPlayer()));
  2616. +
  2617. +    }
  2618. +}
  2619. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/attendance/RequestVipAttendanceCheck.java
  2620. IDEA additional info:
  2621. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  2622. <+>UTF-8
  2623. ===================================================================
  2624. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/attendance/RequestVipAttendanceCheck.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/attendance/RequestVipAttendanceCheck.java
  2625. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/attendance/RequestVipAttendanceCheck.java    (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  2626. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/attendance/RequestVipAttendanceCheck.java    (date 1619536553363)
  2627. @@ -60,7 +60,10 @@
  2628.         {
  2629.             player.sendPacket(SystemMessageId.YOUR_VIP_RANK_IS_TOO_LOW_TO_RECEIVE_THE_REWARD);
  2630.             return;
  2631. -       }
  2632. +       }else if(Config.VIP_ONLY_ATTENDANCE_REWARDS && player.getVipTier() <= 0){
  2633. +            player.sendPacket(SystemMessageId.YOUR_VIP_RANK_IS_TOO_LOW_TO_RECEIVE_THE_REWARD);
  2634. +            return;
  2635. +        }
  2636.        
  2637.         // Check login delay.
  2638.         if (player.getUptime() < (Config.ATTENDANCE_REWARD_DELAY * 60 * 1000))
  2639. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/vip/VipManager.java
  2640. IDEA additional info:
  2641. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  2642. <+>UTF-8
  2643. ===================================================================
  2644. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/vip/VipManager.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/vip/VipManager.java
  2645. new file mode 100644
  2646. --- /dev/null   (date 1619559791678)
  2647. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/vip/VipManager.java  (date 1619559791678)
  2648. @@ -0,0 +1,166 @@
  2649. +package org.l2jmobius.gameserver.model.vip;
  2650. +
  2651. +import org.l2jmobius.Config;
  2652. +import org.l2jmobius.gameserver.data.xml.PrimeShopData;
  2653. +import org.l2jmobius.gameserver.data.xml.SkillData;
  2654. +import org.l2jmobius.gameserver.data.xml.VipData;
  2655. +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
  2656. +import org.l2jmobius.gameserver.model.events.Containers;
  2657. +import org.l2jmobius.gameserver.model.events.EventType;
  2658. +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLoad;
  2659. +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
  2660. +import org.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener;
  2661. +import org.l2jmobius.gameserver.model.primeshop.PrimeShopGroup;
  2662. +import org.l2jmobius.gameserver.model.variables.AccountVariables;
  2663. +import org.l2jmobius.gameserver.network.clientpackets.primeshop.RequestBRBuyProduct;
  2664. +import org.l2jmobius.gameserver.network.serverpackets.ExBRNewIconCashBtnWnd;
  2665. +import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo;
  2666. +
  2667. +import java.time.Instant;
  2668. +import java.time.temporal.ChronoUnit;
  2669. +import java.util.function.Consumer;
  2670. +
  2671. +import static java.util.Objects.nonNull;
  2672. +
  2673. +/**
  2674. + * @author Gabriel Costa Souza
  2675. + * Discord: Gabriel 'GCS'#2589
  2676. + * Skype - email: gabriel_costa25@hotmail.com
  2677. + */
  2678. +public final class VipManager {
  2679. +
  2680. +    private static final byte VIP_MAX_TIER = (byte) Config.VIP_SYSTEM_MAX_TIER;
  2681. +
  2682. +    private final ConsumerEventListener vipLoginListener = new ConsumerEventListener(null, EventType.ON_PLAYER_LOGIN, (Consumer<OnPlayerLogin>) this::onVipLogin, this);
  2683. +
  2684. +    private VipManager() {
  2685. +        if(!Config.VIP_SYSTEM_ENABLED)
  2686. +            return;
  2687. +        Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_PLAYER_LOAD, (Consumer<OnPlayerLoad>) this::onPlayerLoaded, this));
  2688. +    }
  2689. +
  2690. +    private void onPlayerLoaded(OnPlayerLoad event) {
  2691. +        final var player = event.getPlayer();
  2692. +        player.setVipTier(getVipTier(player));
  2693. +        if(player.getVipTier() > 0) {
  2694. +            manageTier(player);
  2695. +            player.addListener(vipLoginListener);
  2696. +        } else {
  2697. +            player.sendPacket(new ReceiveVipInfo(player));
  2698. +            player.sendPacket(new ExBRNewIconCashBtnWnd((byte)0));
  2699. +        }
  2700. +    }
  2701. +
  2702. +    private boolean canReceiveGift(PlayerInstance player){
  2703. +        if(!Config.VIP_SYSTEM_ENABLED)
  2704. +            return false;
  2705. +        if(player.getVipTier() <= 0)
  2706. +            return false;
  2707. +        else{
  2708. +            long timeBought = player.getAccountVariables().getLong(AccountVariables.VIP_ITEM_BOUGHT, 0L);
  2709. +            return timeBought <= 0;
  2710. +        }
  2711. +    }
  2712. +
  2713. +    private void onVipLogin(OnPlayerLogin event) {
  2714. +        final var player = event.getPlayer();
  2715. +        if(canReceiveGift(player)) {
  2716. +            player.sendPacket(new ExBRNewIconCashBtnWnd((byte) 1));
  2717. +        }else {
  2718. +             player.sendPacket(new ExBRNewIconCashBtnWnd((byte) 0));
  2719. +        }
  2720. +        player.removeListener(vipLoginListener);
  2721. +        player.sendPacket(new ReceiveVipInfo(player));
  2722. +    }
  2723. +
  2724. +    public void manageTier(PlayerInstance player) {
  2725. +        if(!checkVipTierExpiration(player)) {
  2726. +            player.sendPacket(new ReceiveVipInfo(player));
  2727. +        }
  2728. +
  2729. +        if(player.getVipTier() > 1) {
  2730. +            var oldSkillId = VipData.getInstance().getSkillId((byte) (player.getVipTier() - 1));
  2731. +            if(oldSkillId > 0) {
  2732. +                var oldSkill = SkillData.getInstance().getSkill(oldSkillId, 1);
  2733. +                if(nonNull(oldSkill)) {
  2734. +                    player.removeSkill(oldSkill);
  2735. +                }
  2736. +            }
  2737. +        }
  2738. +
  2739. +        var skillId = VipData.getInstance().getSkillId(player.getVipTier());
  2740. +        if(skillId > 0) {
  2741. +            var skill = SkillData.getInstance().getSkill(skillId, 1);
  2742. +            if(nonNull(skill)) {
  2743. +                player.addSkill(skill);
  2744. +            }
  2745. +        }
  2746. +    }
  2747. +
  2748. +
  2749. +    public byte getVipTier(PlayerInstance player) {
  2750. +        return getVipInfo(player).getTier();
  2751. +    }
  2752. +
  2753. +    public byte getVipTier(long points) {
  2754. +        byte temp = getVipInfo(points).getTier();
  2755. +        if(temp > VIP_MAX_TIER)
  2756. +            temp = VIP_MAX_TIER;
  2757. +        return temp;
  2758. +    }
  2759. +
  2760. +    private VipInfo getVipInfo(PlayerInstance player) {
  2761. +        var points =  player.getVipPoints();
  2762. +        return getVipInfo(points);
  2763. +    }
  2764. +
  2765. +    public float getSilverCoinDropChance(PlayerInstance player) {
  2766. +        return getVipInfo(player).getSilverCoinChance();
  2767. +    }
  2768. +
  2769. +    public float getRustyCoinDropChance(PlayerInstance player) {
  2770. +        return getVipInfo(player).getGoldCoinChance();
  2771. +    }
  2772. +
  2773. +
  2774. +    private VipInfo getVipInfo(long points) {
  2775. +        for (byte i = 0; i < VipData.getInstance().getVipTiers().size(); i++) {
  2776. +            if(points < VipData.getInstance().getVipTiers().get(i).getPointsRequired()) {
  2777. +                byte temp = (byte) (i - 1);
  2778. +                if(temp > VIP_MAX_TIER)
  2779. +                    temp = VIP_MAX_TIER;
  2780. +                return VipData.getInstance().getVipTiers().get(temp);
  2781. +            }
  2782. +        }
  2783. +        return VipData.getInstance().getVipTiers().get(VIP_MAX_TIER);
  2784. +    }
  2785. +
  2786. +    public long getPointsDepreciatedOnLevel(byte vipTier) {
  2787. +        return VipData.getInstance().getVipTiers().get(vipTier).getPointsDepreciated();
  2788. +    }
  2789. +
  2790. +    public long getPointsToLevel(byte level) {
  2791. +        if(VipData.getInstance().getVipTiers().containsKey(level)) {
  2792. +            return VipData.getInstance().getVipTiers().get(level).getPointsRequired();
  2793. +        }
  2794. +        return 0;
  2795. +    }
  2796. +
  2797. +    public boolean checkVipTierExpiration(PlayerInstance player) {
  2798. +        var now = Instant.now();
  2799. +        if(now.isAfter(Instant.ofEpochMilli(player.getVipTierExpiration()))) {
  2800. +            player.updateVipPoints(-getPointsDepreciatedOnLevel(player.getVipTier()));
  2801. +            player.setVipTierExpiration(Instant.now().plus(30, ChronoUnit.DAYS).toEpochMilli());
  2802. +            return true;
  2803. +        }
  2804. +        return false;
  2805. +    }
  2806. +
  2807. +    public static VipManager getInstance() {
  2808. +        return Singleton.INSTANCE;
  2809. +    }
  2810. +
  2811. +    private static class Singleton {
  2812. +        private static final VipManager INSTANCE = new VipManager();
  2813. +    }
  2814. +}
  2815. \ No newline at end of file
  2816. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/xsd/PrimeShop.xsd
  2817. IDEA additional info:
  2818. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  2819. <+>UTF-8
  2820. ===================================================================
  2821. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/xsd/PrimeShop.xsd b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/xsd/PrimeShop.xsd
  2822. --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/xsd/PrimeShop.xsd (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  2823. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/xsd/PrimeShop.xsd (date 1619548798159)
  2824. @@ -1,43 +1,46 @@
  2825.  <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  2826. -   <xs:element name="list">
  2827. -       <xs:complexType>
  2828. -           <xs:sequence>
  2829. -               <xs:element name="item" maxOccurs="unbounded" minOccurs="0">
  2830. -                   <xs:complexType>
  2831. -                       <xs:sequence>
  2832. -                           <xs:element name="item" maxOccurs="unbounded" minOccurs="0">
  2833. -                               <xs:complexType>
  2834. -                                   <xs:attribute type="xs:int" name="itemId" use="optional" />
  2835. -                                   <xs:attribute type="xs:int" name="count" use="optional" />
  2836. -                               </xs:complexType>
  2837. -                           </xs:element>
  2838. -                       </xs:sequence>
  2839. -                       <xs:attribute type="xs:int" name="id" use="optional" />
  2840. -                       <xs:attribute type="xs:byte" name="cat" use="optional" />
  2841. -                       <xs:attribute type="xs:byte" name="paymentType" use="optional" />
  2842. -                       <xs:attribute type="xs:int" name="price" use="optional" />
  2843. -                       <xs:attribute type="xs:byte" name="panelType" use="optional" />
  2844. -                       <xs:attribute type="xs:byte" name="recommended" use="optional" />
  2845. -                       <xs:attribute type="xs:int" name="startSale" use="optional" />
  2846. -                       <xs:attribute type="xs:int" name="endSale" use="optional" />
  2847. -                       <xs:attribute type="xs:byte" name="dayOfWeek" use="optional" />
  2848. -                       <xs:attribute type="xs:byte" name="startHour" use="optional" />
  2849. -                       <xs:attribute type="xs:byte" name="startMinute" use="optional" />
  2850. -                       <xs:attribute type="xs:byte" name="stopHour" use="optional" />
  2851. -                       <xs:attribute type="xs:byte" name="stopMinute" use="optional" />
  2852. -                       <xs:attribute type="xs:byte" name="stock" use="optional" />
  2853. -                       <xs:attribute type="xs:byte" name="maxStock" use="optional" />
  2854. -                       <xs:attribute type="xs:byte" name="salePercent" use="optional" />
  2855. -                       <xs:attribute type="xs:byte" name="minLevel" use="optional" />
  2856. -                       <xs:attribute type="xs:byte" name="maxLevel" use="optional" />
  2857. -                       <xs:attribute type="xs:byte" name="minBirthday" use="optional" />
  2858. -                       <xs:attribute type="xs:byte" name="maxBirthday" use="optional" />
  2859. -                       <xs:attribute type="xs:byte" name="restrictionDay" use="optional" />
  2860. -                       <xs:attribute type="xs:byte" name="availableCount" use="optional" />
  2861. -                   </xs:complexType>
  2862. -               </xs:element>
  2863. -           </xs:sequence>
  2864. -           <xs:attribute type="xs:boolean" name="enabled" />
  2865. -       </xs:complexType>
  2866. -   </xs:element>
  2867. +    <xs:element name="list">
  2868. +        <xs:complexType>
  2869. +            <xs:sequence>
  2870. +                <xs:element name="item" maxOccurs="unbounded" minOccurs="0">
  2871. +                    <xs:complexType>
  2872. +                        <xs:sequence>
  2873. +                            <xs:element name="item" maxOccurs="unbounded" minOccurs="0">
  2874. +                                <xs:complexType>
  2875. +                                    <xs:attribute type="xs:int" name="itemId" use="optional" />
  2876. +                                    <xs:attribute type="xs:int" name="count" use="optional" />
  2877. +                                </xs:complexType>
  2878. +                            </xs:element>
  2879. +                        </xs:sequence>
  2880. +                        <xs:attribute type="xs:int" name="id" use="optional" />
  2881. +                        <xs:attribute type="xs:byte" name="cat" use="optional" />
  2882. +                        <xs:attribute type="xs:byte" name="paymentType" use="optional" />
  2883. +                        <xs:attribute type="xs:int" name="price" use="optional" />
  2884. +                        <xs:attribute type="xs:byte" name="panelType" use="optional" />
  2885. +                        <xs:attribute type="xs:byte" name="recommended" use="optional" />
  2886. +                        <xs:attribute type="xs:int" name="startSale" use="optional" />
  2887. +                        <xs:attribute type="xs:int" name="endSale" use="optional" />
  2888. +                        <xs:attribute type="xs:byte" name="dayOfWeek" use="optional" />
  2889. +                        <xs:attribute type="xs:byte" name="startHour" use="optional" />
  2890. +                        <xs:attribute type="xs:byte" name="startMinute" use="optional" />
  2891. +                        <xs:attribute type="xs:byte" name="stopHour" use="optional" />
  2892. +                        <xs:attribute type="xs:byte" name="stopMinute" use="optional" />
  2893. +                        <xs:attribute type="xs:byte" name="stock" use="optional" />
  2894. +                        <xs:attribute type="xs:byte" name="maxStock" use="optional" />
  2895. +                        <xs:attribute type="xs:byte" name="salePercent" use="optional" />
  2896. +                        <xs:attribute type="xs:byte" name="minLevel" use="optional" />
  2897. +                        <xs:attribute type="xs:byte" name="maxLevel" use="optional" />
  2898. +                        <xs:attribute type="xs:byte" name="minBirthday" use="optional" />
  2899. +                        <xs:attribute type="xs:byte" name="maxBirthday" use="optional" />
  2900. +                        <xs:attribute type="xs:byte" name="restrictionDay" use="optional" />
  2901. +                        <xs:attribute type="xs:byte" name="availableCount" use="optional" />
  2902. +                        <xs:attribute type="xs:boolean" name="isVipGift" use="optional" />
  2903. +                        <xs:attribute type="xs:byte" name="vipTier" use="optional" />
  2904. +                        <xs:attribute type="xs:int" name="silverCoin" use="optional" />
  2905. +                    </xs:complexType>
  2906. +                </xs:element>
  2907. +            </xs:sequence>
  2908. +            <xs:attribute type="xs:boolean" name="enabled" />
  2909. +        </xs:complexType>
  2910. +    </xs:element>
  2911.  </xs:schema>
  2912. \ No newline at end of file
  2913. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/56000-56099.xml
  2914. IDEA additional info:
  2915. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  2916. <+>UTF-8
  2917. ===================================================================
  2918. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/56000-56099.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/56000-56099.xml
  2919. --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/56000-56099.xml  (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  2920. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/56000-56099.xml  (date 1619536517947)
  2921. @@ -546,11 +546,21 @@
  2922.         <icon>BranchIcon.Icon.g_bm_vip_potion_i00</icon>
  2923.         <operateType>A1</operateType>
  2924.         <reuseDelay>1000</reuseDelay>
  2925. +        <effects>
  2926. +            <effect name="VipUp">
  2927. +                <amount>27</amount>
  2928. +            </effect>
  2929. +        </effects>
  2930.     </skill>
  2931.     <skill id="56097" toLevel="1" name="Good VIP Gain Scroll">
  2932.         <icon>BranchIcon.Icon.g_bm_vip_potion_i00</icon>
  2933.         <operateType>A1</operateType>
  2934.         <reuseDelay>1000</reuseDelay>
  2935. +        <effects>
  2936. +            <effect name="VipUp">
  2937. +                <amount>273</amount>
  2938. +            </effect>
  2939. +        </effects>
  2940.     </skill>
  2941.     <skill id="56098" toLevel="24" name="Venir's Talisman">
  2942.         <!-- When equipped, CON +$s1. -->
  2943. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java
  2944. IDEA additional info:
  2945. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  2946. <+>UTF-8
  2947. ===================================================================
  2948. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java
  2949. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  2950. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java (date 1619548182372)
  2951. @@ -46,8 +46,11 @@
  2952.  import org.l2jmobius.gameserver.model.items.Item;
  2953.  import org.l2jmobius.gameserver.model.skills.Skill;
  2954.  import org.l2jmobius.gameserver.model.stats.Stat;
  2955. +import org.l2jmobius.gameserver.model.vip.VipManager;
  2956.  import org.l2jmobius.gameserver.util.Util;
  2957.  
  2958. +import static java.util.Objects.nonNull;
  2959. +
  2960.  /**
  2961.   * NPC template.
  2962.   * @author NosBit
  2963. @@ -716,7 +719,6 @@
  2964.         }
  2965.        
  2966.         final List<DropHolder> dropList = new ArrayList<>(getDropList(dropType));
  2967. -      
  2968.         // randomize drop order
  2969.         Collections.shuffle(dropList);
  2970.        
  2971. @@ -733,15 +735,8 @@
  2972.             }
  2973.            
  2974.             // check level gap that may prevent drop this item
  2975. -           final double levelGapChanceToDrop;
  2976. -           if (dropItem.getItemId() == Inventory.ADENA_ID)
  2977. -           {
  2978. -               levelGapChanceToDrop = Util.map(levelDifference, -Config.DROP_ADENA_MAX_LEVEL_DIFFERENCE, -Config.DROP_ADENA_MIN_LEVEL_DIFFERENCE, Config.DROP_ADENA_MIN_LEVEL_GAP_CHANCE, 100.0);
  2979. -           }
  2980. -           else
  2981. -           {
  2982. -               levelGapChanceToDrop = Util.map(levelDifference, -Config.DROP_ITEM_MAX_LEVEL_DIFFERENCE, -Config.DROP_ITEM_MIN_LEVEL_DIFFERENCE, Config.DROP_ITEM_MIN_LEVEL_GAP_CHANCE, 100.0);
  2983. -           }
  2984. +           final double levelGapChanceToDrop = calculateLevelGapChanceToDrop(dropItem, levelDifference);
  2985. +
  2986.             if ((Rnd.nextDouble() * 100) > levelGapChanceToDrop)
  2987.             {
  2988.                 continue;
  2989. @@ -788,10 +783,64 @@
  2990.            
  2991.             calculatedDrops.add(new ItemHolder(Config.CHAMPION_REWARD_ID, Config.CHAMPION_REWARD_QTY));
  2992.         }
  2993. -      
  2994. -       return calculatedDrops;
  2995. +
  2996. +        if (dropType == DropType.DROP) {
  2997. +            processVipDrops(calculatedDrops, victim, killer);
  2998. +        }
  2999. +
  3000. +        return calculatedDrops;
  3001.     }
  3002. -  
  3003. +
  3004. +
  3005. +    private void processVipDrops(Collection<ItemHolder> items, Creature victim, Creature killer) {
  3006. +        final List<DropHolder> dropList = new ArrayList<>();
  3007. +        if (nonNull(killer.getActingPlayer())) {
  3008. +            float silverCoinChance = VipManager.getInstance().getSilverCoinDropChance(killer.getActingPlayer());
  3009. +            float rustyCoinChance = VipManager.getInstance().getRustyCoinDropChance(killer.getActingPlayer());
  3010. +
  3011. +            if (silverCoinChance > 0) {
  3012. +                dropList.add(new DropHolder(DropType.DROP, Inventory.SILVER_COIN, Config.VIP_SYSTEM_SILVER_DROP_MIN, Config.VIP_SYSTEM_SILVER_DROP_MAX, silverCoinChance));
  3013. +            }
  3014. +
  3015. +            if (rustyCoinChance > 0) {
  3016. +                dropList.add(new DropHolder(DropType.DROP, Inventory.GOLD_COIN,  Config.VIP_SYSTEM_GOLD_DROP_MIN, Config.VIP_SYSTEM_GOLD_DROP_MAX, rustyCoinChance));
  3017. +            }
  3018. +        }
  3019. +
  3020. +        for (DropHolder dropItem : dropList) {
  3021. +            final ItemHolder drop = calculateDropWithLevelGap(dropItem, victim, killer);
  3022. +            if (drop == null) {
  3023. +                continue;
  3024. +            }
  3025. +
  3026. +            items.add(drop);
  3027. +        }
  3028. +    }
  3029. +
  3030. +    private ItemHolder calculateDropWithLevelGap(DropHolder dropItem, Creature victim, Creature killer) {
  3031. +        final int levelDifference = victim.getLevel() - killer.getLevel();
  3032. +        double levelGapChanceToDrop = calculateLevelGapChanceToDrop(dropItem, levelDifference);
  3033. +        if ((Rnd.nextDouble() * 100) > levelGapChanceToDrop) {
  3034. +            return null;
  3035. +        }
  3036. +
  3037. +        return calculateDrop(dropItem, victim, killer);
  3038. +    }
  3039. +
  3040. +    private double calculateLevelGapChanceToDrop(DropHolder dropItem, int levelDifference) {
  3041. +        final double levelGapChanceToDrop;
  3042. +
  3043. +        if (dropItem.getItemId() == Inventory.ADENA_ID)
  3044. +        {
  3045. +            levelGapChanceToDrop = Util.map(levelDifference, -Config.DROP_ADENA_MAX_LEVEL_DIFFERENCE, -Config.DROP_ADENA_MIN_LEVEL_DIFFERENCE, Config.DROP_ADENA_MIN_LEVEL_GAP_CHANCE, 100.0);
  3046. +        }
  3047. +        else
  3048. +        {
  3049. +            levelGapChanceToDrop = Util.map(levelDifference, -Config.DROP_ITEM_MAX_LEVEL_DIFFERENCE, -Config.DROP_ITEM_MIN_LEVEL_DIFFERENCE, Config.DROP_ITEM_MIN_LEVEL_GAP_CHANCE, 100.0);
  3050. +        }
  3051. +        return levelGapChanceToDrop;
  3052. +    }
  3053. +
  3054.     /**
  3055.      * All item drop chance calculations are done by this method.
  3056.      * @param dropItem
  3057. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExWorldChatCnt.java
  3058. IDEA additional info:
  3059. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  3060. <+>UTF-8
  3061. ===================================================================
  3062. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExWorldChatCnt.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExWorldChatCnt.java
  3063. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExWorldChatCnt.java  (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  3064. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExWorldChatCnt.java  (date 1619536553447)
  3065. @@ -30,7 +30,7 @@
  3066.    
  3067.     public ExWorldChatCnt(PlayerInstance player)
  3068.     {
  3069. -       _points = player.getLevel() < Config.WORLD_CHAT_MIN_LEVEL ? 0 : Math.max(player.getWorldChatPoints() - player.getWorldChatUsed(), 0);
  3070. +       _points = player.getLevel() < Config.WORLD_CHAT_MIN_LEVEL || player.getVipTier() <= 0 ? 0 : Math.max(player.getWorldChatPoints() - player.getWorldChatUsed(), 0);
  3071.     }
  3072.    
  3073.     @Override
  3074. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/PcCafe.ini
  3075. IDEA additional info:
  3076. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  3077. <+>UTF-8
  3078. ===================================================================
  3079. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/PcCafe.ini b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/PcCafe.ini
  3080. --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/PcCafe.ini   (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  3081. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/PcCafe.ini   (date 1619561814045)
  3082. @@ -9,6 +9,9 @@
  3083.  # Allow only players with a Premium account.
  3084.  PcCafeOnlyPremium = False
  3085.  
  3086. +# Allow only players with a Vip Tier account.
  3087. +PcCafeOnlyVip = False
  3088. +
  3089.  # Max points that player may have.
  3090.  # Limited by int limit.
  3091.  MaxPcCafePoints = 200000
  3092. Index: L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/EventType.java
  3093. IDEA additional info:
  3094. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  3095. <+>UTF-8
  3096. ===================================================================
  3097. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/EventType.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/EventType.java
  3098. --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/EventType.java    (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  3099. +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/events/EventType.java    (date 1619536553318)
  3100. @@ -58,67 +58,7 @@
  3101.  import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcSpawn;
  3102.  import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcTeleport;
  3103.  import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcTeleportRequest;
  3104. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnElementalSpiritLearn;
  3105. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayableExpChanged;
  3106. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerAbilityPointsChanged;
  3107. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerAugment;
  3108. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBypass;
  3109. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerCallToChangeClass;
  3110. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerChangeToAwakenedClass;
  3111. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerChat;
  3112. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerClanCreate;
  3113. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerClanDestroy;
  3114. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerClanJoin;
  3115. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerClanLeaderChange;
  3116. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerClanLeft;
  3117. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerClanLvlUp;
  3118. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerClanWHItemAdd;
  3119. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerClanWHItemDestroy;
  3120. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerClanWHItemTransfer;
  3121. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerCreate;
  3122. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerDelete;
  3123. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerDlgAnswer;
  3124. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerFameChanged;
  3125. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerFishing;
  3126. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerHennaAdd;
  3127. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerHennaRemove;
  3128. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemAdd;
  3129. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemDestroy;
  3130. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemDrop;
  3131. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemEquip;
  3132. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemPickup;
  3133. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemTransfer;
  3134. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemUnequip;
  3135. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLevelChanged;
  3136. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
  3137. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogout;
  3138. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerMenteeAdd;
  3139. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerMenteeLeft;
  3140. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerMenteeRemove;
  3141. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerMenteeStatus;
  3142. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerMentorStatus;
  3143. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerMoveRequest;
  3144. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerPKChanged;
  3145. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerPressTutorialMark;
  3146. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerProfessionCancel;
  3147. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerProfessionChange;
  3148. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerPvPChanged;
  3149. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerPvPKill;
  3150. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerQuestAbort;
  3151. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerQuestComplete;
  3152. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerReputationChanged;
  3153. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerRestore;
  3154. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSelect;
  3155. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSkillLearn;
  3156. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSocialAction;
  3157. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSubChange;
  3158. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSummonAgathion;
  3159. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSummonSpawn;
  3160. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSummonTalk;
  3161. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerTakeHero;
  3162. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerTransform;
  3163. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerUnsummonAgathion;
  3164. -import org.l2jmobius.gameserver.model.events.impl.creature.player.OnTrapAction;
  3165. +import org.l2jmobius.gameserver.model.events.impl.creature.player.*;
  3166.  import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceCreated;
  3167.  import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceDestroy;
  3168.  import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceEnter;
  3169. @@ -259,6 +199,7 @@
  3170.     ON_PLAYER_LEVEL_CHANGED(OnPlayerLevelChanged.class, void.class),
  3171.     ON_PLAYER_LOGIN(OnPlayerLogin.class, void.class),
  3172.     ON_PLAYER_LOGOUT(OnPlayerLogout.class, void.class),
  3173. +    ON_PLAYER_LOAD(OnPlayerLoad.class, void.class),
  3174.     ON_PLAYER_PK_CHANGED(OnPlayerPKChanged.class, void.class),
  3175.     ON_PLAYER_PRESS_TUTORIAL_MARK(OnPlayerPressTutorialMark.class, void.class),
  3176.     ON_PLAYER_MOVE_REQUEST(OnPlayerMoveRequest.class, void.class, TerminateReturn.class),
  3177. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/AttendanceRewards.ini
  3178. IDEA additional info:
  3179. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  3180. <+>UTF-8
  3181. ===================================================================
  3182. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/AttendanceRewards.ini b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/AttendanceRewards.ini
  3183. --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/AttendanceRewards.ini   (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  3184. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/AttendanceRewards.ini   (date 1619536339460)
  3185. @@ -13,6 +13,10 @@
  3186.  # Default: False
  3187.  PremiumOnlyAttendanceRewards = False
  3188.  
  3189. +# Enable the Attendance Reward system only for Vip accounts.
  3190. +# Default: False
  3191. +VIPOnlyAttendanceRewards = False
  3192. +
  3193.  # Make rewards sharable in the same account.
  3194.  # Default: False (Each character will receive its own rewards.)
  3195.  AttendanceRewardsShareAccount = False
  3196. Index: L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71300-71399.xml
  3197. IDEA additional info:
  3198. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  3199. <+>UTF-8
  3200. ===================================================================
  3201. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71300-71399.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71300-71399.xml
  3202. --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71300-71399.xml   (revision 5dccd31cc69ab347a4a7e7c2ddd23325d9458024)
  3203. +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/items/71300-71399.xml   (date 1619536517884)
  3204. @@ -155,46 +155,70 @@
  3205.     <item id="71314" name="VIP Gain Scroll - 800" type="EtcItem">
  3206.         <!-- Allows to regain 800 VIP Points when used. Cannot be exchanged, dropped or sold in a private store. Can be stored in a private warehouse. -->
  3207.         <set name="icon" val="BranchIcon.Icon.g_bm_vip_potion_i00" />
  3208. -       <set name="default_action" val="SKILL_REDUCE_ON_SKILL_SUCCESS" />
  3209. -       <set name="material" val="PAPER" />
  3210. -       <set name="weight" val="5" />
  3211. -       <set name="is_tradable" val="false" />
  3212. -       <set name="is_dropable" val="false" />
  3213. -       <set name="is_sellable" val="false" />
  3214. -       <set name="is_stackable" val="true" />
  3215. +        <set name="default_action" val="SKILL_REDUCE" />
  3216. +        <set name="material" val="PAPER" />
  3217. +        <set name="weight" val="5" />
  3218. +        <set name="is_tradable" val="false" />
  3219. +        <set name="is_depositable" val="false" />
  3220. +        <set name="immediate_effect" val="true" />
  3221. +        <set name="is_dropable" val="false" />
  3222. +        <set name="is_sellable" val="false" />
  3223. +        <set name="is_stackable" val="true" />
  3224. +        <set name="handler" val="ItemSkills" />
  3225. +        <skills>
  3226. +            <skill id="59125" level="1" /> <!-- VIP Gain Scroll - 800 -->
  3227. +        </skills>
  3228.     </item>
  3229.     <item id="71315" name="VIP Gain Scroll - 2400" type="EtcItem">
  3230.         <!-- Allows to regain 2400 VIP Points when used. Cannot be exchanged, dropped or sold in a private store. Can be stored in a private warehouse. -->
  3231.         <set name="icon" val="BranchIcon.Icon.g_bm_vip_potion_i00" />
  3232. -       <set name="default_action" val="SKILL_REDUCE_ON_SKILL_SUCCESS" />
  3233. +       <set name="default_action" val="SKILL_REDUCE" />
  3234.         <set name="material" val="PAPER" />
  3235.         <set name="weight" val="5" />
  3236.         <set name="is_tradable" val="false" />
  3237.         <set name="is_dropable" val="false" />
  3238. -       <set name="is_sellable" val="false" />
  3239. -       <set name="is_stackable" val="true" />
  3240. +        <set name="immediate_effect" val="true" />
  3241. +        <set name="is_dropable" val="false" />
  3242. +        <set name="is_sellable" val="false" />
  3243. +        <set name="is_stackable" val="true" />
  3244. +        <set name="handler" val="ItemSkills" />
  3245. +        <skills>
  3246. +            <skill id="59126" level="1" /> <!-- VIP Gain Scroll - 2400 -->
  3247. +        </skills>
  3248.     </item>
  3249.     <item id="71316" name="VIP Gain Scroll - 80" type="EtcItem">
  3250.         <!-- Allows to regain 80 VIP Points when used. Cannot be exchanged, dropped or sold in a private store. Can be stored in a private warehouse. -->
  3251.         <set name="icon" val="BranchIcon.Icon.g_bm_vip_potion_i00" />
  3252. -       <set name="default_action" val="SKILL_REDUCE_ON_SKILL_SUCCESS" />
  3253. -       <set name="material" val="PAPER" />
  3254. -       <set name="weight" val="5" />
  3255. -       <set name="is_tradable" val="false" />
  3256. -       <set name="is_dropable" val="false" />
  3257. -       <set name="is_sellable" val="false" />
  3258. -       <set name="is_stackable" val="true" />
  3259. +        <set name="default_action" val="SKILL_REDUCE" />
  3260. +        <set name="material" val="PAPER" />
  3261. +        <set name="weight" val="5" />
  3262. +        <set name="is_tradable" val="false" />
  3263. +        <set name="is_depositable" val="false" />
  3264. +        <set name="immediate_effect" val="true" />
  3265. +        <set name="is_dropable" val="false" />
  3266. +        <set name="is_sellable" val="false" />
  3267. +        <set name="is_stackable" val="true" />
  3268. +        <set name="handler" val="ItemSkills" />
  3269. +        <skills>
  3270. +            <skill id="59127" level="1" /> <!-- VIP Gain Scroll - 80 -->
  3271. +        </skills>
  3272.     </item>
  3273.     <item id="71317" name="VIP Gain Scroll - 240" type="EtcItem">
  3274.         <!-- Allows to regain 240 VIP Points when used. Cannot be exchanged, dropped or sold in a private store. Can be stored in a private warehouse. -->
  3275.         <set name="icon" val="BranchIcon.Icon.g_bm_vip_potion_i00" />
  3276. -       <set name="default_action" val="SKILL_REDUCE_ON_SKILL_SUCCESS" />
  3277. -       <set name="material" val="PAPER" />
  3278. -       <set name="weight" val="5" />
  3279. -       <set name="is_tradable" val="false" />
  3280. -       <set name="is_dropable" val="false" />
  3281. -       <set name="is_sellable" val="false" />
  3282. -       <set name="is_stackable" val="true" />
  3283. +        <set name="default_action" val="SKILL_REDUCE" />
  3284. +        <set name="material" val="PAPER" />
  3285. +        <set name="weight" val="5" />
  3286. +        <set name="is_tradable" val="false" />
  3287. +        <set name="is_depositable" val="false" />
  3288. +        <set name="immediate_effect" val="true" />
  3289. +        <set name="is_dropable" val="false" />
  3290. +        <set name="is_sellable" val="false" />
  3291. +        <set name="is_stackable" val="true" />
  3292. +        <set name="handler" val="ItemSkills" />
  3293. +        <skills>
  3294. +            <skill id="59128" level="1" /> <!-- VIP Gain Scroll - 240 -->
  3295. +        </skills>
  3296.     </item>
  3297.     <item id="71318" name="Transformation Sealbook: Part-time Seller" additionalName="Kat the Cat" type="EtcItem">
  3298.         <!-- Sealbook for learning the skill of transforming yourself into Kat the Cat. -->
  3299.  
Add Comment
Please, Sign In to add comment