瀏覽代碼

Fixed some compile warnings.(bugreport:6352, bugreport:6361)
Follow up r16520 added some missing entry in packet_db.txt where my patch doesn't include it...XD

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

rud0lp20 12 年之前
父節點
當前提交
a319977345
共有 4 個文件被更改,包括 8 次插入3 次删除
  1. 1 0
      db/packet_db.txt
  2. 1 1
      src/map/homunculus.c
  3. 2 2
      src/map/pc.h
  4. 4 0
      src/map/status.c

+ 1 - 0
db/packet_db.txt

@@ -1754,6 +1754,7 @@ packet_ver: 30
 0x0907,5,moveitem,2:4
 0x0908,5
 0x08D7,28,battlegroundreg,2:4 //Added to prevent disconnections
+0x08CF,10 //Amulet spirits
 
 //Add new packets here
 //packet_ver: 31

+ 1 - 1
src/map/homunculus.c

@@ -371,7 +371,7 @@ int hom_mutate(struct homun_data *hd, int homun_id)
 	m_class = hom_class2mapid(hd->homunculus.class_);
 	m_id    = hom_class2mapid(homun_id);
 	
-	if( !m_class&HOM_EVO || !m_id&HOM_S ) {
+	if( !(m_class&HOM_EVO) || !(m_id&HOM_S) ) {
 		clif_emotion(&hd->bl, E_SWT);
 		return 0;
 	}

+ 2 - 2
src/map/pc.h

@@ -332,8 +332,8 @@ struct map_session_data {
 
 	short spiritball, spiritball_old;
 	int spirit_timer[MAX_SKILL_LEVEL];
-	short talisman[5];
-	int talisman_timer[5][10];
+	short talisman[ELE_POISON+1]; // There are actually 5 talisman Fire, Ice, Wind, Earth & Poison maybe because its color violet.
+	int talisman_timer[ELE_POISON+1][10];
 
 	unsigned char potion_success_counter; //Potion successes in row counter
 	unsigned char mission_count; //Stores the bounty kill count for TK_MISSION

+ 4 - 0
src/map/status.c

@@ -3234,7 +3234,9 @@ static signed short status_calc_mdef2(struct block_list *,struct status_change *
 static unsigned short status_calc_speed(struct block_list *,struct status_change *,int);
 static short status_calc_aspd_rate(struct block_list *,struct status_change *,int);
 static unsigned short status_calc_dmotion(struct block_list *bl, struct status_change *sc, int dmotion);
+#ifdef RENEWAL_ASPD
 static short status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag);
+#endif
 static unsigned int status_calc_maxhp(struct block_list *,struct status_change *,unsigned int);
 static unsigned int status_calc_maxsp(struct block_list *,struct status_change *,unsigned int);
 static unsigned char status_calc_element(struct block_list *bl, struct status_change *sc, int element);
@@ -5058,6 +5060,7 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
 	return (short)cap_value(speed,10,USHRT_MAX);
 }
 
+#ifdef RENEWAL_ASPD
 // flag&1 - fixed value [malufett]
 // flag&2 - percentage value
 static short status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag)
@@ -5181,6 +5184,7 @@ static short status_calc_aspd(struct block_list *bl, struct status_change *sc, s
 
 	return ( flag&1? (skills1 + pots) : skills2 );
 }
+#endif
 
 /// Calculates an object's ASPD modifier (alters the base amotion value).
 /// Note that the scale of aspd_rate is 1000 = 100%.