|
@@ -12851,7 +12851,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
|
|
|
|
|
|
case UNT_BANDING:
|
|
|
if( battle_check_target(&src->bl, bl, BCT_ENEMY) > 0 && !(status_get_mode(bl)&MD_BOSS) && !(tsc && tsc->data[SC_BANDING_DEFENCE]) )
|
|
|
- sc_start(ss, bl, SC_BANDING_DEFENCE, (status_get_lv(src) / 5) + (sg->skill_lv * 5) - (status_get_agi(bl) / 10), 90, skill_get_time2(sg->skill_id, sg->skill_lv));
|
|
|
+ sc_start(ss, bl, SC_BANDING_DEFENCE, (status_get_lv(&src->bl) / 5) + (sg->skill_lv * 5) - (status_get_agi(bl) / 10), 90, skill_get_time2(sg->skill_id, sg->skill_lv));
|
|
|
break;
|
|
|
|
|
|
case UNT_FIRE_MANTLE:
|
|
@@ -14182,18 +14182,36 @@ bool skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_i
|
|
|
if (require.status_count) {
|
|
|
uint8 i;
|
|
|
/* May has multiple requirements */
|
|
|
- if (!sc) {
|
|
|
- clif_skill_fail(sd, skill_id, USESKILL_FAIL_CONDITION, 0);
|
|
|
- return false;
|
|
|
- }
|
|
|
+ //if (!sc) {
|
|
|
+ // clif_skill_fail(sd, skill_id, USESKILL_FAIL_CONDITION, 0);
|
|
|
+ // return false;
|
|
|
+ //}
|
|
|
for (i = 0; i < require.status_count; i++) {
|
|
|
- if (require.status[i] >= 0 && !sc->data[require.status[i]]) {
|
|
|
- if (require.status[i] == SC_PUSH_CART) {
|
|
|
- clif_skill_fail(sd,skill_id,USESKILL_FAIL_CART,0);
|
|
|
- return false;
|
|
|
- }
|
|
|
- clif_skill_fail(sd, skill_id, USESKILL_FAIL_CONDITION, 0);
|
|
|
- return false;
|
|
|
+ enum sc_type req_sc = require.status[i];
|
|
|
+ if (req_sc == SC_NONE)
|
|
|
+ continue;
|
|
|
+
|
|
|
+ switch (req_sc) {
|
|
|
+ /* Official fail msg */
|
|
|
+ case SC_PUSH_CART:
|
|
|
+ if (!sc || !sc->data[SC_PUSH_CART]) {
|
|
|
+ clif_skill_fail(sd,skill_id,USESKILL_FAIL_CART,0);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case SC_POISONINGWEAPON:
|
|
|
+ if (!sc || !sc->data[SC_POISONINGWEAPON]) {
|
|
|
+ clif_skill_fail(sd,skill_id,USESKILL_FAIL_GC_POISONINGWEAPON,0);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+ if (!sc || !sc->data[req_sc]) {
|
|
|
+ clif_skill_fail(sd, skill_id, USESKILL_FAIL_CONDITION, 0);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -14205,8 +14223,8 @@ bool skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_i
|
|
|
if(!reqeqit) break; //no more required item get out of here
|
|
|
if (!pc_checkequip2(sd,reqeqit,EQI_ACC_L,EQI_MAX)) {
|
|
|
char output[128];
|
|
|
- //clif_skill_fail(sd, skill_id, USESKILL_FAIL_NEED_EQUIPMENT, reqeqit);
|
|
|
- sprintf(output,"Please equip with a %d.",reqeqit); // Officially, some Mechanic skills failure message displays this rather than just "Skill has failed."
|
|
|
+ //Official use msgstringtable.txt for each skill failure
|
|
|
+ sprintf(output,msg_txt(sd,722),itemdb_jname(reqeqit));
|
|
|
clif_colormes(sd,color_table[COLOR_RED],output);
|
|
|
return false;
|
|
|
}
|
|
@@ -14401,16 +14419,18 @@ bool skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id,
|
|
|
continue;
|
|
|
index[i] = pc_search_inventory(sd,require.itemid[i]);
|
|
|
if( index[i] < 0 || sd->status.inventory[index[i]].amount < require.amount[i] ) {
|
|
|
- if( require.itemid[i] == ITEMID_RED_GEMSTONE )
|
|
|
- clif_skill_fail(sd,skill_id,USESKILL_FAIL_REDJAMSTONE,0);// red gemstone required
|
|
|
- else if( require.itemid[i] == ITEMID_BLUE_GEMSTONE )
|
|
|
- clif_skill_fail(sd,skill_id,USESKILL_FAIL_BLUEJAMSTONE,0);// blue gemstone required
|
|
|
- else {
|
|
|
- // char output[128]; //not offi but more explicit msg
|
|
|
- clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
|
|
|
- // sprintf(output, "You need itemid=%d, amount=%d", require.itemid[i], require.amount[i]);
|
|
|
- // clif_colormes(sd,color_table[COLOR_RED],output);
|
|
|
- }
|
|
|
+ //if( require.itemid[i] == ITEMID_RED_GEMSTONE )
|
|
|
+ // clif_skill_fail(sd,skill_id,USESKILL_FAIL_REDJAMSTONE,0);// red gemstone required
|
|
|
+ //else if( require.itemid[i] == ITEMID_BLUE_GEMSTONE )
|
|
|
+ // clif_skill_fail(sd,skill_id,USESKILL_FAIL_BLUEJAMSTONE,0);// blue gemstone required
|
|
|
+ //else {
|
|
|
+ //Official is using msgstringtable.txt for each requirement failure
|
|
|
+ char output[CHAT_SIZE_MAX];
|
|
|
+ //clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
|
|
|
+ //sprintf(output, "You need itemid=%d, amount=%d", require.itemid[i], require.amount[i]);
|
|
|
+ sprintf(output, msg_txt(sd,720), itemdb_jname(require.itemid[i])); // %s is required.
|
|
|
+ clif_colormes(sd,color_table[COLOR_RED],output);
|
|
|
+ //}
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -17805,29 +17825,41 @@ int skill_arrow_create (struct map_session_data *sd, int nameid)
|
|
|
int skill_poisoningweapon( struct map_session_data *sd, int nameid) {
|
|
|
sc_type type;
|
|
|
int chance, i;
|
|
|
+ //uint16 msg = 1443; //Official is using msgstringtable.txt
|
|
|
+ char output[CHAT_SIZE_MAX];
|
|
|
+ const char *msg;
|
|
|
+
|
|
|
nullpo_ret(sd);
|
|
|
+
|
|
|
if( nameid <= 0 || (i = pc_search_inventory(sd,nameid)) < 0 || pc_delitem(sd,i,1,0,0,LOG_TYPE_CONSUME) ) {
|
|
|
clif_skill_fail(sd,GC_POISONINGWEAPON,USESKILL_FAIL_LEVEL,0);
|
|
|
return 0;
|
|
|
}
|
|
|
+
|
|
|
switch( nameid ) { // t_lv used to take duration from skill_get_time2
|
|
|
- case ITEMID_PARALYSE: type = SC_PARALYSE; break;
|
|
|
- case ITEMID_PYREXIA: type = SC_PYREXIA; break;
|
|
|
- case ITEMID_DEATHHURT: type = SC_DEATHHURT; break;
|
|
|
- case ITEMID_LEECHESEND: type = SC_LEECHESEND; break;
|
|
|
- case ITEMID_VENOMBLEED: type = SC_VENOMBLEED; break;
|
|
|
- case ITEMID_TOXIN: type = SC_TOXIN; break;
|
|
|
- case ITEMID_MAGICMUSHROOM: type = SC_MAGICMUSHROOM; break;
|
|
|
- case ITEMID_OBLIVIONCURSE: type = SC_OBLIVIONCURSE; break;
|
|
|
+ case ITEMID_PARALYSE: type = SC_PARALYSE; /*msg = 1444;*/ msg = "Paralyze"; break;
|
|
|
+ case ITEMID_PYREXIA: type = SC_PYREXIA; /*msg = 1448;*/ msg = "Pyrexia"; break;
|
|
|
+ case ITEMID_DEATHHURT: type = SC_DEATHHURT; /*msg = 1447;*/ msg = "Deathhurt"; break;
|
|
|
+ case ITEMID_LEECHESEND: type = SC_LEECHESEND; /*msg = 1450;*/ msg = "Leech End"; break;
|
|
|
+ case ITEMID_VENOMBLEED: type = SC_VENOMBLEED; /*msg = 1445;*/ msg = "Venom Bleed"; break;
|
|
|
+ case ITEMID_TOXIN: type = SC_TOXIN; /*msg = 1443;*/ msg = "Toxin"; break;
|
|
|
+ case ITEMID_MAGICMUSHROOM: type = SC_MAGICMUSHROOM; /*msg = 1446;*/ msg = "Magic Mushroom"; break;
|
|
|
+ case ITEMID_OBLIVIONCURSE: type = SC_OBLIVIONCURSE; /*msg = 1449;*/ msg = "Oblivion Curse"; break;
|
|
|
default:
|
|
|
clif_skill_fail(sd,GC_POISONINGWEAPON,USESKILL_FAIL_LEVEL,0);
|
|
|
return 0;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
chance = 2 + 2 * sd->menuskill_val; // 2 + 2 * skill_lv
|
|
|
sc_start4(&sd->bl,&sd->bl, SC_POISONINGWEAPON, 100, pc_checkskill(sd, GC_RESEARCHNEWPOISON), //in Aegis it store the level of GC_RESEARCHNEWPOISON in val1
|
|
|
type, chance, 0, skill_get_time(GC_POISONINGWEAPON, sd->menuskill_val));
|
|
|
|
|
|
+ sprintf(output, msg_txt(sd,721), msg);
|
|
|
+ clif_colormes(sd,color_table[COLOR_WHITE],output);
|
|
|
+
|
|
|
+/*#if PACKETVER >= 20110208 //! TODO: Check the correct PACKVETVER
|
|
|
+ clif_msg(sd,msg);
|
|
|
+#endif*/
|
|
|
return 0;
|
|
|
}
|
|
|
|