[Experience] Add exp mod to npc types to let a server op change the exp modifier (#1252)

* Add exp mod to npc types to let a server op change the exp modifier a npc gives (useful for custom content)

* Updated version.h
This commit is contained in:
Alex authored and GitHub committed 2021-02-23 11:50:38 -06:00
1 parent 65704274cb
commit bf3593a60d
8 files changed
+22 -6

No files matched your search

+9 -1
View File
@@ -215,7 +215,15 @@ uint32 Client::GetExperienceForKill(Mob *against)
if (against && against->IsNPC()) {
uint32 level = (uint32)against->GetLevel();
return EXP_FORMULA;
uint32 ret = EXP_FORMULA;
auto mod = against->GetKillExpMod();
if(mod >= 0) {
ret *= mod;
ret /= 100;
}
return ret;
}
return 0;