summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-04-15 23:27:29 -0300
committershennetsind <ind@henn.et>2013-04-15 23:27:29 -0300
commit2967335cb41866162a69732abe4fc3a07b02e27c (patch)
tree08ce3282b6204cfd0491a9aba2811139f046ada8 /src/map
parent7a853ef214cc4f96574358759489f3769a805e4c (diff)
downloadhercules-2967335cb41866162a69732abe4fc3a07b02e27c.tar.gz
hercules-2967335cb41866162a69732abe4fc3a07b02e27c.tar.bz2
hercules-2967335cb41866162a69732abe4fc3a07b02e27c.tar.xz
hercules-2967335cb41866162a69732abe4fc3a07b02e27c.zip
Fixed Bug #7127
Also Implemented allow party invitations state. Implemented saving of client options (atm show_equip and allow party invitation) http://hercules.ws/board/tracker/issue-7127-view-equipment/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c27
-rw-r--r--src/map/clif.h2
-rw-r--r--src/map/packets.h2
3 files changed, 28 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index b1998de77..57b14b1de 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -6354,7 +6354,7 @@ void clif_partyinvitationstate(struct map_session_data* sd)
WFIFOHEAD(fd, packet_len(0x2c9));
WFIFOW(fd, 0) = 0x2c9;
- WFIFOB(fd, 2) = 0; // not implemented
+ WFIFOB(fd, 2) = sd->status.allow_party ? 1 : 0;
WFIFOSET(fd, packet_len(0x2c9));
}
@@ -14641,6 +14641,16 @@ void clif_parse_EquipTick(int fd, struct map_session_data* sd)
clif->equiptickack(sd, flag);
}
+/// Request to change party invitation tick.
+/// value:
+/// 0 = disabled
+/// 1 = enabled
+void clif_parse_PartyTick(int fd, struct map_session_data* sd)
+{
+ bool flag = RFIFOB(fd,6)?true:false;
+ sd->status.allow_party = flag;
+ clif->partytickack(sd, flag);
+}
/// Questlog System [Kevin] [Inkfish]
///
@@ -16595,6 +16605,15 @@ void clif_maptypeproperty2(struct block_list *bl,enum send_target t) {
clif->send(&p,sizeof(p),bl,t);
#endif
}
+
+void clif_partytickack(struct map_session_data* sd, bool flag) {
+
+ WFIFOHEAD(sd->fd, packet_len(0x2c9));
+ WFIFOW(sd->fd, 0) = 0x2c9;
+ WFIFOB(sd->fd, 2) = flag;
+ WFIFOSET(sd->fd, packet_len(0x2c9));
+}
+
/*==========================================
* Main client packet processing function
*------------------------------------------*/
@@ -16974,6 +16993,7 @@ void clif_defaults(void) {
clif->hate_info = clif_hate_info;
clif->mission_info = clif_mission_info;
clif->feel_hate_reset = clif_feel_hate_reset;
+ clif->partytickack = clif_partytickack;
clif->equiptickack = clif_equiptickack;
clif->viewequip_ack = clif_viewequip_ack;
clif->viewequip_fail = clif_viewequip_fail;
@@ -17465,10 +17485,13 @@ void clif_defaults(void) {
clif->pDebug = clif_parse_debug;
clif->pSkillSelectMenu = clif_parse_SkillSelectMenu;
clif->pMoveItem = clif_parse_MoveItem;
- clif->pDull = clif_parse_dull;
/* RagExe Cash Shop [Ind/Hercules] */
clif->pCashShopOpen = clif_parse_CashShopOpen;
clif->pCashShopClose = clif_parse_CashShopClose;
clif->pCashShopSchedule = clif_parse_CashShopSchedule;
clif->pCashShopBuy = clif_parse_CashShopBuy;
+ /* */
+ clif->pPartyTick = clif_parse_PartyTick;
+ /* dull */
+ clif->pDull = clif_parse_dull;
}
diff --git a/src/map/clif.h b/src/map/clif.h
index 89a330a90..0e13b29f2 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -575,6 +575,7 @@ struct clif_interface {
void (*hate_info) (struct map_session_data *sd, unsigned char hate_level,int class_, unsigned char type);
void (*mission_info) (struct map_session_data *sd, int mob_id, unsigned char progress);
void (*feel_hate_reset) (struct map_session_data *sd);
+ void (*partytickack) (struct map_session_data* sd, bool flag);
void (*equiptickack) (struct map_session_data* sd, int flag);
void (*viewequip_ack) (struct map_session_data* sd, struct map_session_data* tsd);
void (*viewequip_fail) (struct map_session_data* sd);
@@ -1071,6 +1072,7 @@ struct clif_interface {
void (*pCashShopClose) (int fd, struct map_session_data *sd);
void (*pCashShopSchedule) (int fd, struct map_session_data *sd);
void (*pCashShopBuy) (int fd, struct map_session_data *sd);
+ void (*pPartyTick) (int fd, struct map_session_data *sd);
} clif_s;
struct clif_interface *clif;
diff --git a/src/map/packets.h b/src/map/packets.h
index 09e035413..3c204c978 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -1116,7 +1116,7 @@ packet(0x020d,-1);
packet(0x02c5,30);
packet(0x02c6,30);
packet(0x02c7,7,clif->pReplyPartyInvite2,2,6);
- packet(0x02c8,3);
+ packet(0x02c8,3,clif->pPartyTick,2);
packet(0x02c9,3);
packet(0x02ca,3);
packet(0x02cb,20);