Forráskód Böngészése

- Fixed the compile error when trying to build the ladmin exe.
- When GM skill unconditional is set, the arrow state of the skill will be calculated, this fixes all skills getting stuck on arrow-type after you attack normally.
- Alchemist famous potions get their 50% bonus on top of the natural bonuses as a 1.5x type of bonus instead of adding linearly on top of your vit bonus (which would mean equal bonus of raising your vit by 25).
- Fixed the va_arg(va, char) warning that said the program would abort when it's reached o.O; made it read a int which is then casted to char.


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

skotlex 18 éve
szülő
commit
c5dc6d7e04
5 módosított fájl, 21 hozzáadás és 7 törlés
  1. 8 0
      Changelog-Trunk.txt
  2. 5 3
      src/ladmin/Makefile
  3. 1 1
      src/map/clif.c
  4. 5 3
      src/map/pc.c
  5. 2 0
      src/map/skill.c

+ 8 - 0
Changelog-Trunk.txt

@@ -4,6 +4,14 @@ 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.
 
 2004/12/06
+	* When GM skill unconditional is set, the arrow state of the skill will be
+	  calculated, this fixes all skills getting stuck on arrow-type after you
+	  attack normally. [Skotlex]
+	* Alchemist famous potions get their 50% bonus on top of the natural
+	  bonuses as a 1.5x type of bonus. In other words, now alchemist potions
+	  will really heal 50% more than when you use the non-famous potion
+	  version.
+	  [Skotlex]
 	* Messages with server_tick field are sent as soon as possible now.
 	  This might fix client synchronization issues. [FlavioJS]
 	* Added StringBuf_Vprintf to utils.c and changed the showmsg.c buffer.

+ 5 - 3
src/ladmin/Makefile

@@ -1,9 +1,11 @@
 all txt sql: ladmin
 
 COMMON_OBJ = ../common/obj/minicore.o ../common/obj/minisocket.o ../common/obj/timer.o \
-	../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/strlib.o
+	../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/strlib.o \
+	../common/obj/utils.o
 COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \
-	../common/version.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h
+	../common/version.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h \
+	../common/utils.h
 
 ladmin: ladmin.o md5calc.o $(COMMON_OBJ)
 	$(CC) -o ../../$@ ladmin.o md5calc.o $(COMMON_OBJ) $(LIB_S)
@@ -14,4 +16,4 @@ clean:
 # DO NOT DELETE
 
 ladmin.o: ladmin.c ladmin.h md5calc.h $(COMMON_H)
-md5calc.o: md5calc.c md5calc.h
+md5calc.o: md5calc.c md5calc.h

+ 1 - 1
src/map/clif.c

@@ -290,7 +290,7 @@ int clif_send_sub(struct block_list *bl, va_list ap)
 	len = va_arg(ap,int);
 	nullpo_retr(0, src_bl = va_arg(ap,struct block_list*));
 	type = va_arg(ap,int);
-	flush = va_arg(ap,char);
+	flush = (char)va_arg(ap,int);
 
 	switch(type) {
 	case AREA_WOS:

+ 5 - 3
src/map/pc.c

@@ -5407,10 +5407,11 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp)
 
 	if(hp) {
 		bonus = 100 + (sd->battle_status.vit<<1)
-			 + pc_checkskill(sd,SM_RECOVERY)*10
+			+ pc_checkskill(sd,SM_RECOVERY)*10
 			+ pc_checkskill(sd,AM_LEARNINGPOTION)*5;
 		// A potion produced by an Alchemist in the Fame Top 10 gets +50% effect [DracoRPG]
-		bonus += (potion_flag==2)?50:(potion_flag==3?100:0);
+		if (potion_flag > 1)
+			bonus += bonus*(potion_flag-1)*50/100;
 		//Item Group bonuses
 		bonus += bonus*itemdb_group_bonus(sd, itemid)/100;
 		//Individual item bonuses.
@@ -5428,7 +5429,8 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp)
 		bonus = 100 + (sd->battle_status.int_<<1)
 			+ pc_checkskill(sd,MG_SRECOVERY)*10
 			+ pc_checkskill(sd,AM_LEARNINGPOTION)*5;
-		bonus += (potion_flag==2)?50:(potion_flag==3?100:0);
+		if (potion_flag > 1)
+			bonus += bonus*(potion_flag-1)*50/100;
 		if(bonus != 100)
 			sp = sp * bonus / 100;
 	}

+ 2 - 0
src/map/skill.c

@@ -7883,6 +7883,8 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
 		sd->skillitem != skill)
 	{	//GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex]
 		sd->skillitem = sd->skillitemlv = 0;
+		//Need to do arrow state check.
+		sd->state.arrow_atk = skill_get_ammotype(skill)?1:0; 
 		return 1;
 	}