public void Reward() { // 3. Reward killer (and group, if necessary). if (_group) { // 3.1. If killer is in group, reward group. _RewardGroup(); } else { // 3.2. Reward single killer (not group case). // 3.2.1. Initialize initial XP amount based on killer's level. _InitXP(_killer); // To avoid unnecessary calculations and calls, // proceed only if XP is not ZERO or player is not on Battleground // (Battlegroundrewards only XP, that's why). if (!_isBattleground || _xp != 0) { // 3.2.2. Reward killer. _RewardPlayer(_killer, false); } } // 5. Credit instance encounter. // 6. Update guild achievements. // 7. Credit scenario criterias Creature victim = _victim.ToCreature(); if (victim != null) { if (victim.IsDungeonBoss()) { InstanceScript instance = _victim.GetInstanceScript(); if (instance != null) { instance.UpdateEncounterStateForKilledCreature(_victim.GetEntry(), _victim); } } uint guildId = victim.GetMap().GetOwnerGuildId(); var guild = Global.GuildMgr.GetGuildById(guildId); if (guild != null) { guild.UpdateCriteria(CriteriaTypes.KillCreature, victim.GetEntry(), 1, 0, victim, _killer); } Scenario scenario = victim.GetScenario(); if (scenario != null) { scenario.UpdateCriteria(CriteriaTypes.KillCreature, victim.GetEntry(), 1, 0, victim, _killer); } } }