summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-09 17:45:51 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-09 17:45:51 +0000
commit486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df (patch)
tree32032934e3a8954081c78757268b6d581e01be39 /src/map/skill.c
parent6b37d26f7557bb6318e046fac461c05751c3f149 (diff)
downloadhercules-486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df.tar.gz
hercules-486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df.tar.bz2
hercules-486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df.tar.xz
hercules-486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df.zip
* 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
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c7
1 files changed, 5 insertions, 2 deletions
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;i<MAX_SKILLTIMERSKILL && ud->skilltimerskill[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]