summaryrefslogtreecommitdiff
path: root/src/map
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 /src/map
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
Diffstat (limited to 'src/map')
-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
5 files changed, 34 insertions, 6 deletions
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