Przeglądaj źródła

- Updated the skill_db, some mob skills seem to be better to a range of -9 than 9.
- Corrected the pet_db information for Xmas Goblin and Rice Cake.
- Replaced all struct map_session_data to TBL_PC in script.c
- Pressure no longer vaporizes plants.
- Corrected pc_setregstr to handle a null str argument.
- Corrected @reloadbattleconf causing a add_timer_func "already existing function" error.


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

skotlex 18 lat temu
rodzic
commit
b6e3783be6
7 zmienionych plików z 159 dodań i 154 usunięć
  1. 2 0
      Changelog-Trunk.txt
  2. 3 0
      db/Changelog.txt
  3. 3 3
      db/pet_db.txt
  4. 22 22
      db/skill_db.txt
  5. 3 4
      src/map/battle.c
  6. 11 3
      src/map/pc.c
  7. 115 122
      src/map/script.c

+ 2 - 0
Changelog-Trunk.txt

@@ -3,6 +3,8 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+2007/04/24
+	* Pressure no longer vaporizes plants.
 2007/04/23
 	* Fixed bug which totally broke item group bonuses.
 	* Added warnings when setting a pvp/gvg flag removes the other flags on the

+ 3 - 0
db/Changelog.txt

@@ -19,6 +19,9 @@
 	-----
 
 ========================
+
+04/24
+	* Corrected the pet_db information for Xmas Goblin and Rice Cake. [Skotlex]
 04/23
 	* Added some "refined" headgears [Playtester]
 	* Some more Anubis updates [Playtester]

+ 3 - 3
db/pet_db.txt

@@ -30,7 +30,7 @@
 //but only one of each.
 
 //NOTE: The max value (100%) of attack_rate, defense_rate & change_target_rate is 10000.
-// MobID,Name,JName,LureID,EggID,AcceID,FoodID,Fullness,HungryDelay,R_Hungry,R_Full,Intimate,Die,Capture,Speed,S_Performance,talk_convert_class,attack_rate,defence_attack_rate,change_target_rate,pet_script
+// MobID,Name,JName,LureID,EggID,EquipID,FoodID,Fullness,HungryDelay,R_Hungry,R_Full,Intimate,Die,Capture,Speed,S_Performance,talk_convert_class,attack_rate,defence_attack_rate,change_target_rate,pet_script
 1002,PORING,Poring,619,9001,10013,531,80,20,50,100,250,20,2000,400,1,0,350,400,800,{ petloot 10; }
 1011,CHONCHON,ChonChon,624,9006,10002,537,80,10,30,100,250,20,1500,200,1,0,500,500,250,{ petskillbonus bAgi,4,10,50; }
 1014,SPORE,Spore,630,9012,10017,537,80,20,30,100,250,20,1500,200,0,0,350,500,500,{ petrecovery SC_Poison,60; }
@@ -57,6 +57,6 @@
 1170,SOHEE,Sohee,638,9020,10016,537,80,20,10,100,250,20,500,300,0,0,100,1000,200,{ petheal 400,60,33,100; }
 1188,BON_GUN,Bon Gun,659,9025,10020,537,80,20,10,100,250,20,500,200,1,0,600,200,400,{ petskillattack2 190,555,1,1,1; }
 1200,ZHERLTHSH,Zherlthsh,660,9026,0,929,80,20,10,100,250,20,50,200,0,0,1000,100,500,{ petskillattack 136,1,0,3; }
-1245,GOBLINE_XMAS,Christmas Goblin,12225,9029,0,911,80,15,20,100,250,20,500,100,0,0,300,300,800,{ petskillattack 10,5,5,5; }
+1245,GOBLINE_XMAS,Christmas Goblin,12225,9029,0,911,80,20,50,100,250,20,2000,100,0,0,300,300,800,{ petskillattack 10,5,5,5; }
 1275,ALICE,Alice,661,9027,0,504,80,20,10,100,250,20,100,200,0,0,100,1000,200,{ petskillsupport 28,5,60,25,100; }
-1815,EVENT_RICECAKE,Rice Cake,0,9028,0,550,80,20,10,100,250,20,2000,150,0,0,500,500,200,{ petskillsupport 257,3,240,50,100; }
+1815,EVENT_RICECAKE,Rice Cake,0,9028,0,511,80,20,50,100,250,20,2000,150,1,0,500,500,200,{ petskillsupport 257,3,240,50,100; }

+ 22 - 22
db/skill_db.txt

@@ -208,29 +208,29 @@
 167,0,0,4,6,0x1,0,1,1,no,0,0x2,0,magic,0	//NPC_CHANGEHOLY#Holy Attribute Change#
 168,0,0,4,7,0x1,0,1,1,no,0,0x2,0,magic,0	//NPC_CHANGEDARKNESS#Shadow Attribute Change#
 169,0,0,4,8,0x1,0,1,1,no,0,0x2,0,magic,0	//NPC_CHANGETELEKINESIS#Sense Attribute Change#
-170,9,6,1,-1,0x20,0,10,1,no,0,0x2,0,weapon,0	//NPC_CRITICALSLASH#Defense disregard attack#
-171,9,8,1,-1,0,0,10,2:3:4:5:6:7:8:9:10:11,no,0,0x2,0,weapon,0	//NPC_COMBOATTACK#Multi-stage Attack#
-172,9,6,1,-1,0x40,0,10,1,no,0,0x2,0,weapon,0	//NPC_GUIDEATTACK#On-target Impact Attack#
+170,-9,6,1,-1,0x20,0,10,1,no,0,0x2,0,weapon,0	//NPC_CRITICALSLASH#Defense disregard attack#
+171,-9,8,1,-1,0,0,10,2:3:4:5:6:7:8:9:10:11,no,0,0x2,0,weapon,0	//NPC_COMBOATTACK#Multi-stage Attack#
+172,-9,6,1,-1,0x40,0,10,1,no,0,0x2,0,weapon,0	//NPC_GUIDEATTACK#On-target Impact Attack#
 173,5,6,4,3,0xD2,5,10,1,no,0,0x2,0,misc,3	//NPC_SELFDESTRUCTION#Suicide bombing#
-174,9,6,1,-1,0x2,3,1,1,no,0,0x2,0,weapon,0	//NPC_SPLASHATTACK#Splash attack#
+174,-9,6,1,-1,0x2,3,1,1,no,0,0x2,0,weapon,0	//NPC_SPLASHATTACK#Splash attack#
 175,0,0,4,0,0x41,0,10,1,no,0,0x2,0,misc,0	//NPC_SUICIDE#Suicide#
-176,9,6,1,-1,0,0,5,1,no,0,0x2,0,weapon,0	//NPC_POISON#Poison Attack#
-177,9,6,1,-1,0,0,5,1,no,0,0x2,0,weapon,0	//NPC_BLINDATTACK#Darkness Attack#
-178,9,6,1,-1,0,0:0:0:0:0:-1,5,1,no,0,0x2,0,weapon,0	//NPC_SILENCEATTACK#Silence Attack#
-179,9,6,1,-1,0,0,5,1,no,0,0x2,0,weapon,0	//NPC_STUNATTACK#Stun Attack#
-180,9,6,1,-1,0,0:0:0:0:0:-1,5,1,no,0,0x2,0,weapon,0	//NPC_PETRIFYATTACK#Petrify Attack#
-181,9,6,1,7,0,0,5,1,no,0,0x2,0,weapon,0	//NPC_CURSEATTACK#Cursing Attack #
-182,9,6,1,-1,0,0,5,1,no,0,0x2,0,weapon,0	//NPC_SLEEPATTACK#Sleep attack#
-183,9,6,1,-1,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_RANDOMATTACK#Random Attack #
-184,9,6,1,1,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_WATERATTACK#Water Attribute Attack#
-185,9,6,1,2,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_GROUNDATTACK#Earth Attribute Attack#
-186,9,6,1,3,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_FIREATTACK#Fire Attribute Attack#
-187,9,6,1,4,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_WINDATTACK#Wind Attribute Attack#
-188,9,6,1,5,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_POISONATTACK#Poison Attribute Attack#
-189,9,6,1,6,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_HOLYATTACK#Holy Attribute Attack#
-190,9,6,1,7,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_DARKNESSATTACK#Shadow Attribute Attack#
-191,9,6,1,8,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_TELEKINESISATTACK#Sense Attribute Attack#
-192,9,6,1,-1,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_MAGICALATTACK#Demon Shock Attack#
+176,-9,6,1,-1,0,0,5,1,no,0,0x2,0,weapon,0	//NPC_POISON#Poison Attack#
+177,-9,6,1,-1,0,0,5,1,no,0,0x2,0,weapon,0	//NPC_BLINDATTACK#Darkness Attack#
+178,-9,6,1,-1,0,0:0:0:0:0:-1,5,1,no,0,0x2,0,weapon,0	//NPC_SILENCEATTACK#Silence Attack#
+179,-9,6,1,-1,0,0,5,1,no,0,0x2,0,weapon,0	//NPC_STUNATTACK#Stun Attack#
+180,-9,6,1,-1,0,0:0:0:0:0:-1,5,1,no,0,0x2,0,weapon,0	//NPC_PETRIFYATTACK#Petrify Attack#
+181,-9,6,1,7,0,0,5,1,no,0,0x2,0,weapon,0	//NPC_CURSEATTACK#Cursing Attack #
+182,-9,6,1,-1,0,0,5,1,no,0,0x2,0,weapon,0	//NPC_SLEEPATTACK#Sleep attack#
+183,-9,6,1,-1,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_RANDOMATTACK#Random Attack #
+184,-9,6,1,1,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_WATERATTACK#Water Attribute Attack#
+185,-9,6,1,2,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_GROUNDATTACK#Earth Attribute Attack#
+186,-9,6,1,3,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_FIREATTACK#Fire Attribute Attack#
+187,-9,6,1,4,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_WINDATTACK#Wind Attribute Attack#
+188,-9,6,1,5,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_POISONATTACK#Poison Attribute Attack#
+189,-9,6,1,6,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_HOLYATTACK#Holy Attribute Attack#
+190,-9,6,1,7,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_DARKNESSATTACK#Shadow Attribute Attack#
+191,-9,6,1,8,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_TELEKINESISATTACK#Sense Attribute Attack#
+192,-9,6,1,-1,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_MAGICALATTACK#Demon Shock Attack#
 193,0,0,4,0,0x1,0,10,1,no,0,0x2,0,none,0	//NPC_METAMORPHOSIS#Metamorphosis#
 194,0,0,4,0,0x1,0,10,1,no,0,0x2,0,none,0	//NPC_PROVOCATION#Provocation#
 195,0,6,4,0,0x50,0,10,1,no,0,0x2,0,misc,0	//NPC_SMOKING#Smoking#
@@ -385,7 +385,7 @@
 344,9,6,1,-1,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_BREAKARMOR#Break armor#
 345,9,6,1,-1,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_BREAKHELM#Break helm#
 346,9,6,1,-1,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_BREAKSHIELD#Break shield#
-347,9,6,1,9,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_UNDEADATTACK
+347,-9,6,1,9,0,0,10,1,no,0,0x2,0,weapon,0	//NPC_UNDEADATTACK
 348,9,0,1,9,0x1,0,5,1,no,0,0x2,0,magic,0	//NPC_CHANGEUNDEAD
 349,0,6,4,0,0x1,0,10,0,no,0,0x2,0,weapon,0	//NPC_POWERUP
 350,0,6,4,0,0x1,0,10,0,no,0,0x2,0,none,0	//NPC_AGIUP

+ 3 - 4
src/map/battle.c

@@ -2637,7 +2637,7 @@ struct Damage  battle_calc_misc_attack(
 
 	if(md.damage < 0)
 		md.damage = 0;
-	else if(md.damage && tstatus->mode&MD_PLANT && skill_num != PA_PRESSURE) //Pressure can vaporize plants
+	else if(md.damage && tstatus->mode&MD_PLANT)
 		md.damage = 1;
 
 	if(!(nk&NK_NO_ELEFIX))
@@ -4324,16 +4324,15 @@ int battle_config_read(const char *cfgName)
 	}
 	fclose(fp);
 
-	if (--count == 0) {
+	if (--count == 0)
 		battle_validate_conf();
-		add_timer_func_list(battle_delay_damage_sub, "battle_delay_damage_sub");
-	}
 
 	return 0;
 }
 
 void do_init_battle(void) {
 	delay_damage_ers = ers_new(sizeof(struct delay_damage));
+	add_timer_func_list(battle_delay_damage_sub, "battle_delay_damage_sub");
 }
 
 void do_final_battle(void) {

+ 11 - 3
src/map/pc.c

@@ -6018,17 +6018,25 @@ int pc_setregstr(struct map_session_data *sd,int reg,char *str)
 
 	nullpo_retr(0, sd);
 
-	if(strlen(str)+1 >= sizeof(sd->regstr[0].data)){
+	if(str && strlen(str)+1 >= sizeof(sd->regstr[0].data)){
 		ShowWarning("pc_setregstr: string too long !\n");
 		return 0;
 	}
 
 	for(i=0;i<sd->regstr_num;i++)
 		if(sd->regstr[i].index==reg){
-			strcpy(sd->regstr[i].data,str);
+			if (str && strcmp(str,"")!=0)
+				strcpy(sd->regstr[i].data,str);
+			else { //Delete last entry.
+				sd->regstr_num--;
+				memcpy(&sd->regstr[i], &sd->regstr[sd->regstr_num], sizeof(sd->regstr[0]));
+				sd->regstr = (struct script_regstr *) aRealloc(sd->regstr, sizeof(sd->regstr[0]) * sd->regstr_num);
+			}
 			return 1;
 		}
 
+	if (!str) return 1;
+
 	sd->regstr_num++;
 	sd->regstr = (struct script_regstr *) aRealloc(sd->regstr, sizeof(sd->regstr[0]) * sd->regstr_num);
 	if(sd->regstr==NULL){
@@ -6233,7 +6241,7 @@ int pc_setregistry_str(struct map_session_data *sd,char *reg,char *val,int type)
 	}
 	
 	// delete reg
-	if (strcmp(val,"")==0) {
+	if (!val || strcmp(val,"")==0) {
 		for(i = 0; i < *max; i++) {
 			if (strcmp(sd_reg[i].str, reg) == 0) {
 				if (i != *max - 1)

Plik diff jest za duży
+ 115 - 122
src/map/script.c


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików