瀏覽代碼

Follow up to ec9c2b2
* hp display 50% by client, for novice class when dead

icxbb-xx 9 年之前
父節點
當前提交
54136ddfca
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      src/map/clif.c

+ 2 - 4
src/map/clif.c

@@ -3135,10 +3135,8 @@ void clif_updatestatus(struct map_session_data *sd,int type)
 		break;
 	case SP_HP:
 		// On officials the HP never go below 1, even if you die [Lemongrass]
-		if( (sd->class_&MAPID_UPPERMASK) != MAPID_NOVICE )
-			WFIFOL(fd,4)=max(1,sd->battle_status.hp);
-		else
-			WFIFOL(fd,4)=max((sd->battle_status.max_hp/2),sd->battle_status.hp);
+		// On officials the HP Novice class never go below 50%, even if you die [Napster]
+		WFIFOL(fd,4)= sd->battle_status.hp ? sd->battle_status.hp : (sd->class_&MAPID_UPPERMASK) != MAPID_NOVICE ? 1 : sd->battle_status.max_hp/2;
 
 		// TODO: Won't these overwrite the current packet?
 		if( map[sd->bl.m].hpmeter_visible )