summaryrefslogtreecommitdiff
path: root/src/map/battleground.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/battleground.c')
-rw-r--r--src/map/battleground.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/map/battleground.c b/src/map/battleground.c
index 58e3b469c..13f62a042 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -52,7 +52,7 @@ int bg_team_delete(int bg_id)
continue;
bg_send_dot_remove(sd);
- sd->state.bg_id = 0;
+ sd->bg_id = 0;
}
idb_remove(bg_team_db, bg_id);
return 1;
@@ -70,7 +70,7 @@ int bg_team_warp(int bg_id, unsigned short mapindex, short x, short y)
int bg_send_dot_remove(struct map_session_data *sd)
{
- if( sd && sd->state.bg_id )
+ if( sd && sd->bg_id )
clif_bg_xy_remove(sd);
return 0;
}
@@ -81,12 +81,12 @@ int bg_team_join(int bg_id, struct map_session_data *sd)
struct battleground_data *bg = bg_team_search(bg_id);
struct map_session_data *pl_sd;
- if( bg == NULL || sd == NULL || sd->state.bg_id ) return 0;
+ if( bg == NULL || sd == NULL || sd->bg_id ) return 0;
ARR_FIND(0, MAX_BG_MEMBERS, i, bg->members[i].sd == NULL);
if( i == MAX_BG_MEMBERS ) return 0; // No free slots
- sd->state.bg_id = bg_id;
+ sd->bg_id = bg_id;
bg->members[i].sd = sd;
bg->members[i].x = sd->bl.x;
bg->members[i].y = sd->bl.y;
@@ -111,12 +111,12 @@ int bg_team_leave(struct map_session_data *sd, int flag)
struct battleground_data *bg;
char output[128];
- if( sd == NULL || !sd->state.bg_id )
+ if( sd == NULL || !sd->bg_id )
return 0;
bg_send_dot_remove(sd);
- bg_id = sd->state.bg_id;
- sd->state.bg_id = 0;
+ bg_id = sd->bg_id;
+ sd->bg_id = 0;
if( (bg = bg_team_search(bg_id)) == NULL )
return 0;
@@ -141,7 +141,7 @@ int bg_team_leave(struct map_session_data *sd, int flag)
int bg_member_respawn(struct map_session_data *sd)
{ // Respawn after killed
struct battleground_data *bg;
- if( sd == NULL || !pc_isdead(sd) || !sd->state.bg_id || (bg = bg_team_search(sd->state.bg_id)) == NULL )
+ if( sd == NULL || !pc_isdead(sd) || !sd->bg_id || (bg = bg_team_search(sd->bg_id)) == NULL )
return 0;
if( bg->mapindex == 0 )
return 0; // Respawn not handled by Core
@@ -177,26 +177,26 @@ int bg_team_get_id(struct block_list *bl)
switch( bl->type )
{
case BL_PC:
- return ((TBL_PC*)bl)->state.bg_id;
+ return ((TBL_PC*)bl)->bg_id;
case BL_PET:
if( ((TBL_PET*)bl)->msd )
- return ((TBL_PET*)bl)->msd->state.bg_id;
+ return ((TBL_PET*)bl)->msd->bg_id;
break;
case BL_MOB:
{
struct map_session_data *msd;
struct mob_data *md = (TBL_MOB*)bl;
if( md->special_state.ai && (msd = map_id2sd(md->master_id)) != NULL )
- return msd->state.bg_id;
- return md->state.bg_id;
+ return msd->bg_id;
+ return md->bg_id;
}
case BL_HOM:
if( ((TBL_HOM*)bl)->master )
- return ((TBL_HOM*)bl)->master->state.bg_id;
+ return ((TBL_HOM*)bl)->master->bg_id;
break;
case BL_MER:
if( ((TBL_MER*)bl)->master )
- return ((TBL_MER*)bl)->master->state.bg_id;
+ return ((TBL_MER*)bl)->master->bg_id;
break;
case BL_SKILL:
return ((TBL_SKILL*)bl)->group->bg_id;
@@ -210,7 +210,7 @@ int bg_send_message(struct map_session_data *sd, const char *mes, int len)
struct battleground_data *bg;
nullpo_ret(sd);
- if( sd->state.bg_id == 0 || (bg = bg_team_search(sd->state.bg_id)) == NULL )
+ if( sd->bg_id == 0 || (bg = bg_team_search(sd->bg_id)) == NULL )
return 0;
clif_bg_message(bg, sd->bl.id, sd->status.name, mes, len);
return 0;