From aeabd9b6ae7cd6b59d6c8d85609559f132a464ee Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 14 Dec 2007 02:57:54 +0000 Subject: - corrected Option_Xmas value in const.txt - Wand of Hermode now dispells buffs only of allies. - Fixed some null pointer checks in status_change_end. - Corrected a crashy Warning message. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11910 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/party.c | 2 +- src/map/skill.c | 5 ++++- src/map/status.c | 8 +------- 3 files changed, 6 insertions(+), 9 deletions(-) (limited to 'src/map') diff --git a/src/map/party.c b/src/map/party.c index bfaf21b8a..dc5ddb1f9 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -155,7 +155,7 @@ int party_check_member(struct party *p) ARR_FIND( 0, MAX_PARTY, j, p->member[j].account_id == sd->status.account_id && p->member[j].char_id == sd->status.char_id ); if( j == MAX_PARTY ) { - ShowWarning("party_check_member: '%s' (acc:%d) is not member of party '%s' (id:%d)\n",sd->status.char_id,sd->status.name,p->name,p->party_id); + ShowWarning("party_check_member: '%s' (acc:%d) is not member of party '%s' (id:%d)\n",sd->status.name,sd->status.account_id,p->name,p->party_id); sd->status.party_id = 0; } } diff --git a/src/map/skill.c b/src/map/skill.c index 4e60a39f9..fd116f02e 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6544,6 +6544,10 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned 0,0,sg->limit); break; + case UNT_HERMODE: + if (sg->src_id!=bl->id && battle_check_target(&src->bl,bl,BCT_PARTY|BCT_GUILD) > 0) + status_change_clear_buffs(bl,1); //Should dispell only allies. + break; case UNT_RICHMANKIM: case UNT_ETERNALCHAOS: case UNT_DRUMBATTLEFIELD: @@ -6551,7 +6555,6 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned case UNT_ROKISWEIL: case UNT_INTOABYSS: case UNT_SIEGFRIED: - case UNT_HERMODE: //Needed to check when a dancer/bard leaves their ensemble area. if (sg->src_id==bl->id && !(sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_BARDDANCER)) return skillid; diff --git a/src/map/status.c b/src/map/status.c index f9237f565..91ae9eb06 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -5552,10 +5552,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val val2 = 50*val1; //aspd reduction break; - case SC_HERMODE: - status_change_clear_buffs(bl,1); - break; - case SC_REGENERATION: if (val1 == 1) val2 = 2; @@ -6206,10 +6202,8 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid) sc = status_get_sc(bl); status = status_get_status_data(bl); - nullpo_retr(0,sc); - nullpo_retr(0,status); - if(type < 0 || type >= SC_MAX || !(sce = sc->data[type])) + if(type < 0 || type >= SC_MAX || !sc || !(sce = sc->data[type])) return 0; BL_CAST(BL_PC,bl,sd); -- cgit v1.2.3-70-g09d2