diff --git a/db/pre-re/item_trade.txt b/db/pre-re/item_trade.txt index 3b8b70107a..f8d28d8fb1 100644 --- a/db/pre-re/item_trade.txt +++ b/db/pre-re/item_trade.txt @@ -50,7 +50,7 @@ 7418,475,100 // Written Request(B) // PVP Item -7420,499,100 // Skull +7420,498,100 // Skull // 10.3 Quest items // * "Gaebolg family Curse" items diff --git a/db/re/item_trade.txt b/db/re/item_trade.txt index c92047a832..4dff66f549 100644 --- a/db/re/item_trade.txt +++ b/db/re/item_trade.txt @@ -50,7 +50,7 @@ 7418,475,100 // Written Request(B) // PVP Item -7420,499,100 // Skull +7420,498,100 // Skull // 10.3 Quest items // * "Gaebolg family Curse" items diff --git a/doc/atcommands.txt b/doc/atcommands.txt index 4a7aa5084d..90205d328f 100644 --- a/doc/atcommands.txt +++ b/doc/atcommands.txt @@ -583,6 +583,12 @@ Opens the Identification window if any unappraised items are in your inventory. --------------------------------------- +@identifyall + +Automatically identifies all unidentified items in your inventory. + +--------------------------------------- + @trade Opens the trade window with the specified player. diff --git a/npc/merchants/advanced_refiner.txt b/npc/merchants/advanced_refiner.txt index 0995ce5cea..95e0c30ca3 100644 --- a/npc/merchants/advanced_refiner.txt +++ b/npc/merchants/advanced_refiner.txt @@ -54,12 +54,6 @@ payon,157,146,6 script Suhnbi#cash 85,{ mes "I don't think I can refine this item at all."; close; } - if( !getequipisidentify(.@part) ) - { - mes "[Suhnbi]"; - mes "This has not been identified. So, it can't be refined..."; - close; - } if( getequiprefinerycnt(.@part) >= 10 ) { mes "[Suhnbi]"; diff --git a/npc/merchants/refine.txt b/npc/merchants/refine.txt index 4f688de13e..a1da72cbd3 100644 --- a/npc/merchants/refine.txt +++ b/npc/merchants/refine.txt @@ -635,16 +635,6 @@ function script refinemain { mes "refine this item at all..."; close; } - //Check if the item is identified... (Don't know why this is in here... but kept it anyway) - if(!getequipisidentify(.@part)) { - mes "[" + getarg(0) + "]"; - mes "You can't refine this"; - mes "if you haven't appraised"; - mes "it first. Make sure your"; - mes "stuff is identified before"; - mes "I can refine it."; - close; - } //Check to see if the items is already +10 if(getequiprefinerycnt(.@part) >= 10) { mes "[" + getarg(0) + "]"; @@ -1266,4 +1256,4 @@ function script repairmain { mes "items to repair."; close; } -} \ No newline at end of file +} diff --git a/npc/quests/seals/mjolnir_seal.txt b/npc/quests/seals/mjolnir_seal.txt index e2be244ead..5c796c3b85 100644 --- a/npc/quests/seals/mjolnir_seal.txt +++ b/npc/quests/seals/mjolnir_seal.txt @@ -1963,11 +1963,6 @@ mjolnir_01,35,136,7 script Dwarf Blacksmith#west 826,{ mes "me to do with this?"; close; } - if (getequipisidentify(.@part) == 0) { - mes "[Vestri]"; - mes "You'd better identify this item first. If we don't know what it is, what's the point of upgrading it?"; - close; - } if (getequiprefinerycnt(.@part) >= 10) { mes "[Vestri]"; mes "Oh, this is excellent! This piece here has been perfectly refined! But this isn't what I want. I can't do any work on this at all."; @@ -2189,11 +2184,6 @@ mjolnir_01,35,136,7 script Dwarf Blacksmith#west 826,{ mes "me to do with this?"; close; } - if (getequipisidentify(.@part) == 0) { - mes "[Vestri]"; - mes "You'd better identify this item first. If we don't know what it is, what's the point of upgrading it?"; - close; - } if (getequiprefinerycnt(.@part) >= 10) { mes "[Vestri]"; mes "Oh, this is excellent! This piece here has been perfectly refined! But this isn't what I want. I can't do any work on this at all."; diff --git a/npc/re/merchants/advanced_refiner.txt b/npc/re/merchants/advanced_refiner.txt index 08a23ff88a..8a73dcb44a 100644 --- a/npc/re/merchants/advanced_refiner.txt +++ b/npc/re/merchants/advanced_refiner.txt @@ -70,11 +70,6 @@ malangdo,221,174,6 script Holink#mal_cash 559,{ mes "Even Aragam can't refine such a thing, meow."; close; } - if (!getequipisidentify(.@part)) { - mes "[Holink]"; - mes "Meow? How did you wear something that wasn't appraised, meow?~"; - close; - } if (getequiprefinerycnt(.@part) >= 10) { mes "[Holink]"; mes "Meow~ Perfect refining. Did Aragam do this, meow?~"; diff --git a/npc/re/merchants/blessed_refiner.txt b/npc/re/merchants/blessed_refiner.txt index c3d140a3fa..a257017743 100644 --- a/npc/re/merchants/blessed_refiner.txt +++ b/npc/re/merchants/blessed_refiner.txt @@ -72,11 +72,6 @@ mes "This item cannot be refined."; close; } - if (!getequipisidentify(.@part)) { - mes "[Blacksmith Dister]"; - mes "This item can't be refined because it has not been identified."; - close; - } set .@equip_refine, getequiprefinerycnt(.@part); if (.@equip_refine < 6 || .@equip_refine > 12) { mes "[Blacksmith Dister]"; diff --git a/npc/re/merchants/hd_refiner.txt b/npc/re/merchants/hd_refiner.txt index 1035be3d50..897986cd62 100644 --- a/npc/re/merchants/hd_refiner.txt +++ b/npc/re/merchants/hd_refiner.txt @@ -74,11 +74,6 @@ mes "This item can't be refined."; close; } - if (!getequipisidentify(.@part)) { - mes "[Blacksmith Mighty Hammer]"; - mes "This item can't be refined because it has not been identified."; - close; - } if (getequiprefinerycnt(.@part) < 7 || getequiprefinerycnt(.@part) > 9) { mes "[Blacksmith Mighty Hammer]"; mes "I only handle items with refine levels from +7 to +9."; @@ -213,11 +208,6 @@ lhz_in02,280,19,3 duplicate(MightyHammer) Mighty Hammer#lhz 826 mes "Even I cannot refine this item. There's no way."; close; } - if (!getequipisidentify(.@part)) { - mes "[Basta]"; - mes "I can't do anything about unidentified items."; - close; - } if (getequiprefinerycnt(.@part) < 10) { mes "[Basta]"; mes "Haven't I told you? I only refine equipments that are +10 and above."; diff --git a/npc/re/merchants/refine.txt b/npc/re/merchants/refine.txt index 4def6c71fe..efe5754805 100644 --- a/npc/re/merchants/refine.txt +++ b/npc/re/merchants/refine.txt @@ -77,16 +77,6 @@ function script refinenew { mes "refine this item at all..."; close; } - //Check if the item is identified... (Don't know why this is in here... but kept it anyway) - if(!getequipisidentify(.@part)) { - mes "[" + getarg(0) + "]"; - mes "You can't refine this"; - mes "if you haven't appraised"; - mes "it first. Make sure your"; - mes "stuff is identified before"; - mes "I can refine it."; - close; - } //Check to see if the items is at least +10 if(getequiprefinerycnt(.@part) < 10) { mes "["+ getarg(0) +"]"; @@ -553,11 +543,6 @@ malangdo,224,172,6 script Clink#mal_normal 544,{ mes "This can't be refined!!"; close; } - if (!getequipisidentify(.@part)) { - mes "[Clink]"; - mes "How did you wear something that wasn't appraised?"; - close; - } if (getequiprefinerycnt(.@part) >= 10) { mes "[Clink]"; mes "Perfect refining. Did I do this for you?"; diff --git a/npc/re/merchants/ticket_refiner.txt b/npc/re/merchants/ticket_refiner.txt index b219a4a773..7246528a44 100644 --- a/npc/re/merchants/ticket_refiner.txt +++ b/npc/re/merchants/ticket_refiner.txt @@ -73,12 +73,6 @@ prontera,184,177,6 script Refine Master 851,{ mes "This item is impossible to refine."; close; } - if (!getequipisidentify(.@part)) { - mes "[Refine Master]"; - mes "Oh, I'm sorry."; - mes "You have to identify this item first."; - close; - } switch(getequipweaponlv(.@part)) { default: case 0: diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 41da3612c7..63db998ea3 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -6580,6 +6580,23 @@ ACMD_FUNC(identify) return 0; } +/*=============================================== +* @identifyall +* => Indentify all items in inventory - Akinari +*-----------------------------------------------*/ +ACMD_FUNC(identifyall) +{ + int i; + nullpo_retr(-1, sd); + for(i=0; istatus.inventory[i].nameid > 0 && sd->status.inventory[i].identify!=1) { + sd->status.inventory[i].identify=1; + clif_item_identified(sd,i,0); + } + } + return 0; +} + /*========================================== * @gmotd (Global MOTD) * by davidsiaw :P @@ -9131,6 +9148,7 @@ void atcommand_basecommands(void) { ACMD_DEF(refresh), ACMD_DEF(refreshall), ACMD_DEF(identify), + ACMD_DEF(identifyall), ACMD_DEF(gmotd), ACMD_DEF(misceffect), ACMD_DEF(mobsearch), diff --git a/src/map/pc.c b/src/map/pc.c index b33e34d799..5355964c35 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6784,6 +6784,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) if( get_percentage(sd->status.base_exp,next) >= 99 ) { sd->state.snovice_dead_flag = 1; pc_setstand(sd); + pc_setrestartvalue(sd,1); status_percent_heal(&sd->bl, 100, 100); clif_resurrection(&sd->bl, 1); if(battle_config.pc_invincible_time) diff --git a/src/map/script.c b/src/map/script.c index 6426d2f87d..c1a0ef5000 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -7529,32 +7529,6 @@ BUILDIN_FUNC(getequipisenableref) return 0; } -/*========================================== - * Chk if the item equiped at pos is identify (huh ?) - * return (npc) - * 1 : true - * 0 : false - *------------------------------------------*/ -BUILDIN_FUNC(getequipisidentify) -{ - int i = -1,num; - TBL_PC *sd; - - num = script_getnum(st,2); - sd = script_rid2sd(st); - if( sd == NULL ) - return 0; - - if (num > 0 && num <= ARRAYLENGTH(equip)) - i=pc_checkequip(sd,equip[num-1]); - if(i >= 0) - script_pushint(st,sd->status.inventory[i].identify); - else - script_pushint(st,0); - - return 0; -} - /*========================================== * Get the item refined value at pos * return (npc) @@ -9839,7 +9813,7 @@ BUILDIN_FUNC(sc_start) TBL_NPC * nd = map_id2nd(st->oid); struct block_list* bl; enum sc_type type; - int tick, val1, val2, val3, val4=0, rate, flag, isitem; + int tick, val1, val2, val3, val4=0, rate, flag; char start_type; const char* command = script_getfuncname(st); @@ -9854,8 +9828,13 @@ BUILDIN_FUNC(sc_start) tick = script_getnum(st,3); val1 = script_getnum(st,4); + //If from NPC we make default flag 1 to be unavoidable + if(nd && nd->bl.id == fake_nd->bl.id) + flag = script_hasdata(st,5+start_type)?script_getnum(st,5+start_type):1; + else + flag = script_hasdata(st,5+start_type)?script_getnum(st,5+start_type):2; + rate = script_hasdata(st,4+start_type)?min(script_getnum(st,4+start_type),10000):10000; - flag = script_hasdata(st,5+start_type)?script_getnum(st,5+start_type):2; if(script_hasdata(st,(6+start_type))) bl = map_id2bl(script_getnum(st,(6+start_type))); @@ -9873,25 +9852,22 @@ BUILDIN_FUNC(sc_start) val4 = 1;// Mark that this was a thrown sc_effect } - //solving if script from npc or item - isitem = (nd && nd->bl.id == fake_nd->bl.id || flag != 2)?true:false; + if(!bl) + return 0; switch(start_type) { case 1: - if(bl) - status_change_start(isitem?bl:NULL, bl, type, rate, val1, 0, 0, val4, tick, flag); + status_change_start(bl, bl, type, rate, val1, 0, 0, val4, tick, flag); break; case 2: val2 = script_getnum(st,5); - if(bl) - status_change_start(isitem?bl:NULL, bl, type, rate, val1, val2, 0, val4, tick, flag); + status_change_start(bl, bl, type, rate, val1, val2, 0, val4, tick, flag); break; case 4: val2 = script_getnum(st,5); val3 = script_getnum(st,6); val4 = script_getnum(st,7); - if(bl) - status_change_start(isitem?bl:NULL, bl, type, rate, val1, val2, val3, val4, tick, flag); + status_change_start(bl, bl, type, rate, val1, val2, val3, val4, tick, flag); break; } @@ -17758,7 +17734,6 @@ struct script_function buildin_func[] = { BUILDIN_DEF(repairall,""), BUILDIN_DEF(getequipisequiped,"i"), BUILDIN_DEF(getequipisenableref,"i"), - BUILDIN_DEF(getequipisidentify,"i"), BUILDIN_DEF(getequiprefinerycnt,"i"), BUILDIN_DEF(getequipweaponlv,"i"), BUILDIN_DEF(getequippercentrefinery,"i"), diff --git a/src/map/status.c b/src/map/status.c index 073707d36a..00ea744b68 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -6259,7 +6259,7 @@ int status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_typ struct map_session_data *sd; nullpo_ret(bl); - if(src==NULL) return tick?tick:1;//If no source, it can't be resisted (NPC given) + if(src==NULL) return tick?tick:1; //This should not happen in current implementation, but leave it anyway //Status that are blocked by Golden Thief Bug card or Wand of Hermod if (status_isimmune(bl)) @@ -6565,8 +6565,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty sc = status_get_sc(bl); status = status_get_status_data(bl); - if( type <= SC_NONE || type >= SC_MAX ) - { + if( type <= SC_NONE || type >= SC_MAX ) { ShowError("status_change_start: invalid status change (%d)!\n", type); return 0; } @@ -6577,8 +6576,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty if( status_isdead(bl) && type != SC_NOCHAT ) // SC_NOCHAT should work even on dead characters return 0; - if( bl->type == BL_MOB) - { + if( bl->type == BL_MOB) { struct mob_data *md = BL_CAST(BL_MOB,bl); if(md && (md->class_ == MOBID_EMPERIUM || mob_is_battleground(md)) && type != SC_SAFETYWALL && type != SC_PNEUMA) return 0; //Emperium/BG Monsters can't be afflicted by status changes @@ -6642,8 +6640,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty sd = BL_CAST(BL_PC, bl); //Adjust tick according to status resistances - if( !(flag&(1|4)) ) - { + if( !(flag&(1|4)) ) { tick = status_get_sc_def(src, bl, type, rate, tick, flag); if( !tick ) return 0; }