parent
060f33408d
commit
99845c1fd6
@ -1953,6 +1953,12 @@ void clif_selllist(struct map_session_data *sd)
|
|||||||
WFIFOSET(fd,WFIFOW(fd,2));
|
WFIFOSET(fd,WFIFOW(fd,2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Closes shop (CZ_NPC_TRADE_QUIT).
|
||||||
|
/// 09d4
|
||||||
|
void clif_parse_NPCShopClosed(int fd, struct map_session_data *sd) {
|
||||||
|
// TODO: State tracking?
|
||||||
|
sd->npc_shopid = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Presents list of items, that can be sold to a Market shop.
|
* Presents list of items, that can be sold to a Market shop.
|
||||||
@ -11599,18 +11605,18 @@ void clif_parse_RemoveOption(int fd,struct map_session_data *sd)
|
|||||||
/// 097f <Length>.W <identity>.L <type>.B
|
/// 097f <Length>.W <identity>.L <type>.B
|
||||||
void clif_SelectCart(struct map_session_data *sd) {
|
void clif_SelectCart(struct map_session_data *sd) {
|
||||||
#if PACKETVER >= 20150826
|
#if PACKETVER >= 20150826
|
||||||
int i = 0, carts = 3;
|
int i = 0, carts = 3;
|
||||||
|
|
||||||
int fd = sd->fd;
|
int fd = sd->fd;
|
||||||
WFIFOHEAD(fd,8 + carts);
|
WFIFOHEAD(fd,8 + carts);
|
||||||
WFIFOW(fd,0) = 0x97f;
|
WFIFOW(fd,0) = 0x97f;
|
||||||
WFIFOW(fd,2) = 8 + carts;
|
WFIFOW(fd,2) = 8 + carts;
|
||||||
WFIFOL(fd,4) = sd->status.account_id;
|
WFIFOL(fd,4) = sd->status.account_id;
|
||||||
// Right now we have 10-12, tested it you can also enable selection for all cart styles here(1-12)
|
// Right now we have 10-12, tested it you can also enable selection for all cart styles here(1-12)
|
||||||
for( i = 0; i < carts; i++ ) {
|
for( i = 0; i < carts; i++ ) {
|
||||||
WFIFOB(fd,8 + i) = 10 + i;
|
WFIFOB(fd,8 + i) = 10 + i;
|
||||||
}
|
}
|
||||||
WFIFOSET(fd,8 + carts);
|
WFIFOSET(fd,8 + carts);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11619,19 +11625,19 @@ void clif_SelectCart(struct map_session_data *sd) {
|
|||||||
/// 0980 <identity>.L <type>.B
|
/// 0980 <identity>.L <type>.B
|
||||||
void clif_parse_SelectCart(int fd,struct map_session_data *sd) {
|
void clif_parse_SelectCart(int fd,struct map_session_data *sd) {
|
||||||
#if PACKETVER >= 20150826
|
#if PACKETVER >= 20150826
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
// Check identity
|
// Check identity
|
||||||
if( !sd || pc_checkskill(sd,MC_CARTDECORATE) < 1 || RFIFOL(fd,2) != sd->status.account_id )
|
if( !sd || pc_checkskill(sd,MC_CARTDECORATE) < 1 || RFIFOL(fd,2) != sd->status.account_id )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
type = (int)RFIFOB(fd,6);
|
type = (int)RFIFOB(fd,6);
|
||||||
|
|
||||||
// Check type
|
// Check type
|
||||||
if( type < 10 || type > MAX_CARTS )
|
if( type < 10 || type > MAX_CARTS )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pc_setcart(sd, type);
|
pc_setcart(sd, type);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19226,6 +19232,7 @@ void packetdb_readdb(bool reload)
|
|||||||
{ clif_parse_blocking_playcancel, "booking_playcancel"},
|
{ clif_parse_blocking_playcancel, "booking_playcancel"},
|
||||||
{ clif_parse_ranklist, "ranklist"},
|
{ clif_parse_ranklist, "ranklist"},
|
||||||
// Market NPC
|
// Market NPC
|
||||||
|
{ clif_parse_NPCShopClosed, "npcshopclosed" },
|
||||||
{ clif_parse_NPCMarketClosed, "npcmarketclosed" },
|
{ clif_parse_NPCMarketClosed, "npcmarketclosed" },
|
||||||
{ clif_parse_NPCMarketPurchase, "npcmarketpurchase" },
|
{ clif_parse_NPCMarketPurchase, "npcmarketpurchase" },
|
||||||
// Roulette
|
// Roulette
|
||||||
|
@ -6439,9 +6439,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
|
|||||||
|
|
||||||
case MC_CARTDECORATE:
|
case MC_CARTDECORATE:
|
||||||
clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
|
clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
|
||||||
if( sd ) {
|
if( sd ) {
|
||||||
clif_SelectCart(sd);
|
clif_SelectCart(sd);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TK_MISSION:
|
case TK_MISSION:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user