|
المشاركات 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 |