summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
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.