Fixes battle config skill_removetrap_type (#4865)
* Fixes an array out of bounds check when attempting to return used traps to a player through HT_REMOVETRAP. Thanks to @marky291!
This commit is contained in:
parent
40c776340f
commit
e92f88a030
@ -9008,14 +9008,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
|
||||
{ // get back all items used to deploy the trap
|
||||
for( i = 0; i < MAX_SKILL_ITEM_REQUIRE; i++ )
|
||||
{
|
||||
if( skill_group->require.itemid[i + 1] > 0 )
|
||||
if( skill_group->require.itemid[i] > 0 )
|
||||
{
|
||||
int flag2;
|
||||
struct item item_tmp;
|
||||
memset(&item_tmp,0,sizeof(item_tmp));
|
||||
item_tmp.nameid = skill_group->require.itemid[i + 1];
|
||||
item_tmp.nameid = skill_group->require.itemid[i];
|
||||
item_tmp.identify = 1;
|
||||
item_tmp.amount = skill_group->require.amount[i + 1];
|
||||
item_tmp.amount = skill_group->require.amount[i];
|
||||
if( item_tmp.nameid && (flag2=pc_additem(sd,&item_tmp,item_tmp.amount,LOG_TYPE_OTHER)) ){
|
||||
clif_additem(sd,0,0,flag2);
|
||||
map_addflooritem(&item_tmp,item_tmp.amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,4,0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user