summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-02 20:44:38 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-02 20:44:38 +0000
commite6b8222bdb14b6e1e8b3cd12733ae1bce97a23fb (patch)
tree40ae570d1b60dc1e7a9c215c4adc9f76847612d0
parentce1208eb233cab2923c82ba61d546b108e056fc0 (diff)
downloadhercules-e6b8222bdb14b6e1e8b3cd12733ae1bce97a23fb.tar.gz
hercules-e6b8222bdb14b6e1e8b3cd12733ae1bce97a23fb.tar.bz2
hercules-e6b8222bdb14b6e1e8b3cd12733ae1bce97a23fb.tar.xz
hercules-e6b8222bdb14b6e1e8b3cd12733ae1bce97a23fb.zip
* Added support for IT_CASH to @iteminfo, logging filters and item drop rate adjustment. Added 'show_picker.item_type'-specific IT_CASH value to it's description (follow up to r14549).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14550 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--conf/battle/party.conf1
-rw-r--r--conf/log_athena.conf2
-rw-r--r--src/map/atcommand.c7
-rw-r--r--src/map/log.c4
-rw-r--r--src/map/mob.c1
6 files changed, 10 insertions, 6 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 48d568630..f648d7a97 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -1,6 +1,7 @@
Date Added
2010/12/02
+ * Added support for IT_CASH to @iteminfo, logging filters and item drop rate adjustment. Added 'show_picker.item_type'-specific IT_CASH value to it's description (follow up to r14549). [Ai4rei]
* Rev. 14549 Added item type IT_CASH (item type 18) Requires user confirmation before using/generating item(s). [L0ne_W0lf]
* Fixed mapflags not getting initialized upon @reloadscript (bugreport:2247, since r1275). [Ai4rei]
* Removed redundant check in food vs. cash food status change overriding code, partially suggested by xazax (related r14437 and r14510). [Ai4rei]
diff --git a/conf/battle/party.conf b/conf/battle/party.conf
index 2bb0dbb0c..f0b2c8de2 100644
--- a/conf/battle/party.conf
+++ b/conf/battle/party.conf
@@ -38,6 +38,7 @@ show_party_share_picker: yes
// 1: IT_HEALING, 2: IT_UNKNOWN, 4: IT_USABLE, 8: IT_ETC,
// 16: IT_WEAPON, 32: IT_ARMOR, 64: IT_CARD, 128: IT_PETEGG,
// 256: IT_PETARMOR, 512: IT_UNKNOWN2, 1024: IT_AMMO, 2048: IT_DELAYCONSUME
+// 262144: IT_CASH
show_picker.item_type: 112
// Method of distribution when item party share is enabled in a party:
diff --git a/conf/log_athena.conf b/conf/log_athena.conf
index b75f1b363..2f8effd18 100644
--- a/conf/log_athena.conf
+++ b/conf/log_athena.conf
@@ -30,7 +30,7 @@ sql_logs: 0
// Advanced Filter Bits by item type: ||
// 0002 - Healing items (0)
// 0004 - Etc Items(3) + Arrows (10)
-// 0008 - Usable Items(2) + Lures,Scrolls(11)
+// 0008 - Usable Items(2) + Lures,Scrolls(11) + Usable Cash Items(18)
// 0016 - Weapon(4)
// 0032 - Shields,Armor,Headgears,Accessories,etc(5)
// 0064 - Cards(6)
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 347fbbbac..6cf5d1c4e 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -7390,8 +7390,9 @@ ACMD_FUNC(homshuffle)
*------------------------------------------*/
ACMD_FUNC(iteminfo)
{
- char *itype[12] = {"Potion/Food", "BUG!", "Usable", "Etc", "Weapon", "Protection", "Card", "Egg", "Pet Acessory", "BUG!", "Arrow"};
- //, "Lure/Scroll"}; No need, type 11 items are converted to type 2 upon loading [Skotlex]
+ char *itype[IT_MAX] = {"Potion/Food", "BUG!", "Usable", "Etc", "Weapon", "Protection", "Card", "Egg", "Pet Acessory", "BUG!", "Arrow",
+ "BUG!", // No need, type 11 items are converted to type 2 upon loading [Skotlex]
+ "BUG!", "BUG!", "BUG!", "BUG!", "BUG!", "BUG!", "Cash Usable"};
struct item_data *item_data, *item_array[MAX_SEARCH];
int i, count = 1;
@@ -7417,7 +7418,7 @@ ACMD_FUNC(iteminfo)
item_data = item_array[i];
sprintf(atcmd_output, "Item: '%s'/'%s'[%d] (%d) Type: %s | Extra Effect: %s",
item_data->name,item_data->jname,item_data->slot,item_data->nameid,
- item_data->type < 12 ? itype[item_data->type] : "BUG!",
+ item_data->type < IT_MAX ? itype[item_data->type] : "BUG!",
(item_data->script==NULL)? "None" : "With script"
);
clif_displaymessage(fd, atcmd_output);
diff --git a/src/map/log.c b/src/map/log.c
index 474a6bb96..0affef995 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -27,7 +27,7 @@ time_t curtime;
//Bits: ||
//2 - Healing items (0)
//3 - Etc Items(3) + Arrows (10)
-//4 - Usable Items(2) + Scrolls,Lures(11)
+//4 - Usable Items(2) + Scrolls,Lures(11) + Usable Cash Items(18)
//5 - Weapon(4)
//6 - Shields,Armor,Headgears,Accessories,etc(5)
//7 - Cards(6)
@@ -45,7 +45,7 @@ int should_log_item(int filter, int nameid, int amount)
if ((filter&1) || // Filter = 1, we log any item
(filter&2 && item_data->type == IT_HEALING ) ||
(filter&4 && (item_data->type == IT_ETC || item_data->type == IT_AMMO) ) ||
- (filter&8 && item_data->type == IT_USABLE ) ||
+ (filter&8 && (item_data->type == IT_USABLE || item_data->type == IT_CASH) ) ||
(filter&16 && item_data->type == IT_WEAPON ) ||
(filter&32 && item_data->type == IT_ARMOR ) ||
(filter&64 && item_data->type == IT_CARD ) ||
diff --git a/src/map/mob.c b/src/map/mob.c
index 524350b81..3c5a611af 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3582,6 +3582,7 @@ static bool mob_parse_dbrow(char** str)
ratemax = battle_config.item_drop_heal_max;
break;
case IT_USABLE:
+ case IT_CASH:
rate_adjust = (status->mode&MD_BOSS) ? battle_config.item_rate_use_boss : battle_config.item_rate_use;
ratemin = battle_config.item_drop_use_min;
ratemax = battle_config.item_drop_use_max;