summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorMurilo Pereti Tavares <murilopereti@gmail.com>2018-01-25 01:15:08 -0200
committerMurilo Pereti Tavares <murilopereti@gmail.com>2018-01-25 01:15:08 -0200
commitfc1684c82d92de81e5688e33a8386cde3c2407db (patch)
treecb6af3fd8e9f940cc4cb9f2181e78c2dc751d203 /src/map/status.c
parent33982166de006d777aa2d95a9d95b2778db1c65a (diff)
downloadhercules-fc1684c82d92de81e5688e33a8386cde3c2407db.tar.gz
hercules-fc1684c82d92de81e5688e33a8386cde3c2407db.tar.bz2
hercules-fc1684c82d92de81e5688e33a8386cde3c2407db.tar.xz
hercules-fc1684c82d92de81e5688e33a8386cde3c2407db.zip
Implementation of Official Clan System
All official features work including the autokick for inactive members And the system is completely customizable.
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 9e578bc12..3bb511970 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -25,6 +25,7 @@
#include "map/battle.h"
#include "map/chrif.h"
+#include "map/clan.h"
#include "map/clif.h"
#include "map/elemental.h"
#include "map/guild.h"
@@ -1019,6 +1020,9 @@ void initChangeTables(void)
// Summoner
status->dbs->IconChangeTable[SC_SPRITEMABLE] = SI_SPRITEMABLE;
+ // Clan System
+ status->dbs->IconChangeTable[SC_CLAN_INFO] = SI_CLAN_INFO;
+
// RoDEX
status->dbs->IconChangeTable[SC_DAILYSENDMAILCNT] = SI_DAILYSENDMAILCNT;
@@ -1181,6 +1185,9 @@ void initChangeTables(void)
status->dbs->ChangeFlagTable[SC_MVPCARD_ORCHERO] |= SCB_ALL;
status->dbs->ChangeFlagTable[SC_MVPCARD_ORCLORD] |= SCB_ALL;
+ // Clan System
+ status->dbs->ChangeFlagTable[SC_CLAN_INFO] |= SCB_NONE;
+
// Costumes
status->dbs->ChangeFlagTable[SC_DRESS_UP] |= SCB_NONE;
status->dbs->ChangeFlagTable[SC_MOONSTAR] |= SCB_NONE;
@@ -2685,6 +2692,12 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
status->current_equip_option_index = -1;
status->current_equip_item_index = -1;
+ // Clan Buffs
+ if (sd->status.clan_id > 0) {
+ struct clan *c = clan->search(sd->status.clan_id);
+ clan->buff_start(sd, c);
+ }
+
status->calc_pc_additional(sd, opt);
if( sd->pd ) { // Pet Bonus
@@ -9726,6 +9739,11 @@ void status_change_start_display(struct map_session_data *sd, enum sc_type type,
case SC_ALL_RIDING:
dval1 = 1;
break;
+ case SC_CLAN_INFO:
+ dval1 = val1;
+ dval2 = val2;
+ dval3 = val3;
+ break;
default: /* all others: just copy val1 */
dval1 = val1;
break;
@@ -9745,6 +9763,9 @@ int status_get_val_flag(enum sc_type type)
{
int val_flag = 0;
switch (type) {
+ case SC_CLAN_INFO:
+ val_flag |= 1 | 2;
+ break;
case SC_FIGHTINGSPIRIT:
val_flag |= 1 | 2;
break;