소스 검색

Removed Renewal Drop Modifier out of #REMODE and created a #RE_DROP_MOD specially for it. will update wiki asap

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15375 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 13 년 전
부모
커밋
576d65655b
4개의 변경된 파일17개의 추가작업 그리고 5개의 파일을 삭제
  1. 8 0
      src/map/config/Renewal.h
  2. 2 2
      src/map/mob.c
  3. 5 3
      src/map/party.c
  4. 2 0
      src/map/party.h

+ 8 - 0
src/map/config/Renewal.h

@@ -29,6 +29,14 @@
  **/
 #define RECASTING 1
 
+/**
+ * Renewal Drop Rate Modifier
+ * @values: 1 (enabled) or 0 (disabled)
+ * - When enabled a modifier based on difference between the player and the monster level is applied,
+ * - based on the http://irowiki.org/wiki/Drop_System#Level_Factor table
+ **/
+#define RE_DROP_MOD 1
+
 /**
  * Renewal Cast Time : Variable-Free
  * - Value required for no variable cast time with stats.

+ 2 - 2
src/map/mob.c

@@ -2187,7 +2187,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 		struct item_drop *ditem;
 		struct item_data* it = NULL;
 		int drop_rate;
-#if REMODE
+#if RE_DROP_MOD
 		int drop_modifier = mvp_sd ? party_renewal_drop_mod(mvp_sd->status.base_level - md->level) :
 							second_sd ? party_renewal_drop_mod(second_sd->status.base_level - md->level) :
 							third_sd ? party_renewal_drop_mod(third_sd->status.base_level - md->level) : 100;
@@ -2233,7 +2233,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 			// Increase drop rate if user has SC_ITEMBOOST
 			if (sd && sd->sc.data[SC_ITEMBOOST]) // now rig the drop rate to never be over 90% unless it is originally >90%.
 				drop_rate = max(drop_rate,cap_value((int)(0.5+drop_rate*(sd->sc.data[SC_ITEMBOOST]->val1)/100.),0,9000));
-#if REMODE
+#if RE_DROP_MOD
 			if( drop_modifier != 100 )
 				drop_rate = drop_rate * drop_modifier / 100;
 #endif

+ 5 - 3
src/map/party.c

@@ -916,9 +916,9 @@ int party_send_xy_clear(struct party_data *p)
 	}
 	return 0;
 }
-#if REMODE
+#if RE_DROP_MOD
 /**
- * Renewal Drop Earning Modifier
+ * Renewal Drop Modifier
  **/
 int party_renewal_drop_mod(int diff) {
 	if( diff >= -10 && diff <= 5 )
@@ -934,9 +934,11 @@ int party_renewal_drop_mod(int diff) {
 		if( diff <= -10 && diff <= -14 )
 			return 75;//75%
 	}
-	//other chases: 50%
+	//other chances: 50%
 	return 50;
 }
+#endif
+#if REMODE
 /**
  * Renewal Experience Earning Mode
  **/

+ 2 - 0
src/map/party.h

@@ -94,6 +94,8 @@ bool party_booking_delete(struct map_session_data *sd);
 
 #if REMODE
 void party_renewal_exp_mod(unsigned int *base_exp, unsigned int *job_exp, int lvl, int moblvl);
+#endif
+#if RE_DROP_MOD
 int party_renewal_drop_mod(int diff);
 #endif