- Follow up r17322 fix bugreport:7663
-- fix favorite display -- fix typos - Add script provenance for sc_start, (item or npc) requested for sc_def. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17324 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
b484c33694
commit
553fe59fb1
@ -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);
|
WBUFB(buf,n+4)=itemtype(id->type);
|
||||||
|
|
||||||
if(!normal){ //equip 31B
|
if(!normal){ //equip 31B
|
||||||
WBUFL(buf,n+5)= i->equip; //location
|
WBUFL(buf,n+5)= equip; //location
|
||||||
WBUFL(buf,n+9)=equip; //wear state
|
WBUFL(buf,n+9)= i->equip; //wear state
|
||||||
WBUFB(buf,n+13)= i->refine; //refine lvl
|
WBUFB(buf,n+13)= i->refine; //refine lvl
|
||||||
clif_addcards(WBUFP(buf, n+14), i); //EQUIPSLOTINFO 8B
|
clif_addcards(WBUFP(buf, n+14), i); //EQUIPSLOTINFO 8B
|
||||||
WBUFL(buf,n+22) = i->expire_time;
|
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
|
//V5_ITEM_flag
|
||||||
WBUFB(buf,n+30)=i->identify; //0x1 IsIdentified
|
WBUFB(buf,n+30)=i->identify; //0x1 IsIdentified
|
||||||
WBUFB(buf,n+30)|=(i->attribute)?0x2:0; //0x2 IsDamaged
|
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
|
else { //normal 24B
|
||||||
WBUFW(buf,n+5)=i->amount;
|
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
|
clif_addcards(WBUFP(buf, n+11), i); //EQUIPSLOTINFO 8B
|
||||||
WBUFL(buf,n+19) = i->expire_time;
|
WBUFL(buf,n+19) = i->expire_time;
|
||||||
//V5_ITEM_flag
|
//V5_ITEM_flag
|
||||||
WBUFB(buf,n+23)=i->identify; //0x1 IsIdentified
|
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;
|
WBUFW(bufe,2)=4+ne*se;
|
||||||
clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF);
|
clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF);
|
||||||
}
|
}
|
||||||
#if PACKETVER >= 20111122
|
#if PACKETVER >= 20111122 && PACKETVER < 20120925
|
||||||
for( i = 0; i < MAX_INVENTORY; i++ ) {
|
for( i = 0; i < MAX_INVENTORY; i++ ) {
|
||||||
if( sd->status.inventory[i].nameid <= 0 || sd->inventory_data[i] == NULL )
|
if( sd->status.inventory[i].nameid <= 0 || sd->inventory_data[i] == NULL )
|
||||||
continue;
|
continue;
|
||||||
@ -2501,7 +2501,7 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items
|
|||||||
#elif PACKETVER < 20120925
|
#elif PACKETVER < 20120925
|
||||||
WBUFW(bufe,0)=0x2d1;
|
WBUFW(bufe,0)=0x2d1;
|
||||||
#else
|
#else
|
||||||
WBUFW(buf,0)=0x996;
|
WBUFW(bufe,0)=0x996;
|
||||||
#endif
|
#endif
|
||||||
WBUFW(bufe,2)=4+ne*cmd;
|
WBUFW(bufe,2)=4+ne*cmd;
|
||||||
clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF);
|
clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF);
|
||||||
@ -2572,9 +2572,9 @@ void clif_cartlist(struct map_session_data *sd)
|
|||||||
#if PACKETVER < 20071002
|
#if PACKETVER < 20071002
|
||||||
WBUFW(bufe,0)=0x122;
|
WBUFW(bufe,0)=0x122;
|
||||||
#elif PACKETVER < 20120925
|
#elif PACKETVER < 20120925
|
||||||
WBUFW(buf,0)=0x2d2;
|
WBUFW(bufe,0)=0x2d2;
|
||||||
#else
|
#else
|
||||||
WBUFW(buf,0)=0x994;
|
WBUFW(bufe,0)=0x994;
|
||||||
#endif
|
#endif
|
||||||
WBUFW(bufe,2)=4+ne*cmd;
|
WBUFW(bufe,2)=4+ne*cmd;
|
||||||
clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF);
|
clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF);
|
||||||
|
@ -9893,9 +9893,10 @@ BUILDIN_FUNC(hideonnpc)
|
|||||||
/// sc_start <effect_id>,<duration>,<val1>{,<unit_id>};
|
/// sc_start <effect_id>,<duration>,<val1>{,<unit_id>};
|
||||||
BUILDIN_FUNC(sc_start)
|
BUILDIN_FUNC(sc_start)
|
||||||
{
|
{
|
||||||
|
TBL_NPC * nd = map_id2nd(st->oid);
|
||||||
struct block_list* bl;
|
struct block_list* bl;
|
||||||
enum sc_type type;
|
enum sc_type type;
|
||||||
int tick;
|
int tick,isitem;
|
||||||
int val1;
|
int val1;
|
||||||
int val4 = 0;
|
int val4 = 0;
|
||||||
|
|
||||||
@ -9919,8 +9920,10 @@ BUILDIN_FUNC(sc_start)
|
|||||||
val4 = 1;// Mark that this was a thrown sc_effect
|
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 )
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -9306,7 +9306,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
|
|||||||
case SC_STUN:
|
case SC_STUN:
|
||||||
case SC_SLEEP:
|
case SC_SLEEP:
|
||||||
if (sce->val1) {
|
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
|
//since these SC are not affected by it, and it lets us know
|
||||||
//if we have already delayed this attack or not.
|
//if we have already delayed this attack or not.
|
||||||
sce->val1 = 0;
|
sce->val1 = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user