summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/skill.c19
-rw-r--r--src/map/skill.h2
-rw-r--r--src/map/status.c8
4 files changed, 16 insertions, 15 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 0a6d302c1..0f943c5c4 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -314,7 +314,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
struct skill_unit_group* group = skill_id2group(sc->data[SC_SAFETYWALL]->val3);
if (group) {
if (--group->val2<=0)
- skill_delunitgroup(NULL,group);
+ skill_delunitgroup(group);
d->dmg_lv = ATK_BLOCK;
return 0;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index e2bbe6707..227ae1fe1 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -7097,7 +7097,7 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, short skilli
if (!group->alive_count)
{ //No cells? Something that was blocked completely by Land Protector?
- skill_delunitgroup(src, group);
+ skill_delunitgroup(group);
return NULL;
}
@@ -7187,7 +7187,7 @@ static int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, un
unsigned short m = sg->val3;
if( --sg->val1 <= 0 )
- skill_delunitgroup(NULL, sg);
+ skill_delunitgroup(sg);
pc_setpos(sd,m,x,y,3);
sg = src->group; // avoid dangling pointer (pc_setpos can cause deletion of 'sg')
@@ -7399,7 +7399,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
sg->val1--;
}
if( sg->val1 <= 0 )
- skill_delunitgroup(NULL,sg);
+ skill_delunitgroup(sg);
break;
case UNT_EVILLAND:
@@ -9611,7 +9611,7 @@ int skill_clear_group (struct block_list *bl, int flag)
}
for (i=0;i<count;i++)
- skill_delunitgroup(bl, group[i]);
+ skill_delunitgroup(group[i]);
return count;
}
@@ -10000,7 +10000,7 @@ int skill_delunit (struct skill_unit* unit)
map_deliddb(&unit->bl);
idb_remove(skillunit_db, unit->bl.id);
if(--group->alive_count==0)
- skill_delunitgroup(NULL, group);
+ skill_delunitgroup(group);
return 0;
}
@@ -10062,7 +10062,7 @@ struct skill_unit_group* skill_initunitgroup (struct block_list* src, int count,
maxdiff=x;
j=i;
}
- skill_delunitgroup(src, ud->skillunit[j]);
+ skill_delunitgroup(ud->skillunit[j]);
//Since elements must have shifted, we use the last slot.
i = MAX_SKILLUNITGROUP-1;
}
@@ -10100,14 +10100,15 @@ struct skill_unit_group* skill_initunitgroup (struct block_list* src, int count,
/*==========================================
*
*------------------------------------------*/
-int skill_delunitgroup (struct block_list *src, struct skill_unit_group *group)
+int skill_delunitgroup (struct skill_unit_group *group)
{
+ struct block_list* src;
struct unit_data *ud;
int i,j;
nullpo_retr(0, group);
- if (!src) src=map_id2bl(group->src_id);
+ src=map_id2bl(group->src_id);
ud = unit_bl2ud(src);
if(!src || !ud) {
ShowError("skill_delunitgroup: Group's source not found! (src_id: %d skill_id: %d)\n", group->src_id, group->skill_id);
@@ -10191,7 +10192,7 @@ int skill_clear_unitgroup (struct block_list *src)
nullpo_retr(0, ud);
while (ud->skillunit[0])
- skill_delunitgroup(src, ud->skillunit[0]);
+ skill_delunitgroup(ud->skillunit[0]);
return 1;
}
diff --git a/src/map/skill.h b/src/map/skill.h
index bb1e10ef3..795cdf65b 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -278,7 +278,7 @@ struct skill_unit_group *skill_unitsetting(struct block_list* src, short skillid
struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int x, int y, int val1, int val2);
int skill_delunit(struct skill_unit *unit);
struct skill_unit_group *skill_initunitgroup(struct block_list* src, int count, short skillid, short skilllv, int unit_id, int limit, int interval);
-int skill_delunitgroup(struct block_list *src, struct skill_unit_group *group);
+int skill_delunitgroup(struct skill_unit_group *group);
int skill_clear_unitgroup(struct block_list *src);
int skill_clear_group(struct block_list *bl, int flag);
diff --git a/src/map/status.c b/src/map/status.c
index 62170bf27..20c4e072a 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -704,7 +704,7 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s
{
struct skill_unit_group* sg = skill_id2group(sce->val4);
if (sg) {
- skill_delunitgroup(target,sg);
+ skill_delunitgroup(sg);
sce->val4 = 0;
status_change_end(target, SC_GRAVITATION, -1);
}
@@ -6438,7 +6438,7 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
{// erase associated land skill
group = skill_id2group(sce->val2);
sce->val2 = 0;
- skill_delunitgroup(NULL, group);
+ skill_delunitgroup(group);
}
if((sce->val1&0xFFFF) == CG_MOONLIT)
@@ -6520,7 +6520,7 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
if (sce->val3) { //Clear the group.
struct skill_unit_group* group = skill_id2group(sce->val3);
sce->val3 = 0;
- skill_delunitgroup(bl, group);
+ skill_delunitgroup(group);
}
break;
case SC_HERMODE:
@@ -6537,7 +6537,7 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
if (sce->val4) { //Clear the group.
struct skill_unit_group* group = skill_id2group(sce->val4);
sce->val4 = 0;
- skill_delunitgroup(bl, group);
+ skill_delunitgroup(group);
}
break;
case SC_KAAHI: