diff options
-rw-r--r-- | localserver/beta.patch2 | 56 |
1 files changed, 53 insertions, 3 deletions
diff --git a/localserver/beta.patch2 b/localserver/beta.patch2 index 33f872a..2efb341 100644 --- a/localserver/beta.patch2 +++ b/localserver/beta.patch2 @@ -11,7 +11,7 @@ index fe7a64b51..f9066fcb8 100644 static bool battle_set_value_sub(int index, int value) diff --git a/src/map/npc.c b/src/map/npc.c -index 4b79a9fed..e11f00b2a 100644 +index 4b79a9fed..b4d125581 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2069,9 +2069,6 @@ static int npc_buylist(struct map_session_data *sd, struct itemlist *item_list) @@ -54,6 +54,56 @@ index 4b79a9fed..e11f00b2a 100644 return 0; } +@@ -2462,7 +2468,7 @@ static int npc_selllist(struct map_session_data *sd, struct itemlist *item_list) + + z = 0; + +- if (sd->status.zeny >= MAX_ZENY && nd->master_nd == NULL) ++ if (sd->status.zeny >= MAX_ZENY) + return 1; + + // verify the sell list +@@ -2486,20 +2492,11 @@ static int npc_selllist(struct map_session_data *sd, struct itemlist *item_list) + return 1; + } + +- if (nd->master_nd) { +- // Script-controlled shops decide by themselves, what can be sold and at what price. +- continue; +- } +- + value = pc->modifysellvalue(sd, sd->inventory_data[idx]->value_sell); + + z += (int64)value * entry->amount; + } + +- if( nd->master_nd ) { // Script-controlled shops +- return npc->selllist_sub(sd, item_list, nd->master_nd); +- } +- + // delete items + for (i = 0; i < VECTOR_LENGTH(*item_list); i++) { + struct itemlist_entry *entry = &VECTOR_INDEX(*item_list, i); +@@ -2518,7 +2515,7 @@ static int npc_selllist(struct map_session_data *sd, struct itemlist *item_list) + + } + +- if (z + sd->status.zeny > MAX_ZENY && nd->master_nd == NULL) ++ if (z + sd->status.zeny > MAX_ZENY) + return 1; + + if (z > MAX_ZENY) +@@ -2539,6 +2536,10 @@ static int npc_selllist(struct map_session_data *sd, struct itemlist *item_list) + } + } + ++ if( nd->master_nd ) { // Script-controlled shops ++ return npc->selllist_sub(sd, item_list, nd->master_nd); ++ } ++ + return 0; + } + diff --git a/src/map/rodex.c b/src/map/rodex.c index 766fdc5ea..996576fd3 100644 --- a/src/map/rodex.c @@ -74,10 +124,10 @@ index 766fdc5ea..996576fd3 100644 static struct rodex_interface rodex_s; struct rodex_interface *rodex; diff --git a/src/map/script.c b/src/map/script.c -index fe8638ac3..de8122ea3 100644 +index 5211e2cd4..9880ed65b 100644 --- a/src/map/script.c +++ b/src/map/script.c -@@ -16394,6 +16394,8 @@ static BUILDIN(summon) +@@ -16436,6 +16436,8 @@ static BUILDIN(summon) clif->specialeffect(&md->bl,344,AREA); sc_start4(NULL, &md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 60000); } |