summaryrefslogtreecommitdiff
path: root/src/map/mercenary.c
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/mercenary.c
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/mercenary.c')
-rw-r--r--src/map/mercenary.c16
1 files changed, 16 insertions, 0 deletions
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;
}