summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
6 files changed, 35 insertions, 7 deletions
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