#W# Started work on guild rings.

This commit is contained in:
WarrentyExpired 2026-07-24 19:06:22 -04:00
parent 000d16eab6
commit 6cb014d51c
7 changed files with 201 additions and 2 deletions

View file

@ -1,7 +1,7 @@
using System;
using Server;
using Server.Mobiles;
using Server.Items;
namespace Server.Misc
{
public enum Trades
@ -110,6 +110,27 @@ namespace Server.Misc
else if ( trade == Trades.Tailoring ){ value += (m.Dex*0.65)+(m.Int*0.35); if ( !raw && pm.NpcGuild == NpcGuild.TailorsGuild ){ value += 20; } }
else if ( trade == Trades.Tinkering ){ value += (m.Dex*0.5)+(m.Int*0.5); if ( !raw && pm.NpcGuild == NpcGuild.TinkersGuild ){ value += 20; } }
}
// --- CUSTOM TRADE BONUSES FROM ITEMS START ---
if ( !raw && m is PlayerMobile )
{
PlayerMobile pm = (PlayerMobile)m;
// Loop through every item the player is currently wearing/holding
foreach ( Item item in m.Items )
{
if ( item is ITradeSkillBonus )
{
ITradeSkillBonus bonusItem = (ITradeSkillBonus)item;
// Check if it boosts the right trade AND the player is in the required guild!
if ( bonusItem.TradeSkill == trade && pm.NpcGuild == bonusItem.RequiredGuild )
{
value += bonusItem.TradeBonus;
}
}
}
}
// --- CUSTOM TRADE BONUSES FROM ITEMS END ---
if ( value > 100 )
value = 100;