瀏覽代碼

Correction to some status icons based on official information
- Added SI_S_LIFEPOTION and SI_L_LIFEPOTION and their corresponding new status changes to deal with the fact that Small_Life_Potion and Med_Life_Potion each use a different status icon.
- Left the duplicate SC_HPREGEN status in fof backwards compatibility, but removed its icon.
- Corrected the status icon id for SC_INCCRI from 292 to 295.
- Corrected the status icon id for SC_INCHEALRATE from 293 to 292.
- Added status icons for SC_INCFLEE2, SC_SPCOST_RATE and SC_COMMONSC_RESIST.
- Removed icon from SC_ARMOR_RESIST since officially it is a bonus, not a status, and thus doesn't (and can't) have an icon.
- Renamed the status icon name of SC_ELEMENTALCHANGE from SI_ARMOR_RESIST to SI_ARMOR_PROPERTY.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13698 54d463be-8e91-2dee-dedb-b68131a5f0ec

ultramage 16 年之前
父節點
當前提交
ff21daafa2
共有 4 個文件被更改,包括 42 次插入21 次删除
  1. 2 0
      db/const.txt
  2. 2 2
      db/item_db.txt
  3. 27 11
      src/map/status.c
  4. 11 8
      src/map/status.h

+ 2 - 0
db/const.txt

@@ -811,6 +811,8 @@ SC_DEFRATIOATK	286
 SC_HPDRAIN	287
 SC_SKILLATKBONUS	288
 SC_ITEMSCRIPT	289
+SC_S_LIFEPOTION	290
+SC_L_LIFEPOTION	291
 
 e_gasp	0
 e_what	1

+ 2 - 2
db/item_db.txt

@@ -4904,8 +4904,8 @@
 14531,Accuracy_30_Scroll,Concentration Power Scroll,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCHIT,1800000,30; },{},{}
 14532,Battle_Manual25,Field Manual 25%,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_EXPBOOST,1800000,25; },{},{}
 14533,Battle_Manual100,Field Manual 100%,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_EXPBOOST,1800000,100; },{},{}
-14534,Small_Life_Potion,Small Life Potion,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 320; sc_start4 SC_HPREGEN,600000,-5,5,0,0; },{},{}
-14535,Med_Life_Potion,Medium Life Potion,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 320; sc_start4 SC_HPREGEN,600000,-7,4,0,0; },{},{}
+14534,Small_Life_Potion,Small Life Potion,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 320; sc_start4 SC_S_LIFEPOTION,600000,-5,5,0,0; },{},{}
+14535,Med_Life_Potion,Medium Life Potion,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 320; sc_start4 SC_L_LIFEPOTION,600000,-7,4,0,0; },{},{}
 14536,Abrasive,Abrasive,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 182; sc_start SC_INCCRI,300000,30; },{},{}
 14537,Regeneration_Potion,Regeneration Potion,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 348; sc_start SC_INCHEALRATE,1800000,20; },{},{}
 14538,Glass_of_Illusion,Glass of Illusion,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 EF_STEAL; sc_start SC_INCFLEE2,60000,20; },{},{}

+ 27 - 11
src/map/status.c

@@ -193,7 +193,7 @@ void initChangeTables(void)
 	set_sc( MG_ENERGYCOAT        , SC_ENERGYCOAT      , SI_ENERGYCOAT      , SCB_NONE );
 	set_sc( NPC_EMOTION          , SC_MODECHANGE      , SI_BLANK           , SCB_MODE );
 	add_sc( NPC_EMOTION_ON       , SC_MODECHANGE      );
-	set_sc( NPC_ATTRICHANGE      , SC_ELEMENTALCHANGE , SI_ARMOR_RESIST    , SCB_DEF_ELE );
+	set_sc( NPC_ATTRICHANGE      , SC_ELEMENTALCHANGE , SI_ARMOR_PROPERTY  , SCB_DEF_ELE );
 	add_sc( NPC_CHANGEWATER      , SC_ELEMENTALCHANGE );
 	add_sc( NPC_CHANGEGROUND     , SC_ELEMENTALCHANGE );
 	add_sc( NPC_CHANGEFIRE       , SC_ELEMENTALCHANGE );
@@ -472,11 +472,12 @@ void initChangeTables(void)
 	StatusIconChangeTable[SC_DEF_RATE] = SI_DEF_RATE;
 	StatusIconChangeTable[SC_MDEF_RATE] = SI_MDEF_RATE;
 	StatusIconChangeTable[SC_INCCRI] = SI_INCCRI;
+	StatusIconChangeTable[SC_INCFLEE2] = SI_PLUSAVOIDVALUE;
 	StatusIconChangeTable[SC_INCHEALRATE] = SI_INCHEALRATE;
-	StatusIconChangeTable[SC_HPREGEN] = SI_HPREGEN;
-	StatusIconChangeTable[SC_SPCOST_RATE] = SI_SPCOST_RATE;
-	StatusIconChangeTable[SC_COMMONSC_RESIST] = SI_COMMONSC_RESIST;
-	StatusIconChangeTable[SC_ARMOR_RESIST] = SI_ARMOR_RESIST;
+	StatusIconChangeTable[SC_S_LIFEPOTION] = SI_S_LIFEPOTION;
+	StatusIconChangeTable[SC_L_LIFEPOTION] = SI_L_LIFEPOTION;
+	StatusIconChangeTable[SC_SPCOST_RATE] = SI_ATKER_BLOOD;
+	StatusIconChangeTable[SC_COMMONSC_RESIST] = SI_TARGET_BLOOD;
 	// Mercenary Bonus Effects
 	StatusIconChangeTable[SC_MERC_FLEEUP] = SI_MERC_FLEEUP;
 	StatusIconChangeTable[SC_MERC_ATKUP] = SI_MERC_ATKUP;
@@ -5123,6 +5124,8 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
 			case SC_HPREGEN:
 			case SC_HPDRAIN:
 			case SC_SPREGEN:
+			case SC_S_LIFEPOTION:
+			case SC_L_LIFEPOTION:
 			case SC_BOSSMAPINFO:
 			case SC_STUN:
 			case SC_SLEEP:
@@ -5454,6 +5457,8 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
 		case SC_HPREGEN:
 		case SC_HPDRAIN:
 		case SC_SPREGEN:
+		case SC_S_LIFEPOTION:
+		case SC_L_LIFEPOTION:
 			if( val1 == 0 ) return 0;
 			// val1 = heal percent/amout
 			// val2 = seconds between heals
@@ -7059,17 +7064,28 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr data)
 		break;
 
 	case SC_HPREGEN:
-	case SC_SPREGEN:
+	case SC_S_LIFEPOTION:
+	case SC_L_LIFEPOTION:
 		if( sd && --(sce->val4) >= 0 )
 		{
 			// val1 < 0 = per max% | val1 > 0 = exact amount
-			int hp = 0, sp = 0;
-			if( type == SC_HPREGEN && status->hp < status->max_hp )
+			int hp = 0;
+			if( status->hp < status->max_hp )
 				hp = (sce->val1 < 0) ? (int)(sd->status.max_hp * -1 * sce->val1 / 100.) : sce->val1 ;
-			else if( type == SC_SPREGEN && status->sp < status->max_sp )
-				sp = (sce->val1 < 0) ? (int)(sd->status.max_sp * -1 * sce->val1 / 100.) : sce->val1 ;
+			status_heal(bl, hp, 0, 2);
+			sc_timer_next((sce->val2 * 1000) + tick, status_change_timer, bl->id, data);
+			return 0;
+		}
+		break;
 
-			status_heal(bl, hp, sp, 2);
+	case SC_SPREGEN:
+		if( sd && --(sce->val4) >= 0 )
+		{
+			// val1 < 0 = per max% | val1 > 0 = exact amount
+			int sp = 0;
+			if( status->sp < status->max_sp )
+				sp = (sce->val1 < 0) ? (int)(sd->status.max_sp * -1 * sce->val1 / 100.) : sce->val1 ;
+			status_heal(bl, 0, sp, 2);
 			sc_timer_next((sce->val2 * 1000) + tick, status_change_timer, bl->id, data);
 			return 0;
 		}

+ 11 - 8
src/map/status.h

@@ -310,6 +310,8 @@ typedef enum sc_type {
 	SC_HPDRAIN,
 	SC_SKILLATKBONUS,
 	SC_ITEMSCRIPT,
+	SC_S_LIFEPOTION,
+	SC_L_LIFEPOTION,
 
 	SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
 } sc_type;
@@ -485,15 +487,16 @@ enum si_type {
 	SI_CRITICALWOUND	= 286,
 	SI_DEF_RATE		= 290,
 	SI_MDEF_RATE	= 291,
-	SI_INCCRI		= 292,
-	SI_INCHEALRATE	= 293,
-	SI_HPREGEN		= 294,
-	// 295 Sword ?
-	// 296 4 chars up ?
+
+	SI_INCHEALRATE	= 292,
+	SI_S_LIFEPOTION = 293,
+	SI_L_LIFEPOTION = 294,
+	SI_INCCRI		= 295,
+	SI_PLUSAVOIDVALUE = 296,
 	SI_SPCOST_RATE  = 298,
-	// 300 Stars ?
-	SI_COMMONSC_RESIST	= 301,
-	SI_ARMOR_RESIST	= 302,
+	SI_ATKER_BLOOD = 300,
+	SI_TARGET_BLOOD = 301,
+	SI_ARMOR_PROPERTY = 302,
 };
 
 // JOINTBEAT stackable ailments