Some refactoring of code. and some cleanups

This commit is contained in:
hondacrx
2019-09-21 12:11:16 -04:00
parent 7c405230cc
commit 35c06c09fd
214 changed files with 1235 additions and 1341 deletions
+3 -3
View File
@@ -149,15 +149,15 @@ namespace Game
{
float xpMod = 1.0f;
gain = BaseGain(player.getLevel(), u.GetLevelForTarget(player));
gain = BaseGain(player.GetLevel(), u.GetLevelForTarget(player));
if (gain != 0 && creature)
{
// Players get only 10% xp for killing creatures of lower expansion levels than himself
if ((creature.GetCreatureTemplate().HealthScalingExpansion < (int)GetExpansionForLevel(player.getLevel())))
if ((creature.GetCreatureTemplate().HealthScalingExpansion < (int)GetExpansionForLevel(player.GetLevel())))
gain = (uint)Math.Round(gain / 10.0f);
if (creature.isElite())
if (creature.IsElite())
{
// Elites in instances have a 2.75x XP bonus instead of the regular 2x world bonus.
if (u.GetMap().IsDungeon())