mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
Add rule Character:FinalExpMultiplier - Added on top of everything else, easy for setting EXP events
This commit is contained in:
parent
482816058f
commit
32407dbb56
@ -52,6 +52,7 @@ RULE_BOOL(Character, LeaveCorpses, true, "Setting whether you leave a corpse beh
|
|||||||
RULE_BOOL(Character, LeaveNakedCorpses, false, "Setting whether you leave a corpse without items")
|
RULE_BOOL(Character, LeaveNakedCorpses, false, "Setting whether you leave a corpse without items")
|
||||||
RULE_INT(Character, MaxDraggedCorpses, 2, "Maximum number of corpses you can drag at once")
|
RULE_INT(Character, MaxDraggedCorpses, 2, "Maximum number of corpses you can drag at once")
|
||||||
RULE_REAL(Character, DragCorpseDistance, 400, "If a player is using /corpsedrag and moving, the corpse will not move until the player exceeds this distance")
|
RULE_REAL(Character, DragCorpseDistance, 400, "If a player is using /corpsedrag and moving, the corpse will not move until the player exceeds this distance")
|
||||||
|
RULE_REAL(Character, FinalExpMultiplier, 1, "Added on top of everything else, easy for setting EXP events")
|
||||||
RULE_REAL(Character, ExpMultiplier, 0.5, "If greater than 0, the experience gained is multiplied by this value. ")
|
RULE_REAL(Character, ExpMultiplier, 0.5, "If greater than 0, the experience gained is multiplied by this value. ")
|
||||||
RULE_REAL(Character, AAExpMultiplier, 0.5, "If greater than 0, the AA experience gained is multiplied by this value. ")
|
RULE_REAL(Character, AAExpMultiplier, 0.5, "If greater than 0, the AA experience gained is multiplied by this value. ")
|
||||||
RULE_REAL(Character, GroupExpMultiplier, 0.5, "The experience in a group is multiplied by this value in addition to the group multiplier. The group multiplier is: 2 members=x 1.2, 3=x1.4, 4=x1.6, 5=x1.8, 6=x2.16")
|
RULE_REAL(Character, GroupExpMultiplier, 0.5, "The experience in a group is multiplied by this value in addition to the group multiplier. The group multiplier is: 2 members=x 1.2, 3=x1.4, 4=x1.6, 5=x1.8, 6=x2.16")
|
||||||
|
|||||||
22
zone/exp.cpp
22
zone/exp.cpp
@ -194,6 +194,10 @@ uint32 Client::CalcEXP(uint8 conlevel) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (RuleR(Character, FinalExpMultiplier) >= 0) {
|
||||||
|
in_add_exp *= RuleR(Character, FinalExpMultiplier);
|
||||||
|
}
|
||||||
|
|
||||||
return in_add_exp;
|
return in_add_exp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,6 +315,10 @@ void Client::CalculateStandardAAExp(uint32 &add_aaxp, uint8 conlevel, bool resex
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (RuleR(Character, FinalExpMultiplier) >= 0) {
|
||||||
|
add_aaxp *= RuleR(Character, FinalExpMultiplier);
|
||||||
|
}
|
||||||
|
|
||||||
add_aaxp = (uint32)(RuleR(Character, AAExpMultiplier) * add_aaxp * aatotalmod);
|
add_aaxp = (uint32)(RuleR(Character, AAExpMultiplier) * add_aaxp * aatotalmod);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -466,6 +474,10 @@ void Client::CalculateExp(uint32 in_add_exp, uint32 &add_exp, uint32 &add_aaxp,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (RuleR(Character, FinalExpMultiplier) >= 0) {
|
||||||
|
add_exp *= RuleR(Character, FinalExpMultiplier);
|
||||||
|
}
|
||||||
|
|
||||||
add_exp = GetEXP() + add_exp;
|
add_exp = GetEXP() + add_exp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -961,14 +973,16 @@ void Client::AddLevelBasedExp(uint8 exp_percentage, uint8 max_level, bool ignore
|
|||||||
xp_for_level = GetEXPForLevel(max_level + 1) - GetEXPForLevel(max_level);
|
xp_for_level = GetEXPForLevel(max_level + 1) - GetEXPForLevel(max_level);
|
||||||
award = xp_for_level * exp_percentage / 100;
|
award = xp_for_level * exp_percentage / 100;
|
||||||
|
|
||||||
if(RuleB(Zone, LevelBasedEXPMods) && !ignore_mods)
|
if (RuleB(Zone, LevelBasedEXPMods) && !ignore_mods) {
|
||||||
{
|
if (zone->level_exp_mod[GetLevel()].ExpMod) {
|
||||||
if(zone->level_exp_mod[GetLevel()].ExpMod)
|
|
||||||
{
|
|
||||||
award *= zone->level_exp_mod[GetLevel()].ExpMod;
|
award *= zone->level_exp_mod[GetLevel()].ExpMod;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (RuleR(Character, FinalExpMultiplier) >= 0) {
|
||||||
|
award *= RuleR(Character, FinalExpMultiplier);
|
||||||
|
}
|
||||||
|
|
||||||
uint32 newexp = GetEXP() + award;
|
uint32 newexp = GetEXP() + award;
|
||||||
SetEXP(newexp, GetAAXP());
|
SetEXP(newexp, GetAAXP());
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user