From 486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df Mon Sep 17 00:00:00 2001 From: ultramage Date: Tue, 9 Oct 2007 17:45:51 +0000 Subject: * Corrected string lengths according to bugreport:198 - CHATBOX_SIZE: 70 -> 70+1 - removed some too aggressive checks in clif_parse_globalmessage() - removed CHAT_SIZE define as it actually doesn't apply anywhere - added CHAT_SIZE_MAX to serve as a custom limit to input string lengths - added length/contents checks to /b and /lb (against fake names) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11386 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/skill.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/map/skill.c') diff --git a/src/map/skill.c b/src/map/skill.c index 421ceb6a8..21266e148 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2729,8 +2729,8 @@ int skill_addtimerskill (struct block_list *src, unsigned int tick, int target, ud = unit_bl2ud(src); nullpo_retr(1, ud); - for(i=0;iskilltimerskill[i]; i++); - if (i==MAX_SKILLTIMERSKILL) return 1; + ARR_FIND( 0, MAX_SKILLTIMERSKILL, i, ud->skilltimerskill[i] == 0 ); + if( i == MAX_SKILLTIMERSKILL ) return 1; ud->skilltimerskill[i] = ers_alloc(skill_timer_ers, struct skill_timerskill); ud->skilltimerskill[i]->timer = add_timer(tick, skill_timerskill, src->id, i); @@ -4393,7 +4393,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case DC_SCREAM: clif_skill_nodamage(src,bl,skillid,skilllv,1); skill_addtimerskill(src,tick+2000,bl->id,src->x,src->y,skillid,skilllv,0,flag); + if (md) { + // custom hack to make the mob display the skill, because these skills don't show the skill use text themselves + //NOTE: mobs don't have the sprite animation that is used when performing this skill (will cause glitches) char temp[128]; if (strlen(md->name) + strlen(skill_db[skillid].desc) > 120) break; //Message won't fit on buffer. [Skotlex] -- cgit v1.2.3-70-g09d2