Sfoglia il codice sorgente

Corrected status_display_add val1, val2, val3
Corrected the docs

Atemo 1 anno fa
parent
commit
da034f11d9
2 ha cambiato i file con 6 aggiunte e 4 eliminazioni
  1. 3 3
      doc/status.txt
  2. 3 1
      src/map/status.cpp

+ 3 - 3
doc/status.txt

@@ -211,9 +211,9 @@ Flags: Various status flags for specific status change events.
 	MobLoseTarget         - When active on a monster it will lose the target.
 	RestartOnMapWarp      - Restarts the timer of a status when warping to another map.
 	SpreadEffect          - Passes the status onto a target when SC_DEADLYINFECT is active.
-	SendVal1              - Whether val1 must be saved for DisplayPc, DisplayNpc, DisplayMob. If false, the value is ignored when the status is displayed again.
-	SendVal2              - Whether val2 must be saved for DisplayPc, DisplayNpc, DisplayMob. If false, the value is ignored when the status is displayed again.
-	SendVal3              - Whether val3 must be saved for DisplayPc, DisplayNpc, DisplayMob. If false, the value is ignored when the status is displayed again.
+	SendVal1              - Whether val1 shoudn't be ignored.
+	SendVal2              - Whether val2 shoudn't be ignored.
+	SendVal3              - Whether val3 shoudn't be ignored.
 
 	NoClearbuff           - Cannot be removed by 'status_change_clear_buffs()', 'sc_end SC_ALL', 'status_change_clear(3)', etc.
 	NoForcedEnd           - Cannot be removed by sc_end.

+ 3 - 1
src/map/status.cpp

@@ -12794,7 +12794,9 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 
 	// Save sc to display it again later
 	if (scdb->flag[SCF_DISPLAYPC] && bl->type == BL_PC || scdb->flag[SCF_DISPLAYNPC] && bl->type == BL_NPC || scdb->flag[SCF_DISPLAYMOB] && bl->type == BL_MOB) {
-		int dval1 = 0, dval2 = 0, dval3 = 0;
+		int dval1 = scdb->flag[SCF_SENDVAL1] ? val1 : 0;
+		int dval2 = scdb->flag[SCF_SENDVAL2] ? val2 : 0;
+		int dval3 = scdb->flag[SCF_SENDVAL3] ? val3 : 0;
 
 		switch (type) {
 			case SC_ALL_RIDING: