Просмотр исходного кода

* Added SC_EXPBOOST (Field Manual), SC_ITEMBOOST (Bubble Gum) to const.txt. Allready working.
- Added SC_LIFEINSURANCE and SC_BOSSMAPINFO to const.txt. (not implemented but i will work on it)
- Updated Field Manual and Bubble Gum in the itemdb.txt file.
- As L0ne Wolf reported to me and based on Doddler information, the Bubble Gum only do a second try of the item drop, and it don't increase the drop rates.

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

zephyrus 17 лет назад
Родитель
Сommit
4026ba7ec1
9 измененных файлов с 36 добавлено и 32 удалено
  1. 6 0
      Changelog-Trunk.txt
  2. 4 2
      db/Changelog.txt
  3. 4 2
      db/const.txt
  4. 2 2
      db/item_db.txt
  5. 7 3
      src/map/mob.c
  6. 2 2
      src/map/pc.c
  7. 1 1
      src/map/skill.c
  8. 5 17
      src/map/status.c
  9. 5 3
      src/map/status.h

+ 6 - 0
Changelog-Trunk.txt

@@ -4,6 +4,12 @@ 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/10/04
+	* Added SC_EXPBOOST (Field Manual), SC_ITEMBOOST (Bubble Gum) to const.txt.
+	  Allready working [Zephyrus]
+	- Added SC_LIFEINSURANCE and SC_BOSSMAPINFO (not implemented)
+	- Updated Field Manual and Bubble Gum in the itemdb.txt file.
+	- As L0ne Wolf reported to me and based on Doddler information, the Bubble Gum
+	  only do a second try of the item drop, and it don't increase the drop rates.
 	* Added code that compacts the vending list after a purchase; fixes
 	  the problem with empty positions appearing in the list (bugreport:168)
 	* Corrected Icewall skill to be closer to official behavior

+ 4 - 2
db/Changelog.txt

@@ -13,8 +13,6 @@
 
 	Missing Effects:
 	12209 Life_Insurrance:		No EXP penalty on death (Recommend constant: SC_NoPenelty - Has status icon)
-	12208 Field_Manual:		Increased EXP rate (Recommend constant: SC_IncreasedEXP - Has status icon)
-	12210 Bubble_Gum:		Increased Drop rate (Recommend constant: SC_IncreasedDropRate - Has status icon)
 	12214 Convex_Mirror:		Detect MVP spawn on minimap; doesn't work with special condition MVPs. (Recommend constant: SC_DetectMVPSpawn)
 	7621 Token_of_Ziegfried:	Give player the option to revive after death, through the "Respawn/Exit" menu.
 
@@ -37,6 +35,10 @@
 	13034 Desert_Twilight		Small chance to activate max Attack Speed for 7 seconds.
 
 =======================
+10/04
+	* Added SC_EXPBOOST (Field Manual), SC_ITEMBOOST (Bubble Gum) to const.txt. Allready working [Zephyrus]
+	- Added SC_LIFEINSURANCE and SC_BOSSMAPINFO (not implemented)
+	- Updated Field Manual and Bubble Gum in the itemdb.txt file.
 10/01
 	* Fixed Frigg combo not reducing def by refine rate [Playtester]
 	* Reverted the bug that was added in the last update [Playtester]

+ 4 - 2
db/const.txt

@@ -754,8 +754,10 @@ SC_JAILED	249
 SC_ENCHANTARMS	250
 SC_MAGICALATTACK	251
 SC_SUMMER	256
-SC_BONUSEXP	257
-SC_BONUSDROP	258
+SC_EXPBOOST	257
+SC_ITEMBOOST	258
+SC_BOSSMAPINFO	259
+SC_LIFEINSURANCE	260
 
 e_gasp	0
 e_what	1

+ 2 - 2
db/item_db.txt

@@ -3258,9 +3258,9 @@
 12205,DEX_Dish,Hwergelmir's_Tonic,0,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_DEXFood,1800000, 10; percentheal 15,5; },{},{}
 12206,LUK_Dish,Cooked_Nine_Tail,0,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_LUKFood,1800000, 10; percentheal 15,5; },{},{}
 12207,VIT_Dish,Immortal_Stew,0,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_VITFood,1800000, 10; percentheal 15,5; },{},{}
-12208,Battle_Manual,Battle Manual,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_BONUSEXP,1800000,50;},{},{}
+12208,Battle_Manual,Battle Manual,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_EXPBOOST,1800000,50;},{},{}
 12209,Insurance,Life Insurance,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_BABY,1800000,0; },{},{}
-12210,Bubble_Gum,Bubble Gum,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_BONUSDROP,1800000,100;},{},{}
+12210,Bubble_Gum,Bubble Gum,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ITEMBOOST,1800000,0;},{},{}
 12211,Kafra_Card,Kafra Card,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_CashStore"; },{},{}
 12212,Giant_Fly_Wing,Giant Fly Wing,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_CashPartyCall"; },{},{}
 12213,Neuralizer,Neuralizer,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_CashReset"; },{},{}

+ 7 - 3
src/map/mob.c

@@ -2017,12 +2017,16 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 			if (sd && battle_config.pk_mode &&
 				(int)(md->level - sd->status.base_level) >= 20)
 				drop_rate = (int)(drop_rate*1.25); // pk_mode increase drops if 20 level difference [Valaris]
-			if (sd && sd->sc.data[SC_BONUSDROP].timer != -1)
-				drop_rate += (int)(0.5+drop_rate*sd->sc.data[SC_BONUSDROP].val1/100.);
 
 			// attempt to drop the item
 			if (rand() % 10000 >= drop_rate)
-				continue;
+			{
+				if (sd && sd->sc.data[SC_ITEMBOOST].timer != -1)
+					if (rand() % 10000 >= drop_rate)
+						continue; // Double try by Bubble Gum
+				else
+					continue;
+			}
 
 			ditem = mob_setdropitem(md->db->dropitem[i].nameid, 1);
 

+ 2 - 2
src/map/pc.c

@@ -4197,8 +4197,8 @@ static void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsi
 		(int)(status_get_lv(src) - sd->status.base_level) >= 20)
 		bonus += 15; // pk_mode additional exp if monster >20 levels [Valaris]	
 
-	if (sd->sc.data[SC_BONUSEXP].timer != -1)
-		bonus += sd->sc.data[SC_BONUSEXP].val1;
+	if (sd->sc.data[SC_EXPBOOST].timer != -1)
+		bonus += sd->sc.data[SC_EXPBOOST].val1;
 
 	if (!bonus)
 	  	return;

+ 1 - 1
src/map/skill.c

@@ -4824,7 +4824,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 				case SC_CARTBOOST:   case SC_MELTDOWN:    case SC_SAFETYWALL:
 				case SC_SMA:         case SC_SPEEDUP0:    case SC_NOCHAT:
 				case SC_ANKLE:       case SC_SPIDERWEB:   case SC_JAILED:
-				case SC_BONUSDROP:   case SC_BONUSEXP: // [ConvexMirror and FieldGuide]
+				case SC_ITEMBOOST:   case SC_EXPBOOST: // [ConvexMirror and FieldGuide]
 					continue;
 				}
 				if(i==SC_BERSERK) tsc->data[i].val2=0; //Mark a dispelled berserk to avoid setting hp to 100 by setting hp penalty to 0.

+ 5 - 17
src/map/status.c

@@ -451,6 +451,10 @@ void initChangeTables(void)
 	StatusIconChangeTable[SC_LUKFOOD] = SI_FOODLUK;
 	StatusIconChangeTable[SC_FLEEFOOD]= SI_FOODFLEE;
 	StatusIconChangeTable[SC_HITFOOD] = SI_FOODHIT;
+	//Cash Items
+	StatusIconChangeTable[SC_EXPBOOST] = SI_EXPBOOST;
+	StatusIconChangeTable[SC_ITEMBOOST] = SI_ITEMBOOST;
+
 	//Other SC which are not necessarily associated to skills.
 	StatusChangeFlagTable[SC_ASPDPOTION0] = SCB_ASPD;
 	StatusChangeFlagTable[SC_ASPDPOTION1] = SCB_ASPD;
@@ -5804,15 +5808,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
 			//Place here SCs that have no SCB_* data, no skill associated, no ICON
 			//associated, and yet are not wrong/unknown. [Skotlex]
 			break;
-		case SC_BONUSDROP:
-			clif_specialeffect(&sd->bl, 348, AREA);
-			clif_disp_onlyself(sd, "[Drop Rate Increased]", (int)strlen("[Drop Rate Increased]"));
-			if (val1 < 0)
-				val1 = 0;
-			break;
-		case SC_BONUSEXP:
-			clif_specialeffect(&sd->bl, 348, AREA);
-			clif_disp_onlyself(sd, "[Exp Rate Increased]", (int)strlen("[Exp Rate Increased]"));
+		case SC_EXPBOOST:
 			if (val1 < 0)
 				val1 = 0;
 			break;
@@ -6407,14 +6403,6 @@ int status_change_end( struct block_list* bl , int type,int tid )
 		case SC_JOINTBEAT:
 			sc->data[type].val2 = 0; // Clear stackable ailments
 			break;
-		case SC_BONUSEXP:
-			clif_disp_onlyself(sd, "[Exp Rate Back to Normal]", (int)strlen("[Exp Rate Back to Normal]"));
-			clif_specialeffect(&sd->bl, 488, AREA);
-			break;
-		case SC_BONUSDROP:
-			clif_disp_onlyself(sd, "[Drop Rate Back to Normal]", (int)strlen("[Drop Rate Back to Normal]"));
-			clif_specialeffect(&sd->bl, 488, AREA);
-			break;
 		}
 
 	opt_flag = 1;

+ 5 - 3
src/map/status.h

@@ -269,9 +269,11 @@ enum {
 	SC_CRITICALWOUND,
 	SC_MAGICMIRROR,
 	SC_SLOWCAST,
-	SC_SUMMER, // [Zephyrus Summer]
-	SC_BONUSEXP, // [Field Guide]
-	SC_BONUSDROP, // [Bubble Gum]
+	SC_SUMMER,
+	SC_EXPBOOST, // Field Guide
+	SC_ITEMBOOST, // Bubble Gum
+	SC_BOSSMAPINFO, // Convex Mirror
+	SC_LIFEINSURANCE, // Life Insurance
 	SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
 };
 int SkillStatusChangeTable(int skill);