summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/map/battle/items.conf3
-rw-r--r--db/pre-re/item_db.conf24
-rw-r--r--db/re/item_db.conf24
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/itemdb.h13
-rw-r--r--src/map/pc.c29
-rw-r--r--src/map/status.c42
8 files changed, 39 insertions, 98 deletions
diff --git a/conf/map/battle/items.conf b/conf/map/battle/items.conf
index c7aa99245..f7ffd3f32 100644
--- a/conf/map/battle/items.conf
+++ b/conf/map/battle/items.conf
@@ -86,9 +86,6 @@ item_check: false
// On officials this is 0, but it's set to 100ms as a measure against bots/macros.
item_use_interval: 100
-// How much time must pass between cash food uses? Default: 60000 (1 min)
-cashfood_use_interval: 60000
-
// Required level of bNoMagicDamage before Status Changes are blocked (Golden Thief Bug card).
// For example, if left at 50. An item can give bNoMagicDamage,40;
// which reduces magic damage by 40%, but does not blocks status changes.
diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf
index 7309af4d3..b17e57252 100644
--- a/db/pre-re/item_db.conf
+++ b/db/pre-re/item_db.conf
@@ -69802,8 +69802,8 @@ item_db: (
nogstorage: true
}
Script: <"
- sc_start SC_FOOD_STR,1800000,10;
- percentheal 20,10;
+ sc_start(SC_FOOD_STR_CASH, 1800000, 10);
+ percentheal(20, 10);
">
},
{
@@ -69823,8 +69823,8 @@ item_db: (
nogstorage: true
}
Script: <"
- sc_start SC_FOOD_AGI,1800000,10;
- percentheal 15,5;
+ sc_start(SC_FOOD_AGI_CASH, 1800000, 10);
+ percentheal(15, 5);
">
},
{
@@ -69844,8 +69844,8 @@ item_db: (
nogstorage: true
}
Script: <"
- sc_start SC_FOOD_INT,1800000,10;
- percentheal 10,20;
+ sc_start(SC_FOOD_INT_CASH, 1800000, 10);
+ percentheal(10, 20);
">
},
{
@@ -69865,8 +69865,8 @@ item_db: (
nogstorage: true
}
Script: <"
- sc_start SC_FOOD_DEX,1800000,10;
- percentheal 10,10;
+ sc_start(SC_FOOD_DEX_CASH, 1800000, 10);
+ percentheal(10, 10);
">
},
{
@@ -69886,8 +69886,8 @@ item_db: (
nogstorage: true
}
Script: <"
- sc_start SC_FOOD_LUK,1800000,10;
- percentheal 14,8;
+ sc_start(SC_FOOD_LUK_CASH, 1800000, 10);
+ percentheal(14, 8);
">
},
{
@@ -69907,8 +69907,8 @@ item_db: (
nogstorage: true
}
Script: <"
- sc_start SC_FOOD_VIT,1800000,10;
- percentheal 25,0;
+ sc_start(SC_FOOD_VIT_CASH, 1800000, 10);
+ percentheal(25, 0);
">
},
{
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index b47bd46d4..514337801 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -87604,8 +87604,8 @@ item_db: (
nogstorage: true
}
Script: <"
- sc_start SC_FOOD_STR,1800000,10;
- percentheal 20,10;
+ sc_start(SC_FOOD_STR_CASH, 1800000, 10);
+ percentheal(20, 10);
">
},
{
@@ -87625,8 +87625,8 @@ item_db: (
nogstorage: true
}
Script: <"
- sc_start SC_FOOD_AGI,1800000,10;
- percentheal 15,5;
+ sc_start(SC_FOOD_AGI_CASH, 1800000, 10);
+ percentheal(15, 5);
">
},
{
@@ -87646,8 +87646,8 @@ item_db: (
nogstorage: true
}
Script: <"
- sc_start SC_FOOD_INT,1800000,10;
- percentheal 10,20;
+ sc_start(SC_FOOD_INT_CASH, 1800000, 10);
+ percentheal(10, 20);
">
},
{
@@ -87667,8 +87667,8 @@ item_db: (
nogstorage: true
}
Script: <"
- sc_start SC_FOOD_DEX,1800000,10;
- percentheal 10,10;
+ sc_start(SC_FOOD_DEX_CASH, 1800000, 10);
+ percentheal(10, 10);
">
},
{
@@ -87688,8 +87688,8 @@ item_db: (
nogstorage: true
}
Script: <"
- sc_start SC_FOOD_LUK,1800000,10;
- percentheal 14,8;
+ sc_start(SC_FOOD_LUK_CASH, 1800000, 10);
+ percentheal(14, 8);
">
},
{
@@ -87709,8 +87709,8 @@ item_db: (
nogstorage: true
}
Script: <"
- sc_start SC_FOOD_VIT,1800000,10;
- percentheal 25,0;
+ sc_start(SC_FOOD_VIT_CASH, 1800000, 10);
+ percentheal(25, 0);
">
},
{
diff --git a/src/map/battle.c b/src/map/battle.c
index cf08bf96c..921e8bbd3 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -7036,7 +7036,6 @@ static const struct battle_data {
{ "combo_delay_rate", &battle_config.combo_delay_rate, 100, 0, INT_MAX, },
{ "item_check", &battle_config.item_check, 0, 0, 1, },
{ "item_use_interval", &battle_config.item_use_interval, 100, 0, INT_MAX, },
- { "cashfood_use_interval", &battle_config.cashfood_use_interval, 60000, 0, INT_MAX, },
{ "wedding_modifydisplay", &battle_config.wedding_modifydisplay, 0, 0, 1, },
{ "wedding_ignorepalette", &battle_config.wedding_ignorepalette, 0, 0, 1, },
{ "xmas_ignorepalette", &battle_config.xmas_ignorepalette, 0, 0, 1, },
diff --git a/src/map/battle.h b/src/map/battle.h
index a5e50407e..e698ccb8f 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -240,7 +240,6 @@ struct Battle_Config {
int combo_delay_rate;
int item_check;
int item_use_interval; //[Skotlex]
- int cashfood_use_interval;
int wedding_modifydisplay;
int wedding_ignorepalette; //[Skotlex]
int xmas_ignorepalette; // [Valaris]
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index f77801e09..35cd154cb 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -266,18 +266,6 @@ enum mercenary_scroll_item_list {
};
/**
- * Cash Food
- */
-enum cash_food_item_list {
- ITEMID_STR_DISH10_ = 12202,
- ITEMID_AGI_DISH10_, // 12203
- ITEMID_INT_DISH10_, // 12204
- ITEMID_DEX_DISH10_, // 12205
- ITEMID_LUK_DISH10_, // 12206
- ITEMID_VIT_DISH10_, // 12207
-};
-
-/**
* Geneticist
*/
enum geneticist_item_list {
@@ -556,7 +544,6 @@ struct item_data {
#define itemdb_is_spellbook(n) ((n) >= ITEMID_MAGIC_BOOK_FB && (n) <= ITEMID_MAGIC_BOOK_DL)
#define itemdb_is_poison(n) ((n) >= ITEMID_POISON_PARALYSIS && (n) <= ITEMID_POISON_FATIGUE)
#define itemid_isgemstone(n) ((n) >= ITEMID_YELLOW_GEMSTONE && (n) <= ITEMID_BLUE_GEMSTONE)
-#define itemdb_iscashfood(n) ((n) >= ITEMID_STR_DISH10_ && (n) <= ITEMID_VIT_DISH10_)
#define itemdb_is_GNbomb(n) ((n) >= ITEMID_APPLE_BOMB && (n) <= ITEMID_VERY_HARD_LUMP)
#define itemdb_is_GNthrowable(n) ((n) >= ITEMID_MYSTERIOUS_POWDER && (n) <= ITEMID_BLACK_THING_TO_THROW)
#define itemid_is_pilebunker(n) ((n) == ITEMID_PILEBUNCKER || (n) == ITEMID_PILEBUNCKER_P || (n) == ITEMID_PILEBUNCKER_S || (n) == ITEMID_PILEBUNCKER_T)
diff --git a/src/map/pc.c b/src/map/pc.c
index c1339b0de..f40fba8ae 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4903,25 +4903,6 @@ int pc_isUseitem(struct map_session_data *sd,int n)
if( map->list[sd->bl.m].flag.nobranch || map_flag_gvg2(sd->bl.m) )
return 0;
break;
- case ITEMID_BUBBLE_GUM:
- case ITEMID_COMP_BUBBLE_GUM:
- if( sd->sc.data[SC_CASH_RECEIVEITEM] )
- return 0;
- break;
- case ITEMID_BATTLE_MANUAL:
- case ITEMID_COMP_BATTLE_MANUAL:
- case ITEMID_THICK_MANUAL50:
- case ITEMID_NOBLE_NAMEPLATE:
- case ITEMID_BATTLE_MANUAL25:
- case ITEMID_BATTLE_MANUAL100:
- case ITEMID_BATTLE_MANUAL_X3:
- if( sd->sc.data[SC_CASH_PLUSEXP] )
- return 0;
- break;
- case ITEMID_JOB_MANUAL50:
- if( sd->sc.data[SC_CASH_PLUSONLYJOBEXP] )
- return 0;
- break;
// Mercenary Items
case ITEMID_MERCENARY_RED_POTION:
@@ -5075,10 +5056,8 @@ int pc_useitem(struct map_session_data *sd,int n) {
))
return 0;
- //Prevent mass item usage. [Skotlex]
- if( DIFF_TICK(sd->canuseitem_tick, tick) > 0 ||
- (itemdb_iscashfood(nameid) && DIFF_TICK(sd->canusecashfood_tick, tick) > 0)
- )
+ // Prevent mass item usage. [Skotlex]
+ if (DIFF_TICK(sd->canuseitem_tick, tick) > 0)
return 0;
/* Items with delayed consume are not meant to work while in mounts except reins of mount(12622) */
@@ -5171,10 +5150,8 @@ int pc_useitem(struct map_session_data *sd,int n) {
script->potion_flag = 3; //Even more effective potions.
}
- //Update item use time.
+ // Update item use time.
sd->canuseitem_tick = tick + battle_config.item_use_interval;
- if( itemdb_iscashfood(nameid) )
- sd->canusecashfood_tick = tick + battle_config.cashfood_use_interval;
script->run_use_script(sd, sd->inventory_data[n], npc->fake_nd->bl.id);
script->potion_flag = 0;
diff --git a/src/map/status.c b/src/map/status.c
index d8fb9a350..506c45ddf 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -7767,30 +7767,6 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
if (sc->data[SC_FOOD_LUK_CASH] && sc->data[SC_FOOD_LUK_CASH]->val1 > val1)
return 0;
break;
- case SC_FOOD_STR_CASH:
- if (sc->data[SC_FOOD_STR] && sc->data[SC_FOOD_STR]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_AGI_CASH:
- if (sc->data[SC_FOOD_AGI] && sc->data[SC_FOOD_AGI]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_VIT_CASH:
- if (sc->data[SC_FOOD_VIT] && sc->data[SC_FOOD_VIT]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_INT_CASH:
- if (sc->data[SC_FOOD_INT] && sc->data[SC_FOOD_INT]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_DEX_CASH:
- if (sc->data[SC_FOOD_DEX] && sc->data[SC_FOOD_DEX]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_LUK_CASH:
- if (sc->data[SC_FOOD_LUK] && sc->data[SC_FOOD_LUK]->val1 > val1)
- return 0;
- break;
case SC_CAMOUFLAGE:
if( sd && pc->checkskill(sd, RA_CAMOUFLAGE) < 3 && !skill->check_camouflage(bl,NULL) )
return 0;
@@ -8009,40 +7985,46 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
status_change_end(bl, SC_INC_AGI, INVALID_TIMER);
break;
case SC_FOOD_STR:
- status_change_end(bl, SC_FOOD_STR_CASH, INVALID_TIMER);
+ status_change_end(bl, SC_FOOD_STR, INVALID_TIMER);
break;
case SC_FOOD_AGI:
- status_change_end(bl, SC_FOOD_AGI_CASH, INVALID_TIMER);
+ status_change_end(bl, SC_FOOD_AGI, INVALID_TIMER);
break;
case SC_FOOD_VIT:
- status_change_end(bl, SC_FOOD_VIT_CASH, INVALID_TIMER);
+ status_change_end(bl, SC_FOOD_VIT, INVALID_TIMER);
break;
case SC_FOOD_INT:
- status_change_end(bl, SC_FOOD_INT_CASH, INVALID_TIMER);
+ status_change_end(bl, SC_FOOD_INT, INVALID_TIMER);
break;
case SC_FOOD_DEX:
- status_change_end(bl, SC_FOOD_DEX_CASH, INVALID_TIMER);
+ status_change_end(bl, SC_FOOD_DEX, INVALID_TIMER);
break;
case SC_FOOD_LUK:
- status_change_end(bl, SC_FOOD_LUK_CASH, INVALID_TIMER);
+ status_change_end(bl, SC_FOOD_LUK, INVALID_TIMER);
break;
case SC_FOOD_STR_CASH:
status_change_end(bl, SC_FOOD_STR, INVALID_TIMER);
+ status_change_end(bl, SC_FOOD_STR_CASH, INVALID_TIMER);
break;
case SC_FOOD_AGI_CASH:
status_change_end(bl, SC_FOOD_AGI, INVALID_TIMER);
+ status_change_end(bl, SC_FOOD_AGI_CASH, INVALID_TIMER);
break;
case SC_FOOD_VIT_CASH:
status_change_end(bl, SC_FOOD_VIT, INVALID_TIMER);
+ status_change_end(bl, SC_FOOD_VIT_CASH, INVALID_TIMER);
break;
case SC_FOOD_INT_CASH:
status_change_end(bl, SC_FOOD_INT, INVALID_TIMER);
+ status_change_end(bl, SC_FOOD_INT_CASH, INVALID_TIMER);
break;
case SC_FOOD_DEX_CASH:
status_change_end(bl, SC_FOOD_DEX, INVALID_TIMER);
+ status_change_end(bl, SC_FOOD_DEX_CASH, INVALID_TIMER);
break;
case SC_FOOD_LUK_CASH:
status_change_end(bl, SC_FOOD_LUK, INVALID_TIMER);
+ status_change_end(bl, SC_FOOD_LUK_CASH, INVALID_TIMER);
break;
case SC_GM_BATTLE:
status_change_end(bl, SC_GM_BATTLE2, INVALID_TIMER);