From c6b5397e443179b28e6e094452fd4966ceb36798 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 23 Jan 2007 14:08:34 +0000 Subject: - 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 --- src/map/mercenary.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/map/mercenary.c') 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; } -- cgit v1.2.3-60-g2f50