summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatheus Macabu <mkbu95@gmail.com>2013-06-15 17:23:31 -0300
committerMatheus Macabu <mkbu95@gmail.com>2013-06-15 17:23:31 -0300
commit8568f179f5cefa638d564b75119235bac4b9a3b3 (patch)
tree1bd5516f7dd21e5907f2d75ff4781bea0ad649f1
parent9055b9c84bb915cbf29207484fef80550a88bf74 (diff)
downloadhercules-8568f179f5cefa638d564b75119235bac4b9a3b3.tar.gz
hercules-8568f179f5cefa638d564b75119235bac4b9a3b3.tar.bz2
hercules-8568f179f5cefa638d564b75119235bac4b9a3b3.tar.xz
hercules-8568f179f5cefa638d564b75119235bac4b9a3b3.zip
Sending whisper to a player from an admin account (group 99 [is this right?]) will display the message as a self announce to player. (done a todo)
Also added trade interface properly for HPM, forgot that. Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
-rw-r--r--src/map/clif.c5
-rw-r--r--src/map/map.c2
-rw-r--r--src/map/trade.h2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index e8de09d70..a752f1bc1 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -5964,12 +5964,13 @@ void clif_wis_message(int fd, const char* nick, const char* mes, int mes_len)
safestrncpy((char*)WFIFOP(fd,28), mes, mes_len);
WFIFOSET(fd,WFIFOW(fd,2));
#else
+ struct map_session_data *ssd = iMap->nick2sd(nick);
+
WFIFOHEAD(fd, mes_len + NAME_LENGTH + 8);
WFIFOW(fd,0) = 0x97;
WFIFOW(fd,2) = mes_len + NAME_LENGTH + 8;
safestrncpy((char*)WFIFOP(fd,4), nick, NAME_LENGTH);
- WFIFOL(fd,28) = 0; // isAdmin; if nonzero, also displays text above char
- // TODO: WFIFOL(fd,28) = pc->get_group_level(ssd);
+ WFIFOL(fd,28) = (pc->get_group_level(ssd) == 99) ? 1 : 0; // isAdmin; if nonzero, also displays text above char
safestrncpy((char*)WFIFOP(fd,32), mes, mes_len);
WFIFOSET(fd,WFIFOW(fd,2));
#endif
diff --git a/src/map/map.c b/src/map/map.c
index d74263d1a..5f86286e9 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -5246,6 +5246,7 @@ void map_hp_symbols(void) {
HPM->share(vending,"vending");
HPM->share(pc,"pc");
HPM->share(party,"party");
+ HPM->share(trade,"trade");
HPM->share(iMap,"iMap");
/* partial */
HPM->share(mapit,"mapit");
@@ -5278,6 +5279,7 @@ void load_defaults(void) {
vending_defaults();
pc_defaults();
party_defaults();
+ trade_defaults();
}
int do_init(int argc, char *argv[])
{
diff --git a/src/map/trade.h b/src/map/trade.h
index 6bcefdb96..f66c70525 100644
--- a/src/map/trade.h
+++ b/src/map/trade.h
@@ -20,6 +20,6 @@ struct trade_interface {
} trade_s;
struct trade_interface *trade;
-void trade_interface(void);
+void trade_defaults(void);
#endif /* _TRADE_H_ */