forked from 2009Scape/Server
Added Ticket Merchant
Added the ticket merchant to go along with the archery minigame, from this shop you can purchase the same items that were purchasable in 2009. You can only buy items from this shop with archery tickets, which are the reward from the archery minigame.
This commit is contained in:
parent
ae7c53b4a7
commit
a802e7e33f
4 changed files with 12113 additions and 12091 deletions
24183
Server/server.sql
24183
Server/server.sql
File diff suppressed because it is too large
Load diff
|
|
@ -17,6 +17,7 @@ import java.util.List;
|
|||
* A class representing a shop.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @author Jamix77
|
||||
*/
|
||||
public class Shop {
|
||||
|
||||
|
|
@ -32,6 +33,12 @@ public class Shop {
|
|||
* Represents the tokkul item id.
|
||||
*/
|
||||
private static final int TOKKUL = 6529;
|
||||
|
||||
/**
|
||||
* Represents the archery ticket item id
|
||||
*/
|
||||
private static final int ARCHERY_TICKET = 1464;
|
||||
|
||||
/**
|
||||
* Represents the shop containers.
|
||||
*/
|
||||
|
|
@ -634,6 +641,12 @@ public class Shop {
|
|||
price *= 0.86666666667;
|
||||
}
|
||||
}
|
||||
if (getCurrency() == ARCHERY_TICKET) {
|
||||
int tickets = item.getDefinition().getConfiguration(ItemConfigSQLHandler.ARCHERY_TICKET_PRICE,-1);
|
||||
if (tickets > 0) {
|
||||
price = tickets;
|
||||
}
|
||||
}
|
||||
return (getSellAllFor() > 0 ? getSellAllFor() : price);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -321,7 +321,8 @@ public class NPC extends Entity {
|
|||
shop.open(player);
|
||||
|
||||
//Fix for issue #11 for shops keeping dialogue open.
|
||||
player.getDialogueInterpreter().getDialogue().end();
|
||||
if (!player.getDialogueInterpreter().getDialogue().isFinished())
|
||||
player.getDialogueInterpreter().getDialogue().end();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,6 +210,11 @@ public class ItemConfigSQLHandler extends SQLEntryHandler<Object> {
|
|||
* The render animation id of an item.
|
||||
*/
|
||||
public static final String RENDER_ANIM_ID = "render_anim";
|
||||
|
||||
/**
|
||||
* the archery ticket price of an item.
|
||||
*/
|
||||
public static final String ARCHERY_TICKET_PRICE = "archery_ticket_price";
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code ItemConfigSQLHandler} {@Code Object}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue