Parcourir la source

- Added view_data support to mercenary.*, so that the Homunculus entries are no longer required on the mob_db.
- Removed homunculus entries from mob_db.
- Added the status icon to NPC_CHANGEUNDEAD and the Flee/Hit foods
- Corrected the check that lets you walk when vending/chatting/etc.


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

skotlex il y a 18 ans
Parent
commit
da11e41ed4
10 fichiers modifiés avec 43 ajouts et 40 suppressions
  1. 5 0
      Changelog-Trunk.txt
  2. 3 0
      db/Changelog.txt
  3. 0 17
      db/mob_db.txt
  4. 0 16
      sql-files/mob_db.sql
  5. 1 1
      src/common/mmo.h
  6. 3 1
      src/map/clif.c
  7. 16 0
      src/map/mercenary.c
  8. 3 3
      src/map/mercenary.h
  9. 8 2
      src/map/status.c
  10. 4 0
      src/map/status.h

+ 5 - 0
Changelog-Trunk.txt

@@ -3,6 +3,11 @@ 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/01/23
+	* Added view_data support to mercenary.*, so that the Homunculus entries
+	  are no longer required on the mob_db.
+	* Added the status icon to NPC_CHANGEUNDEAD and the Flee/Hit foods.
+	* Corrected the check that lets you walk when vending/chatting/etc.
 2007/01/22
 	* Reverted the battle_calc_return_damage code as the previous one was
 	  correct, ninja self-targetted skills CAN be reflected. [Skotlex]

+ 3 - 0
db/Changelog.txt

@@ -20,6 +20,9 @@
 
 ========================
 
+01/22
+	* Removed homunculus entries from mob_db as they are no longer needed.
+	  [Skotlex]
 01/21
 	* Fixed equip location of Father's Mustaches and Father's Sunglasses [Lupus]
 01/18

+ 0 - 17
db/mob_db.txt

@@ -850,20 +850,3 @@
 1814,EVENT_MOON,Moonlight Flower,Moonlight Flower,80,30000,0,30000,30000,1,500,800,50,50,1,35,45,112,69,93,10,12,1,2,63,0xA3,150,1276,576,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 1815,EVENT_RICECAKE,Rice Cake,Rice Cake,12,20,0,0,0,1,1,2,100,99,1,1,1,1,1,1,0,0,1,0,20,0xA3,2000,1320,0,300,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 1816,EVENT_GOURD,Gourd,Gourd,12,1000,0,0,0,1,1,2,100,99,1,1,1,1,1,1,0,0,1,0,20,0xA3,2000,96,96,96,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-
-6001,MER_LIF,Lif,Lif,1,150,40,0,0,2,0,0,0,0,12,20,15,35,24,14,10,0,0,7,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,5
-6002,MER_AMISTR,Amistr,Amistr,1,320,10,0,0,2,0,0,0,0,20,17,35,11,24,13,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,5
-6003,MER_FILIR,Filir,Filir,1,90,25,0,0,2,0,0,0,0,29,35,9,8,30,9,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,5
-6004,MER_VANILMIRTH,Vanilmirth,Vanilmirth,1,80,11,0,0,2,0,0,0,0,11,11,11,11,11,11,10,0,0,0,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5
-6005,MER_LIF2,Lif,Lif,1,150,40,0,0,2,0,0,0,0,12,20,15,35,24,14,10,0,0,7,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,5
-6006,MER_AMISTR2,Amistr,Amistr,1,320,10,0,0,2,0,0,0,0,20,17,35,11,24,13,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5
-6007,MER_FILIR2,Filir,Filir,1,90,25,0,0,2,0,0,0,0,29,35,9,8,30,9,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5
-6008,MER_VANILMIRTH2,Vanimirth,Vanilmirth,1,80,11,0,0,2,0,0,0,0,11,11,11,11,11,11,10,0,0,0,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5
-6009,MER_LIF_H,Lif,Lif,1,150,40,0,0,2,0,0,0,0,12,20,15,35,24,14,10,0,0,7,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,5
-6010,MER_AMISTR_H,Amistr,Amistr,1,320,10,0,0,2,0,0,0,0,20,17,35,11,24,13,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,5
-6011,MER_FILIR_H,Filir,Filir,1,90,25,0,0,2,0,0,0,0,29,35,9,8,30,9,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5
-6012,MER_VANILMIRTH_H,Vanilmirth,Vanilmirth,1,80,11,0,0,2,0,0,0,0,11,11,11,11,11,11,10,0,0,0,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5
-6013,MER_LIF_H2,Lif,Lif,1,150,40,0,0,2,0,0,0,0,12,20,15,35,24,14,10,0,0,7,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,5
-6014,MER_AMISTR_H2,Amistr,Amistr,1,320,10,0,0,2,0,0,0,0,20,17,35,11,24,13,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5
-6015,MER_FILIR_H2,Filir,Filir,1,90,25,0,0,2,0,0,0,0,29,35,9,8,30,9,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5
-6016,MER_VANILMIRTH_H2,Vanimirth,Vanilmirth,1,80,11,0,0,2,0,0,0,0,11,11,11,11,11,11,10,0,0,0,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5

+ 0 - 16
sql-files/mob_db.sql

@@ -901,19 +901,3 @@ REPLACE INTO `mob_db` VALUES (1813,'EVENT_HYDRO','Hydro','Hydrolancer',99,588000
 REPLACE INTO `mob_db` VALUES (1814,'EVENT_MOON','Moonlight Flower','Moonlight Flower',80,30000,0,30000,30000,1,500,800,50,50,1,35,45,112,69,93,10,12,1,2,63,0xA3,150,1276,576,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
 REPLACE INTO `mob_db` VALUES (1815,'EVENT_RICECAKE','Rice Cake','Rice Cake',12,20,0,0,0,1,1,2,100,99,1,1,1,1,1,1,0,0,1,0,20,0xA3,2000,1320,0,300,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
 REPLACE INTO `mob_db` VALUES (1816,'EVENT_GOURD','Gourd','Gourd',12,1000,0,0,0,1,1,2,100,99,1,1,1,1,1,1,0,0,1,0,20,0xA3,2000,96,96,96,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (6001,'MER_LIF','Lif','Lif',1,150,40,0,0,2,0,0,0,0,12,20,15,35,24,14,10,0,0,7,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6002,'MER_AMISTR','Amistr','Amistr',1,320,10,0,0,2,0,0,0,0,20,17,35,11,24,13,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6003,'MER_FILIR','Filir','Filir',1,90,25,0,0,2,0,0,0,0,29,35,9,8,30,9,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6004,'MER_VANILMIRTH','Vanilmirth','Vanilmirth',1,80,11,0,0,2,0,0,0,0,11,11,11,11,11,11,10,0,0,0,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6005,'MER_LIF2','Lif','Lif',1,150,40,0,0,2,0,0,0,0,12,20,15,35,24,14,10,0,0,7,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6006,'MER_AMISTR2','Amistr','Amistr',1,320,10,0,0,2,0,0,0,0,20,17,35,11,24,13,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6007,'MER_FILIR2','Filir','Filir',1,90,25,0,0,2,0,0,0,0,29,35,9,8,30,9,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6008,'MER_VANILMIRTH2','Vanimirth','Vanilmirth',1,80,11,0,0,2,0,0,0,0,11,11,11,11,11,11,10,0,0,0,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6009,'MER_LIF_H','Lif','Lif',1,150,40,0,0,2,0,0,0,0,12,20,15,35,24,14,10,0,0,7,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6010,'MER_AMISTR_H','Amistr','Amistr',1,320,10,0,0,2,0,0,0,0,20,17,35,11,24,13,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6011,'MER_FILIR_H','Filir','Filir',1,90,25,0,0,2,0,0,0,0,29,35,9,8,30,9,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6012,'MER_VANILMIRTH_H','Vanilmirth','Vanilmirth',1,80,11,0,0,2,0,0,0,0,11,11,11,11,11,11,10,0,0,0,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6013,'MER_LIF_H2','Lif','Lif',1,150,40,0,0,2,0,0,0,0,12,20,15,35,24,14,10,0,0,7,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6014,'MER_AMISTR_H2','Amistr','Amistr',1,320,10,0,0,2,0,0,0,0,20,17,35,11,24,13,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6015,'MER_FILIR_H2','Filir','Filir',1,90,25,0,0,2,0,0,0,0,29,35,9,8,30,9,10,0,0,2,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5);
-REPLACE INTO `mob_db` VALUES (6016,'MER_VANILMIRTH_H2','Vanimirth','Vanilmirth',1,80,11,0,0,2,0,0,0,0,11,11,11,11,11,11,10,0,0,0,20,0x91,150,700,0,300,0,0,0,0,0,0,0,0,7004,2000,7054,5500,1000,250,997,30,512,0,757,250,985,163,0,0,0,0,4072,5);

+ 1 - 1
src/common/mmo.h

@@ -105,7 +105,7 @@
 #define MAX_HOMUNSKILL 16
 #define MAX_HOMUNCULUS_CLASS	16	//[orn]
 #define HM_CLASS_BASE 6001
-#define HM_CLASS_MAX 6099
+#define HM_CLASS_MAX (HM_CLASS_BASE+MAX_HOMUNCULUS_CLASS-1)
 
 struct item {
 	int id;

+ 3 - 1
src/map/clif.c

@@ -8449,7 +8449,9 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd) {
 		return;
 	}
 
-	if (clif_cant_act(sd) && sd->sc.opt1 != OPT1_STONEWAIT)
+	if (sd->sc.opt1 && sd->sc.opt1 == OPT1_STONEWAIT)
+		; //You CAN walk on this OPT1 value.
+	else if (clif_cant_act(sd))
 		return;
 
 	if(sd->sc.count && sd->sc.data[SC_RUN].timer != -1)

+ 16 - 0
src/map/mercenary.c

@@ -44,6 +44,16 @@ static int merc_hom_hungry(int tid,unsigned int tick,int id,int data);
 
 static unsigned int hexptbl[MAX_LEVEL];
 
+//For holding the view data of npc classes. [Skotlex]
+static struct view_data hom_viewdb[MAX_HOMUNCULUS_CLASS];
+
+struct view_data* merc_get_hom_viewdata(int class_)
+{	//Returns the viewdata for homunculus
+	if (homdb_checkid(class_))
+		return &hom_viewdb[class_-HM_CLASS_BASE];
+	return NULL;
+}
+
 void merc_damage(struct homun_data *hd,struct block_list *src,int hp,int sp)
 {
 	clif_hominfo(hd->master,hd,0);
@@ -976,11 +986,17 @@ void merc_skill_reload(void)
 
 int do_init_merc(void)
 {
+	int class_;
 	read_homunculusdb();
 	read_homunculus_expdb();
 	read_homunculus_skilldb();
 	// Add homunc timer function to timer func list [Toms]
 	add_timer_func_list(merc_hom_hungry, "merc_hom_hungry");
+
+	//Stock view data for homuncs
+	memset(&hom_viewdb, 0, sizeof(hom_viewdb));
+	for (class_ = HM_CLASS_BASE; class_ <= HM_CLASS_MAX; class_++) 
+		hom_viewdb[class_-HM_CLASS_BASE].class_ = class_;
 	return 0;
 }
 

+ 3 - 3
src/map/mercenary.h

@@ -43,13 +43,13 @@ enum {
 	SP_INTIMATE 	= 0x100,
 	SP_HUNGRY 		= 0x200
 };
+
+#define homdb_checkid(id) (id >=  HM_CLASS_BASE && id <= HM_CLASS_MAX)
+
 // merc_is_hom_alive(struct homun_data *)
 #define merc_is_hom_active(x) (x && x->homunculus.vaporize != 1 && x->battle_status.hp > 0)
 int do_init_merc(void);
 int merc_hom_recv_data(int account_id, struct s_homunculus *sh, int flag); //albator
-void merc_load_sub(struct homun_data *hd, struct map_session_data *sd);
-void merc_load_exptables(void);
-char *merc_hom_skill_get_name(int id);
 void merc_damage(struct homun_data *hd,struct block_list *src,int hp,int sp);
 int merc_hom_dead(struct homun_data *hd, struct block_list *src);
 void merc_hom_skillup(struct homun_data *hd,int skillnum);

+ 8 - 2
src/map/status.c

@@ -418,14 +418,18 @@ void initChangeTables(void) {
 	StatusIconChangeTable[SC_INCSTR] = SI_INCSTR;
 	StatusIconChangeTable[SC_MIRACLE] = SI_SPIRIT;
 	StatusIconChangeTable[SC_INTRAVISION] = SI_INTRAVISION;
-#if PACKETVER > 7
+	//This seems wrong as it sets the same icon to all skills that change your 
+	//element, but alas, all of them are mob-target only with the exception of
+	//NPC_CHANGEUNDEAD, so this should be alright. [Skotlex]
+	StatusIconChangeTable[SC_ELEMENTALCHANGE] = SI_UNDEAD;
 	StatusIconChangeTable[SC_STRFOOD] = SI_FOODSTR;
 	StatusIconChangeTable[SC_AGIFOOD] = SI_FOODAGI;
 	StatusIconChangeTable[SC_VITFOOD] = SI_FOODVIT;
 	StatusIconChangeTable[SC_INTFOOD] = SI_FOODDEX;
 	StatusIconChangeTable[SC_DEXFOOD] = SI_FOODINT;
 	StatusIconChangeTable[SC_LUKFOOD] = SI_FOODLUK;
-#endif
+	StatusIconChangeTable[SC_FLEEFOOD] = SI_FOODFLEE;
+	StatusIconChangeTable[SC_HITFOOD] = SI_FOODHIT;
 	//Other SC which are not necessarily associated to skills.
 	StatusChangeFlagTable[SC_ASPDPOTION0] = SCB_ASPD;
 	StatusChangeFlagTable[SC_ASPDPOTION1] = SCB_ASPD;
@@ -4223,6 +4227,8 @@ void status_set_viewdata(struct block_list *bl, int class_)
 		vd =  mob_get_viewdata(class_);
 	else if (npcdb_checkid(class_) || (bl->type == BL_NPC && class_ == WARP_CLASS))
 		vd = npc_get_viewdata(class_);
+	else if (homdb_checkid(class_))
+		vd = merc_get_hom_viewdata(class_);
 	else
 		vd = NULL;
 

+ 4 - 0
src/map/status.h

@@ -330,6 +330,7 @@ enum {
 	SI_WATERWEAPON		= 91,
 	SI_WINDWEAPON		= 92,
 	SI_EARTHWEAPON		= 93,
+	SI_UNDEAD			= 97,
 // 102 = again gloria - from what I saw on screenshots, I wonder if it isn't gospel... [DracoRPG]
 	SI_AURABLADE		= 103,
 	SI_PARRYING		= 104,
@@ -406,6 +407,9 @@ enum {
 	SI_FOODDEX			= 244,
 	SI_FOODINT			= 245,
 	SI_FOODLUK			= 246,
+	SI_FOODFLEE			= 247,
+	SI_FOODHIT			= 248,
+	SI_FOODCRI			= 249,
 };
 
 // JOINTBEAT stackable ailments