summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-20 15:08:43 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-20 15:08:43 +0000
commit838e87120758507b0be05b87af4a470f251e5bbd (patch)
tree08532a366d2d091b69d2530724bd3d1434d79cac /src/map/skill.c
parent99bc4b10c83859763ef0f21c70b3c519a31cf98e (diff)
downloadhercules-838e87120758507b0be05b87af4a470f251e5bbd.tar.gz
hercules-838e87120758507b0be05b87af4a470f251e5bbd.tar.bz2
hercules-838e87120758507b0be05b87af4a470f251e5bbd.tar.xz
hercules-838e87120758507b0be05b87af4a470f251e5bbd.zip
- Raised the amount of skills that can stack on a single cell before the "in-area/out-area" detection code breaks to 24 (from 8)
- Fixed a crash in clif_SkillInfoBlock if the passed player already disconnected. - Added limiting drop rate to 100% from item-bonuses that depend on the mob's level so that "@autoloot 100" will catch them. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9270 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index a85737c6c..957f4f34a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2129,7 +2129,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
*------------------------------------------
*/
static int skill_area_temp[8];
-static int skill_unit_temp[8]; /* For storing skill_unit ids as players move in/out of them. [Skotlex] */
+static int skill_unit_temp[24]; /* For storing skill_unit ids as players move in/out of them. [Skotlex] */
static int skill_unit_index=0; //Well, yeah... am too lazy to pass pointers around :X
typedef int (*SkillFunc)(struct block_list *, struct block_list *, int, int, unsigned int, int);
int skill_area_sub (struct block_list *bl, va_list ap)
@@ -10135,15 +10135,16 @@ int skill_unit_move_sub (struct block_list *bl, va_list ap)
if (flag&2)
{ //Clear skill ids we have stored in onout.
int i;
- for(i=0; i<8 && skill_unit_temp[i]!=skill_id; i++);
- if (i<8)
+ for(i=0; i < (sizeof(skill_unit_temp)/sizeof(int)) &&
+ skill_unit_temp[i]!=skill_id; i++);
+ if (i < (sizeof(skill_unit_temp)/sizeof(int)))
skill_unit_temp[i] = 0;
}
}
else
{
if (flag&2) { //Store this unit id.
- if (skill_unit_index < 7)
+ if (skill_unit_index < (sizeof(skill_unit_temp)/sizeof(int)))
skill_unit_temp[skill_unit_index++] = skill_id;
else if (battle_config.error_log)
ShowError("skill_unit_move_sub: Reached limit of unit objects per cell!\n");
@@ -10164,8 +10165,9 @@ int skill_unit_move_sub (struct block_list *bl, va_list ap)
if (flag&2 && result)
{ //Clear skill ids we have stored in onout.
int i;
- for(i=0; i<8 && skill_unit_temp[i]!=result; i++);
- if (i<8)
+ for(i=0; i < (sizeof(skill_unit_temp)/sizeof(int)) &&
+ skill_unit_temp[i]!=result; i++);
+ if (i < (sizeof(skill_unit_temp)/sizeof(int)))
skill_unit_temp[i] = 0;
}
}
@@ -10173,7 +10175,7 @@ int skill_unit_move_sub (struct block_list *bl, va_list ap)
{
result = skill_unit_onout(unit,target,tick);
if (flag&2 && result) { //Store this unit id.
- if (skill_unit_index < 7)
+ if (skill_unit_index < (sizeof(skill_unit_temp)/sizeof(int)))
skill_unit_temp[skill_unit_index++] = result;
else if (battle_config.error_log)
ShowError("skill_unit_move_sub: Reached limit of unit objects per cell!\n");
@@ -10219,7 +10221,8 @@ int skill_unit_move (struct block_list *bl, unsigned int tick, int flag)
if (flag&2 && flag&1)
{ //Onplace, check any skill units you have left.
int i;
- for (i=0; i< 8 && skill_unit_temp[i]>0; i++)
+ for (i=0; i < (sizeof(skill_unit_temp)/sizeof(int)) &&
+ skill_unit_temp[i]; i++)
skill_unit_onleft(skill_unit_temp[i], bl, tick);
}