From 9a1076b7e969edfb951c7a2b836cd5e25e5ff7ab Mon Sep 17 00:00:00 2001 From: glighta Date: Tue, 26 Mar 2013 06:56:01 +0000 Subject: [PATCH] -Hotfixs for : --bugreport:7364 null SC_STYLE_CHANGE crashing serv (when eleanor die and try to skill afterward) --bugreport:7352 skillnotok_hom typo, checking other case. -Remove unwanted debuginfo from r17211 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17212 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/homunculus.c | 2 -- src/map/skill.c | 11 ++++++----- src/map/status.c | 5 ++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 3b964486c9..4cf17e722c 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -782,8 +782,6 @@ int merc_hom_alloc(struct map_session_data *sd, struct s_homunculus *hom) map_addiddb(&hd->bl); status_calc_homunculus(hd,1); - if(hom->class_ == 6052) //eleanor - sc_start(&hd->bl,&hd->bl, SC_STYLE_CHANGE, 100, MH_MD_FIGHTING, -1); hd->hungry_timer = INVALID_TIMER; return 0; diff --git a/src/map/skill.c b/src/map/skill.c index f623844b3b..76274083ba 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -663,12 +663,15 @@ int skillnotok_hom(uint16 skill_id, struct homun_data *hd) case MH_OVERED_BOOST: if(hd->homunculus.hunger <= 1) //if we starving return 1; + break; case MH_GOLDENE_FERSE: //can be used with angriff if(hd->sc.data[SC_ANGRIFFS_MODUS]) return 1; + break; case MH_ANGRIFFS_MODUS: if(hd->sc.data[SC_GOLDENE_FERSE]) return 1; + break; case MH_TINDER_BREAKER: case MH_CBC: case MH_EQC: @@ -677,11 +680,9 @@ int skillnotok_hom(uint16 skill_id, struct homun_data *hd) case MH_MIDNIGHT_FRENZY: { struct status_change_entry *sce = hd->sc.data[SC_STYLE_CHANGE]; TBL_PC *sd; - if(!(sd=hd->master)) return 1; //we need a master - if(!sce || !sce->val3){ //homon doesn't have status or it's not a combo - if(skill_id != MH_SONIC_CRAW && skill_id != MH_TINDER_BREAKER) - return 1; - } + if(!(sd=hd->master) || !sce) return 1; //homon doesn't have status or a master + if((!sce->val3) && (skill_id != MH_SONIC_CRAW && skill_id != MH_TINDER_BREAKER)) + return 1; // or it's not a combo switch(skill_id){ case MH_SONIC_CRAW: diff --git a/src/map/status.c b/src/map/status.c index 43b77e72a8..a90c7b3a63 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3197,6 +3197,8 @@ int status_calc_homunculus_(struct homun_data *hd, bool first) if (first) { hd->battle_status.hp = hom->hp ; hd->battle_status.sp = hom->sp ; + if(hom->class_ == 6052) //eleanor + sc_start(&hd->bl,&hd->bl, SC_STYLE_CHANGE, 100, MH_MD_FIGHTING, -1); } status->rhw.atk = status->dex; @@ -9095,8 +9097,6 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty if( opt_flag&2 && sd && sd->touching_id ) npc_touchnext_areanpc(sd,false); // run OnTouch_ on next char in range - ShowInfo("status started with \n\ttype=%d\n\ttick=%d \n\trate=%d, \n\tval=[%d,%d,%d,%d] flag=%d\n", - type,tick, rate,val1,val2,val3,val4,flag); return 1; } @@ -9893,7 +9893,6 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const npc_touch_areanpc(sd,bl->m,bl->x,bl->y); //Trigger on-touch event. ers_free(sc_data_ers, sce); - ShowInfo("status end type=%d\n",type); return 1; }