summaryrefslogtreecommitdiff
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
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
-rw-r--r--Changelog-Trunk.txt7
-rw-r--r--src/map/clif.c4
-rw-r--r--src/map/mob.c1
-rw-r--r--src/map/skill.c19
4 files changed, 22 insertions, 9 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index ee863d33a..adf5c65c2 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,13 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2006/11/20
+ * 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) [Skotlex]
+ * Fixed a crash in clif_SkillInfoBlock if the passed player already
+ disconnected. [Skotlex]
+ * Added limiting drop rate to 100% from item-bonuses that depend on the
+ mob's level so that "@autoloot 100" will catch them. [Skotlex]
2006/11/19
* Removed security check since source level patch is applied.
* Reverted select(), created prompt().
diff --git a/src/map/clif.c b/src/map/clif.c
index 28e3f0ecd..b268818ce 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -4391,6 +4391,8 @@ int clif_skillinfoblock(struct map_session_data *sd)
nullpo_retr(0, sd);
fd=sd->fd;
+ if (!fd) return 0;
+
WFIFOHEAD(fd, MAX_SKILL * 37 + 4);
WFIFOW(fd,0)=0x10f;
for ( i = c = 0; i < MAX_SKILL; i++){
@@ -4416,7 +4418,7 @@ int clif_skillinfoblock(struct map_session_data *sd)
WFIFOW(fd,2)=len;
WFIFOSET(fd,len);
- return 0;
+ return 1;
}
/*==========================================
diff --git a/src/map/mob.c b/src/map/mob.c
index 36af27b17..3e5338654 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2020,6 +2020,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
drop_rate = battle_config.item_drop_adddrop_min;
else if (drop_rate > battle_config.item_drop_adddrop_max)
drop_rate = battle_config.item_drop_adddrop_max;
+ if (drop_rate > 10000) drop_rate = 10000;
}
else
//it's positive, then it goes as it is
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);
}