|
ÇáãÔÇÑßÇÊ 1,372 |
+ÇáÊÞííã 0.68 |
ÊÇÑíÎ ÇáÊÓÌíá Apr 2019 |
ÇáÇÞÇãÉ ÔÑÞíå/ÒÞÇÒíÞ |
äÙÇã ÇáÊÔÛíá |
ÑÞã ÇáÚÖæíÉ 30 |
#region Marriage
#region Marriage
if (attack.InteractType == MsgInteract.MarriageAccept || attack.InteractType == MsgInteract.MarriageRequest)
{
if (attack.InteractType == MsgInteract.MarriageRequest)
{
Client.GameState Spouse = null;
uint takeout = attack.Attacked;
if (takeout == attacker.UID)
takeout = attack.Attacker;
if (Kernel.GamePool.TryGetValue(takeout, out Spouse))
{
MsgRelation Relation = new MsgRelation();
Relation.Requester = attacker.UID;
Relation.Receiver = Spouse.Player.UID;
Relation.Level = attacker.Level;
Relation.BattlePower = (uint)attacker.BattlePower;
Relation.Spouse = attacker.Name == Spouse.Player.Spouse;
Relation.Friend = attacker.Owner.Friends.ContainsKey(Spouse.Player.UID);
Relation.TradePartner = attacker.Owner.Partners.ContainsKey(Spouse.Player.UID);
if (attacker.Owner.Mentor != null)
Relation.Mentor = attacker.Owner.Mentor.ID == Spouse.Player.UID;
Relation.Apprentice = attacker.Owner.Apprentices.ContainsKey(Spouse.Player.UID);
if (attacker.Owner.Team != null)
Relation.Teammate = attacker.Owner.Team.IsTeammate(Spouse.Player.UID);
if (attacker.Owner.Guild != null)
Relation.GuildMember = attacker.Owner.Guild.Members.ContainsKey(Spouse.Player.UID);
Relation.Enemy = attacker.Owner.Enemy.ContainsKey(Spouse.Player.UID);
Spouse.Send(Relation);
if (attacker.Spouse != "None" || Spouse.Player.Spouse != "None")
{
attacker.Owner.Send(new MsgTalk("You cannot marry someone that is already married with someone else!", Color.Black, MsgTalk.TopLeft));
}
else
{
uint id1 = attacker.Mesh % 10, id2 = Spouse.Player.Mesh % 10;
if (id1 <= 5 && id2 >= 6 || id1 >= 6 && id2 <= 5)
{
attack.X = Spouse.Player.X;
attack.Y = Spouse.Player.Y;
Spouse.Send(attack);
}
else
{
attacker.Owner.Send(new MsgTalk("You cannot marry someone of your gender!", Color.Black, MsgTalk.TopLeft));
}
}
}
}
else
{
Client.GameState Spouse = null;
if (Kernel.GamePool.TryGetValue(attack.Attacked, out Spouse))
{
if (attacker.Spouse != "None" || Spouse.Player.Spouse != "None")
{
attacker.Owner.Send(new MsgTalk("You cannot marry someone that is already married with someone else!", Color.Black, MsgTalk.TopLeft));
}
else
{
if (attacker.Mesh % 10 <= 5 && Spouse.Player.Mesh % 10 >= 6 || attacker.Mesh % 10 >= 6 && Spouse.Player.Mesh % 10 <= 5)
{
Spouse.Player.Spouse = attacker.Name;
attacker.Spouse = Spouse.Player.Name;
MsgTalk message = null;
if (Spouse.Player.Mesh % 10 >= 6)
message = new MsgTalk("Joy and happiness! " + Spouse.Player.Name + " and " + attacker.Name + " have joined together in the holy marriage. We wish them a stone house.", Color.BurlyWood, MsgTalk.Center);
else message = new MsgTalk("Joy and happiness! " + attacker.Name + " and " + attacker.Spouse + " have joined together in the holy marriage. We wish them a stone house.", Color.BurlyWood, MsgTalk.Center);
foreach (Client.GameState client in Server.GamePool)
{
client.Send(message);
}
Spouse.Player.Update(MsgName.Effect, "firework-2love", true);
attacker.Update(MsgName.Effect, "firework-2love", true);
}
else
{
attacker.Owner.Send(new MsgTalk("You cannot marry someone of your gender!", System.Drawing.Color.Black, MsgTalk.TopLeft));
}
}
}
}
}
#endregion
ÇáÐíä íÔÇåÏæä ãÍÊæì ÇáãæÖæÚ ÇáÂä : 1 ( ÇáÃÚÖÇÁ 0 æÇáÒæÇÑ 1) | |
|
ÇáãæÖæÚ | ßÇÊÈ ÇáãæÖæÚ | ÇáãäÊÏì | ãÔÇÑßÇÊ | ÂÎÑ ãÔÇÑßÉ |
Íá ãÔßáå ÇáäÞÇØ Çáæåãíå Ýí ÈÖÚ ÇáÓæÑÓÇÊ | Hassan Emprator | ÊØæíÑ ÓíÑÝÑÇÊ ßæäßÑ | 2 | 2021-07-22 08:37 PM |
ÈÎÕæÕ ßá ÇáÓæÑÓÇÊ | Tyranny-Team's | ãÔßáÇÊ ÇáÓíÑÝíÑÇÊ ßæäßÑ ÇáÔÎÕíå | 9 | 2020-04-30 10:38 AM |
Íá ãÔßáÉ ÇáÌæÇÒ[RayzoV3] | Tefa | ÊØæíÑ ÓíÑÝÑÇÊ ßæäßÑ | 7 | 2019-11-24 10:20 AM |
ÈÎÕæÕ ÇáÓæÑÓÇÊ | salahsayed | ãÔßáÇÊ ÇáÓíÑÝíÑÇÊ ßæäßÑ ÇáÔÎÕíå | 2 | 2019-11-14 03:25 PM |