Removes literal variables (#257)

This commit is contained in:
Kamron Batman 2020-09-18 18:41:26 -07:00 • committed by GitHub
parent 580da8a0cc
commit 4d6e584b6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
359 changed files with 1306 additions and 1306 deletions

View file

@ -72,7 +72,7 @@ namespace Server.Gumps
{
if (button >= 0 && button < m_Types.Length)
{
@from.SendGump(new AddDoorGump(button));
from.SendGump(new AddDoorGump(button));
}
}
else

View file

@ -235,7 +235,7 @@ namespace Server.Gumps
{
a.Comments.Add(
new AccountComment(
@from.RawName,
from.RawName,
$"Duration: {(duration == TimeSpan.MaxValue ? "Infinite" : duration.ToString())}, Comment: {comment}"
)
);
@ -244,11 +244,11 @@ namespace Server.Gumps
if (duration == TimeSpan.MaxValue)
{
@from.SendMessage("Ban Duration: Infinite");
from.SendMessage("Ban Duration: Infinite");
}
else
{
@from.SendMessage("Ban Duration: {0}", duration);
from.SendMessage("Ban Duration: {0}", duration);
}
}
else

View file

@ -80,11 +80,11 @@ namespace Server.Gumps
if (m.Account == null)
{
@from.SendMessage("That player doesn't have an account loaded... weird.");
from.SendMessage("That player doesn't have an account loaded... weird.");
}
else
{
@from.SendGump(new CommentsGump((Account)m.Account));
from.SendGump(new CommentsGump((Account)m.Account));
}
}

View file

@ -74,11 +74,11 @@ namespace Server.Gumps
if (node == tree.Root)
{
tree.LastBranch.Remove(@from);
tree.LastBranch.Remove(from);
}
else
{
tree.LastBranch[@from] = node;
tree.LastBranch[from] = node;
}
m_Page = page;
@ -239,7 +239,7 @@ namespace Server.Gumps
if (branch != null)
{
@from.SendGump(new GoGump(0, @from, tree, branch));
from.SendGump(new GoGump(0, from, tree, branch));
}
}
@ -253,7 +253,7 @@ namespace Server.Gumps
{
if (m_Node.Parent != null)
{
@from.SendGump(new GoGump(0, @from, m_Tree, m_Node.Parent));
from.SendGump(new GoGump(0, from, m_Tree, m_Node.Parent));
}
break;
@ -262,7 +262,7 @@ namespace Server.Gumps
{
if (m_Page > 0)
{
@from.SendGump(new GoGump(m_Page - 1, @from, m_Tree, m_Node));
from.SendGump(new GoGump(m_Page - 1, from, m_Tree, m_Node));
}
break;
@ -271,7 +271,7 @@ namespace Server.Gumps
{
if ((m_Page + 1) * EntryCount < m_Node.Categories.Length + m_Node.Locations.Length)
{
@from.SendGump(new GoGump(m_Page + 1, @from, m_Tree, m_Node));
from.SendGump(new GoGump(m_Page + 1, from, m_Tree, m_Node));
}
break;
@ -294,7 +294,7 @@ namespace Server.Gumps
index -= m_Node.Categories.Length;
if (index < m_Node.Locations.Length)
{
@from.MoveToWorld(m_Node.Locations[index].Location, m_Tree.Map);
from.MoveToWorld(m_Node.Locations[index].Location, m_Tree.Map);
}
}

View file

@ -284,13 +284,13 @@ namespace Server.Gumps
/*AddHtmlLocalized( 10, 170, 275, 20, 1011237, LabelColor, false, false ); // Number of locked down items:
AddLabel( 310, 170, LabelHue, m_House.LockDownCount.ToString() );
AddHtmlLocalized( 10, 190, 275, 20, 1011238, LabelColor, false, false ); // Maximum locked down items:
AddLabel( 310, 190, LabelHue, m_House.MaxLockDowns.ToString() );
AddHtmlLocalized( 10, 210, 275, 20, 1011239, LabelColor, false, false ); // Number of secure containers:
AddLabel( 310, 210, LabelHue, m_House.SecureCount.ToString() );
AddHtmlLocalized( 10, 230, 275, 20, 1011240, LabelColor, false, false ); // Maximum number of secure containers:
AddLabel( 310, 230, LabelHue, m_House.MaxSecures.ToString() );*/
@ -682,7 +682,7 @@ namespace Server.Gumps
{
if (!house.Deleted)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Security, @from, house));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Security, from, house));
}
}
@ -690,7 +690,7 @@ namespace Server.Gumps
{
if (!house.Deleted)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Customize, @from, house));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Customize, from, house));
}
}
@ -814,7 +814,7 @@ namespace Server.Gumps
{
if (Banker.Deposit(from, -cost))
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
1060397,
(-cost).ToString()
); // ~1_AMOUNT~ gold has been deposited into your bank box.
@ -969,17 +969,17 @@ namespace Server.Gumps
if (from.Map != sign.Map || !from.InRange(sign, 5))
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
1062429
); // You must be within five paces of the house sign to use this option.
}
else if (vendor.IsOwner(from))
{
vendor.SendOwnerGump(@from);
vendor.SendOwnerGump(from);
}
else
{
vendor.OpenBackpack(@from);
vendor.OpenBackpack(from);
}
}
@ -1011,7 +1011,7 @@ namespace Server.Gumps
{
if (m_House.Public)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveBan, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveBan, from, m_House));
}
break;
@ -1032,7 +1032,7 @@ namespace Server.Gumps
{
if (!m_House.Public)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveAccess, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveAccess, from, m_House));
}
break;
@ -1076,7 +1076,7 @@ namespace Server.Gumps
{
if (isCoOwner)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.ListCoOwner, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.ListCoOwner, from, m_House));
}
break;
@ -1097,7 +1097,7 @@ namespace Server.Gumps
{
if (isOwner)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveCoOwner, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveCoOwner, from, m_House));
}
break;
@ -1106,7 +1106,7 @@ namespace Server.Gumps
{
if (isOwner)
{
@from.SendGump(
from.SendGump(
new WarningGump(
1060635,
30720,
@ -1114,7 +1114,7 @@ namespace Server.Gumps
32512,
420,
280,
okay => ClearCoOwners_Callback(@from, okay, m_House)
okay => ClearCoOwners_Callback(from, okay, m_House)
)
);
}
@ -1143,7 +1143,7 @@ namespace Server.Gumps
{
if (isCoOwner)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveFriend, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveFriend, from, m_House));
}
break;
@ -1152,7 +1152,7 @@ namespace Server.Gumps
{
if (isCoOwner)
{
@from.SendGump(
from.SendGump(
new WarningGump(
1060635,
30720,
@ -1160,7 +1160,7 @@ namespace Server.Gumps
32512,
420,
280,
okay => ClearFriends_Callback(@from, okay, m_House)
okay => ClearFriends_Callback(from, okay, m_House)
)
);
}
@ -1293,7 +1293,7 @@ namespace Server.Gumps
if (BaseHouse.NewVendorSystem)
{
@from.SendGump(
from.SendGump(
new NoticeGump(
1060637,
30720,
@ -1301,13 +1301,13 @@ namespace Server.Gumps
32512,
320,
180,
() => PublicPrivateNotice_Callback(@from, m_House)
() => PublicPrivateNotice_Callback(from, m_House)
)
);
}
else
{
@from.SendGump(
from.SendGump(
new NoticeGump(
1060637,
30720,
@ -1315,7 +1315,7 @@ namespace Server.Gumps
0xF8C000,
320,
180,
() => PublicPrivateNotice_Callback(@from, m_House)
() => PublicPrivateNotice_Callback(from, m_House)
)
);
}
@ -1369,7 +1369,7 @@ namespace Server.Gumps
if (e != null)
{
@from.SendGump(
from.SendGump(
new WarningGump(
1060635,
30720,
@ -1377,7 +1377,7 @@ namespace Server.Gumps
32512,
420,
280,
okay => ConvertHouse_Callback(@from, okay, m_House)
okay => ConvertHouse_Callback(from, okay, m_House)
)
);
}
@ -1392,7 +1392,7 @@ namespace Server.Gumps
{
if (m_House.HasRentedVendors)
{
@from.SendGump(
from.SendGump(
new NoticeGump(
1060637,
30720,
@ -1400,13 +1400,13 @@ namespace Server.Gumps
32512,
320,
180,
() => CustomizeNotice_Callback(@from, m_House)
() => CustomizeNotice_Callback(from, m_House)
)
);
}
else if (m_House.HasAddonContainers)
{
@from.SendGump(
from.SendGump(
new NoticeGump(
1060637,
30720,
@ -1414,13 +1414,13 @@ namespace Server.Gumps
32512,
320,
180,
() => CustomizeNotice_Callback(@from, m_House)
() => CustomizeNotice_Callback(from, m_House)
)
);
}
else
{
foundation.BeginCustomize(@from);
foundation.BeginCustomize(from);
}
}
@ -1449,7 +1449,7 @@ namespace Server.Gumps
{
if (isOwner && m_House.Public)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.ChangeSign, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.ChangeSign, from, m_House));
}
break;
@ -1458,7 +1458,7 @@ namespace Server.Gumps
{
if (isOwner && isCustomizable)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.ChangeHanger, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.ChangeHanger, from, m_House));
}
break;
@ -1467,7 +1467,7 @@ namespace Server.Gumps
{
if (isOwner && isCustomizable && foundation.Signpost != null)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.ChangePost, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.ChangePost, from, m_House));
}
break;
@ -1476,7 +1476,7 @@ namespace Server.Gumps
{
if (isOwner && isCustomizable)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.ChangeFoundation, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.ChangeFoundation, from, m_House));
}
break;
@ -1661,11 +1661,11 @@ namespace Server.Gumps
if (m_House.CoOwners.Count > 0)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveCoOwner, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveCoOwner, from, m_House));
}
else
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Security, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Security, from, m_House));
}
}
@ -1679,11 +1679,11 @@ namespace Server.Gumps
if (m_House.Friends.Count > 0)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveFriend, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveFriend, from, m_House));
}
else
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Security, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Security, from, m_House));
}
}
@ -1697,11 +1697,11 @@ namespace Server.Gumps
if (m_House.Bans.Count > 0)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveBan, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveBan, from, m_House));
}
else
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Security, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Security, from, m_House));
}
}
@ -1715,11 +1715,11 @@ namespace Server.Gumps
if (m_House.Access.Count > 0)
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveAccess, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.RemoveAccess, from, m_House));
}
else
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Security, @from, m_House));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Security, from, m_House));
}
}

View file

@ -68,7 +68,7 @@ namespace Server.Gumps
if (from.Backpack != null)
{
totalGold += @from.Backpack.GetAmount(typeof(Gold));
totalGold += from.Backpack.GetAmount(typeof(Gold));
}
totalGold += Banker.GetBalance(from);
@ -87,12 +87,12 @@ namespace Server.Gumps
if (from.Backpack != null)
{
leftPrice -= @from.Backpack.ConsumeUpTo(typeof(Gold), leftPrice);
leftPrice -= from.Backpack.ConsumeUpTo(typeof(Gold), leftPrice);
}
if (leftPrice > 0)
{
Banker.Withdraw(@from, leftPrice);
Banker.Withdraw(from, leftPrice);
}
m_Vendor.HoldGold += m_VI.Price;
@ -260,7 +260,7 @@ namespace Server.Gumps
if (info.ButtonID == 1 || info.ButtonID == 2) // See goods or Customize
{
m_Vendor.CheckTeleport(@from);
m_Vendor.CheckTeleport(from);
}
if (!m_Vendor.CanInteractWith(from, true))
@ -698,7 +698,7 @@ namespace Server.Gumps
if (item != null)
{
new PVHuePicker(item, m_Vendor, @from).SendTo(state);
new PVHuePicker(item, m_Vendor, from).SendTo(state);
}
}
}
@ -1046,11 +1046,11 @@ namespace Server.Gumps
{
if (m_Vendor.HairItemID > 0)
{
new PVHuePicker(m_Vendor, false, @from).SendTo(@from.NetState);
new PVHuePicker(m_Vendor, false, from).SendTo(from.NetState);
}
else
{
@from.SendGump(new NewPlayerVendorCustomizeGump(m_Vendor));
from.SendGump(new NewPlayerVendorCustomizeGump(m_Vendor));
}
break;
@ -1067,11 +1067,11 @@ namespace Server.Gumps
{
if (m_Vendor.FacialHairItemID > 0)
{
new PVHuePicker(m_Vendor, true, @from).SendTo(@from.NetState);
new PVHuePicker(m_Vendor, true, from).SendTo(from.NetState);
}
else
{
@from.SendGump(new NewPlayerVendorCustomizeGump(m_Vendor));
from.SendGump(new NewPlayerVendorCustomizeGump(m_Vendor));
}
break;

View file

@ -66,11 +66,11 @@ namespace Server.Gumps
{
if (m_Type == typeof(Type))
{
@from.SendGump(new PropertiesGump(m_Mobile, m_Object, m_Stack, m_List, m_Page));
from.SendGump(new PropertiesGump(m_Mobile, m_Object, m_Stack, m_List, m_Page));
}
else
{
@from.SendGump(new SetObjectGump(m_Property, m_Mobile, m_Object, m_Stack, m_Type, m_Page, m_List));
from.SendGump(new SetObjectGump(m_Property, m_Mobile, m_Object, m_Stack, m_Type, m_Page, m_List));
}
}
}

View file

@ -127,7 +127,7 @@ namespace Server.Gumps
{
if (from.RecentlyReported.Contains(killer))
{
@from.RecentlyReported.Remove(killer);
from.RecentlyReported.Remove(killer);
}
}
@ -178,7 +178,7 @@ namespace Server.Gumps
m_Idx++;
if (m_Idx < m_Killers.Count)
{
@from.SendGump(new ReportMurdererGump(@from, m_Killers, m_Idx));
from.SendGump(new ReportMurdererGump(from, m_Killers, m_Idx));
}
}

View file

@ -243,31 +243,31 @@ namespace Server.Gumps
if (from.RawStr * loss > 10)
{
@from.RawStr = (int)(@from.RawStr * loss);
from.RawStr = (int)(from.RawStr * loss);
}
if (from.RawInt * loss > 10)
{
@from.RawInt = (int)(@from.RawInt * loss);
from.RawInt = (int)(from.RawInt * loss);
}
if (from.RawDex * loss > 10)
{
@from.RawDex = (int)(@from.RawDex * loss);
from.RawDex = (int)(from.RawDex * loss);
}
for (var s = 0; s < from.Skills.Length; s++)
{
if (@from.Skills[s].Base * loss > 35)
if (from.Skills[s].Base * loss > 35)
{
@from.Skills[s].Base *= loss;
from.Skills[s].Base *= loss;
}
}
}
if (from.Alive && m_HitsScalar > 0)
{
@from.Hits = (int)(@from.HitsMax * m_HitsScalar);
from.Hits = (int)(from.HitsMax * m_HitsScalar);
}
}
}

View file

@ -315,7 +315,7 @@ namespace Server.Gumps
from.CloseGump<RunebookGump>();
if (!Core.ML)
{
@from.SendGump(new RunebookGump(@from, Book));
from.SendGump(new RunebookGump(from, Book));
}
}
else

View file

@ -156,7 +156,7 @@ namespace Server.Gumps
if (index < VendorRentalDuration.Instances.Length)
{
SetContractDuration(@from, VendorRentalDuration.Instances[index]);
SetContractDuration(from, VendorRentalDuration.Instances[index]);
}
}
else
@ -329,7 +329,7 @@ namespace Server.Gumps
{
if (m_Contract.IsUsableBy(from, true, true, true, true))
{
@from.SendGump(new VendorRentalContractGump(m_Contract, @from));
from.SendGump(new VendorRentalContractGump(m_Contract, from));
}
}
}
@ -594,7 +594,7 @@ namespace Server.Gumps
{
if (m_Vendor.CanInteractWith(from, false) && m_Vendor.IsLandlord(from))
{
@from.SendGump(new LandlordVendorRentalGump(m_Vendor));
from.SendGump(new LandlordVendorRentalGump(m_Vendor));
}
}
}
@ -665,7 +665,7 @@ namespace Server.Gumps
if (depositedGold > 0)
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
1060397,
depositedGold.ToString()
); // ~1_AMOUNT~ gold has been deposited into your bank box.

View file

@ -173,7 +173,7 @@ namespace Server.Gumps
{
if (targeted is Mobile mobile)
{
@from.SendGump(new ViewHousesGump(@from, GetHouses(mobile), null));
from.SendGump(new ViewHousesGump(from, GetHouses(mobile), null));
}
}

View file

@ -262,7 +262,7 @@ namespace Server.Gumps
{
if (m_Page > 0)
{
@from.SendGump(new WhoGump(@from, m_Mobiles, m_Page - 1));
from.SendGump(new WhoGump(from, m_Mobiles, m_Page - 1));
}
break;
@ -271,7 +271,7 @@ namespace Server.Gumps
{
if ((m_Page + 1) * EntryCount < m_Mobiles.Count)
{
@from.SendGump(new WhoGump(@from, m_Mobiles, m_Page + 1));
from.SendGump(new WhoGump(from, m_Mobiles, m_Page + 1));
}
break;