diff --git a/src/map/clif.c b/src/map/clif.c index a328c80d26..1761d47ea2 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2250,8 +2250,8 @@ void clif_item_sub_v5(unsigned char *buf, int n, int idx, struct item *i, struct WBUFB(buf,n+4)=itemtype(id->type); if(!normal){ //equip 31B - WBUFL(buf,n+5)= i->equip; //location - WBUFL(buf,n+9)=equip; //wear state + WBUFL(buf,n+5)= equip; //location + WBUFL(buf,n+9)= i->equip; //wear state WBUFB(buf,n+13)= i->refine; //refine lvl clif_addcards(WBUFP(buf, n+14), i); //EQUIPSLOTINFO 8B WBUFL(buf,n+22) = i->expire_time; @@ -2260,16 +2260,16 @@ void clif_item_sub_v5(unsigned char *buf, int n, int idx, struct item *i, struct //V5_ITEM_flag WBUFB(buf,n+30)=i->identify; //0x1 IsIdentified WBUFB(buf,n+30)|=(i->attribute)?0x2:0; //0x2 IsDamaged - WBUFB(buf,n+30)|= (id->equip&EQP_VISIBLE)?0:0x4; //0x4 PlaceETCTab + WBUFB(buf,n+30)|= (i->favorite)?0x4:0; //0x4 PlaceETCTab } else { //normal 24B WBUFW(buf,n+5)=i->amount; - WBUFL(buf,n+7)=equip; //wear state + WBUFL(buf,n+7)= i->equip; //wear state clif_addcards(WBUFP(buf, n+11), i); //EQUIPSLOTINFO 8B WBUFL(buf,n+19) = i->expire_time; //V5_ITEM_flag WBUFB(buf,n+23)=i->identify; //0x1 IsIdentified - WBUFB(buf,n+23)|= (id->equip&EQP_VISIBLE)?0:0x2; //0x4,0x2 PlaceETCTab + WBUFB(buf,n+23)|= (i->favorite)?0x2:0; //0x4,0x2 PlaceETCTab } } @@ -2384,7 +2384,7 @@ void clif_inventorylist(struct map_session_data *sd) { WBUFW(bufe,2)=4+ne*se; clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF); } -#if PACKETVER >= 20111122 +#if PACKETVER >= 20111122 && PACKETVER < 20120925 for( i = 0; i < MAX_INVENTORY; i++ ) { if( sd->status.inventory[i].nameid <= 0 || sd->inventory_data[i] == NULL ) continue; @@ -2501,7 +2501,7 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items #elif PACKETVER < 20120925 WBUFW(bufe,0)=0x2d1; #else - WBUFW(buf,0)=0x996; + WBUFW(bufe,0)=0x996; #endif WBUFW(bufe,2)=4+ne*cmd; clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF); @@ -2572,9 +2572,9 @@ void clif_cartlist(struct map_session_data *sd) #if PACKETVER < 20071002 WBUFW(bufe,0)=0x122; #elif PACKETVER < 20120925 - WBUFW(buf,0)=0x2d2; + WBUFW(bufe,0)=0x2d2; #else - WBUFW(buf,0)=0x994; + WBUFW(bufe,0)=0x994; #endif WBUFW(bufe,2)=4+ne*cmd; clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF); diff --git a/src/map/script.c b/src/map/script.c index c4c76b221f..942ff48e2b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -9893,9 +9893,10 @@ BUILDIN_FUNC(hideonnpc) /// sc_start ,,{,}; BUILDIN_FUNC(sc_start) { + TBL_NPC * nd = map_id2nd(st->oid); struct block_list* bl; enum sc_type type; - int tick; + int tick,isitem; int val1; int val4 = 0; @@ -9919,8 +9920,10 @@ 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)?true:false; if( bl ) - status_change_start(NULL, bl, type, 10000, val1, 0, 0, val4, tick, 2); + status_change_start(isitem?bl:NULL, bl, type, 10000, val1, 0, 0, val4, tick, 2); return 0; } @@ -12820,7 +12823,7 @@ int recovery_sub(struct map_session_data* sd, int revive) } /*========================================================================= - * Fully Recover a Character's HP/SP - [Capuche] & [Akinari] + * Fully Recover a Character's HP/SP - [Capuche] & [Akinari] * recovery ,{,,{}}; * : * 0 - Character @@ -12832,7 +12835,7 @@ int recovery_sub(struct map_session_data* sd, int revive) * : 0 => Character's Account ID * : 1-2 => Character's Party/Guild ID * : 3 => Map Name (player attached map's name by default) - * : + * : * : 1 => Revive and Recover (Default) * : 2 => Only Full Heal * : 4 => Only Revive @@ -15494,7 +15497,7 @@ BUILDIN_FUNC(unitwalk) else if( script_hasdata(st,4) ) { int x = script_getnum(st,3); int y = script_getnum(st,4); - if( script_pushint(st, unit_can_reach_pos(bl,x,y,0)) ) + if( script_pushint(st, unit_can_reach_pos(bl,x,y,0)) ) add_timer(gettick()+50, unit_delay_walktoxy_timer, bl->id, (x<<16)|(y&0xFFFF)); // Need timer to avoid mismatches } else { struct block_list* tbl = map_id2bl(script_getnum(st,3)); diff --git a/src/map/status.c b/src/map/status.c index 5d5f615c7e..f5f11dd41d 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -9306,7 +9306,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const case SC_STUN: case SC_SLEEP: if (sce->val1) { - //Removing the 'level' shouldn't affect anything in the code + //Removing the 'level' shouldn't affect anything in the code //since these SC are not affected by it, and it lets us know //if we have already delayed this attack or not. sce->val1 = 0;