summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-23 14:08:34 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-23 14:08:34 +0000
commitc6b5397e443179b28e6e094452fd4966ceb36798 (patch)
tree89a2fb6d78fb5449d62ac888d1384d6f45440f47
parent3194533c578cb83b3c3b5e1fd2f9f151db2e53bc (diff)
downloadhercules-c6b5397e443179b28e6e094452fd4966ceb36798.tar.gz
hercules-c6b5397e443179b28e6e094452fd4966ceb36798.tar.bz2
hercules-c6b5397e443179b28e6e094452fd4966ceb36798.tar.xz
hercules-c6b5397e443179b28e6e094452fd4966ceb36798.zip
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9697 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--db/Changelog.txt3
-rw-r--r--db/mob_db.txt17
-rw-r--r--sql-files/mob_db.sql16
-rw-r--r--src/common/mmo.h2
-rw-r--r--src/map/clif.c4
-rw-r--r--src/map/mercenary.c16
-rw-r--r--src/map/mercenary.h6
-rw-r--r--src/map/status.c10
-rw-r--r--src/map/status.h4
10 files changed, 43 insertions, 40 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 1c1b098af..3cefe4a30 100644
--- a/Changelog-Trunk.txt
+++ b/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]
diff --git a/db/Changelog.txt b/db/Changelog.txt
index 6aacd58cf..884a3295e 100644
--- a/db/Changelog.txt
+++ b/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
diff --git a/db/mob_db.txt b/db/mob_db.txt
index a4cc164dc..184cb123a 100644
--- a/db/mob_db.txt
+++ b/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
diff --git a/sql-files/mob_db.sql b/sql-files/mob_db.sql
index fdb93aa92..f8cc23147 100644
--- a/sql-files/mob_db.sql
+++ b/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);
diff --git a/src/common/mmo.h b/src/common/mmo.h
index ade3e4e04..3898f32d1 100644
--- a/src/common/mmo.h
+++ b/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;
diff --git a/src/map/clif.c b/src/map/clif.c
index 355d001fd..6fe7694b0 100644
--- a/src/map/clif.c
+++ b/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)
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index b776ed4b5..7e222b016 100644
--- a/src/map/mercenary.c
+++ b/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;
}
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index 91ce62a33..b7b0dd635 100644
--- a/src/map/mercenary.h
+++ b/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);
diff --git a/src/map/status.c b/src/map/status.c
index 320045761..f448f006a 100644
--- a/src/map/status.c
+++ b/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;
diff --git a/src/map/status.h b/src/map/status.h
index 968bdd301..954e10b7a 100644
--- a/src/map/status.h
+++ b/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