summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.h2
-rw-r--r--src/map/clif.c37
-rw-r--r--src/map/clif.h1
-rw-r--r--src/map/party.c2
4 files changed, 39 insertions, 3 deletions
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index 7f76dbf30..a4fd609d2 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -10,6 +10,8 @@
//Note: The range is unlimited unless this define is set.
//#define AUTOLOOT_DISTANCE AREA_SIZE
+#include "map.h"
+
enum AtCommandType {
AtCommand_None = -1,
AtCommand_Broadcast = 0,
diff --git a/src/map/clif.c b/src/map/clif.c
index 30646a5b3..335d94ccf 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8083,6 +8083,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
clif_updatestatus(sd,SP_NEXTJOBEXP);
clif_updatestatus(sd,SP_SKILLPOINT);
clif_initialstatus(sd);
+ clif_hotkeys_send(sd);
if (sd->sc.option&OPTION_FALCON)
clif_status_load(&sd->bl, SI_FALCON, 1);
@@ -8193,6 +8194,38 @@ void clif_parse_TickSend(int fd, struct map_session_data *sd)
return;
}
+void clif_hotkeys_send(struct map_session_data *sd) {
+#ifdef HOTKEY_SAVING
+ const int fd = sd->fd;
+ int i;
+ if (!fd) return;
+ WFIFOHEAD(fd, 2+HOTKEY_SAVING*7);
+ WFIFOW(fd, 0) = 0x02b9;
+ for(i = 0; i < HOTKEY_SAVING; i++) {
+ WFIFOB(fd, 2 + 0 + i * 7) = sd->status.hotkeys[i].type; // type: 0: item, 1: skill
+ WFIFOL(fd, 2 + 1 + i * 7) = sd->status.hotkeys[i].id; // item or skill ID
+ WFIFOW(fd, 2 + 5 + i * 7) = sd->status.hotkeys[i].lv; // skill level
+ }
+ WFIFOSET(fd, packet_len(0x02b9));
+#endif
+}
+
+void clif_parse_Hotkey(int fd, struct map_session_data *sd) {
+#ifdef HOTKEY_SAVING
+ unsigned short idx;
+ int cmd;
+
+ cmd = RFIFOW(fd, 0);
+ idx = RFIFOW(fd, packet_db[sd->packet_ver][cmd].pos[0]);
+ if (idx >= HOTKEY_SAVING) return;
+
+ sd->status.hotkeys[idx].type = RFIFOB(fd, packet_db[sd->packet_ver][cmd].pos[1]);
+ sd->status.hotkeys[idx].id = RFIFOL(fd, packet_db[sd->packet_ver][cmd].pos[2]);
+ sd->status.hotkeys[idx].lv = RFIFOW(fd, packet_db[sd->packet_ver][cmd].pos[3]);
+ return;
+#endif
+}
+
/*==========================================
*
*------------------------------------------*/
@@ -11705,7 +11738,7 @@ static int packetdb_readdb(void)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 0, 0, 0, 0, 0, 0,
//#0x02C0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -11843,13 +11876,13 @@ static int packetdb_readdb(void)
{clif_parse_FeelSaveOk,"feelsaveok"},
{clif_parse_AdoptRequest,"adopt"},
{clif_parse_debug,"debug"},
- //[blackhole89] //[orn]
{clif_parse_ChangeHomunculusName,"changehomunculusname"},
{clif_parse_HomMoveToMaster,"hommovetomaster"},
{clif_parse_HomMoveTo,"hommoveto"},
{clif_parse_HomAttack,"homattack"},
{clif_parse_HomMenu,"hommenu"},
{clif_parse_StoragePassword,"storagepassword"},
+ {clif_parse_Hotkey,"hotkey"},
{NULL,NULL}
};
diff --git a/src/map/clif.h b/src/map/clif.h
index 458dfd281..bb510b94a 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -144,6 +144,7 @@ void clif_soundeffect(struct map_session_data* sd, struct block_list* bl, const
int clif_soundeffectall(struct block_list* bl, const char *name, int type, enum send_target coverage);
void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, unsigned int tick);
void clif_parse_LoadEndAck(int fd,struct map_session_data *sd);
+void clif_hotkeys_send(struct map_session_data *sd);
// trade
int clif_traderequest(struct map_session_data* sd, const char* name);
diff --git a/src/map/party.c b/src/map/party.c
index 2427dab98..195e844cb 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -712,7 +712,7 @@ int party_exp_share(struct party_data* p, struct block_list* src, unsigned int b
// count the number of players eligible for exp sharing
for (i = c = 0; i < MAX_PARTY; i++) {
if( (sd[c] = p->data[i].sd) == NULL || sd[c]->bl.m != src->m || pc_isdead(sd[c]) ||
- battle_config.idle_no_share && (sd[c]->chatID || sd[c]->vender_id || sd[c]->idletime < last_tick - battle_config.idle_no_share) )
+ (battle_config.idle_no_share && (sd[c]->chatID || sd[c]->vender_id || sd[c]->idletime < last_tick - battle_config.idle_no_share)) )
continue;
c++;
}