/// <summary> /// This method is called whenever a player tries to interact with this object /// </summary> /// <param name="player"></param> /// <returns></returns> public override bool Interact(GamePlayer player) { if (!base.Interact(player)) { return(false); } if (!player.IsAlive) { player.Out.SendMessage("You cannot pickup " + GetName(0, false) + ". You are dead!", eChatType.CT_System, eChatLoc.CL_SystemWindow); return(false); } if (IsMounted && player.Realm == Realm) { player.Out.SendMessage("You cannot pickup " + GetName(0, false) + ". It is owned by your realm.", eChatType.CT_System, eChatLoc.CL_SystemWindow); return(false); } if (IsMounted && !RelicMgr.CanPickupRelicFromShrine(player, this)) { player.Out.SendMessage("You cannot pickup " + GetName(0, false) + ". You need to capture your realms " + Enum.GetName(typeof(eRelicType), RelicType) + " relic first.", eChatType.CT_System, eChatLoc.CL_SystemWindow); return(false); } PlayerTakesRelic(player); return(true); }
/// <summary> /// add the relicpad to world /// </summary> /// <returns></returns> public override bool AddToWorld() { m_area = new PadArea(this); CurrentRegion.AddArea(m_area); bool success = base.AddToWorld(); if (success) { /* * <[RF][BF]Cerian> mid: mjolnerr faste (str) * <[RF][BF]Cerian> mjollnerr * <[RF][BF]Cerian> grallarhorn faste (magic) * <[RF][BF]Cerian> alb: Castle Excalibur (str) * <[RF][BF]Cerian> Castle Myrddin (magic) * <[RF][BF]Cerian> Hib: Dun Lamfhota (str), Dun Dagda (magic) */ //Name = GlobalConstants.RealmToName((DOL.GS.PacketHandler.eRealm)Realm)+ " Relic Pad"; RelicMgr.AddRelicPad(this); } return(success); }
/// <summary> /// Delve Player Bonuses for Info Window /// </summary> /// <param name="player"></param> /// <returns></returns> public static ICollection <string> GetBonusesInfo(this GamePlayer player) { var info = new List <string>(); /* * <Begin Info: Bonuses (snapshot)> * Resistances * Crush: +25%/+0% * Slash: +28%/+0% * Thrust: +28%/+0% * Heat: +25%/+0% * Cold: +25%/+0% * Matter: +26%/+0% * Body: +31%/+0% * Spirit: +21%/+0% * Energy: +26%/+0% * * Special Item Bonuses +20% to Power Pool +3% to all Melee Damage +6% to all Stat Buff Spells +23% to all Heal Spells +3% to Melee Combat Speed +10% to Casting Speed * * Realm Rank Bonuses +7 to ALL Specs * * Relic Bonuses +20% to all Melee Damage * * Outpost Bonuses * none * * <End Info> */ // AbilityBonus[(int)((eProperty)updateResists[i])] info.Add(LanguageMgr.GetTranslation(player.Client.Account.Language, "PlayerBonusesListRequestHandler.HandlePacket.Resist")); info.Add(string.Format(" {2}: {0:+0;-0}%/\t{1:+0;-0}%", player.GetModified(eProperty.Resist_Crush) - player.AbilityBonus[(int)eProperty.Resist_Crush], player.AbilityBonus[(int)eProperty.Resist_Crush], SkillBase.GetPropertyName(eProperty.Resist_Crush))); info.Add(string.Format(" {2}: {0:+0;-0}%/{1:+0;-0}%", player.GetModified(eProperty.Resist_Slash) - player.AbilityBonus[(int)eProperty.Resist_Slash], player.AbilityBonus[(int)eProperty.Resist_Slash], SkillBase.GetPropertyName(eProperty.Resist_Slash))); info.Add(string.Format(" {2}: {0:+0;-0}%/{1:+0;-0}%", player.GetModified(eProperty.Resist_Thrust) - player.AbilityBonus[(int)eProperty.Resist_Thrust], player.AbilityBonus[(int)eProperty.Resist_Thrust], SkillBase.GetPropertyName(eProperty.Resist_Thrust))); info.Add(string.Format(" {2}: {0:+0;-0}%/{1:+0;-0}%", player.GetModified(eProperty.Resist_Heat) - player.AbilityBonus[(int)eProperty.Resist_Heat], player.AbilityBonus[(int)eProperty.Resist_Heat], SkillBase.GetPropertyName(eProperty.Resist_Heat))); info.Add(string.Format(" {2}: {0:+0;-0}%/{1:+0;-0}%", player.GetModified(eProperty.Resist_Cold) - player.AbilityBonus[(int)eProperty.Resist_Cold], player.AbilityBonus[(int)eProperty.Resist_Cold], SkillBase.GetPropertyName(eProperty.Resist_Cold))); info.Add(string.Format(" {2}: {0:+0;-0}%/{1:+0;-0}%", player.GetModified(eProperty.Resist_Matter) - player.AbilityBonus[(int)eProperty.Resist_Matter], player.AbilityBonus[(int)eProperty.Resist_Matter], SkillBase.GetPropertyName(eProperty.Resist_Matter))); info.Add(string.Format(" {2}: {0:+0;-0}%/{1:+0;-0}%", player.GetModified(eProperty.Resist_Body) - player.AbilityBonus[(int)eProperty.Resist_Body], player.AbilityBonus[(int)eProperty.Resist_Body], SkillBase.GetPropertyName(eProperty.Resist_Body))); info.Add(string.Format(" {2}: {0:+0;-0}%/{1:+0;-0}%", player.GetModified(eProperty.Resist_Spirit) - player.AbilityBonus[(int)eProperty.Resist_Spirit], player.AbilityBonus[(int)eProperty.Resist_Spirit], SkillBase.GetPropertyName(eProperty.Resist_Spirit))); info.Add(string.Format(" {2}: {0:+0;-0}%/{1:+0;-0}%", player.GetModified(eProperty.Resist_Energy) - player.AbilityBonus[(int)eProperty.Resist_Energy], player.AbilityBonus[(int)eProperty.Resist_Energy], SkillBase.GetPropertyName(eProperty.Resist_Energy))); info.Add(string.Format(" {2}: {0:+0;-0}%/{1:+0;-0}%", player.GetModified(eProperty.Resist_Natural) - player.AbilityBonus[(int)eProperty.Resist_Natural], player.AbilityBonus[(int)eProperty.Resist_Natural], SkillBase.GetPropertyName(eProperty.Resist_Natural))); info.Add(" "); info.Add(LanguageMgr.GetTranslation(player.Client.Account.Language, "PlayerBonusesListRequestHandler.HandlePacket.Special")); // This is an Array of the bonuses that show up in the Bonus Snapshot on Live, the only ones that really need to be there. int[] bonusToBeDisplayed = new int[36] { 10, 150, 151, 153, 154, 155, 173, 174, 179, 180, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 247, 248, 251, 252, 253, 254, 210 }; for (int i = 0; i < (int)eProperty.MaxProperty; i++) { if ((player.ItemBonus[i] > 0) && (Array.BinarySearch(bonusToBeDisplayed, i) >= 0)) // Tiny edit here to add the binary serach to weed out the non essential bonuses { if (player.ItemBonus[i] != 0) { // LIFEFLIGHT Add, to correct power pool from showing too much // This is where we need to correct the display, make it cut off at the cap if // Same with hits and hits cap if (i == (int)eProperty.PowerPool) { int powercap = player.ItemBonus[(int)eProperty.PowerPoolCapBonus]; if (powercap > 50) { powercap = 50; } int powerpool = player.ItemBonus[(int)eProperty.PowerPool]; if (powerpool > powercap + 25) { int tempbonus = powercap + 25; info.Add(ItemBonusDescription(tempbonus, i)); } else { int tempbonus = powerpool; info.Add(ItemBonusDescription(tempbonus, i)); } } else if (i == (int)eProperty.MaxHealth) { int hitscap = player.ItemBonus[(int)eProperty.MaxHealthCapBonus]; if (hitscap > 200) { hitscap = 200; } int hits = player.ItemBonus[(int)eProperty.MaxHealth]; if (hits > hitscap + 200) { int tempbonus = hitscap + 200; info.Add(ItemBonusDescription(tempbonus, i)); } else { int tempbonus = hits; info.Add(ItemBonusDescription(tempbonus, i)); } } else { info.Add(ItemBonusDescription(player.ItemBonus[i], i)); } } } } info.Add(" "); info.Add(LanguageMgr.GetTranslation(player.Client.Account.Language, "PlayerBonusesListRequestHandler.HandlePacket.Realm")); if (player.RealmLevel > 10) { info.Add(string.Format(LanguageMgr.GetTranslation(player.Client.Account.Language, "PlayerBonusesListRequestHandler.HandlePacket.Specs", player.RealmLevel / 10))); } else { info.Add(" none"); } info.Add(" "); info.Add(LanguageMgr.GetTranslation(player.Client.Account.Language, "PlayerBonusesListRequestHandler.HandlePacket.Relic")); double meleeRelicBonus = RelicMgr.GetRelicBonusModifier(player.Realm, eRelicType.Strength); double magicRelicBonus = RelicMgr.GetRelicBonusModifier(player.Realm, eRelicType.Magic); info.Add(LanguageMgr.GetTranslation(player.Client.Account.Language, "PlayerBonusesListRequestHandler.HandlePacket.Melee", meleeRelicBonus * 100)); info.Add(LanguageMgr.GetTranslation(player.Client.Account.Language, "PlayerBonusesListRequestHandler.HandlePacket.Magic", magicRelicBonus * 100)); info.Add(" "); info.Add(LanguageMgr.GetTranslation(player.Client.Account.Language, "PlayerBonusesListRequestHandler.HandlePacket.Outpost")); info.Add("TODO, this needs to be written"); return(info); }