Skip to content

Commit

Permalink
Merge pull request #3226 from csnv/feature/venom_dust_setting
Browse files Browse the repository at this point in the history
Added toggle to allow venom dust to give experience points
  • Loading branch information
MishimaHaruna authored Aug 16, 2023
2 parents 3faa147 + 63fd76f commit 224e9d6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions conf/map/battle/battle.conf
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,7 @@ knockback_left: true
// Should the target be able of dodging damage by snapping away to the edge of the screen?
// Official behavior is false
snap_dodge: false

// Should Venom Dust give experience based on the amount of damage caused by its poison?
// Official behavior is false
venom_dust_exp: false
1 change: 1 addition & 0 deletions src/map/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -7853,6 +7853,7 @@ static const struct config_data_old battle_data[] = {
{ "dynamic_npc_range", &battle_config.dynamic_npc_range, 0, 0, INT_MAX, },
{ "features/goldpc/enable", &battle_config.feature_goldpc_enable, 0, 0, 1, },
{ "features/goldpc/default_mode", &battle_config.feature_goldpc_default_mode, 1, 0, INT_MAX, },
{ "venom_dust_exp", &battle_config.venom_dust_exp, 0, 0, 1, },
};

static bool battle_set_value_sub(int index, int value)
Expand Down
2 changes: 2 additions & 0 deletions src/map/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,8 @@ struct Battle_Config {

int feature_goldpc_enable;
int feature_goldpc_default_mode;

int venom_dust_exp; // Enable exp given by venom dust
};

/* criteria for battle_config.idletime_criteria */
Expand Down
4 changes: 2 additions & 2 deletions src/map/skill.c
Original file line number Diff line number Diff line change
Expand Up @@ -14157,8 +14157,8 @@ static int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *b
break;

case UNT_VENOMDUST:
if(tsc && !tsc->data[type])
status->change_start(ss, bl, type, 10000, sg->skill_lv, sg->group_id, 0, 0, skill->get_time2(sg->skill_id, sg->skill_lv), SCFLAG_NONE, skill_id);
if (tsc != NULL && tsc->data[type] == NULL)
status->change_start(ss, bl, type, 10000, sg->skill_lv, battle_config.venom_dust_exp != 0 ? sg->src_id : sg->group_id, 0, 0, skill->get_time2(sg->skill_id, sg->skill_lv), SCFLAG_NONE, skill_id);
break;

case UNT_MAGENTATRAP:
Expand Down

0 comments on commit 224e9d6

Please sign in to comment.