Selaa lähdekoodia

- Changed the night status from 149 to 160, which seems to work so much better, and also enabled simplifying the night code. The previous code was there left commented in case it's needed again.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9699 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 18 vuotta sitten
vanhempi
commit
985abe3b02
3 muutettua tiedostoa jossa 18 lisäystä ja 4 poistoa
  1. 2 0
      Changelog-Trunk.txt
  2. 15 2
      src/map/clif.c
  3. 1 2
      src/map/status.h

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2007/01/23
+	* Changed the night status from 149 to 160, which seems to work so much
+	  better, and also enabled simplifying the night code.
 	* A skill's walk delay will also delay your can-attack time when the skill
 	  connects, since this is the behaviour of Sonic Blows as described by
 	  Tharis.

+ 15 - 2
src/map/clif.c

@@ -8328,10 +8328,16 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
 		if(merc_is_hom_active(sd->hd))
 			merc_hom_init_timers(sd->hd);
 
-		//Delayed night effect on log-on fix for the glow-issue. Thanks to Larry.
 		if (night_flag && map[sd->bl.m].flag.nightenabled)
+#if 0
+			//Delayed night effect on log-on fix for the glow-issue. Thanks to Larry.
 			add_timer(gettick()+1000,clif_nighttimer,sd->bl.id,0);
-
+#else
+		{
+			sd->state.night = 1;
+			clif_status_load(&sd->bl, SI_NIGHT, 1);
+		}
+#endif
 		// Notify everyone that this char logged in [Skotlex].
 		clif_foreachclient(clif_friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 1);
 
@@ -8351,11 +8357,18 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
 		//New 'night' effect by dynamix [Skotlex]
 		if (night_flag && map[sd->bl.m].flag.nightenabled)
 		{	//Display night.
+#if 0
 			if (sd->state.night) //It must be resent because otherwise players get this annoying aura...
 				clif_status_load(&sd->bl, SI_NIGHT, 0);
 			else
 				sd->state.night = 1;
 			clif_status_load(&sd->bl, SI_NIGHT, 1);
+#else
+			if (!sd->state.night) {
+				sd->state.night = 1;
+				clif_status_load(&sd->bl, SI_NIGHT, 1);
+			}
+#endif
 		} else if (sd->state.night) { //Clear night display.
 			sd->state.night = 0;
 			clif_status_load(&sd->bl, SI_NIGHT, 0);

+ 1 - 2
src/map/status.h

@@ -366,7 +366,6 @@ enum {
 	SI_SHADOWWEAPON		= 146,
 	SI_ADRENALINE2		= 147,
 	SI_GHOSTWEAPON		= 148,
-	SI_NIGHT		= 149,
 	SI_SPIRIT		= 149,
 	SI_DEVIL		= 152,
 	SI_KAITE		= 153,
@@ -374,7 +373,7 @@ enum {
 	SI_KAAHI		= 157,
 	SI_KAUPE		= 158,
 	SI_SMA		= 159,
-// 160
+	SI_NIGHT		= 160,
 	SI_ONEHAND		= 161,
 	SI_WARM			= 165,	
 //	166 | The three show the exact same display: ultra red character (165, 166, 167)