summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-12-14 19:03:48 +0100
committerHaru <haru@dotalux.com>2015-12-28 18:35:58 +0100
commit943daa9da6610bd900aee9134951561e8e663a93 (patch)
treef3d20df4bb9d4cab8225ef59378b10e116ba6b47 /src/map/mob.c
parent296e6c04a4c1a01a233c937bd198a31fa849f49c (diff)
downloadhercules-943daa9da6610bd900aee9134951561e8e663a93.tar.gz
hercules-943daa9da6610bd900aee9134951561e8e663a93.tar.bz2
hercules-943daa9da6610bd900aee9134951561e8e663a93.tar.xz
hercules-943daa9da6610bd900aee9134951561e8e663a93.zip
Standardized (source) mob_id enum
- MOBID_ constant names now follow the Mob DB spritenames. - The following names were changed: * MOBID_EMPERIUM => MOBID_EMPELIUM * MOBID_TREAS01 => MOBID_TREASURE_BOX1 * MOBID_TREAS40 => MOBID_TREASURE_BOX40 * MOBID_BARRICADE1 => MOBID_BARRICADE * MOBID_BARRICADE2 => MOBID_BARRICADE_ * MOBID_GUARIDAN_STONE1 => MOBID_S_EMPEL_1 * MOBID_GUARIDAN_STONE2 => MOBID_S_EMPEL_2 * MOBID_FOOD_STOR => MOBID_OBJ_A * MOBID_BLUE_CRYST => MOBID_OBJ_A2 * MOBID_PINK_CRYST => MOBID_OBJ_B2 * MOBID_TREAS41 => MOBID_TREASURE_BOX41 * MOBID_TREAS49 => MOBID_TREASURE_BOX49 - Added several missing items Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index d8fefa61a..5950758a0 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -495,7 +495,7 @@ int mob_once_spawn(struct map_session_data* sd, int16 m, int16 x, int16 y, const
if (!md)
continue;
- if ( class_ == MOBID_EMPERIUM && !no_guardian_data ) {
+ if (class_ == MOBID_EMPELIUM && !no_guardian_data) {
struct guild_castle* gc = guild->mapindex2gc(map_id2index(m));
struct guild* g = (gc) ? guild->search(gc->guild_id) : NULL;
if( gc ) {
@@ -603,7 +603,7 @@ int mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) {
if( g == NULL ) { //Liberate castle, if the guild is not found this is an error! [Skotlex]
ShowError("mob_spawn_guardian_sub: Couldn't load guild %d!\n", (int)data);
//Not sure this is the best way, but otherwise we'd be invoking this for ALL guardians spawned later on.
- if( md->class_ == MOBID_EMPERIUM && md->guardian_data ) {
+ if (md->class_ == MOBID_EMPELIUM && md->guardian_data) {
md->guardian_data->g = NULL;
if( md->guardian_data->castle->guild_id ) {//Free castle up.
ShowNotice("Clearing ownership of castle %d (%s)\n", md->guardian_data->castle->castle_id, md->guardian_data->castle->castle_name);
@@ -2572,7 +2572,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
logs->mvpdrop(mvp_sd, md->class_, log_mvp);
}
- if (type&2 && !sd && md->class_ == MOBID_EMPERIUM && md->guardian_data) {
+ if (type&2 && !sd && md->class_ == MOBID_EMPELIUM && md->guardian_data) {
//Emperium destroyed by script. Discard mvp character. [Skotlex]
mvp_sd = NULL;
}
@@ -2697,9 +2697,10 @@ int mob_guardian_guildchange(struct mob_data *md)
if (md->guardian_data->castle->guild_id == 0) {
//Castle with no owner? Delete the guardians.
- if( md->class_ == MOBID_EMPERIUM ) //But don't delete the emperium, just clear it's guild-data
+ if (md->class_ == MOBID_EMPELIUM) {
+ //But don't delete the emperium, just clear it's guild-data
md->guardian_data->g = NULL;
- else {
+ } else {
if (md->guardian_data->number >= 0 && md->guardian_data->number < MAX_GUARDIANS && md->guardian_data->castle->guardian[md->guardian_data->number].visible)
guild->castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number, 0);
unit->free(&md->bl,CLR_OUTSIGHT); //Remove guardian.