Addition of configuration for teleport flags.
This commit is contained in:
@ -586,6 +586,7 @@ public class Config
|
||||
public static boolean CUSTOM_ITEMS_LOAD;
|
||||
public static boolean CUSTOM_MULTISELL_LOAD;
|
||||
public static boolean CUSTOM_BUYLIST_LOAD;
|
||||
public static int BOOKMARK_CONSUME_ITEM_ID;
|
||||
public static int ALT_BIRTHDAY_GIFT;
|
||||
public static String ALT_BIRTHDAY_MAIL_SUBJECT;
|
||||
public static String ALT_BIRTHDAY_MAIL_TEXT;
|
||||
@ -2092,6 +2093,7 @@ public class Config
|
||||
CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false);
|
||||
CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false);
|
||||
CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false);
|
||||
BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1);
|
||||
ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187);
|
||||
ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!");
|
||||
ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria");
|
||||
|
@ -12205,10 +12205,22 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (_inventory.getInventoryItemCount(20033, 0) == 0)
|
||||
if (Config.BOOKMARK_CONSUME_ITEM_ID > 0)
|
||||
{
|
||||
sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG);
|
||||
return;
|
||||
if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0)
|
||||
{
|
||||
if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033)
|
||||
{
|
||||
sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true);
|
||||
}
|
||||
|
||||
int id;
|
||||
@ -12221,12 +12233,6 @@ public class PlayerInstance extends Playable
|
||||
}
|
||||
_tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name));
|
||||
|
||||
destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false);
|
||||
|
||||
final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED);
|
||||
sm.addItemName(20033);
|
||||
sendPacket(sm);
|
||||
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK))
|
||||
{
|
||||
|
Reference in New Issue
Block a user