|
// Cupid's arrow
case 34:
if (packetsplit != null && packetsplit.Length > 3)
{
if (long.TryParse(packetsplit[3], out long characterId))
{
if (session.Character.CharacterRelations.Any(s => s.RelationType == CharacterRelationType.Spouse))
{
session.SendPacket($"info {Language.Instance.GetMessageFromKey("ALREADY_MARR IED")}");
return;
}
ClientSession otherSession = ServerManager.Instance.GetSessionByCharacterId(cha racterId);
if (otherSession != null)
{
otherSession.SendPacket(UserInterfaceHelper.Genera teDialog(
$"#fins^-34^{session.Character.CharacterId} #fins^-69^{session.Character.CharacterId} {string.Format(Language.Instance.GetMessageFromKey ("MARRY_REQUEST"), session.Character.Name)}"));
session.Character.FriendRequestCharacters.Add(char acterId);
session.Character.Inventory.RemoveItemAmountFromIn ventory(1, inv.Id);
}
}
}
break;
|