diff options
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/atcommand.c | 2 | ||||
-rw-r--r-- | src/map/clif.c | 8 | ||||
-rw-r--r-- | src/map/itemdb.c | 2 | ||||
-rw-r--r-- | src/map/itemdb.h | 4 | ||||
-rw-r--r-- | src/map/npc.c | 8 |
6 files changed, 7 insertions, 19 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 5120a0c62..1f36f39d6 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -1,5 +1,7 @@ Date Added +2010/12/03 + * Removed leftovers of the item_value_db.txt feature (bugreport:2031, since athena-dev-2.1.1-mod377, followup to pre-svn 2004/05/29). [Ai4rei] 2010/12/02 * Various code tweaks and updates related to item types. [Ai4rei] - Replaced item type literals with their appropriate constants. diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 117d6dc0a..6f008c3af 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -7419,7 +7419,7 @@ ACMD_FUNC(iteminfo) ); clif_displaymessage(fd, atcmd_output); - sprintf(atcmd_output, "NPC Buy:%dz%s, Sell:%dz%s | Weight: %.1f ", item_data->value_buy, item_data->flag.value_notdc ? "(No Discount!)":"", item_data->value_sell, item_data->flag.value_notoc ? "(No Overcharge!)":"", item_data->weight/10. ); + sprintf(atcmd_output, "NPC Buy:%dz, Sell:%dz | Weight: %.1f ", item_data->value_buy, item_data->value_sell, item_data->weight/10. ); clif_displaymessage(fd, atcmd_output); if (item_data->maxchance == 10000) diff --git a/src/map/clif.c b/src/map/clif.c index 910ce19f2..29064fe31 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1521,9 +1521,7 @@ int clif_buylist(struct map_session_data *sd, struct npc_data *nd) if( id == NULL ) continue; WFIFOL(fd, 4+c*11) = val; - if (!id->flag.value_notdc) - val = pc_modifybuyvalue(sd,val); - WFIFOL(fd, 8+c*11) = val; + WFIFOL(fd, 8+c*11) = pc_modifybuyvalue(sd,val); WFIFOB(fd,12+c*11) = itemtype(id->type); WFIFOW(fd,13+c*11) = ( id->view_id > 0 ) ? id->view_id : id->nameid; c++; @@ -1562,9 +1560,7 @@ int clif_selllist(struct map_session_data *sd) continue; WFIFOW(fd,4+c*10)=i+2; WFIFOL(fd,6+c*10)=val; - if( !sd->inventory_data[i]->flag.value_notoc ) - val=pc_modifysellvalue(sd,val); - WFIFOL(fd,10+c*10)=val; + WFIFOL(fd,10+c*10)=pc_modifysellvalue(sd,val); c++; } } diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 10341ff0f..ce10f4f39 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -835,8 +835,6 @@ static bool itemdb_parse_dbrow(char** str, const char* source, int line, int scr id->look = atoi(str[18]); id->flag.available = 1; - id->flag.value_notdc = 0; - id->flag.value_notoc = 0; id->view_id = 0; id->sex = itemdb_gendercheck(id); //Apply gender filtering. diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 00dbf73e3..263e4fe3f 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -71,8 +71,6 @@ struct item_data { struct script_code *unequip_script;//Script executed once when unequipping. struct { unsigned available : 1; - unsigned value_notdc : 1; - unsigned value_notoc : 1; short no_equip; unsigned no_refine : 1; // [celest] unsigned delay_consume : 1; // Signifies items that are not consumed immediately upon double-click [Skotlex] @@ -115,8 +113,6 @@ int itemdb_searchrandomid(int flags); #define itemdb_value_buy(n) itemdb_search(n)->value_buy #define itemdb_value_sell(n) itemdb_search(n)->value_sell -#define itemdb_value_notdc(n) itemdb_search(n)->flag.value_notdc -#define itemdb_value_notoc(n) itemdb_search(n)->flag.value_notoc #define itemdb_canrefine(n) itemdb_search(n)->flag.no_refine //Item trade restrictions [Skotlex] int itemdb_isdropable_sub(struct item_data *, int, int); diff --git a/src/map/npc.c b/src/map/npc.c index 92425f585..0b16aa6f9 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1300,8 +1300,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) return 2; } - if( !itemdb_value_notdc(nameid) ) - value = pc_modifybuyvalue(sd,value); + value = pc_modifybuyvalue(sd,value); z += (double)value * amount; w += itemdb_weight(nameid) * amount; @@ -1386,10 +1385,7 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list) sd->status.inventory[idx].amount < qty) break; - if (sd->inventory_data[idx]->flag.value_notoc) - z+=(double)qty*sd->inventory_data[idx]->value_sell; - else - z+=(double)qty*pc_modifysellvalue(sd,sd->inventory_data[idx]->value_sell); + z+=(double)qty*pc_modifysellvalue(sd,sd->inventory_data[idx]->value_sell); if(sd->inventory_data[idx]->type == IT_PETEGG && sd->status.inventory[idx].card[0] == CARD0_PET) |