summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-04-16 12:18:24 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-04-16 12:18:24 +0000
commiteae90264e5ec4170f716cdf6eed706d3d784233e (patch)
tree33d56947c216ad4e105707592faedd2e826e9e74 /src/map/pc.c
parentde678dc8a2d4450a91f9b4c2a205b294a8b678eb (diff)
downloadhercules-eae90264e5ec4170f716cdf6eed706d3d784233e.tar.gz
hercules-eae90264e5ec4170f716cdf6eed706d3d784233e.tar.bz2
hercules-eae90264e5ec4170f716cdf6eed706d3d784233e.tar.xz
hercules-eae90264e5ec4170f716cdf6eed706d3d784233e.zip
* Some cleanups related to player and monster states.
- Moved user_font and bg_id out of states as they are data, not states. - Reordered members of state structs so that bitfields are packed together (less memory gets wasted). - Other insignificant code tweaks. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14795 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index a63bd4d87..4cfec2de8 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5580,7 +5580,7 @@ void pc_respawn(struct map_session_data* sd, clr_type clrtype)
{
if( !pc_isdead(sd) )
return; // not applicable
- if( sd->state.bg_id && bg_member_respawn(sd) )
+ if( sd->bg_id && bg_member_respawn(sd) )
return; // member revived by battleground
pc_setstand(sd);
@@ -5671,10 +5671,10 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
pc_setglobalreg(sd,"PC_DIE_COUNTER",sd->die_counter+1);
pc_setparam(sd, SP_KILLERRID, src?src->id:0);
- if( sd->state.bg_id )
+ if( sd->bg_id )
{
struct battleground_data *bg;
- if( (bg = bg_team_search(sd->state.bg_id)) != NULL && bg->die_event[0] )
+ if( (bg = bg_team_search(sd->bg_id)) != NULL && bg->die_event[0] )
npc_event(sd, bg->die_event, 0);
}
npc_script_event(sd,NPCE_DIE);
@@ -5918,9 +5918,9 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
add_timer(tick+1000, pc_respawn_timer, sd->bl.id, 0);
return 1|8;
}
- else if( sd->state.bg_id )
+ else if( sd->bg_id )
{
- struct battleground_data *bg = bg_team_search(sd->state.bg_id);
+ struct battleground_data *bg = bg_team_search(sd->bg_id);
if( bg && bg->mapindex > 0 )
{ // Respawn by BG
add_timer(tick+1000, pc_respawn_timer, sd->bl.id, 0);