summaryrefslogtreecommitdiff
path: root/.tools
diff options
context:
space:
mode:
Diffstat (limited to '.tools')
-rw-r--r--.tools/beta.patch2132
1 files changed, 118 insertions, 14 deletions
diff --git a/.tools/beta.patch2 b/.tools/beta.patch2
index 41a6417fb..d061a9bf3 100644
--- a/.tools/beta.patch2
+++ b/.tools/beta.patch2
@@ -1,15 +1,119 @@
diff --git a/src/map/battle.c b/src/map/battle.c
-index fe7a64b51..8698cef67 100644
+index 37fc03bca..e10291b1f 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
-@@ -7417,6 +7417,7 @@ static const struct battle_data {
- { "features/enable_achievement_system", &battle_config.feature_enable_achievement, 1, 0, 1, },
- { "ping_timer_inverval", &battle_config.ping_timer_interval, 30, 0, 99999999, },
- { "ping_time", &battle_config.ping_time, 20, 0, 99999999, },
-+ { "hom_bonus_exp_from_master", &battle_config.hom_bonus_exp_from_master, 10, 0, 100, },
- };
-
- static bool battle_set_value_sub(int index, int value)
+@@ -4664,7 +4664,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
+ skill_id == SN_SHARPSHOOTING || skill_id == MA_SHARPSHOOTING ||
+ skill_id == NJ_KIRIKAGE))
+ {
+- short cri = sstatus->cri;
++ int cri = sstatus->cri;
+ if (sd != NULL) {
+ // if show_katar_crit_bonus is enabled, it already done the calculation in status.c
+ if (!battle_config.show_katar_crit_bonus && sd->weapontype == W_KATAR) {
+@@ -4684,7 +4684,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
+ //Therefore, we use the old value 3 on cases when an sd gets attacked by a mob
+ cri -= tstatus->luk*(!sd&&tsd?3:2);
+ #else
+- cri -= status->get_lv(target) / 15 + 2 * status_get_luk(target);
++ cri -= status->get_lv(target) / 5 + (3 * status_get_luk(target))/2;
+ #endif
+
+ if( tsc && tsc->data[SC_SLEEP] ) {
+diff --git a/src/map/npc.c b/src/map/npc.c
+index fea82c873..84d292415 100644
+--- a/src/map/npc.c
++++ b/src/map/npc.c
+@@ -2070,9 +2070,6 @@ static int npc_buylist(struct map_session_data *sd, struct itemlist *item_list)
+ w += itemdb_weight(entry->id) * entry->amount;
+ }
+
+- if (nd->master_nd != NULL) //Script-based shops.
+- return npc->buylist_sub(sd, item_list, nd->master_nd);
+-
+ if (z > sd->status.zeny)
+ return 1; // Not enough Zeny
+ if( w + sd->weight > sd->max_weight )
+@@ -2109,6 +2106,9 @@ static int npc_buylist(struct map_session_data *sd, struct itemlist *item_list)
+ }
+ }
+
++ if (nd->master_nd != NULL) // TMW2 Script-based shops.
++ return npc->buylist_sub(sd, item_list, nd->master_nd);
++
+ return 0;
+ }
+
+@@ -2179,6 +2179,9 @@ static int npc_market_buylist(struct map_session_data *sd, struct itemlist *item
+ return 1;
+ }
+
++ // Apply player discout cupon (TMW2 Custom)
++ value = pc->modifybuyvalue(sd,value);
++
+ z += (int64)value * entry->amount;
+ w += itemdb_weight(entry->id) * entry->amount;
+ }
+@@ -2218,6 +2221,9 @@ static int npc_market_buylist(struct map_session_data *sd, struct itemlist *item
+ }
+ }
+
++ if (nd->master_nd != NULL) // TMW2 Script-based shops.
++ return npc->buylist_sub(sd, item_list, nd->master_nd);
++
+ return 0;
+ }
+
+@@ -2463,7 +2469,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
+@@ -2487,20 +2493,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);
+@@ -2519,7 +2516,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)
+@@ -2540,6 +2537,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
@@ -30,10 +134,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 f515d4403..3747abd6e 100644
--- a/src/map/script.c
+++ b/src/map/script.c
-@@ -16394,6 +16394,8 @@ static BUILDIN(summon)
+@@ -16552,6 +16552,8 @@ static BUILDIN(summon)
clif->specialeffect(&md->bl,344,AREA);
sc_start4(NULL, &md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 60000);
}
@@ -43,10 +147,10 @@ index fe8638ac3..de8122ea3 100644
}
diff --git a/src/map/status.c b/src/map/status.c
-index f06bb0330..1cd69ff18 100644
+index 63e71c9dc..b0fb430f7 100644
--- a/src/map/status.c
+++ b/src/map/status.c
-@@ -3552,7 +3552,7 @@ static void status_calc_regen(struct block_list *bl, struct status_data *st, str
+@@ -3553,7 +3553,7 @@ static void status_calc_regen(struct block_list *bl, struct status_data *st, str
regen->hp = cap_value(val, reg_flag, SHRT_MAX);
@@ -55,7 +159,7 @@ index f06bb0330..1cd69ff18 100644
if( st->int_ >= 120 )
val += ((st->int_-120)>>1) + 4;
-@@ -4468,17 +4468,23 @@ static unsigned short status_base_atk(const struct block_list *bl, const struct
+@@ -4469,17 +4469,23 @@ static int status_base_atk(const struct block_list *bl, const struct status_data
case W_SHOTGUN:
case W_GRENADE:
flag = 1;