summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-05-23 15:13:23 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-05-23 16:03:59 +0200
commit52fca53139167fe93e7251de269d764b001daa66 (patch)
treee4ee10b4e5c617f5ff8a1ad37bfb1ccccda427fd /src
parentd90860857d0e6a30edad6c0df97e87b5eb110db9 (diff)
downloadhercules-52fca53139167fe93e7251de269d764b001daa66.tar.gz
hercules-52fca53139167fe93e7251de269d764b001daa66.tar.bz2
hercules-52fca53139167fe93e7251de269d764b001daa66.tar.xz
hercules-52fca53139167fe93e7251de269d764b001daa66.zip
Remove superfluous parameters file, line and func from skill_delunitgroup()
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c12
-rw-r--r--src/map/guild.c4
-rw-r--r--src/map/skill.c21
-rw-r--r--src/map/skill.h2
-rw-r--r--src/map/status.c12
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc12
7 files changed, 31 insertions, 36 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index c8cd71b94..a8193d24a 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2832,18 +2832,18 @@ static int64 battle_calc_damage(struct block_list *src, struct block_list *bl, s
d->dmg_lv = ATK_BLOCK;
if(src_skill_id == MH_STEINWAND){
if (--group->val2<=0)
- skill->del_unitgroup(group,ALC_MARK);
+ skill->del_unitgroup(group);
if( (group->val3 - damage) > 0 )
group->val3 -= (int)cap_value(damage, INT_MIN, INT_MAX);
else
- skill->del_unitgroup(group,ALC_MARK);
+ skill->del_unitgroup(group);
return 0;
}
if( skill_id == SO_ELEMENTAL_SHIELD ) {
if ( ( group->val2 - damage) > 0 ) {
group->val2 -= (int)cap_value(damage,INT_MIN,INT_MAX);
} else
- skill->del_unitgroup(group,ALC_MARK);
+ skill->del_unitgroup(group);
return 0;
}
/**
@@ -2853,12 +2853,12 @@ static int64 battle_calc_damage(struct block_list *src, struct block_list *bl, s
if ( ( group->val2 - damage) > 0 ) {
group->val2 -= (int)cap_value(damage,INT_MIN,INT_MAX);
} else
- skill->del_unitgroup(group,ALC_MARK);
+ skill->del_unitgroup(group);
if (--group->val3<=0)
- skill->del_unitgroup(group,ALC_MARK);
+ skill->del_unitgroup(group);
#else
if (--group->val2<=0)
- skill->del_unitgroup(group,ALC_MARK);
+ skill->del_unitgroup(group);
#endif
return 0;
}
diff --git a/src/map/guild.c b/src/map/guild.c
index f344878e1..90f870f1c 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1519,7 +1519,7 @@ static void guild_guildaura_refresh(struct map_session_data *sd, uint16 skill_id
if( !skill_lv )
return;
if (sd->sc.data[type] && (group = skill->id2group(sd->sc.data[type]->val4)) != NULL) {
- skill->del_unitgroup(group,ALC_MARK);
+ skill->del_unitgroup(group);
status_change_end(&sd->bl,type,INVALID_TIMER);
}
group = skill->unitsetting(&sd->bl,skill_id,skill_lv,sd->bl.x,sd->bl.y,0);
@@ -2069,7 +2069,7 @@ static int guild_break(struct map_session_data *sd, const char *name)
}
}
for(i = 0; i < count; i++) { // FIXME: Why is this not done in the above loop?
- skill->del_unitgroup(groups[i],ALC_MARK);
+ skill->del_unitgroup(groups[i]);
}
}
diff --git a/src/map/skill.c b/src/map/skill.c
index caa1a0f29..e3fa6b0a1 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -12535,7 +12535,7 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16
if (!group->alive_count) {
//No cells? Something that was blocked completely by Land Protector?
- skill->del_unitgroup(group,ALC_MARK);
+ skill->del_unitgroup(group);
return NULL;
}
@@ -12651,7 +12651,7 @@ static int skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int
unsigned short m = sg->val3;
if( --count <= 0 )
- skill->del_unitgroup(sg,ALC_MARK);
+ skill->del_unitgroup(sg);
if ( map->mapindex2mapid(sg->val3) == sd->bl.m && x == sd->bl.x && y == sd->bl.y )
working = 1;/* we break it because officials break it, lovely stuff. */
@@ -12957,7 +12957,7 @@ static int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *b
sg->val1--;
}
if (sg->val1 <= 0)
- skill->del_unitgroup(sg, ALC_MARK);
+ skill->del_unitgroup(sg);
break;
case UNT_EVILLAND:
@@ -16644,7 +16644,7 @@ static int skill_clear_group(struct block_list *bl, int flag)
}
for (i=0;i<count;i++)
- skill->del_unitgroup(group[i],ALC_MARK);
+ skill->del_unitgroup(group[i]);
return count;
}
@@ -17292,7 +17292,7 @@ static int skill_delunit(struct skill_unit *su)
map->deliddb(&su->bl);
idb_remove(skill->unit_db, su->bl.id);
if(--group->alive_count==0)
- skill->del_unitgroup(group,ALC_MARK);
+ skill->del_unitgroup(group);
return 0;
}
@@ -17351,7 +17351,7 @@ static struct skill_unit_group *skill_initunitgroup(struct block_list *src, int
j = i;
}
}
- skill->del_unitgroup(ud->skillunit[j],ALC_MARK);
+ skill->del_unitgroup(ud->skillunit[j]);
//Since elements must have shifted, we use the last slot.
i = MAX_SKILLUNITGROUP-1;
}
@@ -17390,18 +17390,13 @@ static struct skill_unit_group *skill_initunitgroup(struct block_list *src, int
/*==========================================
*
*------------------------------------------*/
-static int skill_delunitgroup(struct skill_unit_group *group, const char *file, int line, const char *func)
+static int skill_delunitgroup(struct skill_unit_group *group)
{
struct block_list* src;
struct unit_data *ud;
int i,j;
struct map_session_data *sd = NULL;
- if( group == NULL ) {
- ShowDebug("skill_delunitgroup: group is NULL (source=%s:%d, %s)! Please report this! (#3504)\n", file, line, func);
- return 0;
- }
-
src = map->id2bl(group->src_id);
ud = unit->bl2ud(src);
sd = BL_CAST(BL_PC, src);
@@ -17533,7 +17528,7 @@ static int skill_clear_unitgroup(struct block_list *src)
nullpo_ret(ud);
while (ud->skillunit[0])
- skill->del_unitgroup(ud->skillunit[0],ALC_MARK);
+ skill->del_unitgroup(ud->skillunit[0]);
return 1;
}
diff --git a/src/map/skill.h b/src/map/skill.h
index 4dbbaf147..651a355cf 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -2020,7 +2020,7 @@ struct skill_interface {
struct skill_unit *(*initunit) (struct skill_unit_group *group, int idx, int x, int y, int val1, int val2);
int (*delunit) (struct skill_unit *su);
struct skill_unit_group *(*init_unitgroup) (struct block_list* src, int count, uint16 skill_id, uint16 skill_lv, int unit_id, int limit, int interval);
- int (*del_unitgroup) (struct skill_unit_group *group, const char* file, int line, const char* func);
+ int (*del_unitgroup) (struct skill_unit_group *group);
int (*clear_unitgroup) (struct block_list *src);
int (*clear_group) (struct block_list *bl, int flag);
int (*unit_onplace) (struct skill_unit *src, struct block_list *bl, int64 tick);
diff --git a/src/map/status.c b/src/map/status.c
index 13cf8b553..b0cb07d11 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1201,7 +1201,7 @@ static int status_damage(struct block_list *src, struct block_list *target, int6
if ((sce=sc->data[SC_GRAVITATION]) && sce->val3 == BCT_SELF) {
struct skill_unit_group* sg = skill->id2group(sce->val4);
if (sg) {
- skill->del_unitgroup(sg, ALC_MARK);
+ skill->del_unitgroup(sg);
sce->val4 = 0;
status_change_end(target, SC_GRAVITATION, INVALID_TIMER);
}
@@ -10979,7 +10979,7 @@ static int status_change_end_(struct block_list *bl, enum sc_type type, int tid)
sce->val2 = 0;
if( group )
- skill->del_unitgroup(group,ALC_MARK);
+ skill->del_unitgroup(group);
}
if ((sce->val1&0xFFFF) == CG_MOONLIT)
@@ -11083,7 +11083,7 @@ static int status_change_end_(struct block_list *bl, enum sc_type type, int tid)
struct skill_unit_group* group = skill->id2group(sce->val3);
sce->val3 = 0;
if( group )
- skill->del_unitgroup(group,ALC_MARK);
+ skill->del_unitgroup(group);
}
break;
case SC_HERMODE:
@@ -11102,7 +11102,7 @@ static int status_change_end_(struct block_list *bl, enum sc_type type, int tid)
struct skill_unit_group* group = skill->id2group(sce->val4);
sce->val4 = 0;
if( group ) /* might have been cleared before status ended, e.g. land protector */
- skill->del_unitgroup(group,ALC_MARK);
+ skill->del_unitgroup(group);
}
break;
case SC_KAAHI:
@@ -11200,7 +11200,7 @@ static int status_change_end_(struct block_list *bl, enum sc_type type, int tid)
struct skill_unit_group* group = skill->id2group(sce->val2);
sce->val2 = 0;
if (group) /* might have been cleared before status ended, e.g. land protector */
- skill->del_unitgroup(group,ALC_MARK);
+ skill->del_unitgroup(group);
}
break;
case SC_BANDING:
@@ -11208,7 +11208,7 @@ static int status_change_end_(struct block_list *bl, enum sc_type type, int tid)
struct skill_unit_group *group = skill->id2group(sce->val4);
sce->val4 = 0;
if( group ) /* might have been cleared before status ended, e.g. land protector */
- skill->del_unitgroup(group,ALC_MARK);
+ skill->del_unitgroup(group);
}
break;
case SC_CURSEDCIRCLE_ATKER:
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index e043ef768..fa336f704 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -7338,8 +7338,8 @@ typedef int (*HPMHOOK_pre_skill_delunit) (struct skill_unit **su);
typedef int (*HPMHOOK_post_skill_delunit) (int retVal___, struct skill_unit *su);
typedef struct skill_unit_group* (*HPMHOOK_pre_skill_init_unitgroup) (struct block_list **src, int *count, uint16 *skill_id, uint16 *skill_lv, int *unit_id, int *limit, int *interval);
typedef struct skill_unit_group* (*HPMHOOK_post_skill_init_unitgroup) (struct skill_unit_group* retVal___, struct block_list *src, int count, uint16 skill_id, uint16 skill_lv, int unit_id, int limit, int interval);
-typedef int (*HPMHOOK_pre_skill_del_unitgroup) (struct skill_unit_group **group, const char **file, int *line, const char **func);
-typedef int (*HPMHOOK_post_skill_del_unitgroup) (int retVal___, struct skill_unit_group *group, const char *file, int line, const char *func);
+typedef int (*HPMHOOK_pre_skill_del_unitgroup) (struct skill_unit_group **group);
+typedef int (*HPMHOOK_post_skill_del_unitgroup) (int retVal___, struct skill_unit_group *group);
typedef int (*HPMHOOK_pre_skill_clear_unitgroup) (struct block_list **src);
typedef int (*HPMHOOK_post_skill_clear_unitgroup) (int retVal___, struct block_list *src);
typedef int (*HPMHOOK_pre_skill_clear_group) (struct block_list **bl, int *flag);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 97c1a31c0..154f2bc59 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -78235,15 +78235,15 @@ struct skill_unit_group* HP_skill_init_unitgroup(struct block_list *src, int cou
}
return retVal___;
}
-int HP_skill_del_unitgroup(struct skill_unit_group *group, const char *file, int line, const char *func) {
+int HP_skill_del_unitgroup(struct skill_unit_group *group) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_del_unitgroup_pre > 0) {
- int (*preHookFunc) (struct skill_unit_group **group, const char **file, int *line, const char **func);
+ int (*preHookFunc) (struct skill_unit_group **group);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_del_unitgroup_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_del_unitgroup_pre[hIndex].func;
- retVal___ = preHookFunc(&group, &file, &line, &func);
+ retVal___ = preHookFunc(&group);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -78251,13 +78251,13 @@ int HP_skill_del_unitgroup(struct skill_unit_group *group, const char *file, int
}
}
{
- retVal___ = HPMHooks.source.skill.del_unitgroup(group, file, line, func);
+ retVal___ = HPMHooks.source.skill.del_unitgroup(group);
}
if (HPMHooks.count.HP_skill_del_unitgroup_post > 0) {
- int (*postHookFunc) (int retVal___, struct skill_unit_group *group, const char *file, int line, const char *func);
+ int (*postHookFunc) (int retVal___, struct skill_unit_group *group);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_del_unitgroup_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_del_unitgroup_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, group, file, line, func);
+ retVal___ = postHookFunc(retVal___, group);
}
}
return retVal___;