Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P L2jFrozen_GameServer
- Index: head-src/com/l2jfrozen/gameserver/powerpak/globalGK/GKHandler.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/powerpak/globalGK/GKHandler.java (revision 986)
- +++ head-src/com/l2jfrozen/gameserver/powerpak/globalGK/GKHandler.java (working copy)
- @@ -166,12 +166,12 @@
- {
- if(PowerPakConfig.GLOBALGK_PRICE==-1)
- {
- - if(player.getAdena()< tpPoint.getPrice())
- + if(player.getAdena()< tpPoint.getPriceCount())
- {
- player.sendMessage("You do not have enough adena to pay for services");
- return;
- }
- - player.reduceAdena("teleport", tpPoint.getPrice(), null, true);
- + player.reduceAdena("teleport", tpPoint.getPriceCount(), null, true);
- }
- int unstuckTimer = PowerPakConfig.GLOBALGK_TIMEOUT*1000;
- player.setTarget(player);
- Index: head-src/com/l2jfrozen/gameserver/datatables/sql/TeleportLocationTable.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/datatables/sql/TeleportLocationTable.java (revision 986)
- +++ head-src/com/l2jfrozen/gameserver/datatables/sql/TeleportLocationTable.java (working copy)
- @@ -67,7 +67,7 @@
- try
- {
- con = L2DatabaseFactory.getInstance().getConnection(false);
- - final PreparedStatement statement = con.prepareStatement("SELECT Description, id, loc_x, loc_y, loc_z, price, fornoble FROM teleport");
- + final PreparedStatement statement = con.prepareStatement("SELECT Description, id, loc_x, loc_y, loc_z, price_id, price_count, fornoble FROM teleport");
- final ResultSet rset = statement.executeQuery();
- L2TeleportLocation teleport;
- @@ -79,7 +79,8 @@
- teleport.setLocX(rset.getInt("loc_x"));
- teleport.setLocY(rset.getInt("loc_y"));
- teleport.setLocZ(rset.getInt("loc_z"));
- - teleport.setPrice(rset.getInt("price"));
- + teleport.setPriceId(rset.getInt("price_id"));
- + teleport.setPriceCount(rset.getInt("price_count"));
- teleport.setIsForNoble(rset.getInt("fornoble") == 1);
- _teleports.put(teleport.getTeleId(), teleport);
- @@ -103,7 +104,7 @@
- try
- {
- con = L2DatabaseFactory.getInstance().getConnection(false);
- - PreparedStatement statement = con.prepareStatement("SELECT Description, id, loc_x, loc_y, loc_z, price, fornoble FROM custom_teleport");
- + PreparedStatement statement = con.prepareStatement("SELECT Description, id, loc_x, loc_y, loc_z, price_id, price_count, fornoble FROM custom_teleport");
- ResultSet rset = statement.executeQuery();
- L2TeleportLocation teleport;
- @@ -116,7 +117,8 @@
- teleport.setLocX(rset.getInt("loc_x"));
- teleport.setLocY(rset.getInt("loc_y"));
- teleport.setLocZ(rset.getInt("loc_z"));
- - teleport.setPrice(rset.getInt("price"));
- + teleport.setPriceId(rset.getInt("price_id"));
- + teleport.setPriceCount(rset.getInt("price_count"));
- teleport.setIsForNoble(rset.getInt("fornoble") == 1);
- _teleports.put(teleport.getTeleId(), teleport);
- }
- Index: head-src/com/l2jfrozen/gameserver/model/L2TeleportLocation.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/model/L2TeleportLocation.java (revision 986)
- +++ head-src/com/l2jfrozen/gameserver/model/L2TeleportLocation.java (working copy)
- @@ -29,7 +29,8 @@
- private int _locX;
- private int _locY;
- private int _locZ;
- - private int _price;
- + private int _priceId;
- + private int _priceCount;
- private boolean _forNoble;
- /**
- @@ -65,14 +66,22 @@
- }
- /**
- - * @param price
- + * @param priceId
- */
- - public void setPrice(int price)
- + public void setPriceId(int priceId)
- {
- - _price = price;
- + _priceId = priceId;
- }
- /**
- + * @param priceCount
- + */
- + public void setPriceCount(int priceCount)
- + {
- + _priceCount = priceCount;
- + }
- +
- + /**
- * @param val
- */
- public void setIsForNoble(boolean val)
- @@ -115,14 +124,22 @@
- /**
- * @return
- */
- - public int getPrice()
- + public int getPriceId()
- {
- - return _price;
- + return _priceId;
- }
- /**
- * @return
- */
- + public int getPriceCount()
- + {
- + return _priceCount;
- + }
- +
- + /**
- + * @return
- + */
- public boolean getIsForNoble()
- {
- return _forNoble;
- Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2ClanHallManagerInstance.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2ClanHallManagerInstance.java (revision 986)
- +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2ClanHallManagerInstance.java (working copy)
- @@ -1039,7 +1039,7 @@
- player.sendPacket(new SystemMessage(SystemMessageId.NO_PORT_THAT_IS_IN_SIGE));
- return;
- }
- - else if(player.reduceAdena("Teleport", list.getPrice(), this, true))
- + else if(player.reduceAdena("Teleport", list.getPriceCount(), this, true))
- {
- if(Config.DEBUG)
- {
- Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2TeleporterInstance.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2TeleporterInstance.java (revision 986)
- +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2TeleporterInstance.java (working copy)
- @@ -312,7 +312,7 @@
- _zone.allowPlayerEntry(player, 300);
- player.teleToLocation(list.getLocX(), list.getLocY(), list.getLocZ(), true);
- }
- - else if(!list.getIsForNoble() && (Config.ALT_GAME_FREE_TELEPORT || player.reduceAdena("Teleport", list.getPrice(), this, true)))
- + else if(!list.getIsForNoble() && (Config.ALT_GAME_FREE_TELEPORT || player.destroyItemByItemId("Teleport", list.getPriceId(), list.getPriceCount(), this, true)))
- {
- if(Config.DEBUG)
- {
- @@ -320,7 +320,7 @@
- }
- player.teleToLocation(list.getLocX(), list.getLocY(), list.getLocZ(), true);
- }
- - else if(list.getIsForNoble() && (Config.ALT_GAME_FREE_TELEPORT || player.destroyItemByItemId("Noble Teleport", 6651, list.getPrice(), this, true)))
- + else if(list.getIsForNoble() && (Config.ALT_GAME_FREE_TELEPORT || player.destroyItemByItemId("Noble Teleport", 6651, list.getPriceCount(), this, true)))
- {
- if(Config.DEBUG)
- {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement