Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Commit

Permalink
Add setting for shared blood pact timer
Browse files Browse the repository at this point in the history
  • Loading branch information
slassen committed Jul 8, 2018
1 parent 3cee0e6 commit c82db51
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions conf/map_darkstar.conf
Expand Up @@ -136,6 +136,9 @@ player_stat_multiplier: 1.0
#Adjust the recast time for abilities. Acts as a multiplier, so default is 1
ability_recast_multiplier: 1.0

#Enable/disable shared blood pact timer
blood_pact_shared_timer: 0

#Adjust mob drop rate. Acts as a multiplier, so default is 1.
drop_rate_multiplier: 1.0

Expand Down
7 changes: 7 additions & 0 deletions src/map/entities/charentity.cpp
Expand Up @@ -1101,6 +1101,13 @@ void CCharEntity::OnAbility(CAbilityState& state, action_t& action)
state.ApplyEnmity();
}
PRecastContainer->Add(RECAST_ABILITY, PAbility->getRecastId(), action.recast);

uint16 recastID = PAbility->getRecastId();
if (map_config.blood_pact_shared_timer && (recastID == 173 || recastID == 174))
{
PRecastContainer->Add(RECAST_ABILITY, (recastID == 173 ? 174 : 173), action.recast);
}

pushPacket(new CCharRecastPacket(this));

//#TODO: refactor
Expand Down
5 changes: 5 additions & 0 deletions src/map/map.cpp
Expand Up @@ -982,6 +982,7 @@ int32 map_config_default()
map_config.mob_stat_multiplier = 1.0f;
map_config.player_stat_multiplier = 1.0f;
map_config.ability_recast_multiplier = 1.0f;
map_config.blood_pact_shared_timer = 0;
map_config.vanadiel_time_offset = 0;
map_config.lightluggage_block = 4;
map_config.max_time_lastupdate = 60000;
Expand Down Expand Up @@ -1169,6 +1170,10 @@ int32 map_config_read(const int8* cfgName)
{
map_config.ability_recast_multiplier = (float)atof(w2);
}
else if (strcmp(w1, "blood_pact_shared_timer") == 0)
{
map_config.blood_pact_shared_timer = atoi(w2);
}
else if (strcmp(w1, "drop_rate_multiplier") == 0)
{
map_config.drop_rate_multiplier = (float)atof(w2);
Expand Down
1 change: 1 addition & 0 deletions src/map/map.h
Expand Up @@ -114,6 +114,7 @@ struct map_config_t
float mob_stat_multiplier; // Multiplier for str/vit/etc of mobs
float player_stat_multiplier; // Multiplier for str/vit/etc. of NMs of player
float ability_recast_multiplier; // Adjust ability recast time
int8 blood_pact_shared_timer; // Default is 0. Disable/enable old school shared timer for SMN blood pacts.
float drop_rate_multiplier; // Multiplier for drops
uint32 all_mobs_gil_bonus; // Sets the amount of bonus gil (per level) all mobs will drop.
uint32 max_gil_bonus; // Maximum total bonus gil that can be dropped. Default 9999 gil.
Expand Down

0 comments on commit c82db51

Please sign in to comment.