Revert 407fd01. I should not work at midnight...
Sorry guys, Fixes #1359
This commit is contained in:
parent
407fd01d4e
commit
f61535b819
@ -952,15 +952,34 @@ void do_reload_instance(void)
|
|||||||
if(sd && map[sd->bl.m].instance_id) {
|
if(sd && map[sd->bl.m].instance_id) {
|
||||||
struct party_data *p = NULL;
|
struct party_data *p = NULL;
|
||||||
struct guild *g = NULL;
|
struct guild *g = NULL;
|
||||||
|
unsigned short instance_id;
|
||||||
|
|
||||||
if (instance_data[map[sd->bl.m].instance_id].mode == IM_PARTY && (!(p = party_search(sd->status.party_id)) || p->instance_id != map[sd->bl.m].instance_id)) // Someone not in party is on instance map
|
im = &instance_data[map[sd->bl.m].instance_id];
|
||||||
continue;
|
switch (im->mode) {
|
||||||
if (instance_data[map[sd->bl.m].instance_id].mode == IM_GUILD && (!(g = guild_search(sd->status.guild_id)) || g->instance_id != map[sd->bl.m].instance_id)) // Someone not in guild is on instance map
|
case IM_NONE:
|
||||||
continue;
|
continue;
|
||||||
im = &instance_data[p->instance_id];
|
case IM_CHAR:
|
||||||
if((db = instance_searchtype_db(im->type)) != NULL && !instance_enter(sd, i, StringBuf_Value(db->name))) { // All good
|
if (sd->instance_id != map[sd->bl.m].instance_id) // Someone who is not instance owner is on instance map
|
||||||
|
continue;
|
||||||
|
instance_id = sd->instance_id;
|
||||||
|
break;
|
||||||
|
case IM_PARTY:
|
||||||
|
if ((!(p = party_search(sd->status.party_id)) || p->instance_id != map[sd->bl.m].instance_id)) // Someone not in party is on instance map
|
||||||
|
continue;
|
||||||
|
instance_id = p->instance_id;
|
||||||
|
break;
|
||||||
|
case IM_GUILD:
|
||||||
|
if (!(g = guild_search(sd->status.guild_id)) || g->instance_id != map[sd->bl.m].instance_id) // Someone not in guild is on instance map
|
||||||
|
continue;
|
||||||
|
instance_id = g->instance_id;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ShowError("do_reload_instance: Unexpected instance mode for instance %s(id=%u, mode=%u).\n", StringBuf_Value(db->name), map[sd->bl.m].instance_id, (unsigned short)im->mode);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if((db = instance_searchtype_db(im->type)) != NULL && !instance_enter(sd, instance_id, StringBuf_Value(db->name))) { // All good
|
||||||
clif_displaymessage(sd->fd, msg_txt(sd,515)); // Instance has been reloaded
|
clif_displaymessage(sd->fd, msg_txt(sd,515)); // Instance has been reloaded
|
||||||
instance_reqinfo(sd,p->instance_id);
|
instance_reqinfo(sd,instance_id);
|
||||||
} else // Something went wrong
|
} else // Something went wrong
|
||||||
ShowError("do_reload_instance: Error setting character at instance start: character_id=%d instance=%s.\n",sd->status.char_id,StringBuf_Value(db->name));
|
ShowError("do_reload_instance: Error setting character at instance start: character_id=%d instance=%s.\n",sd->status.char_id,StringBuf_Value(db->name));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user