public static void MonsterPointAward(int npcid, int npctype, int awardamount, EPRPlayer player) { MonsterAwardArgs e = new MonsterAwardArgs(); e.Handled = false; e.NPCID = npcid; e.NPCType = npctype; e.AwardAmount = awardamount; e.Player = player; if (OnMonsterPointAward != null) OnMonsterPointAward(e); }
public static void MonsterPointAward(int npcid, int npctype, int awardamount, EPRPlayer player) { MonsterAwardArgs e = new MonsterAwardArgs(); e.Handled = false; e.NPCID = npcid; e.NPCType = npctype; e.AwardAmount = awardamount; e.Player = player; if (OnMonsterPointAward != null) { OnMonsterPointAward(e); } }
public static void OnMonsterPointAward(MonsterAwardArgs e) { if (e.Player.AccountEnable && !e.Handled) { double gainedfinalflt = e.AwardAmount * PointMultiplier; if (e.Player.TSPlayer.Group.HasPermission("ladyluck") || e.Player.LadyLuck) gainedfinalflt = gainedfinalflt * LadyLucksMultiplier; e.AwardAmount = (int)gainedfinalflt; if (!EPRConfig.EnablePointShare) { EPREvents.PointOperate(e.Player, e.AwardAmount, PointOperateReason.MonsterKill); if (e.Player.Notify) e.Player.TSPlayer.SendMessage("you gained " + e.AwardAmount + " " + currname + "(s)!", Color.Green); } else { lock (ENPCs[e.NPCID].Attackers) { foreach (Attacker player in ENPCs[e.NPCID].Attackers) { EPREvents.PointOperate(e.Player, (int)(e.AwardAmount * player.DamageDealtPct), PointOperateReason.MonsterKill); if (player.attacker.Notify) player.attacker.TSPlayer.SendMessage("you gained " + ((int)(e.AwardAmount * player.DamageDealtPct)).ToString() + " " + currname + "(s)!", Color.Green); } } ENPCs[e.NPCID].Attackers.Clear(); } e.Handled = true; } }