summaryrefslogtreecommitdiff
path: root/src/map/npc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/npc.cpp')
-rw-r--r--src/map/npc.cpp58
1 files changed, 4 insertions, 54 deletions
diff --git a/src/map/npc.cpp b/src/map/npc.cpp
index df75216..900a077 100644
--- a/src/map/npc.cpp
+++ b/src/map/npc.cpp
@@ -855,7 +855,7 @@ int npc_buylist(struct map_session_data *sd, int n,
{
struct npc_data *nd;
double z;
- int i, j, w, skill, itemamount = 0, new_stacks = 0;
+ int i, j, w, itemamount = 0, new_stacks = 0;
nullpo_retr(3, sd);
nullpo_retr(3, item_list);
@@ -877,12 +877,7 @@ int npc_buylist(struct map_session_data *sd, int n,
if (nd->u.shop_item[j].nameid == 0)
return 3;
- if (itemdb_value_notdc(nd->u.shop_item[j].nameid))
- z += (double) nd->u.shop_item[j].value * item_list[i * 2];
- else
- z += (double) pc_modifybuyvalue(sd,
- nd->u.shop_item[j].value) *
- item_list[i * 2];
+ z += (double) nd->u.shop_item[j].value * item_list[i * 2];
itemamount += item_list[i * 2];
switch (pc_checkadditem(sd, item_list[i * 2 + 1], item_list[i * 2]))
@@ -943,24 +938,6 @@ int npc_buylist(struct map_session_data *sd, int n,
}
}
- //商人経験値
-/* if ((sd->status.class == 5) || (sd->status.class == 10) || (sd->status.class == 18)) {
- z = z * pc_checkskill(sd,MC_DISCOUNT) / ((1 + 300 / itemamount) * 4000) * battle_config.shop_exp;
- pc_gainexp(sd,0,z);
- }*/
- if (battle_config.shop_exp > 0 && z > 0
- && (skill = pc_checkskill(sd, MC_DISCOUNT)) > 0)
- {
- if (skill > 0)
- {
- z = (log(z * (double) skill) * (double) battle_config.shop_exp /
- 100.);
- if (z < 1)
- z = 1;
- pc_gainexp(sd, 0, (int) z);
- }
- }
-
return 0;
}
@@ -972,7 +949,7 @@ int npc_selllist(struct map_session_data *sd, int n,
const uint16_t *item_list)
{
double z;
- int i, skill, itemamount = 0;
+ int i, itemamount = 0;
nullpo_retr(1, sd);
nullpo_retr(1, item_list);
@@ -991,12 +968,7 @@ int npc_selllist(struct map_session_data *sd, int n,
return 1;
if (sd->trade_partner != 0)
return 2; // cant sell while trading
- if (itemdb_value_notoc(nameid))
- z += (double) itemdb_value_sell(nameid) * item_list[i * 2 + 1];
- else
- z += (double) pc_modifysellvalue(sd,
- itemdb_value_sell(nameid)) *
- item_list[i * 2 + 1];
+ z += (double) itemdb_value_sell(nameid) * item_list[i * 2 + 1];
itemamount += item_list[i * 2 + 1];
}
@@ -1009,24 +981,6 @@ int npc_selllist(struct map_session_data *sd, int n,
pc_delitem(sd, item_id, item_list[i * 2 + 1], 0);
}
- //商人経験値
-/* if ((sd->status.class == 5) || (sd->status.class == 10) || (sd->status.class == 18)) {
- z = z * pc_checkskill(sd,MC_OVERCHARGE) / ((1 + 500 / itemamount) * 4000) * battle_config.shop_exp ;
- pc_gainexp(sd,0,z);
- }*/
- if (battle_config.shop_exp > 0 && z > 0
- && (skill = pc_checkskill(sd, MC_OVERCHARGE)) > 0)
- {
- if (skill > 0)
- {
- z = (log(z * (double) skill) * (double) battle_config.shop_exp /
- 100.);
- if (z < 1)
- z = 1;
- pc_gainexp(sd, 0, (int) z);
- }
- }
-
return 0;
}
@@ -1926,10 +1880,6 @@ int npc_parse_mapflag(char *w1, char *, char *w3, char *w4)
{
map[m].flag.notrade = 1;
}
- else if (strcasecmp(w3, "noskill") == 0)
- {
- map[m].flag.noskill = 1;
- }
else if (battle_config.pk_mode && strcasecmp(w3, "nopvp") == 0)
{ // nopvp for pk mode [Valaris]
map[m].flag.nopvp = 1;