diff options
author | Haru <haru@dotalux.com> | 2018-02-06 20:18:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-06 20:18:07 +0100 |
commit | 19c94017a31d86f7848085162ffb741770975128 (patch) | |
tree | 33a5cf4b2a580a07f1b3868153123fe4dce49f2f /src/map/map.c | |
parent | a928f009f5a7bad77eda090ec7af551c2f647d5b (diff) | |
parent | 587dd19c0269b3c8089838a5442260a185b19ead (diff) | |
download | hercules-19c94017a31d86f7848085162ffb741770975128.tar.gz hercules-19c94017a31d86f7848085162ffb741770975128.tar.bz2 hercules-19c94017a31d86f7848085162ffb741770975128.tar.xz hercules-19c94017a31d86f7848085162ffb741770975128.zip |
Merge pull request #1718 from Murilo-BiO/clan_system
Implementation of Official Clan System
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/map/map.c b/src/map/map.c index 306f3a99d..106224a47 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -30,6 +30,7 @@ #include "map/channel.h" #include "map/chat.h" #include "map/chrif.h" +#include "map/clan.h" #include "map/clif.h" #include "map/duel.h" #include "map/elemental.h" @@ -1904,6 +1905,9 @@ int map_quit(struct map_session_data *sd) { if( sd->bg_id && !sd->bg_queue.arena ) /* TODO: dump this chunk after bg_queue is fully enabled */ bg->team_leave(sd,BGTL_QUIT); + if (sd->status.clan_id) + clan->member_offline(sd); + if (sd->state.autotrade && core->runflag != MAPSERVER_ST_SHUTDOWN && !channel->config->closing) pc->autotrade_update(sd,PAUC_REMOVE); @@ -4815,6 +4819,15 @@ bool map_zone_mf_cache(int m, char *flag, char *params) { else if( map->list[m].flag.battleground ) map_zone_mf_cache_add(m,"battleground"); } + } else if (!strcmpi(flag,"cvc")) { + if (state && map->list[m].flag.cvc) { + ;/* nothing to do */ + } else { + if (state) + map_zone_mf_cache_add(m,"cvc\toff"); + else if (map->list[m].flag.cvc) + map_zone_mf_cache_add(m,"cvc"); + } } else if (!strcmpi(flag,"noexppenalty")) { if( state && map->list[m].flag.noexppenalty ) ;/* nothing to do */ @@ -5839,6 +5852,8 @@ void read_map_zone_db(void) { zone->merge_type = MZMT_MERGEABLE; if( (zone = strdb_get(map->zone_db, MAP_ZONE_BG_NAME)) ) zone->merge_type = MZMT_MERGEABLE; + if ((zone = strdb_get(map->zone_db, MAP_ZONE_CVC_NAME))) + zone->merge_type = MZMT_MERGEABLE; } /* not supposed to go in here but in skill_final whatever */ libconfig->destroy(&map_zone_db); @@ -5999,6 +6014,7 @@ int do_final(void) { ircbot->final();/* before channel. */ channel->final(); chrif->final(); + clan->final(); clif->final(); npc->final(); quest->final(); @@ -6185,6 +6201,7 @@ void map_load_defaults(void) { battleground_defaults(); buyingstore_defaults(); channel_defaults(); + clan_defaults(); clif_defaults(); chrif_defaults(); guild_defaults(); @@ -6517,6 +6534,7 @@ int do_init(int argc, char *argv[]) ircbot->init(minimal); script->init(minimal); itemdb->init(minimal); + clan->init(minimal); skill->init(minimal); if (!minimal) map->read_zone_db();/* read after item and skill initialization */ |