diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 1 | ||||
-rw-r--r-- | src/map/battle.h | 1 | ||||
-rw-r--r-- | src/map/itemdb.h | 13 | ||||
-rw-r--r-- | src/map/pc.c | 29 | ||||
-rw-r--r-- | src/map/status.c | 42 |
5 files changed, 15 insertions, 71 deletions
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); |