summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/npc.c5
-rw-r--r--src/map/script.c7
-rw-r--r--src/map/script.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 75aab5550..23a3b3d84 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -209,13 +209,12 @@ int npc_enable(const char* name, int flag)
nd->option&=~OPTION_HIDE;
else if (flag&4)
nd->option|= OPTION_HIDE;
- else { //Can't change the view_data to invisible class because the view_data for all npcs is shared! [Skotlex]
+ else { //Can't change the view_data to invisible class because the view_data for all npcs is shared! [Skotlex]
nd->option|= OPTION_INVISIBLE;
clif->clearunit_area(&nd->bl,CLR_OUTSIGHT); // Hack to trick maya purple card [Xazax]
}
- if (nd->class_ == WARP_CLASS || nd->class_ == FLAG_CLASS)
- { //Client won't display option changes for these classes [Toms]
+ if (nd->class_ == WARP_CLASS || nd->class_ == FLAG_CLASS) { //Client won't display option changes for these classes [Toms]
if (nd->option&(OPTION_HIDE|OPTION_INVISIBLE))
clif->clearunit_area(&nd->bl, CLR_OUTSIGHT);
else
diff --git a/src/map/script.c b/src/map/script.c
index 019b17cff..79199858a 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -2278,10 +2278,9 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
/// Returns the player attached to this script, identified by the rid.
/// If there is no player attached, the script is terminated.
-TBL_PC *script_rid2sd(struct script_state *st)
-{
- TBL_PC *sd=map_id2sd(st->rid);
- if(!sd){
+TBL_PC *script_rid2sd(struct script_state *st) {
+ TBL_PC *sd;
+ if( !( sd = map_id2sd(st->rid) ) ){
ShowError("script_rid2sd: fatal error ! player not attached!\n");
script_reportfunc(st);
script_reportsrc(st);
diff --git a/src/map/script.h b/src/map/script.h
index 70ced5d43..83d6dd9ee 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -214,6 +214,8 @@ int script_reload(void);
// @commands (script based)
void setd_sub(struct script_state *st, struct map_session_data *sd, const char *varname, int elem, void *value, struct DBMap **ref);
+TBL_PC *script_rid2sd(struct script_state *st);
+
///////////////////////////////////////////////////////////////////////////////
//## TODO possible enhancements: [FlavioJS]
// - 'callfunc' supporting labels in the current npc "::LabelName"