Browse Source

* 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).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14553 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 14 years ago
parent
commit
5cfc017080
6 changed files with 7 additions and 19 deletions
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/atcommand.c
  3. 2 6
      src/map/clif.c
  4. 0 2
      src/map/itemdb.c
  5. 0 4
      src/map/itemdb.h
  6. 2 6
      src/map/npc.c

+ 2 - 0
Changelog-Trunk.txt

@@ -1,5 +1,7 @@
 Date	Added
 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
 2010/12/02
 	* Various code tweaks and updates related to item types. [Ai4rei]
 	* Various code tweaks and updates related to item types. [Ai4rei]
 	- Replaced item type literals with their appropriate constants.
 	- Replaced item type literals with their appropriate constants.

+ 1 - 1
src/map/atcommand.c

@@ -7419,7 +7419,7 @@ ACMD_FUNC(iteminfo)
 		);
 		);
 		clif_displaymessage(fd, atcmd_output);
 		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);
 		clif_displaymessage(fd, atcmd_output);
 
 
 		if (item_data->maxchance == 10000)
 		if (item_data->maxchance == 10000)

+ 2 - 6
src/map/clif.c

@@ -1521,9 +1521,7 @@ int clif_buylist(struct map_session_data *sd, struct npc_data *nd)
 		if( id == NULL )
 		if( id == NULL )
 			continue;
 			continue;
 		WFIFOL(fd, 4+c*11) = val;
 		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);
 		WFIFOB(fd,12+c*11) = itemtype(id->type);
 		WFIFOW(fd,13+c*11) = ( id->view_id > 0 ) ? id->view_id : id->nameid;
 		WFIFOW(fd,13+c*11) = ( id->view_id > 0 ) ? id->view_id : id->nameid;
 		c++;
 		c++;
@@ -1562,9 +1560,7 @@ int clif_selllist(struct map_session_data *sd)
 				continue;
 				continue;
 			WFIFOW(fd,4+c*10)=i+2;
 			WFIFOW(fd,4+c*10)=i+2;
 			WFIFOL(fd,6+c*10)=val;
 			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++;
 			c++;
 		}
 		}
 	}
 	}

+ 0 - 2
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->look = atoi(str[18]);
 
 
 	id->flag.available = 1;
 	id->flag.available = 1;
-	id->flag.value_notdc = 0;
-	id->flag.value_notoc = 0;
 	id->view_id = 0;
 	id->view_id = 0;
 	id->sex = itemdb_gendercheck(id); //Apply gender filtering.
 	id->sex = itemdb_gendercheck(id); //Apply gender filtering.
 
 

+ 0 - 4
src/map/itemdb.h

@@ -71,8 +71,6 @@ struct item_data {
 	struct script_code *unequip_script;//Script executed once when unequipping.
 	struct script_code *unequip_script;//Script executed once when unequipping.
 	struct {
 	struct {
 		unsigned available : 1;
 		unsigned available : 1;
-		unsigned value_notdc : 1;
-		unsigned value_notoc : 1;
 		short no_equip;
 		short no_equip;
 		unsigned no_refine : 1;	// [celest]
 		unsigned no_refine : 1;	// [celest]
 		unsigned delay_consume : 1;	// Signifies items that are not consumed immediately upon double-click [Skotlex]
 		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_buy(n) itemdb_search(n)->value_buy
 #define itemdb_value_sell(n) itemdb_search(n)->value_sell
 #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
 #define itemdb_canrefine(n) itemdb_search(n)->flag.no_refine
 //Item trade restrictions [Skotlex]
 //Item trade restrictions [Skotlex]
 int itemdb_isdropable_sub(struct item_data *, int, int);
 int itemdb_isdropable_sub(struct item_data *, int, int);

+ 2 - 6
src/map/npc.c

@@ -1300,8 +1300,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list)
 				return 2;
 				return 2;
 		}
 		}
 
 
-		if( !itemdb_value_notdc(nameid) )
-			value = pc_modifybuyvalue(sd,value);
+		value = pc_modifybuyvalue(sd,value);
 
 
 		z += (double)value * amount;
 		z += (double)value * amount;
 		w += itemdb_weight(nameid) * 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)
 		   sd->status.inventory[idx].amount < qty)
 			break;
 			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 &&
 		if(sd->inventory_data[idx]->type == IT_PETEGG &&
 			sd->status.inventory[idx].card[0] == CARD0_PET)
 			sd->status.inventory[idx].card[0] == CARD0_PET)