public void AddTinker( CraftResource cr, BaseRunicTool brt, Mobile from) { if ( ht_Tinker == null ) ht_Tinker = new Hashtable(); int i_Have = 0; if ( ht_Tinker[cr] != null ) i_Have = (int)ht_Tinker[cr]; if ( i_Have < 60000 ) { if ( i_Have + brt.UsesRemaining > 60000 ) { brt.UsesRemaining = i_Have + brt.UsesRemaining - 60000; i_Have = 60000; } else { i_Have += brt.UsesRemaining; brt.Delete(); } if ( ht_Tinker.ContainsKey(cr) ) ht_Tinker[cr] = i_Have; else ht_Tinker.Add(cr, i_Have); BeginCombine( from ); from.SendGump( new RunicHouseGump( from, this ) ); from.SendMessage(88, "You added the runic charges."); return; } from.SendGump( new RunicHouseGump( from, this ) ); from.SendMessage(33, "You can't add more charges, the limit is 60,000."); }
public void AddTinker(CraftResource cr, BaseRunicTool brt, Mobile from) { if (ht_Tinker == null) { ht_Tinker = new Hashtable(); } int i_Have = 0; if (ht_Tinker[cr] != null) { i_Have = (int)ht_Tinker[cr]; } if (i_Have < 60000) { if (i_Have + brt.UsesRemaining > 60000) { brt.UsesRemaining = i_Have + brt.UsesRemaining - 60000; i_Have = 60000; } else { i_Have += brt.UsesRemaining; brt.Delete(); } if (ht_Tinker.ContainsKey(cr)) { ht_Tinker[cr] = i_Have; } else { ht_Tinker.Add(cr, i_Have); } BeginCombine(from); from.SendGump(new RunicHouseGump(from, this)); from.SendMessage(88, "You added the runic charges."); return; } from.SendGump(new RunicHouseGump(from, this)); from.SendMessage(33, "You can't add more charges, the limit is 60,000."); }