Fixes brace style (#248)
This commit is contained in:
parent
a236617ad9
commit
8149620b0c
1503 changed files with 28575 additions and 1717 deletions
|
|
@ -12,11 +12,17 @@ namespace Server.Engines.PartySystem
|
|||
var p = Party.Get(from);
|
||||
|
||||
if (p != null && p.Leader != from)
|
||||
from.SendLocalizedMessage(1005453); // You may only add members to the party if you are the leader.
|
||||
{
|
||||
@from.SendLocalizedMessage(1005453); // You may only add members to the party if you are the leader.
|
||||
}
|
||||
else if (p != null && p.Members.Count + p.Candidates.Count >= Party.Capacity)
|
||||
from.SendLocalizedMessage(1008095); // You may only have 10 in your party (this includes candidates).
|
||||
{
|
||||
@from.SendLocalizedMessage(1008095); // You may only have 10 in your party (this includes candidates).
|
||||
}
|
||||
else
|
||||
from.Target = new AddPartyTarget(from);
|
||||
{
|
||||
@from.Target = new AddPartyTarget(@from);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnRemove(Mobile from, Mobile target)
|
||||
|
|
@ -43,27 +49,39 @@ namespace Server.Engines.PartySystem
|
|||
public override void OnPrivateMessage(Mobile from, Mobile target, string text)
|
||||
{
|
||||
if (text.Length > 128 || (text = text.Trim()).Length == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var p = Party.Get(from);
|
||||
|
||||
if (p?.Contains(target) == true)
|
||||
p.SendPrivateMessage(from, target, text);
|
||||
{
|
||||
p.SendPrivateMessage(@from, target, text);
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage(3000211); // You are not in a party.
|
||||
{
|
||||
@from.SendLocalizedMessage(3000211); // You are not in a party.
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnPublicMessage(Mobile from, string text)
|
||||
{
|
||||
if (text.Length > 128 || (text = text.Trim()).Length == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var p = Party.Get(from);
|
||||
|
||||
if (p != null)
|
||||
p.SendPublicMessage(from, text);
|
||||
{
|
||||
p.SendPublicMessage(@from, text);
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage(3000211); // You are not in a party.
|
||||
{
|
||||
@from.SendLocalizedMessage(3000211); // You are not in a party.
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSetCanLoot(Mobile from, bool canLoot)
|
||||
|
|
@ -83,11 +101,15 @@ namespace Server.Engines.PartySystem
|
|||
mi.CanLoot = canLoot;
|
||||
|
||||
if (canLoot)
|
||||
from.SendLocalizedMessage(1005447); // You have chosen to allow your party to loot your corpse.
|
||||
{
|
||||
@from.SendLocalizedMessage(1005447); // You have chosen to allow your party to loot your corpse.
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage(
|
||||
{
|
||||
@from.SendLocalizedMessage(
|
||||
1005448
|
||||
); // You have chosen to prevent your party from looting your corpse.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -100,9 +122,13 @@ namespace Server.Engines.PartySystem
|
|||
var p = Party.Get(leader);
|
||||
|
||||
if (leader == null || p?.Candidates.Contains(from) != true)
|
||||
from.SendLocalizedMessage(3000222); // No one has invited you to be in a party.
|
||||
{
|
||||
@from.SendLocalizedMessage(3000222); // No one has invited you to be in a party.
|
||||
}
|
||||
else if (p.Members.Count + p.Candidates.Count <= Party.Capacity)
|
||||
p.OnAccept(from);
|
||||
{
|
||||
p.OnAccept(@from);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDecline(Mobile from, Mobile sentLeader)
|
||||
|
|
@ -113,9 +139,13 @@ namespace Server.Engines.PartySystem
|
|||
var p = Party.Get(leader);
|
||||
|
||||
if (leader == null || p?.Candidates.Contains(from) != true)
|
||||
from.SendLocalizedMessage(3000222); // No one has invited you to be in a party.
|
||||
{
|
||||
@from.SendLocalizedMessage(3000222); // No one has invited you to be in a party.
|
||||
}
|
||||
else
|
||||
p.OnDecline(from, leader);
|
||||
{
|
||||
p.OnDecline(@from, leader);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue