[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
2021-02-23 09:50:38 -08:00
committed by GitHub
parent 65704274cb
commit bf3593a60d
8 changed files with 22 additions and 6 deletions
+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;