summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-09-28 12:49:34 -0300
committershennetsind <ind@henn.et>2013-09-28 12:49:34 -0300
commite4b0f270ad0fabab869c1a803fa8e4a73f198760 (patch)
tree45f5f5f40e85f2d10e20ca55f6148accfe954a33 /src/map/pc.c
parent3c006ce2b772ae0dffc5fccaee6e547bf0423565 (diff)
downloadhercules-e4b0f270ad0fabab869c1a803fa8e4a73f198760.tar.gz
hercules-e4b0f270ad0fabab869c1a803fa8e4a73f198760.tar.bz2
hercules-e4b0f270ad0fabab869c1a803fa8e4a73f198760.tar.xz
hercules-e4b0f270ad0fabab869c1a803fa8e4a73f198760.zip
HPM: Instance.c Completed
Moved missing vars and declarations of interest into the interface. Instance data now available to plugins via instance->list (struct instance_data array) Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index d11eb7e75..e89ecb80a 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4791,13 +4791,13 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
if( sd->instances ) {
for( i = 0; i < sd->instances; i++ ) {
if( sd->instance[i] >= 0 ) {
- ARR_FIND(0, instances[sd->instance[i]].num_map, j, maplist[instances[sd->instance[i]].map[j]].instance_src_map == m && !maplist[instances[sd->instance[i]].map[j]].custom_name);
- if( j != instances[sd->instance[i]].num_map )
+ ARR_FIND(0, instance->list[sd->instance[i]].num_map, j, maplist[instance->list[sd->instance[i]].map[j]].instance_src_map == m && !maplist[instance->list[sd->instance[i]].map[j]].custom_name);
+ if( j != instance->list[sd->instance[i]].num_map )
break;
}
}
if( i != sd->instances ) {
- m = instances[sd->instance[i]].map[j];
+ m = instance->list[sd->instance[i]].map[j];
mapindex = map_id2index(m);
stop = true;
}
@@ -4805,13 +4805,13 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
if ( !stop && sd->status.party_id && (p = party->search(sd->status.party_id)) && p->instances ) {
for( i = 0; i < p->instances; i++ ) {
if( p->instance[i] >= 0 ) {
- ARR_FIND(0, instances[p->instance[i]].num_map, j, maplist[instances[p->instance[i]].map[j]].instance_src_map == m && !maplist[instances[p->instance[i]].map[j]].custom_name);
- if( j != instances[p->instance[i]].num_map )
+ ARR_FIND(0, instance->list[p->instance[i]].num_map, j, maplist[instance->list[p->instance[i]].map[j]].instance_src_map == m && !maplist[instance->list[p->instance[i]].map[j]].custom_name);
+ if( j != instance->list[p->instance[i]].num_map )
break;
}
}
if( i != p->instances ) {
- m = instances[p->instance[i]].map[j];
+ m = instance->list[p->instance[i]].map[j];
mapindex = map_id2index(m);
stop = true;
}
@@ -4819,13 +4819,13 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
if ( !stop && sd->status.guild_id && sd->guild && sd->guild->instances ) {
for( i = 0; i < sd->guild->instances; i++ ) {
if( sd->guild->instance[i] >= 0 ) {
- ARR_FIND(0, instances[sd->guild->instance[i]].num_map, j, maplist[instances[sd->guild->instance[i]].map[j]].instance_src_map == m && !maplist[instances[sd->guild->instance[i]].map[j]].custom_name);
- if( j != instances[sd->guild->instance[i]].num_map )
+ ARR_FIND(0, instance->list[sd->guild->instance[i]].num_map, j, maplist[instance->list[sd->guild->instance[i]].map[j]].instance_src_map == m && !maplist[instance->list[sd->guild->instance[i]].map[j]].custom_name);
+ if( j != instance->list[sd->guild->instance[i]].num_map )
break;
}
}
if( i != sd->guild->instances ) {
- m = instances[sd->guild->instance[i]].map[j];
+ m = instance->list[sd->guild->instance[i]].map[j];
mapindex = map_id2index(m);
stop = true;
}