+ Удалена большая часть Warnings.
+ Применено исправление деспауна Големов при их взрыве - fix from DeKaN + Добавлен патч для портала в новый тристрам со стороны Лощины Стенаний. + Добавлена новая подсистема "Друзья". + Добавлен звук продажи предметов !Внимание тем кто тестирует - для поиска причины бага, добавлена в консоль информация при использовании Waypoint. Если вас телепортирует не в нужную локацию, скопируйте от туда текст ---Waypoint Debug---.
This commit is contained in:
parent
c7f754dafc
commit
267d087142
@ -27,6 +27,7 @@ namespace DiIiS_NA.LoginServer.FriendsSystem
|
|||||||
private static readonly FriendManager _instance = new FriendManager();
|
private static readonly FriendManager _instance = new FriendManager();
|
||||||
public static FriendManager Instance { get { return _instance; } }
|
public static FriendManager Instance { get { return _instance; } }
|
||||||
|
|
||||||
|
|
||||||
public static readonly Dictionary<ulong, bgs.protocol.friends.v1.ReceivedInvitation> OnGoingInvitations =
|
public static readonly Dictionary<ulong, bgs.protocol.friends.v1.ReceivedInvitation> OnGoingInvitations =
|
||||||
new Dictionary<ulong, bgs.protocol.friends.v1.ReceivedInvitation>();
|
new Dictionary<ulong, bgs.protocol.friends.v1.ReceivedInvitation>();
|
||||||
|
|
||||||
@ -38,26 +39,246 @@ namespace DiIiS_NA.LoginServer.FriendsSystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void HandleIgnore(BattleClient client, bgs.protocol.friends.v1.IgnoreInvitationRequest request)
|
public static bool AreFriends(Account account1, Account account2)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
foreach (ulong friendId in account1.FriendsIds)
|
||||||
|
{
|
||||||
|
if (friendId == account2.PersistentID) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool InvitationExists(Account inviter, Account invitee)
|
||||||
|
{
|
||||||
|
foreach (var invitation in OnGoingInvitations.Values)
|
||||||
|
{
|
||||||
|
if ((invitation.InviterIdentity.AccountId == inviter.BnetEntityId) && (invitation.InviteeIdentity.AccountId == invitee.BnetEntityId))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//Done
|
||||||
|
public static void HandleInvitation(BattleClient client, bgs.protocol.friends.v1.ReceivedInvitation invitation)
|
||||||
|
{
|
||||||
|
var invitee = AccountManager.GetAccountByPersistentID(invitation.InviteeIdentity.AccountId.Low);
|
||||||
|
if (invitee == null) return;
|
||||||
|
|
||||||
|
if (OnGoingInvitations.Values.Any(oldInvite => (oldInvite.InviteeIdentity.AccountId == invitation.InviteeIdentity.AccountId) && (oldInvite.InviterIdentity.AccountId == invitation.InviterIdentity.AccountId)))
|
||||||
|
return;
|
||||||
|
|
||||||
|
OnGoingInvitations.Add(invitation.Id, invitation); // track ongoing invitations so we can tranport it forth and back.
|
||||||
|
|
||||||
|
if (invitee.IsOnline)
|
||||||
|
{
|
||||||
|
var inviter = AccountManager.GetAccountByPersistentID(invitation.InviterIdentity.AccountId.Low);
|
||||||
|
|
||||||
|
var notification = bgs.protocol.friends.v1.InvitationNotification.CreateBuilder()
|
||||||
|
.SetInvitation(invitation)
|
||||||
|
.SetAccountId(invitee.BnetEntityId);
|
||||||
|
|
||||||
|
invitee.GameAccount.LoggedInClient.MakeTargetedRPC(FriendManager.Instance, (lid) =>
|
||||||
|
bgs.protocol.friends.v1.FriendsListener.CreateStub(invitee.GameAccount.LoggedInClient).OnReceivedInvitationAdded(new HandlerController() { ListenerId = lid }, notification.Build(), callback =>
|
||||||
|
{
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Done
|
||||||
|
public static void HandleIgnore(BattleClient client, bgs.protocol.friends.v1.IgnoreInvitationRequest request)
|
||||||
|
{
|
||||||
|
var invitation = OnGoingInvitations[request.InvitationId];
|
||||||
|
|
||||||
|
var inviter = AccountManager.GetAccountByPersistentID(invitation.InviterIdentity.AccountId.Low);
|
||||||
|
var invitee = AccountManager.GetAccountByPersistentID(invitation.InviteeIdentity.AccountId.Low);
|
||||||
|
|
||||||
|
|
||||||
|
var declinedNotification = bgs.protocol.friends.v1.InvitationNotification.CreateBuilder()
|
||||||
|
.SetInvitation(invitation)
|
||||||
|
.SetAccountId(invitee.BnetEntityId)
|
||||||
|
.SetReason((uint)InvitationRemoveReason.Ignored).Build();
|
||||||
|
|
||||||
|
if (inviter.GameAccount.IsOnline)
|
||||||
|
{
|
||||||
|
inviter.GameAccount.LoggedInClient.MakeTargetedRPC(FriendManager.Instance, (lid) =>
|
||||||
|
bgs.protocol.friends.v1.FriendsListener.CreateStub(inviter.GameAccount.LoggedInClient).OnReceivedInvitationRemoved(new HandlerController() { ListenerId = lid }, declinedNotification, callback => { }));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (invitee.GameAccount.IsOnline)
|
||||||
|
{
|
||||||
|
invitee.GameAccount.LoggedInClient.MakeTargetedRPC(FriendManager.Instance, (lid) =>
|
||||||
|
bgs.protocol.friends.v1.FriendsListener.CreateStub(invitee.GameAccount.LoggedInClient).OnReceivedInvitationRemoved(new HandlerController() { ListenerId = lid }, declinedNotification, callback => { }));
|
||||||
|
}
|
||||||
|
|
||||||
|
OnGoingInvitations.Remove(request.InvitationId);
|
||||||
|
}
|
||||||
|
//Done
|
||||||
public static void HandleAccept(BattleClient client, bgs.protocol.friends.v1.AcceptInvitationRequest request)
|
public static void HandleAccept(BattleClient client, bgs.protocol.friends.v1.AcceptInvitationRequest request)
|
||||||
{
|
{
|
||||||
|
if (!OnGoingInvitations.ContainsKey(request.InvitationId)) return;
|
||||||
|
var invitation = OnGoingInvitations[request.InvitationId];
|
||||||
|
|
||||||
|
var inviter = AccountManager.GetAccountByPersistentID(invitation.InviterIdentity.AccountId.Low);
|
||||||
|
var invitee = AccountManager.GetAccountByPersistentID(invitation.InviteeIdentity.AccountId.Low);
|
||||||
|
var inviteeAsFriend = bgs.protocol.friends.v1.Friend.CreateBuilder()
|
||||||
|
.SetAccountId(invitation.InviteeIdentity.AccountId)
|
||||||
|
.AddRole(2)
|
||||||
|
.SetPrivileges(3)
|
||||||
|
.Build();
|
||||||
|
var inviterAsFriend = bgs.protocol.friends.v1.Friend.CreateBuilder()
|
||||||
|
.SetAccountId(invitation.InviterIdentity.AccountId)
|
||||||
|
.AddRole(2)
|
||||||
|
.SetPrivileges(3)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
var notificationToInviter = bgs.protocol.friends.v1.InvitationNotification.CreateBuilder()
|
||||||
|
.SetAccountId(inviter.BnetEntityId)
|
||||||
|
.SetInvitation(invitation)
|
||||||
|
.SetReason((uint)InvitationRemoveReason.Accepted)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
var notificationToInvitee = bgs.protocol.friends.v1.InvitationNotification.CreateBuilder()
|
||||||
|
.SetAccountId(invitee.BnetEntityId)
|
||||||
|
.SetInvitation(invitation)
|
||||||
|
.SetReason((uint)InvitationRemoveReason.Accepted)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
if (!inviter.FriendsIds.Contains(invitee.PersistentID))
|
||||||
|
inviter.FriendsIds.Add(invitee.PersistentID);
|
||||||
|
AddFriendshipToDB(inviter, invitee);
|
||||||
|
|
||||||
|
// send friend added notifications
|
||||||
|
var friendAddedNotificationToInviter = bgs.protocol.friends.v1.FriendNotification.CreateBuilder()
|
||||||
|
.SetTarget(inviteeAsFriend).SetAccountId(inviter.BnetEntityId).Build();
|
||||||
|
var friendAddedNotificationToInvitee = bgs.protocol.friends.v1.FriendNotification.CreateBuilder()
|
||||||
|
.SetTarget(inviterAsFriend).SetAccountId(invitee.BnetEntityId).Build();
|
||||||
|
|
||||||
|
if (inviter.GameAccount.IsOnline)
|
||||||
|
{
|
||||||
|
inviter.GameAccount.LoggedInClient.MakeTargetedRPC(FriendManager.Instance, (lid) =>
|
||||||
|
bgs.protocol.friends.v1.FriendsListener.CreateStub(inviter.GameAccount.LoggedInClient).OnReceivedInvitationRemoved(new HandlerController() { ListenerId = lid }, notificationToInviter, callback => { }));
|
||||||
|
|
||||||
|
inviter.GameAccount.LoggedInClient.MakeTargetedRPC(FriendManager.Instance, (lid) =>
|
||||||
|
bgs.protocol.friends.v1.FriendsListener.CreateStub(inviter.GameAccount.LoggedInClient).OnFriendAdded(new HandlerController() { ListenerId = lid }, friendAddedNotificationToInviter, callback => { }));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (invitee.GameAccount.IsOnline)
|
||||||
|
{
|
||||||
|
invitee.GameAccount.LoggedInClient.MakeTargetedRPC(FriendManager.Instance, (lid) =>
|
||||||
|
bgs.protocol.friends.v1.FriendsListener.CreateStub(invitee.GameAccount.LoggedInClient).OnFriendAdded(new HandlerController() { ListenerId = lid }, friendAddedNotificationToInvitee, callback => { }));
|
||||||
|
|
||||||
|
invitee.GameAccount.LoggedInClient.MakeTargetedRPC(FriendManager.Instance, (lid) =>
|
||||||
|
bgs.protocol.friends.v1.FriendsListener.CreateStub(invitee.GameAccount.LoggedInClient).OnReceivedInvitationRemoved(new HandlerController() { ListenerId = lid }, notificationToInvitee, callback => { }));
|
||||||
|
}
|
||||||
|
|
||||||
|
OnGoingInvitations.Remove(request.InvitationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void HandleDecline(BattleClient client, bgs.protocol.friends.v1.DeclineInvitationRequest request)
|
public static void HandleDecline(BattleClient client, bgs.protocol.friends.v1.DeclineInvitationRequest request)
|
||||||
{
|
{
|
||||||
|
if (!OnGoingInvitations.ContainsKey(request.InvitationId)) return;
|
||||||
|
var invitation = OnGoingInvitations[request.InvitationId];
|
||||||
|
|
||||||
|
var inviter = AccountManager.GetAccountByPersistentID(invitation.InviterIdentity.AccountId.Low);
|
||||||
|
var invitee = AccountManager.GetAccountByPersistentID(invitation.InviteeIdentity.AccountId.Low);
|
||||||
|
|
||||||
|
var declinedNotification = bgs.protocol.friends.v1.InvitationNotification.CreateBuilder()
|
||||||
|
.SetInvitation(invitation)
|
||||||
|
.SetReason((uint)InvitationRemoveReason.Declined).Build();
|
||||||
|
|
||||||
|
if (inviter.GameAccount.IsOnline)
|
||||||
|
{
|
||||||
|
inviter.GameAccount.LoggedInClient.MakeTargetedRPC(FriendManager.Instance, (lid) =>
|
||||||
|
bgs.protocol.friends.v1.FriendsListener.CreateStub(inviter.GameAccount.LoggedInClient).OnReceivedInvitationRemoved(new HandlerController() { ListenerId = lid }, declinedNotification, callback => { }));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (invitee.GameAccount.IsOnline)
|
||||||
|
{
|
||||||
|
invitee.GameAccount.LoggedInClient.MakeTargetedRPC(FriendManager.Instance, (lid) =>
|
||||||
|
bgs.protocol.friends.v1.FriendsListener.CreateStub(invitee.GameAccount.LoggedInClient).OnReceivedInvitationRemoved(new HandlerController() { ListenerId = lid }, declinedNotification, callback => { }));
|
||||||
|
}
|
||||||
|
|
||||||
|
OnGoingInvitations.Remove(request.InvitationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void HandleRemove(BattleClient client, bgs.protocol.friends.v1.RemoveFriendRequest request)
|
public static void HandleRemove(BattleClient client, bgs.protocol.friends.v1.RemoveFriendRequest request)
|
||||||
{
|
{
|
||||||
|
var removee = AccountManager.GetAccountByPersistentID(request.TargetId.Low);
|
||||||
|
var remover = client.Account;
|
||||||
|
|
||||||
|
var removeeAsFriend = bgs.protocol.friends.v1.Friend.CreateBuilder()
|
||||||
|
.SetAccountId(removee.BnetEntityId)
|
||||||
|
.SetPrivileges(1)
|
||||||
|
.AddRole(1)
|
||||||
|
.Build();
|
||||||
|
var removerAsFriend = bgs.protocol.friends.v1.Friend.CreateBuilder()
|
||||||
|
.SetAccountId(remover.BnetEntityId)
|
||||||
|
.SetPrivileges(1)
|
||||||
|
.AddRole(1)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
if (remover.FriendsIds.Contains(removee.PersistentID))
|
||||||
|
remover.FriendsIds.Remove(removee.PersistentID);
|
||||||
|
RemoveFriendshipFromDB(remover, removee);
|
||||||
|
|
||||||
|
var notifyRemover = bgs.protocol.friends.v1.FriendNotification.CreateBuilder()
|
||||||
|
.SetTarget(removeeAsFriend)
|
||||||
|
.SetAccountId(remover.BnetEntityId)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
client.MakeTargetedRPC(FriendManager.Instance, (lid) =>
|
||||||
|
bgs.protocol.friends.v1.FriendsListener.CreateStub(client).OnFriendRemoved(new HandlerController() { ListenerId = lid }, notifyRemover, callback => { }));
|
||||||
|
|
||||||
|
if (removee.GameAccount.IsOnline)
|
||||||
|
{
|
||||||
|
var notifyRemovee = bgs.protocol.friends.v1.FriendNotification.CreateBuilder().SetTarget(removerAsFriend).SetAccountId(removee.BnetEntityId).Build();
|
||||||
|
removee.GameAccount.LoggedInClient.MakeTargetedRPC(FriendManager.Instance, (lid) => bgs.protocol.friends.v1.FriendsListener.CreateStub(removee.GameAccount.LoggedInClient).OnFriendRemoved(new HandlerController() { ListenerId = lid }, notifyRemovee, callback => { }));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void AddFriendshipToDB(Account inviter, Account invitee)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var inviterRecord = new DBAccountLists
|
||||||
|
{
|
||||||
|
ListOwner = inviter.DBAccount,
|
||||||
|
ListTarget = invitee.DBAccount,
|
||||||
|
Type = "FRIEND"
|
||||||
|
};
|
||||||
|
DBSessions.SessionSave(inviterRecord);
|
||||||
|
|
||||||
|
var inviteeRecord = new DBAccountLists
|
||||||
|
{
|
||||||
|
ListOwner = invitee.DBAccount,
|
||||||
|
ListTarget = inviter.DBAccount,
|
||||||
|
Type = "FRIEND"
|
||||||
|
};
|
||||||
|
DBSessions.SessionSave(inviteeRecord);
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Logger.ErrorException(e, "FriendManager.AddFriendshipToDB()");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void RemoveFriendshipFromDB(Account remover, Account removee)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var removerRecords = DBSessions.SessionQueryWhere<DBAccountLists>(dbl => dbl.ListOwner.Id == remover.PersistentID && dbl.ListTarget.Id == removee.PersistentID && dbl.Type == "FRIEND");
|
||||||
|
foreach (var rec in removerRecords)
|
||||||
|
DBSessions.SessionDelete(rec);
|
||||||
|
|
||||||
|
var removeeRecords = DBSessions.SessionQueryWhere<DBAccountLists>(dbl => dbl.ListOwner.Id == removee.PersistentID && dbl.ListTarget.Id == remover.PersistentID && dbl.Type == "FRIEND");
|
||||||
|
foreach (var rec in removeeRecords)
|
||||||
|
DBSessions.SessionDelete(rec);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Logger.ErrorException(e, "FriendManager.RemoveFriendshipFromDB()");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,9 +73,7 @@ namespace DiIiS_NA.LoginServer.GamesSystem
|
|||||||
|
|
||||||
foreach (bgs.protocol.v2.Attribute attribute in request.MatchmakerFilter.AttributeList)
|
foreach (bgs.protocol.v2.Attribute attribute in request.MatchmakerFilter.AttributeList)
|
||||||
{
|
{
|
||||||
if (attribute.Name != "version")
|
if (attribute.Name == "version")
|
||||||
;
|
|
||||||
else
|
|
||||||
this.Version = attribute.Value.StringValue;
|
this.Version = attribute.Value.StringValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,45 +1,230 @@
|
|||||||
//Blizzless Project 2022
|
//Blizzless Project 2022
|
||||||
//Blizzless Project 2022
|
|
||||||
using bgs.protocol;
|
using bgs.protocol;
|
||||||
//Blizzless Project 2022
|
//Blizzless Project 2022
|
||||||
using bgs.protocol.friends.v1;
|
using bgs.protocol.friends.v1;
|
||||||
//Blizzless Project 2022
|
//Blizzless Project 2022
|
||||||
|
using DiIiS_NA.Core.Extensions;
|
||||||
|
//Blizzless Project 2022
|
||||||
using DiIiS_NA.Core.Logging;
|
using DiIiS_NA.Core.Logging;
|
||||||
//Blizzless Project 2022
|
//Blizzless Project 2022
|
||||||
|
using DiIiS_NA.LoginServer.AccountsSystem;
|
||||||
|
//Blizzless Project 2022
|
||||||
|
using DiIiS_NA.LoginServer.Base;
|
||||||
|
//Blizzless Project 2022
|
||||||
|
using DiIiS_NA.LoginServer.FriendsSystem;
|
||||||
|
//Blizzless Project 2022
|
||||||
|
using DiIiS_NA.LoginServer.Helpers;
|
||||||
|
//Blizzless Project 2022
|
||||||
using Google.ProtocolBuffers;
|
using Google.ProtocolBuffers;
|
||||||
//Blizzless Project 2022
|
//Blizzless Project 2022
|
||||||
using System;
|
using System;
|
||||||
|
//Blizzless Project 2022
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace DiIiS_NA.LoginServer.ServicesSystem.Services
|
namespace DiIiS_NA.LoginServer.ServicesSystem.Services
|
||||||
{
|
{
|
||||||
[Service(serviceID: 0x36, serviceName: "bnet.protocol.friends.FriendsService")]
|
[Service(serviceID: 0x36, serviceName: "bnet.protocol.friends.FriendsService")]
|
||||||
public class FriendService : bgs.protocol.friends.v1.FriendsService, IServerService
|
public class FriendService : FriendsService, IServerService
|
||||||
{
|
{
|
||||||
private static readonly Logger Logger = LogManager.CreateLogger();
|
private static readonly Logger Logger = LogManager.CreateLogger();
|
||||||
|
|
||||||
|
public override void Subscribe(IRpcController controller, SubscribeRequest request, Action<SubscribeResponse> done)
|
||||||
|
{
|
||||||
|
Logger.Trace("Subscribe() {0}", ((controller as HandlerController).Client));
|
||||||
|
|
||||||
|
|
||||||
public override void AcceptInvitation(IRpcController controller, AcceptInvitationRequest request, Action<NoData> done)
|
FriendManager.Instance.AddSubscriber(((controller as HandlerController).Client), request.ObjectId);
|
||||||
|
|
||||||
|
var builder = SubscribeResponse.CreateBuilder()
|
||||||
|
.SetMaxFriends(127)
|
||||||
|
.SetMaxReceivedInvitations(127)
|
||||||
|
.SetMaxSentInvitations(127)
|
||||||
|
.AddRole(Role.CreateBuilder().SetId(1).SetName("battle_tag_friend").Build())
|
||||||
|
.AddRole(Role.CreateBuilder().SetId(2).SetName("real_id_friend").Build());
|
||||||
|
|
||||||
|
var friendsIDs = ((controller as HandlerController).Client).Account.FriendsIds;
|
||||||
|
foreach (var dbidFriend in friendsIDs) // send friends list.
|
||||||
|
{
|
||||||
|
var resp = Friend.CreateBuilder()
|
||||||
|
.SetAccountId(EntityId.CreateBuilder().SetHigh((ulong)EntityIdHelper.HighIdType.AccountId).SetLow(dbidFriend))
|
||||||
|
.SetPrivileges(384)
|
||||||
|
|
||||||
|
.AddRole(1);
|
||||||
|
builder.AddFriends(resp.Build());
|
||||||
|
}
|
||||||
|
|
||||||
|
var invitations = new List<ReceivedInvitation>();
|
||||||
|
|
||||||
|
foreach (var invitation in FriendManager.OnGoingInvitations.Values)
|
||||||
|
{
|
||||||
|
if (invitation.InviteeIdentity.AccountId == ((controller as HandlerController).Client).Account.BnetEntityId && !friendsIDs.Contains(invitation.InviterIdentity.AccountId.Low))
|
||||||
|
{
|
||||||
|
invitations.Add(invitation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (invitations.Count > 0)
|
||||||
|
builder.AddRangeReceivedInvitations(invitations);
|
||||||
|
|
||||||
|
done(builder.Build());
|
||||||
|
}
|
||||||
|
public override void SendInvitation(IRpcController controller, SendInvitationRequest request, Action<NoData> done)
|
||||||
|
{
|
||||||
|
var extensionBytes = request.Params.UnknownFields.FieldDictionary[103].LengthDelimitedList[0].ToByteArray();
|
||||||
|
var friendRequest = FriendInvitationParams.ParseFrom(extensionBytes);
|
||||||
|
|
||||||
|
var response = NoData.CreateBuilder();
|
||||||
|
|
||||||
|
if (friendRequest.TargetEmail.ToLower() == ((controller as HandlerController).Client).Account.Email.ToLower())
|
||||||
|
{
|
||||||
|
((controller as HandlerController).Status) = 317202;
|
||||||
|
done(response.Build());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (friendRequest.TargetBattleTag == ((controller as HandlerController).Client).Account.BattleTag)
|
||||||
|
{
|
||||||
|
((controller as HandlerController).Status) = 317202;
|
||||||
|
done(response.Build());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Account invitee;
|
||||||
|
|
||||||
|
Logger.Trace("Friend request body: {0}", friendRequest.ToString());
|
||||||
|
|
||||||
|
if (friendRequest.HasTargetEmail)
|
||||||
|
invitee = AccountManager.GetAccountByEmail(friendRequest.TargetEmail);
|
||||||
|
else
|
||||||
|
invitee = AccountManager.GetAccountByBattletag(friendRequest.TargetBattleTag);
|
||||||
|
|
||||||
|
if (invitee == null)
|
||||||
|
{
|
||||||
|
if (friendRequest.HasTargetEmail)
|
||||||
|
((controller as HandlerController).Status) = 4;
|
||||||
|
else
|
||||||
|
((controller as HandlerController).Status) = 317203;
|
||||||
|
done(response.Build());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (FriendManager.AreFriends(((controller as HandlerController).Client).Account, invitee))
|
||||||
|
{
|
||||||
|
if (friendRequest.HasTargetEmail)
|
||||||
|
((controller as HandlerController).Status) = 317201;
|
||||||
|
else
|
||||||
|
((controller as HandlerController).Status) = 5003;
|
||||||
|
done(response.Build());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (FriendManager.InvitationExists(((controller as HandlerController).Client).Account, invitee))
|
||||||
|
{
|
||||||
|
if (friendRequest.HasTargetEmail)
|
||||||
|
((controller as HandlerController).Status) = 317200;
|
||||||
|
else
|
||||||
|
((controller as HandlerController).Status) = 5005;
|
||||||
|
done(response.Build());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (invitee.IgnoreIds.Contains((controller as HandlerController).Client.Account.PersistentID))
|
||||||
|
{
|
||||||
|
((controller as HandlerController).Status) = 5006;
|
||||||
|
done(response.Build());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.Trace("{0} sent {1} friend invitation.", ((controller as HandlerController).Client).Account, invitee);
|
||||||
|
|
||||||
|
var invitation = ReceivedInvitation.CreateBuilder()
|
||||||
|
.SetId(FriendManager.InvitationIdCounter++) // we may actually need to store invitation ids in database with the actual invitation there. /raist.
|
||||||
|
.SetInviterIdentity(Identity.CreateBuilder().SetAccountId(((controller as HandlerController).Client).Account.BnetEntityId))
|
||||||
|
.SetInviteeIdentity(Identity.CreateBuilder().SetAccountId(invitee.BnetEntityId))
|
||||||
|
.SetInviterName(((controller as HandlerController).Client).Account.BattleTagName)
|
||||||
|
.SetInviteeName(invitee.BattleTagName)
|
||||||
|
.SetCreationTime(DateTime.Now.ToUnixTime())
|
||||||
|
.SetUnknownFields(UnknownFieldSet.CreateBuilder()
|
||||||
|
.AddField(9, UnknownField.CreateBuilder().AddFixed32(17459).Build())
|
||||||
|
.AddField(103, UnknownField.CreateBuilder().AddLengthDelimited(request.Params.UnknownFields.FieldDictionary[103].LengthDelimitedList[0]).Build())
|
||||||
|
.Build());
|
||||||
|
|
||||||
|
done(response.Build());
|
||||||
|
|
||||||
|
// notify the invitee on invitation.
|
||||||
|
FriendManager.HandleInvitation(((controller as HandlerController).Client), invitation.Build());
|
||||||
|
FriendManager.Instance.NotifyUpdate();
|
||||||
|
(controller as HandlerController).Client.Account.NotifyUpdate();
|
||||||
|
(controller as HandlerController).Client.Account.GameAccount.NotifyUpdate();
|
||||||
|
}
|
||||||
|
public override void AcceptInvitation(IRpcController controller, AcceptInvitationRequest request, Action<bgs.protocol.NoData> done)
|
||||||
|
{
|
||||||
|
Logger.Trace("{0} accepted friend invitation.", ((controller as HandlerController).Client).Account);
|
||||||
|
|
||||||
|
var response = bgs.protocol.NoData.CreateBuilder();
|
||||||
|
done(response.Build());
|
||||||
|
|
||||||
|
FriendManager.HandleAccept(((controller as HandlerController).Client), request);
|
||||||
|
}
|
||||||
|
public override void RevokeInvitation(IRpcController controller, RevokeInvitationRequest request, Action<bgs.protocol.NoData> done)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
public override void CreateFriendship(IRpcController controller, CreateFriendshipRequest request, Action<NoData> done)
|
public override void DeclineInvitation(IRpcController controller, DeclineInvitationRequest request, Action<bgs.protocol.NoData> done)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
Logger.Trace("{0} declined friend invitation.", ((controller as HandlerController).Client).Account);
|
||||||
|
|
||||||
|
var response = bgs.protocol.NoData.CreateBuilder();
|
||||||
|
done(response.Build());
|
||||||
|
|
||||||
|
FriendManager.HandleDecline(((controller as HandlerController).Client), request);
|
||||||
}
|
}
|
||||||
public override void DeclineInvitation(IRpcController controller, DeclineInvitationRequest request, Action<NoData> done)
|
public override void IgnoreInvitation(IRpcController controller, IgnoreInvitationRequest request, Action<bgs.protocol.NoData> done)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
//throw new NotImplementedException();
|
||||||
public override void GetFriendList(IRpcController controller, GetFriendListRequest request, Action<GetFriendListResponse> done)
|
var response = bgs.protocol.NoData.CreateBuilder();
|
||||||
{
|
done(response.Build());
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
FriendManager.HandleIgnore(((controller as HandlerController).Client), request);
|
||||||
public override void IgnoreInvitation(IRpcController controller, IgnoreInvitationRequest request, Action<NoData> done)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
}
|
||||||
public override void RemoveFriend(IRpcController controller, RemoveFriendRequest request, Action<NoData> done)
|
public override void RemoveFriend(IRpcController controller, RemoveFriendRequest request, Action<NoData> done)
|
||||||
|
{
|
||||||
|
Logger.Trace("{0} removed friend with id {1}.", ((controller as HandlerController).Client).Account, request.TargetId);
|
||||||
|
|
||||||
|
|
||||||
|
done(NoData.DefaultInstance);
|
||||||
|
|
||||||
|
FriendManager.HandleRemove(((controller as HandlerController).Client), request);
|
||||||
|
FriendManager.Instance.NotifyUpdate();
|
||||||
|
(controller as HandlerController).Client.Account.NotifyUpdate();
|
||||||
|
(controller as HandlerController).Client.Account.GameAccount.NotifyUpdate();
|
||||||
|
|
||||||
|
}
|
||||||
|
public override void ViewFriends(IRpcController controller, ViewFriendsRequest request, Action<ViewFriendsResponse> done)
|
||||||
|
{
|
||||||
|
Logger.Trace("ViewFriends(): {0}.", request.ToString());
|
||||||
|
|
||||||
|
var builder = ViewFriendsResponse.CreateBuilder();
|
||||||
|
var friendsIDs = AccountManager.GetAccountByPersistentID(request.TargetId.Low).FriendsIds;
|
||||||
|
foreach (var dbidFriend in friendsIDs) // send friends list.
|
||||||
|
{
|
||||||
|
var friend = AccountManager.GetAccountByPersistentID(dbidFriend);
|
||||||
|
var resp = FriendOfFriend.CreateBuilder()
|
||||||
|
.SetAccountId(EntityId.CreateBuilder().SetHigh((ulong)EntityIdHelper.HighIdType.AccountId).SetLow(dbidFriend))
|
||||||
|
.SetBattleTag(friend.BattleTag)
|
||||||
|
.SetFullName(friend.BattleTagName)
|
||||||
|
.SetPrivileges(384)
|
||||||
|
.AddRole(1);
|
||||||
|
builder.AddFriends(resp.Build());
|
||||||
|
}
|
||||||
|
done(builder.Build());
|
||||||
|
}
|
||||||
|
public override void UpdateFriendState(IRpcController controller, UpdateFriendStateRequest request, Action<NoData> done)
|
||||||
|
{
|
||||||
|
Logger.Trace("UpdateFriendState(): {0}.", request.ToString());
|
||||||
|
|
||||||
|
done(NoData.CreateBuilder().Build());
|
||||||
|
}
|
||||||
|
public override void Unsubscribe(IRpcController controller, UnsubscribeRequest request, Action<NoData> done)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
@ -47,11 +232,11 @@ namespace DiIiS_NA.LoginServer.ServicesSystem.Services
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
public override void RevokeInvitation(IRpcController controller, RevokeInvitationRequest request, Action<NoData> done)
|
public override void GetFriendList(IRpcController controller, GetFriendListRequest request, Action<GetFriendListResponse> done)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
public override void SendInvitation(IRpcController controller, SendInvitationRequest request, Action<NoData> done)
|
public override void CreateFriendship(IRpcController controller, CreateFriendshipRequest request, Action<NoData> done)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
@ -59,22 +244,6 @@ namespace DiIiS_NA.LoginServer.ServicesSystem.Services
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
public override void Subscribe(IRpcController controller, SubscribeRequest request, Action<SubscribeResponse> done)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
public override void Unsubscribe(IRpcController controller, UnsubscribeRequest request, Action<NoData> done)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
public override void UpdateFriendState(IRpcController controller, UpdateFriendStateRequest request, Action<NoData> done)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
public override void ViewFriends(IRpcController controller, ViewFriendsRequest request, Action<ViewFriendsResponse> done)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,6 @@ namespace DiIiS_NA.LoginServer.ServicesSystem.Services
|
|||||||
int CurrentAct = 0;
|
int CurrentAct = 0;
|
||||||
int CurrentQuest = 0;
|
int CurrentQuest = 0;
|
||||||
int CurrentStep = 0;
|
int CurrentStep = 0;
|
||||||
string GameTag = "";
|
|
||||||
foreach (var attr in request.Options.CreationProperties.AttributeList)
|
foreach (var attr in request.Options.CreationProperties.AttributeList)
|
||||||
{
|
{
|
||||||
switch (attr.Name)
|
switch (attr.Name)
|
||||||
|
@ -585,7 +585,6 @@ namespace DiIiS_NA.LoginServer.ServicesSystem.Services
|
|||||||
foreach (var item in Hero.Profile.Equipment.ItemsList)
|
foreach (var item in Hero.Profile.Equipment.ItemsList)
|
||||||
{
|
{
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
int a = 8;
|
|
||||||
switch ((item.ItemSlot - 272) / 16)
|
switch ((item.ItemSlot - 272) / 16)
|
||||||
{
|
{
|
||||||
case 1: pos = 0; break; //0 - Шлем
|
case 1: pos = 0; break; //0 - Шлем
|
||||||
@ -1354,189 +1353,10 @@ namespace DiIiS_NA.LoginServer.ServicesSystem.Services
|
|||||||
uint countofTravels = 0;
|
uint countofTravels = 0;
|
||||||
if (criteria.CriteriaId32AndFlags8 == 3367569)
|
if (criteria.CriteriaId32AndFlags8 == 3367569)
|
||||||
countofTravels++;
|
countofTravels++;
|
||||||
//else
|
|
||||||
|
|
||||||
snapshot.AddCriteriaSnapshot(criteria);
|
snapshot.AddCriteriaSnapshot(criteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var Achievement in AchievementManager.GetAllAchievements)
|
|
||||||
{
|
|
||||||
//ToonClass.Wizard: GrantAchievement(client, 74987243307581);
|
|
||||||
//Четвертая глава
|
|
||||||
if (Achievement.Id == 74987248297399)
|
|
||||||
{
|
|
||||||
var criterias = AchievementManager.GetCriterias(Achievement.Id);
|
|
||||||
//snapshot.AddCriteriaSnapshot(D3.Achievements.CriteriaUpdateRecord.CreateBuilder().SetCriteriaId32AndFlags8(unchecked((uint)74987244572493)).SetQuantity32(1));
|
|
||||||
//
|
|
||||||
//{criteria_id: 74987244038688 parent_achievement_id: 74987248297399 advance_event { id: 200 comparand: 74987250791778 } necessary_quantity: 1 order_hint: 12 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:Learn_5_Jewelcrafting_Recipies_Title_Tag" } }
|
|
||||||
//
|
|
||||||
//{criteria_id: 74987244572493 parent_achievement_id: 74987248297399 advance_event { id: 200 comparand: 74987244692586 } necessary_quantity: 1 order_hint: 5 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourney_XahRithKeywardenT1_Title_Tag_4" } }
|
|
||||||
//
|
|
||||||
//{criteria_id: 74987245130342 parent_achievement_id: 74987248297399 advance_event { id: 200 comparand: 74987247265988 } necessary_quantity: 1 evalutation_class: 1144211309 flags: 1536 attributes { key: ":title:" value: "Achievements:SeasonJourneyMainPartII_Title_Tag_28" } }
|
|
||||||
//
|
|
||||||
//{criteria_id: 74987245723942 parent_achievement_id: 74987248297399 advance_event { id: 200 comparand: 74987243712360 } necessary_quantity: 1 order_hint: 1 evalutation_class: 1144211309 flags: 1024 attributes {key: ":title:" value: "Achievements:MaxLevelNephalemRift_T12Minutes_Title_Tag"} }
|
|
||||||
//
|
|
||||||
//{criteria_id: 74987245863958 parent_achievement_id: 74987248297399 advance_event { id: 200 comparand: 74987246565133 } necessary_quantity: 1 order_hint: 10 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesAchievement274_Title_Tag" }}
|
|
||||||
//
|
|
||||||
//{criteria_id: 74987247667055 parent_achievement_id: 74987248297399 advance_event { id: 200 comparand: 74987258323927 } necessary_quantity: 1 order_hint: 11 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:Learn_5_Blacksmith_Recipies_Title_Tag" }}
|
|
||||||
//
|
|
||||||
//{criteria_id: 74987247674914 parent_achievement_id: 74987248297399 advance_event { id: 200 comparand: 74987243333398 } necessary_quantity: 1 order_hint: 4 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourney_SokahrKeywardenT1_Title_Tag_4" }}
|
|
||||||
//
|
|
||||||
//{criteria_id: 74987250762680 parent_achievement_id: 74987248297399 advance_event { id: 200 comparand: 74987247015305 } necessary_quantity: 1 order_hint: 6 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourney_NekaratKeywardenT1_Title_Tag_4" }}
|
|
||||||
//
|
|
||||||
//{criteria_id: 74987252164114 parent_achievement_id: 74987248297399 advance_event { id: 200 comparand: 74987254930175 } necessary_quantity: 1 order_hint: 7 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesKillBelialT2_Title_Tag" }}
|
|
||||||
//
|
|
||||||
//{criteria_id: 74987253329205 parent_achievement_id: 74987248297399 advance_event { id: 200 comparand: 74987256362609 } necessary_quantity: 1 order_hint: 3 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourney_OdegKeywardenT1omplete4Bounties_Title_Tag_4" }}
|
|
||||||
//
|
|
||||||
//{criteria_id: 74987255999493 parent_achievement_id: 74987248297399 advance_event { id: 200 comparand: 74987252937364 } necessary_quantity: 1 order_hint: 8 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesKillGhomT4_Title_Tag" }}
|
|
||||||
//
|
|
||||||
//{criteria_id: 74987256952350 parent_achievement_id: 74987248297399 advance_event { id: 200 comparand: 74987258699516 } necessary_quantity: 1 order_hint: 2 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesAchievement273_Title_Tag" }}
|
|
||||||
//
|
|
||||||
//{criteria_id: 74987257331078 parent_achievement_id: 74987248297399 advance_event { id: 200 comparand: 74987245627492 } necessary_quantity: 1 order_hint: 9 evalutation_class: 1144211309 flags: 1024 attributes {key: ":title:" value: "Achievements:SeasonGreaterRifts10Solo_Title_Tag" }}
|
|
||||||
}
|
|
||||||
if (Achievement.Id == 74987247265988)
|
|
||||||
{
|
|
||||||
var criterias = AchievementManager.GetCriterias(Achievement.Id);
|
|
||||||
//snapshot.AddCriteriaSnapshot(D3.Achievements.CriteriaUpdateRecord.CreateBuilder().SetCriteriaId32AndFlags8(unchecked((uint)74987258962046)).SetQuantity32(1));
|
|
||||||
//Мастер
|
|
||||||
//{criteria_id: 74987248395427 parent_achievement_id: 74987247265988 advance_event { id: 200 comparand: 74987255801934 } necessary_quantity: 1 order_hint: 1 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:MASTER_Title_Tag" }}
|
|
||||||
//Камень
|
|
||||||
//{criteria_id: 74987245885431 parent_achievement_id: 74987247265988 advance_event { id: 200 comparand: 74987243963733 } necessary_quantity: 1 order_hint: 2 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourney_ImperialGem_Title_Tag" }}
|
|
||||||
//Привет Кадала
|
|
||||||
//{criteria_id: 74987248526596 parent_achievement_id: 74987247265988 advance_event { id: 200 comparand: 74987254870297 } necessary_quantity: 1 order_hint: 3 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesKadala_Title_Tag" }}
|
|
||||||
//Я становлюсь Звездой
|
|
||||||
//{criteria_id: 74987252384014 parent_achievement_id: 74987247265988 advance_event { id: 200 comparand: 74987249059532 } necessary_quantity: 1 order_hint: 4 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesKillAdriaMaster_Title_Tag" }}
|
|
||||||
//Сделай свой выбор
|
|
||||||
//{criteria_id: 74987246511881 parent_achievement_id: 74987247265988 advance_event { id: 200 comparand: 74987251648219 } necessary_quantity: 1 order_hint: 5 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesKillSiegebreakerMaster_Title_Tag" }}
|
|
||||||
//Разыскивается в Тристраме
|
|
||||||
//{criteria_id: 74987258781748 parent_achievement_id: 74987247265988 advance_event { id: 200 comparand: 74987255156784 } necessary_quantity: 1 order_hint: 6 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesAchievement280_Title_Tag" }}
|
|
||||||
//Разыскивается в Калдее
|
|
||||||
//{criteria_id: 74987247833299 parent_achievement_id: 74987247265988 advance_event { id: 200 comparand: 74987259347561 } necessary_quantity: 1 order_hint: 7 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesAchievement280_Title_Tag_1" }}
|
|
||||||
//Разыскивается на Арреате
|
|
||||||
//{criteria_id: 74987248811185 parent_achievement_id: 74987247265988 advance_event { id: 200 comparand: 74987255614468 } necessary_quantity: 1 order_hint: 8 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesAchievement280_Title_Tag_2" }}
|
|
||||||
//Разыскивается на Небесах
|
|
||||||
//{criteria_id: 74987256262166 parent_achievement_id: 74987247265988 advance_event { id: 200 comparand: 74987254301166 } necessary_quantity: 1 order_hint: 9 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesAchievement280_Title_Tag_3" }}
|
|
||||||
//Разыскивается в Вестмарше
|
|
||||||
//{criteria_id: 74987249495955 parent_achievement_id: 74987247265988 advance_event { id: 200 comparand: 74987248936002 } necessary_quantity: 1 order_hint: 10 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesAchievement280_Title_Tag_4" }}
|
|
||||||
//Сезонный кубист
|
|
||||||
//{criteria_id: 74987245494264 parent_achievement_id: 74987247265988 advance_event { id: 200 comparand: 74987254169957 } necessary_quantity: 1 order_hint: 11 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:CraftingKanaisCubeExtractPower1_Title_Tag_2" }}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
//{criteria_id: 74987258962046 parent_achievement_id: 74987247265988 advance_event { id: 200 comparand: 74987254626662 } necessary_quantity: 1 evalutation_class: 1144211309 flags: 1536 attributes { key: ":title:" value: "Achievements:SeasonJourneyMainPartII_Title_Tag_27" }}
|
|
||||||
}
|
|
||||||
//Вторая глава
|
|
||||||
if (Achievement.Id == 74987254626662)
|
|
||||||
{
|
|
||||||
var criterias = AchievementManager.GetCriterias(Achievement.Id);
|
|
||||||
|
|
||||||
//Эксперт
|
|
||||||
//{ criteria_id: 74987250579270 advance_event { id: 200 comparand: 74987259480511 } necessary_quantity: 1 order_hint: 1 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesAchievement267_Title_Tag" } }
|
|
||||||
//Как закалять сталь
|
|
||||||
//{ criteria_id: 74987254004798 advance_event { id: 200 comparand: 74987256755434 } necessary_quantity: 1 order_hint: 2 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesAchievement264_Title_Tag" } }
|
|
||||||
//Лучшие друзья
|
|
||||||
//{ criteria_id: 74987246031286 advance_event { id: 200 comparand: 74987252641760 } necessary_quantity: 1 order_hint: 3 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourney_EquipFollower_Title_Tag" }
|
|
||||||
//Максимальная эффективность
|
|
||||||
//{ criteria_id: 74987249993545 advance_event { id: 200 comparand: 74987244456174 } necessary_quantity: 1 order_hint: 4 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesAchievement263_Title_Tag" } }
|
|
||||||
//Невероятные приключения Канаи
|
|
||||||
//{ criteria_id: 74987252674266 advance_event { id: 200 comparand: 74987243457910 } necessary_quantity: 1 order_hint: 5 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:CraftingKanaisCubeExtractPower1_Title_Tag_1" } }
|
|
||||||
//Все выше и выше
|
|
||||||
//{ criteria_id: 74987254853541 advance_event { id: 200 comparand: 74987257058411 } necessary_quantity: 1 order_hint: 6 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:Level_10_Title_Tag_6" } }
|
|
||||||
//Оставь надежду
|
|
||||||
//{ criteria_id: 74987254022737 advance_event { id: 200 comparand: 74987253273237 } necessary_quantity: 1 order_hint: 7 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesKillRakanothHard_Title_Tag" } }
|
|
||||||
//Сущий ад
|
|
||||||
//{ criteria_id: 74987252582955 advance_event { id: 200 comparand: 74987259900862 } necessary_quantity: 1 order_hint: 8 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesKillSKHard_Title_Tag" } }
|
|
||||||
//Приятные мелочи
|
|
||||||
//{ criteria_id: 74987254245219 advance_event { id: 200 comparand: 74987243791733 } necessary_quantity: 1 order_hint: 9 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesAchievement265_Title_Tag" } }
|
|
||||||
//Очаровательные чары
|
|
||||||
//{ criteria_id: 74987255495718 advance_event { id: 200 comparand: 74987243946801 } necessary_quantity: 1 order_hint: 10 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourney_EnchantAnItem_Title_Tag" } }
|
|
||||||
//Новый гардероб
|
|
||||||
//{ criteria_id: 74987253143400 advance_event { id: 200 comparand: 74987255480628 } necessary_quantity: 1 order_hint: 11 evalutation_class: 1144211309 flags: 1024 attributes { key: ":title:" value: "Achievements:SeasonJourney_TransmogrifyAnItem_Title_Tag" } }
|
|
||||||
}
|
|
||||||
//Первая глава
|
|
||||||
if (Achievement.Id == 74987254816831)
|
|
||||||
{
|
|
||||||
var criterias = AchievementManager.GetCriterias(Achievement.Id);
|
|
||||||
//3367569 - Количество приключений
|
|
||||||
// snapshot.AddCriteriaSnapshot(D3.Achievements.CriteriaUpdateRecord.CreateBuilder().SetCriteriaId32AndFlags8(3367569).SetQuantity32(5));
|
|
||||||
//snapshot.AddCriteriaSnapshot(D3.Achievements.CriteriaUpdateRecord.CreateBuilder().SetCriteriaId32AndFlags8(unchecked((uint)74987254401623)).SetQuantity32(1));
|
|
||||||
//snapshot.AddCriteriaSnapshot(D3.Achievements.CriteriaUpdateRecord.CreateBuilder().SetCriteriaId32AndFlags8(unchecked((uint)74987246353740)).SetQuantity32(0));
|
|
||||||
//{id: 200
|
|
||||||
//comparand: 74987256867455
|
|
||||||
|
|
||||||
/*
|
|
||||||
Глава Первая
|
|
||||||
TODO: Критерии первой главы
|
|
||||||
{criteria_id: 74987243379080 advance_event { id: 200 comparand: 74987247751174 } necessary_quantity: 1 attributes { key: ":title:" value: "Achievements:Complete4Bounties_Title_Tag_2" } }
|
|
||||||
{criteria_id: 74987246353740 advance_event { id: 200 comparand: 74987256867455 } necessary_quantity: 1 order_hint: 1 attributes { key: ":title:" value: "Achievements:Complete4Bounties_Title_Tag_1" } }
|
|
||||||
//{id: 200 comparand: 74987256867455}
|
|
||||||
---{criteria_id: 74987254401623 advance_event { id: 200 comparand: 74987259370936 } necessary_quantity: 1 order_hint: 2 attributes { key: ":title:" value: "Achievements:Socket_5_Gems_Title_Tag" } }
|
|
||||||
|
|
||||||
Готово:
|
|
||||||
{criteria_id: 74987249071497 advance_event { id: 200 comparand: 74987250124925 } necessary_quantity: 1 order_hint: 3 attributes { key: ":title:" value: "Achievements:Level_10_Blacksmith_Title_Tag_2" } }
|
|
||||||
{criteria_id: 74987245845978 advance_event { id: 200 comparand: 74987255697859 } necessary_quantity: 1 order_hint: 4 attributes { key: ":title:" value: "Achievements:Level_10_Jeweler_Title_Tag_2" } }
|
|
||||||
{criteria_id: 74987259424359 advance_event { id: 200 comparand: 74987255324210 } necessary_quantity: 1 order_hint: 5 attributes { key: ":title:" value: "Achievements:Level_10_Mystic_Title_Tag_1" } }
|
|
||||||
{criteria_id: 74987250915380 advance_event { id: 200 comparand: 74987258964574 } necessary_quantity: 1 order_hint: 6 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesKillDiabloNormal_Title_Tag" } }
|
|
||||||
{criteria_id: 74987249642121 advance_event { id: 200 comparand: 74987247606809 } necessary_quantity: 1 order_hint: 7 attributes { key: ":title:" value: "Achievements:SeasonJourneyObjectivesKillIzualNormal_Title_Tag" } }
|
|
||||||
{criteria_id: 74987250038929 advance_event { id: 200 comparand: 74987251848215 } necessary_quantity: 1 order_hint: 8 attributes { key: ":title:" value: "Achievements:Level_50_Title_Tag_1" } }
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
if (Achievement.AttributesList[0].Value.Contains("Kanai"))
|
|
||||||
{
|
|
||||||
//Logger.Info(Achievement.AttributesList[0].Value);
|
|
||||||
}
|
|
||||||
if (Achievement.AttributesList[0].Value.Contains("Season"))
|
|
||||||
{
|
|
||||||
//Logger.Info(Achievement.AttributesList[0].Value);
|
|
||||||
}
|
|
||||||
if (Achievement.AttributesList[0].Value.Contains("SeasonJourney"))
|
|
||||||
{
|
|
||||||
//"Achievements:SeasonJourney_SokahrKeywardenT1_Title_Tag_4"
|
|
||||||
//"Achievements:Level_10_Blacksmith_Title_Tag_2"
|
|
||||||
//"Achievements:SeasonJourney_SokahrKeywardenT1_Title_Tag_4"
|
|
||||||
//"Achievements:Kill_AncientBeasts_ActV_SeasonOnly_Title_Tag"
|
|
||||||
//"Achievements:SeasonJourneyObjectivesFollowerLegendary_Title_Tag"
|
|
||||||
string Name = "";
|
|
||||||
foreach (var attr in Achievement.AttributesList)
|
|
||||||
{
|
|
||||||
switch (attr.Key)
|
|
||||||
{
|
|
||||||
case ":title:": Name = attr.Value; break;
|
|
||||||
case "Partition":
|
|
||||||
if (attr.Value == "1") //Сезон
|
|
||||||
{
|
|
||||||
//Logger.Warn("Name: {0}, Partition: {1}", Name, attr.Value);
|
|
||||||
if (Achievement.CategoryId == 5548889
|
|
||||||
||
|
|
||||||
Achievement.CategoryId == 5519843 //> 4 главы
|
|
||||||
//||
|
|
||||||
//Achievement.CategoryId == 5518623
|
|
||||||
) ;
|
|
||||||
//snapshot.AddAchievementSnapshot(D3.Achievements.AchievementUpdateRecord.CreateBuilder().SetAchievementId(Achievement.Id).SetCompletion(1));
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//snapshot.AddAchievementSnapshot(D3.Achievements.AchievementUpdateRecord.CreateBuilder().SetAchievementId(Achievement.Id).SetCompletion(1));
|
|
||||||
//Logger.Warn("Name: {0}, Partition: {1}, ID: {2}", Name, attr.Value, Achievement.Id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//Logger.Warn("Partition: {0}", attr.Value);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// if(attr)
|
|
||||||
}
|
|
||||||
//Achievements:SeasonJourneyObjectivesFollowerLegendary_Description_Tag
|
|
||||||
}
|
|
||||||
//snapshot.AddAchievementSnapshot(D3.Achievements.AchievementUpdateRecord.CreateBuilder().SetAchievementId(Achievement.Id).SetCompletion(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
//Name: Achievements: SeasonJourneyMainPartII_Title_Tag_29, Partition: 1, ID: 74987248297399 - Четвертая глава
|
|
||||||
//Name: Achievements: SeasonJourneyMainPartII_Title_Tag_28, Partition: 1, ID: 74987247265988 - Третья глава
|
|
||||||
//Name: Achievements: SeasonJourneyMainPartII_Title_Tag_27, Partition: 1, ID: 74987254626662 - Вторая глава
|
|
||||||
//Name: Achievements: SeasonJourneyMainPartI_Title_Tag_9, Partition: 1, ID: 74987254816831 - Первая глава
|
|
||||||
|
|
||||||
|
|
||||||
return AchievementsSnapshot.CreateBuilder().SetErrorCode(0).SetGameAccountId(request.GameAccountId).SetSnapshot(snapshot).Build().ToByteString();
|
return AchievementsSnapshot.CreateBuilder().SetErrorCode(0).SetGameAccountId(request.GameAccountId).SetSnapshot(snapshot).Build().ToByteString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2402,7 +2222,6 @@ namespace DiIiS_NA.LoginServer.ServicesSystem.Services
|
|||||||
|
|
||||||
var response = MatchmakingGetStatsResponse.CreateBuilder().AddStatsBucket(back);
|
var response = MatchmakingGetStatsResponse.CreateBuilder().AddStatsBucket(back);
|
||||||
return response.Build().ToByteString();
|
return response.Build().ToByteString();
|
||||||
return ByteString.Empty;
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@ namespace DiIiS_NA.Core.Extensions
|
|||||||
{
|
{
|
||||||
public static T DeepClone<T>(T obj)
|
public static T DeepClone<T>(T obj)
|
||||||
{
|
{
|
||||||
//Blizzless Project 2022
|
|
||||||
using (var ms = new MemoryStream())
|
using (var ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
var formatter = new BinaryFormatter();
|
var formatter = new BinaryFormatter();
|
||||||
|
@ -68,7 +68,7 @@ namespace DiIiS_NA.Core.MPQ
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
private static readonly Logger Logger = LogManager.CreateLogger("DataBaseWorker");
|
private static new readonly Logger Logger = LogManager.CreateLogger("DataBaseWorker");
|
||||||
|
|
||||||
public Data()
|
public Data()
|
||||||
//: base(0, new List<string> { "CoreData.mpq", "ClientData.mpq" }, "/base/d3-update-base-(?<version>.*?).mpq")
|
//: base(0, new List<string> { "CoreData.mpq", "ClientData.mpq" }, "/base/d3-update-base-(?<version>.*?).mpq")
|
||||||
@ -230,20 +230,17 @@ using (StreamWriter sw = new StreamWriter(writePath, false, System.Text.Encoding
|
|||||||
|
|
||||||
var timerStart = DateTime.Now;
|
var timerStart = DateTime.Now;
|
||||||
|
|
||||||
// read all assets from the catalog first and process them (ie. find the parser if any available).
|
|
||||||
while (stream.Position < stream.Length)
|
while (stream.Position < stream.Length)
|
||||||
{
|
{
|
||||||
stream.Position += 8;
|
stream.Position += 8;
|
||||||
var group = (SNOGroup)stream.ReadValueS32();
|
var group = (SNOGroup)stream.ReadValueS32();
|
||||||
var snoId = stream.ReadValueS32();
|
var snoId = stream.ReadValueS32();
|
||||||
var name = stream.ReadString(128, true);
|
var name = stream.ReadString(128, true);
|
||||||
if (group == SNOGroup.SkillKit)
|
if (groupsToLoad != null && !groupsToLoad.Contains(group))
|
||||||
;
|
|
||||||
if (groupsToLoad != null && !groupsToLoad.Contains(group)) // if we're handled groups to load, just ignore the ones not in the list.
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var asset = new MPQAsset(group, snoId, name);
|
var asset = new MPQAsset(group, snoId, name);
|
||||||
asset.MpqFile = this.GetFile(asset.FileName, PatchExceptions.Contains(asset.Group)); // get the file. note: if file is in any of the groups in PatchExceptions it'll from load the original version - the reason is that assets in those groups got patched to 0 bytes. /raist.
|
asset.MpqFile = this.GetFile(asset.FileName, PatchExceptions.Contains(asset.Group));
|
||||||
|
|
||||||
if (asset.MpqFile != null)
|
if (asset.MpqFile != null)
|
||||||
this.ProcessAsset(asset); // process the asset.
|
this.ProcessAsset(asset); // process the asset.
|
||||||
@ -251,8 +248,6 @@ using (StreamWriter sw = new StreamWriter(writePath, false, System.Text.Encoding
|
|||||||
|
|
||||||
stream.Close();
|
stream.Close();
|
||||||
|
|
||||||
// Run the parsers for assets (that have a parser).
|
|
||||||
|
|
||||||
if (this._tasks.Count > 0) // if we're running in tasked mode, run the parser tasks.
|
if (this._tasks.Count > 0) // if we're running in tasked mode, run the parser tasks.
|
||||||
{
|
{
|
||||||
foreach (var task in this._tasks)
|
foreach (var task in this._tasks)
|
||||||
|
@ -110,8 +110,8 @@ namespace DiIiS_NA.GameServer.ClientSystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
else if (message is ISelfHandler) (message as ISelfHandler).Handle(this); // if message is able to handle itself, let it do so.
|
else if (message is ISelfHandler) (message as ISelfHandler).Handle(this); // if message is able to handle itself, let it do so.
|
||||||
else if (message.Id == 217) ;
|
else if (message.Id != 217)
|
||||||
else Logger.Warn("{0} - ID:{1} has no consumer or self-handler.", message.GetType(), message.Id);
|
Logger.Warn("{0} - ID:{1} has no consumer or self-handler.", message.GetType(), message.Id);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (NotImplementedException)
|
catch (NotImplementedException)
|
||||||
|
@ -120,9 +120,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
|||||||
/// <param name="facingAngle">The angle in radians.</param>
|
/// <param name="facingAngle">The angle in radians.</param>
|
||||||
public void SetFacingRotation(float facingAngle)
|
public void SetFacingRotation(float facingAngle)
|
||||||
{
|
{
|
||||||
if (this.Spawner)
|
if (!this.Spawner)
|
||||||
;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
Quaternion q = Quaternion.FacingRotation(facingAngle);
|
Quaternion q = Quaternion.FacingRotation(facingAngle);
|
||||||
this.RotationW = q.W;
|
this.RotationW = q.W;
|
||||||
@ -450,10 +448,6 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
|||||||
if (this is Player)
|
if (this is Player)
|
||||||
{
|
{
|
||||||
(this as Player).BetweenWorlds = true;
|
(this as Player).BetweenWorlds = true;
|
||||||
/*(this as Player).InGameClient.SendMessage(new FreezeGameMessage
|
|
||||||
{
|
|
||||||
Field0 = true
|
|
||||||
});*/
|
|
||||||
(this as Player).InGameClient.SendMessage(new ACDTranslateSyncMessage()
|
(this as Player).InGameClient.SendMessage(new ACDTranslateSyncMessage()
|
||||||
{
|
{
|
||||||
ActorId = this.DynamicID(this as Player),
|
ActorId = this.DynamicID(this as Player),
|
||||||
@ -476,10 +470,6 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
|||||||
if (this is Player)
|
if (this is Player)
|
||||||
{
|
{
|
||||||
(this as Player).BetweenWorlds = false;
|
(this as Player).BetweenWorlds = false;
|
||||||
/*(this as Player).InGameClient.SendMessage(new FreezeGameMessage
|
|
||||||
{
|
|
||||||
Field0 = false
|
|
||||||
});*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this is Player)
|
if (this is Player)
|
||||||
@ -490,7 +480,6 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
|||||||
(hireling as Hireling).Brain.DeActivate();
|
(hireling as Hireling).Brain.DeActivate();
|
||||||
hireling.Position = position;
|
hireling.Position = position;
|
||||||
(hireling as Hireling).Brain.Activate();
|
(hireling as Hireling).Brain.Activate();
|
||||||
//(this as Player).ActiveHireling = hireling;
|
|
||||||
}
|
}
|
||||||
var questhireling = (this as Player).SetQuestHireling;
|
var questhireling = (this as Player).SetQuestHireling;
|
||||||
if (questhireling != null)
|
if (questhireling != null)
|
||||||
@ -498,7 +487,6 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
|||||||
(questhireling as Hireling).Brain.DeActivate();
|
(questhireling as Hireling).Brain.DeActivate();
|
||||||
questhireling.Position = position;
|
questhireling.Position = position;
|
||||||
(questhireling as Hireling).Brain.Activate();
|
(questhireling as Hireling).Brain.Activate();
|
||||||
//(this as Player).ActiveHireling = hireling;
|
|
||||||
}
|
}
|
||||||
foreach (var fol in (this as Player).Followers)
|
foreach (var fol in (this as Player).Followers)
|
||||||
{
|
{
|
||||||
@ -517,6 +505,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
|||||||
this.Attributes[GameAttribute.Looping_Animation_End_Time] = -1;
|
this.Attributes[GameAttribute.Looping_Animation_End_Time] = -1;
|
||||||
this.Attributes.BroadcastChangedIfRevealed();
|
this.Attributes.BroadcastChangedIfRevealed();
|
||||||
//Refresh Inventory
|
//Refresh Inventory
|
||||||
|
(this as Player).Inventory.RefreshInventoryToClient();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -530,9 +519,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
|||||||
this.SetFacingRotation(facingAngle);
|
this.SetFacingRotation(facingAngle);
|
||||||
|
|
||||||
if (this.World == null) return;
|
if (this.World == null) return;
|
||||||
if (Spawner)
|
if (!Spawner)
|
||||||
;
|
|
||||||
else
|
|
||||||
this.World.BroadcastIfRevealed(plr => new ACDTranslateFacingMessage
|
this.World.BroadcastIfRevealed(plr => new ACDTranslateFacingMessage
|
||||||
{
|
{
|
||||||
ActorId = DynamicID(plr),
|
ActorId = DynamicID(plr),
|
||||||
@ -861,11 +848,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
|||||||
{
|
{
|
||||||
lock (player.RevealedObjects)
|
lock (player.RevealedObjects)
|
||||||
{
|
{
|
||||||
if (this.ActorSNO.Id == 3205)
|
|
||||||
;
|
|
||||||
if (this.Hidden || this.Dead || !this.Visible || this.World == null) return false;
|
if (this.Hidden || this.Dead || !this.Visible || this.World == null) return false;
|
||||||
|
|
||||||
|
|
||||||
//Leave Miriam in Crypt
|
//Leave Miriam in Crypt
|
||||||
if (this.ActorSNO.Id == 175310)
|
if (this.ActorSNO.Id == 175310)
|
||||||
if (this.World.WorldSNO.Id == 72636 ||
|
if (this.World.WorldSNO.Id == 72636 ||
|
||||||
|
@ -112,9 +112,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
|
|||||||
public override bool Reveal(Player player)
|
public override bool Reveal(Player player)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
//return base.Reveal(player);
|
||||||
|
|
||||||
return base.Reveal(player);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,9 +46,6 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
|
|||||||
switch (this.ActorSNO.Id)
|
switch (this.ActorSNO.Id)
|
||||||
{
|
{
|
||||||
case 308474:
|
case 308474:
|
||||||
//[311433][Conversation] X1_westm_Intro_FirstRunnerFromDeath -
|
|
||||||
//{[Actor] [Type: Monster] SNOId:308474 GlobalId: 1017300800 Position: x:1443.9391 y:439.9689 z:14.999992 Name: X1_WestM_Intro_Human_Male}
|
|
||||||
Actor IntroMan = null;
|
|
||||||
if (this.Position.X > 1440)
|
if (this.Position.X > 1440)
|
||||||
StartConversation(this.World, 311433);
|
StartConversation(this.World, 311433);
|
||||||
else
|
else
|
||||||
|
@ -33,8 +33,6 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.ScriptObjects
|
|||||||
if (player.Position.DistanceSquared(ref _position) < ActorData.Sphere.Radius * ActorData.Sphere.Radius * 3f * this.Scale && !_collapsed)
|
if (player.Position.DistanceSquared(ref _position) < ActorData.Sphere.Radius * ActorData.Sphere.Radius * 3f * this.Scale && !_collapsed)
|
||||||
{
|
{
|
||||||
_collapsed = true;
|
_collapsed = true;
|
||||||
int duration = 500; // ticks
|
|
||||||
|
|
||||||
this.PlayAnimation(5, 116098); //- Разлом
|
this.PlayAnimation(5, 116098); //- Разлом
|
||||||
this.World.SpawnMonster(76953, this.Position);
|
this.World.SpawnMonster(76953, this.Position);
|
||||||
}
|
}
|
||||||
|
@ -150,8 +150,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
|
|||||||
public override void OnTargeted(Player player, TargetMessage message)
|
public override void OnTargeted(Player player, TargetMessage message)
|
||||||
{
|
{
|
||||||
base.OnTargeted(player, message);
|
base.OnTargeted(player, message);
|
||||||
player.InGameClient.SendMessage(new OpenTradeWindowMessage((int)this.DynamicID(player)));
|
//player.RefreshReveal();
|
||||||
_vendorGrid.Reveal(player);
|
_vendorGrid.Reveal(player);
|
||||||
|
player.InGameClient.SendMessage(new OpenTradeWindowMessage((int)this.DynamicID(player)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void OnRequestBuyItem(PlayerSystem.Player player, uint itemId)
|
public virtual void OnRequestBuyItem(PlayerSystem.Player player, uint itemId)
|
||||||
|
@ -299,7 +299,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
|||||||
|
|
||||||
NPCInteraction[] npcInters = new NPCInteraction[count];
|
NPCInteraction[] npcInters = new NPCInteraction[count];
|
||||||
|
|
||||||
bool HaveWithTitles = false;
|
//bool HaveWithTitles = false;
|
||||||
var it = 0;
|
var it = 0;
|
||||||
foreach (var conv in Conversations)
|
foreach (var conv in Conversations)
|
||||||
{
|
{
|
||||||
@ -311,7 +311,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
|||||||
{
|
{
|
||||||
npcInters[it] = conv.AsNPCInteraction(this, player);
|
npcInters[it] = conv.AsNPCInteraction(this, player);
|
||||||
it++;
|
it++;
|
||||||
HaveWithTitles = true;
|
//HaveWithTitles = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,29 +246,6 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
|||||||
PetId = this.DynamicID(player),
|
PetId = this.DynamicID(player),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
int TypeID = 7;
|
|
||||||
int PlusIndex = 0;
|
|
||||||
bool isGolem = false;
|
|
||||||
if (this is BaseGolem ||
|
|
||||||
this is IceGolem ||
|
|
||||||
this is BoneGolem ||
|
|
||||||
this is DecayGolem ||
|
|
||||||
this is ConsumeFleshGolem ||
|
|
||||||
this is BloodGolem)
|
|
||||||
{
|
|
||||||
TypeID = 27;
|
|
||||||
isGolem = false;
|
|
||||||
}
|
|
||||||
if (this is SkeletalMage)
|
|
||||||
{
|
|
||||||
PlusIndex += 10;
|
|
||||||
TypeID = 9;
|
|
||||||
}
|
|
||||||
if (this is NecromancerSkeleton_A)
|
|
||||||
TypeID = 28;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -99,6 +99,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
|||||||
this.Destination = SmartExitGenerate();
|
this.Destination = SmartExitGenerate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
else if (this.World.WorldSNO.Id == 62751) //portal Adria's Hut
|
else if (this.World.WorldSNO.Id == 62751) //portal Adria's Hut
|
||||||
this.Destination = new ResolvedPortalDestination
|
this.Destination = new ResolvedPortalDestination
|
||||||
{
|
{
|
||||||
@ -1290,6 +1291,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
|||||||
if (this.Destination.DestLevelAreaSNO == 81178) return false;
|
if (this.Destination.DestLevelAreaSNO == 81178) return false;
|
||||||
if (this.Destination.DestLevelAreaSNO == 210451 && !(this.World.Game.CurrentQuest == 121792 || this.World.Game.CurrentQuest == 57339)) return false;
|
if (this.Destination.DestLevelAreaSNO == 210451 && !(this.World.Game.CurrentQuest == 121792 || this.World.Game.CurrentQuest == 57339)) return false;
|
||||||
if (this.Destination.DestLevelAreaSNO == 19789 && this.World.WorldSNO.Id == 50585) return false;
|
if (this.Destination.DestLevelAreaSNO == 19789 && this.World.WorldSNO.Id == 50585) return false;
|
||||||
|
if (this.Destination.WorldSNO == 332336 && this.Destination.StartingPointActorTag == 483 && this.World.WorldSNO.Id == 71150)
|
||||||
|
{
|
||||||
|
this.Destination.WorldSNO = 71150; this.Destination.StartingPointActorTag = 338;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.World.WorldSNO.Id == 80763 && this.Destination.WorldSNO == 85201) //Tower of the Damned lvl2
|
if (this.World.WorldSNO.Id == 80763 && this.Destination.WorldSNO == 85201) //Tower of the Damned lvl2
|
||||||
|
@ -687,7 +687,6 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem
|
|||||||
if (waypoints.Count > 1)
|
if (waypoints.Count > 1)
|
||||||
{
|
{
|
||||||
int RandomPoint = RandomHelper.Next(0, waypoints.Count - 1);
|
int RandomPoint = RandomHelper.Next(0, waypoints.Count - 1);
|
||||||
int pos = 0;
|
|
||||||
for (int i = 0; i < waypoints.Count; i++)
|
for (int i = 0; i < waypoints.Count; i++)
|
||||||
{
|
{
|
||||||
if (i != RandomPoint)
|
if (i != RandomPoint)
|
||||||
|
@ -435,8 +435,6 @@ namespace DiIiS_NA.GameServer.GSSystem.ItemsSystem
|
|||||||
|
|
||||||
if (IsWeapon(this.ItemType))
|
if (IsWeapon(this.ItemType))
|
||||||
{
|
{
|
||||||
if (Attributes[GameAttribute.Attacks_Per_Second_Item] == 0)
|
|
||||||
;
|
|
||||||
if (Attributes[GameAttribute.Damage_Weapon_Min, 0] == 0)
|
if (Attributes[GameAttribute.Damage_Weapon_Min, 0] == 0)
|
||||||
Attributes[GameAttribute.Damage_Weapon_Min, 0] = 34;
|
Attributes[GameAttribute.Damage_Weapon_Min, 0] = 34;
|
||||||
if (Attributes[GameAttribute.Damage_Weapon_Delta, 0] == 0)
|
if (Attributes[GameAttribute.Damage_Weapon_Delta, 0] == 0)
|
||||||
|
@ -289,22 +289,6 @@ namespace DiIiS_NA.GameServer.GSSystem.ObjectsSystem
|
|||||||
if (_parent is Item)
|
if (_parent is Item)
|
||||||
attributes.Remove(attr);
|
attributes.Remove(attr);
|
||||||
|
|
||||||
foreach (var attr in attributes.Where(a => !this.Replicateable(GameAttribute.Attributes[a.Id])).ToList())
|
|
||||||
if (_parent is Item)
|
|
||||||
;// attributes.Remove(attr);
|
|
||||||
|
|
||||||
if (this._parent.World != null && this._parent.World.IsPvP)
|
|
||||||
{
|
|
||||||
if (this._parent == client.Player || (this._parent is Minion && (this._parent as Minion).Master == client.Player))
|
|
||||||
;// attributes.RemoveWhere(a => a.Id == 104);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(this._parent is Living && !(this._parent is NPC)) && !(this._parent is Player && (this._parent as Player) == client.Player))
|
|
||||||
{
|
|
||||||
foreach (var attr in attributes.Where(a => ((_attributeValues[a].Value == GameAttribute.Attributes[a.Id]._DefaultValue.Value) && (_attributeValues[a].ValueF == GameAttribute.Attributes[a.Id]._DefaultValue.ValueF))).ToList())
|
|
||||||
;// attributes.Remove(attr);
|
|
||||||
}
|
|
||||||
//*/
|
|
||||||
var ids = attributes.GetEnumerator();
|
var ids = attributes.GetEnumerator();
|
||||||
|
|
||||||
bool level = attributes.Contains(new KeyId() { Id = GameAttribute.Level.Id });
|
bool level = attributes.Contains(new KeyId() { Id = GameAttribute.Level.Id });
|
||||||
|
@ -39,7 +39,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ObjectsSystem
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
_position = value;
|
_position = value;
|
||||||
if (_position == null || this.Size == null) return;
|
if (_position == null) return;
|
||||||
this.Bounds = new RectangleF(this.Position.X, this.Position.Y, this.Size.Width, this.Size.Height);
|
this.Bounds = new RectangleF(this.Position.X, this.Position.Y, this.Size.Width, this.Size.Height);
|
||||||
var handler = PositionChanged;
|
var handler = PositionChanged;
|
||||||
if (handler != null) handler(this, EventArgs.Empty);
|
if (handler != null) handler(this, EventArgs.Empty);
|
||||||
|
@ -728,7 +728,6 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
|
|||||||
foreach (var ghost in cryptwrld.GetActorsBySNO(5360))
|
foreach (var ghost in cryptwrld.GetActorsBySNO(5360))
|
||||||
ghost.Destroy();
|
ghost.Destroy();
|
||||||
break;
|
break;
|
||||||
break;
|
|
||||||
#endregion
|
#endregion
|
||||||
#region A1-Q4 Event_DoK
|
#region A1-Q4 Event_DoK
|
||||||
case 139823: //Event_DoK_Kill.cnv
|
case 139823: //Event_DoK_Kill.cnv
|
||||||
|
@ -348,6 +348,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
|
|||||||
item.Unreveal(_owner);
|
item.Unreveal(_owner);
|
||||||
this.AddGoldAmount(cost);
|
this.AddGoldAmount(cost);
|
||||||
(vendor as Vendor).AddBuybackItem(item, _owner);
|
(vendor as Vendor).AddBuybackItem(item, _owner);
|
||||||
|
_owner.PlayEffect(Effect.Sound, 36744);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CheckItemSlots(Item target_item, int destination_slot)
|
public bool CheckItemSlots(Item target_item, int destination_slot)
|
||||||
@ -602,9 +603,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
|
|||||||
var addedItem = destGrid.GetItem(item.InvLoc(_owner).Row + 1, item.InvLoc(_owner).Column);
|
var addedItem = destGrid.GetItem(item.InvLoc(_owner).Row + 1, item.InvLoc(_owner).Column);
|
||||||
if (addedItem != null)
|
if (addedItem != null)
|
||||||
{
|
{
|
||||||
if (sourceGrid.GetItemInventorySize(addedItem).Height == 2)
|
if (sourceGrid.GetItemInventorySize(addedItem).Height != 2)
|
||||||
;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
ChangeItemSlotDB(request.Location.EquipmentSlot, addedItem);
|
ChangeItemSlotDB(request.Location.EquipmentSlot, addedItem);
|
||||||
ChangeItemLocationDB(old_x, old_y + 1, addedItem);
|
ChangeItemLocationDB(old_x, old_y + 1, addedItem);
|
||||||
|
@ -1604,7 +1604,6 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
|
|||||||
Actor NStone = null;
|
Actor NStone = null;
|
||||||
Portal portal = null;
|
Portal portal = null;
|
||||||
int map = -1;
|
int map = -1;
|
||||||
int x = 0;
|
|
||||||
int[] Maps = new int[]
|
int[] Maps = new int[]
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -2293,31 +2292,6 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
|
|||||||
{
|
{
|
||||||
this.Attributes.BroadcastChangedIfRevealed();
|
this.Attributes.BroadcastChangedIfRevealed();
|
||||||
var a = this.GetActorsInRange(15f);
|
var a = this.GetActorsInRange(15f);
|
||||||
;
|
|
||||||
//2896 2968
|
|
||||||
|
|
||||||
//this.World.SpawnRandomLegOrSetEquip(this, this);
|
|
||||||
//this.World.SpawnRandomEquip(this, this
|
|
||||||
// , RandomHelper.Next(3, 8));
|
|
||||||
//this.GrantCriteria(74987249495955);
|
|
||||||
// foreach (var actor in World.GetActorsInGroup(-1248096796))
|
|
||||||
//actor.PlayActionAnimation(11514);
|
|
||||||
//for (int i = 0; i < 20; i++)
|
|
||||||
//0 - хз
|
|
||||||
//1 - Инвентарь
|
|
||||||
//2 - Скиллы
|
|
||||||
//3 - Парагон скиллы
|
|
||||||
//4,5,6 - краш
|
|
||||||
//7 - пустая карта
|
|
||||||
//8 - Задания
|
|
||||||
//9 - Тайник
|
|
||||||
//10 - Соратник
|
|
||||||
//11,12,15 - ?
|
|
||||||
//13 - Админка
|
|
||||||
//14 - Мини карта
|
|
||||||
//16 - Почта
|
|
||||||
//17,18,19,20,21,22,23 - разрыв соединения
|
|
||||||
// this.InGameClient.SendMessage(new UIElementMessage() { Element = 13, Action = true });
|
|
||||||
|
|
||||||
#region
|
#region
|
||||||
//UpdateExp(5000000);
|
//UpdateExp(5000000);
|
||||||
@ -2529,10 +2503,9 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
|
|||||||
|
|
||||||
private void OnTryWaypoint(GameClient client, TryWaypointMessage tryWaypointMessage)
|
private void OnTryWaypoint(GameClient client, TryWaypointMessage tryWaypointMessage)
|
||||||
{
|
{
|
||||||
//{[World] SNOId: 460587 GlobalId: 117440518 Name: lost_souls_prototype_v5}
|
|
||||||
var wpWorld = this.World.Game.GetWayPointWorldById(tryWaypointMessage.nWaypoint);
|
var wpWorld = this.World.Game.GetWayPointWorldById(tryWaypointMessage.nWaypoint);
|
||||||
var wayPoint = wpWorld.GetWayPointById(tryWaypointMessage.nWaypoint);
|
var wayPoint = wpWorld.GetWayPointById(tryWaypointMessage.nWaypoint);
|
||||||
|
Logger.Warn("---Waypoint Debug---");
|
||||||
var proximity = new RectangleF(wayPoint.Position.X - 1f, wayPoint.Position.Y - 1f, 2f, 2f);
|
var proximity = new RectangleF(wayPoint.Position.X - 1f, wayPoint.Position.Y - 1f, 2f, 2f);
|
||||||
var scenes = wpWorld.QuadTree.Query<Scene>(proximity);
|
var scenes = wpWorld.QuadTree.Query<Scene>(proximity);
|
||||||
if (scenes.Count == 0) return; // cork (is it real?)
|
if (scenes.Count == 0) return; // cork (is it real?)
|
||||||
@ -2546,21 +2519,15 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
var levelArea = scene.Specification.SNOLevelAreas[0];
|
var levelArea = scene.Specification.SNOLevelAreas[0];
|
||||||
Logger.Trace("OnTryWaypoint: Id: {0}, WorldId: {1}, levelArea: {2}", tryWaypointMessage.nWaypoint, wpWorld.WorldSNO.Id, levelArea);
|
Logger.Warn($"OnTryWaypoint: Id: {tryWaypointMessage.nWaypoint}, WorldId: {wpWorld.WorldSNO.Id}, levelArea: {levelArea}");
|
||||||
if (wayPoint == null) return;
|
if (wayPoint == null) return;
|
||||||
|
Logger.Warn($"WpWorld: {wpWorld}, wayPoint: {wayPoint}");
|
||||||
InGameClient.SendMessage(new SimpleMessage(Opcodes.LoadingWarping));
|
InGameClient.SendMessage(new SimpleMessage(Opcodes.LoadingWarping));
|
||||||
if (wpWorld == this.World)
|
if (wpWorld == this.World)
|
||||||
this.Teleport(wayPoint.Position);
|
this.Teleport(wayPoint.Position);
|
||||||
else
|
else
|
||||||
this.ChangeWorld(wpWorld, wayPoint.Position);
|
this.ChangeWorld(wpWorld, wayPoint.Position);
|
||||||
|
|
||||||
/*this.Attributes[GameAttribute.Hidden] = false;
|
|
||||||
this.Attributes[GameAttribute.Loading] = false;
|
|
||||||
this.Attributes[GameAttribute.Disabled] = false;
|
|
||||||
this.Attributes[GameAttribute.CantStartDisplayedPowers] = false;
|
|
||||||
this.Attributes.BroadcastChangedIfRevealed();*/
|
|
||||||
|
|
||||||
//handling quest triggers
|
//handling quest triggers
|
||||||
if (this.World.Game.QuestProgress.QuestTriggers.ContainsKey(levelArea)) //EnterLevelArea
|
if (this.World.Game.QuestProgress.QuestTriggers.ContainsKey(levelArea)) //EnterLevelArea
|
||||||
{
|
{
|
||||||
@ -2585,8 +2552,21 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
|
|||||||
PlayerIndex = this.PlayerIndex,
|
PlayerIndex = this.PlayerIndex,
|
||||||
LevelAreaSNO = levelArea
|
LevelAreaSNO = levelArea
|
||||||
});
|
});
|
||||||
|
Logger.Warn("---Waypoint Debug End---");
|
||||||
}
|
}
|
||||||
|
public void RefreshReveal()
|
||||||
|
{
|
||||||
|
float Range = 200f;
|
||||||
|
if (this.InGameClient.Game.CurrentEncounter.activated)
|
||||||
|
Range = 360f;
|
||||||
|
|
||||||
|
List<Actor> actors_around = this.GetActorsInRange(Range);
|
||||||
|
|
||||||
|
foreach (var actor in actors_around)
|
||||||
|
if (actor is not Player)
|
||||||
|
actor.Unreveal(this);
|
||||||
|
RevealActorsToPlayer();
|
||||||
|
}
|
||||||
private void OnRequestBuyItem(GameClient client, RequestBuyItemMessage requestBuyItemMessage)
|
private void OnRequestBuyItem(GameClient client, RequestBuyItemMessage requestBuyItemMessage)
|
||||||
{
|
{
|
||||||
var vendor = this.SelectedNPC as Vendor;
|
var vendor = this.SelectedNPC as Vendor;
|
||||||
@ -2722,7 +2702,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
|
|||||||
if (!this.Inventory.HaveEnough(ingr.ItemsGBID, ingr.Count)) { haveEnoughIngredients = false; break; } //if havent enough then exit
|
if (!this.Inventory.HaveEnough(ingr.ItemsGBID, ingr.Count)) { haveEnoughIngredients = false; break; } //if havent enough then exit
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (!haveEnoughIngredients) return;
|
if (!haveEnoughIngredients) return;
|
||||||
this.Inventory.RemoveGoldAmount(recipeDefinition.Gold);
|
this.Inventory.RemoveGoldAmount(recipeDefinition.Gold);
|
||||||
|
|
||||||
foreach (var ingr in recipeDefinition.Ingredients) //second loop (getting)
|
foreach (var ingr in recipeDefinition.Ingredients) //second loop (getting)
|
||||||
@ -2790,7 +2770,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
|
|||||||
if (!this.Inventory.HaveEnough(ingr.ItemsGBID, ingr.Count)) { haveEnoughIngredients = false; break; } //if havent enough then exit
|
if (!this.Inventory.HaveEnough(ingr.ItemsGBID, ingr.Count)) { haveEnoughIngredients = false; break; } //if havent enough then exit
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (!haveEnoughIngredients) return;
|
if (!haveEnoughIngredients) return;
|
||||||
this.Inventory.RemoveGoldAmount(recipeDefinition.Gold);
|
this.Inventory.RemoveGoldAmount(recipeDefinition.Gold);
|
||||||
|
|
||||||
foreach (var ingr in recipeDefinition.Ingredients) //second loop (getting)
|
foreach (var ingr in recipeDefinition.Ingredients) //second loop (getting)
|
||||||
@ -2855,7 +2835,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
|
|||||||
if (!this.Inventory.HaveEnough(ingr.ItemsGBID, ingr.Count)) { haveEnoughIngredients = false; break; } //if havent enough then exit
|
if (!this.Inventory.HaveEnough(ingr.ItemsGBID, ingr.Count)) { haveEnoughIngredients = false; break; } //if havent enough then exit
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (!haveEnoughIngredients) return;
|
if (!haveEnoughIngredients) return;
|
||||||
this.Inventory.RemoveGoldAmount(recipeDefinition.Gold);
|
this.Inventory.RemoveGoldAmount(recipeDefinition.Gold);
|
||||||
|
|
||||||
foreach (var ingr in recipeDefinition.Ingredients) //second loop (getting)
|
foreach (var ingr in recipeDefinition.Ingredients) //second loop (getting)
|
||||||
@ -3399,8 +3379,6 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
|
|||||||
{
|
{
|
||||||
actor.Reveal(this);
|
actor.Reveal(this);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var actor in this.World.Actors.Values) // unreveal far actors
|
foreach (var actor in this.World.Actors.Values) // unreveal far actors
|
||||||
|
@ -18,7 +18,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem
|
|||||||
public bool IsChannelOpen = false;
|
public bool IsChannelOpen = false;
|
||||||
public float EffectsPerSecond = 1.0f;
|
public float EffectsPerSecond = 1.0f;
|
||||||
public bool WaitForSpawn = false;
|
public bool WaitForSpawn = false;
|
||||||
public float WaitSeconds = 1.0f;
|
public new float WaitSeconds = 1.0f;
|
||||||
|
|
||||||
public virtual void OnChannelOpen() { }
|
public virtual void OnChannelOpen() { }
|
||||||
public virtual void OnChannelClose() { }
|
public virtual void OnChannelClose() { }
|
||||||
|
@ -47,7 +47,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem
|
|||||||
this.Position = position;
|
this.Position = position;
|
||||||
|
|
||||||
// copy in important effect params from user
|
// copy in important effect params from user
|
||||||
if (context.PowerSNO != null)
|
if (context != null)
|
||||||
if (context.PowerSNO != 0)
|
if (context.PowerSNO != 0)
|
||||||
{
|
{
|
||||||
this.Attributes[GameAttribute.Rune_A, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_A, context.PowerSNO];
|
this.Attributes[GameAttribute.Rune_A, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_A, context.PowerSNO];
|
||||||
|
@ -39,7 +39,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
|
|||||||
bool hitAnything = false;
|
bool hitAnything = false;
|
||||||
var ShockWavePos = PowerMath.TranslateDirection2D(User.Position, TargetPosition,
|
var ShockWavePos = PowerMath.TranslateDirection2D(User.Position, TargetPosition,
|
||||||
User.Position,
|
User.Position,
|
||||||
ScriptFormula(23));
|
10.0f);
|
||||||
var maxHits = 1;
|
var maxHits = 1;
|
||||||
for (int i = 0; i < maxHits; ++i)
|
for (int i = 0; i < maxHits; ++i)
|
||||||
{
|
{
|
||||||
@ -56,7 +56,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
|
|||||||
hitAnything = true;
|
hitAnything = true;
|
||||||
if (Rune_D > 0)
|
if (Rune_D > 0)
|
||||||
{
|
{
|
||||||
GeneratePrimaryResource(ScriptFormula(10));
|
GeneratePrimaryResource(6.0f);
|
||||||
}
|
}
|
||||||
if (Rune_B > 0)
|
if (Rune_B > 0)
|
||||||
{
|
{
|
||||||
@ -68,18 +68,16 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
|
|||||||
}
|
}
|
||||||
else if (Rune_C > 0)
|
else if (Rune_C > 0)
|
||||||
{
|
{
|
||||||
if (Rand.NextDouble() < ScriptFormula(14))
|
if (Rand.NextDouble() < 0.5)
|
||||||
AddBuff(hitPayload.Target, new DebuffStunned(WaitSeconds(ScriptFormula(15))));
|
AddBuff(hitPayload.Target, new DebuffStunned(WaitSeconds(1.5f)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Rand.NextDouble() < ScriptFormula(0))
|
if (Rand.NextDouble() < 0.1)
|
||||||
Knockback(hitPayload.Target, 0.8f, 2, -0.03f);
|
Knockback(hitPayload.Target, 0.8f, 2, -0.03f);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
attack.Apply();
|
attack.Apply();
|
||||||
yield return WaitSeconds(0.5f);
|
|
||||||
|
|
||||||
if (hitAnything)
|
if (hitAnything)
|
||||||
GeneratePrimaryResource(EvalTag(PowerKeys.ResourceGainedOnFirstHit));
|
GeneratePrimaryResource(EvalTag(PowerKeys.ResourceGainedOnFirstHit));
|
||||||
}
|
}
|
||||||
|
@ -2097,8 +2097,6 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
|
|||||||
WeaponDamage(hit, ScriptFormula(0), RuneSelect(DamageType.Physical, DamageType.Fire, DamageType.Lightning, DamageType.Poison, DamageType.Physical, DamageType.Physical));
|
WeaponDamage(hit, ScriptFormula(0), RuneSelect(DamageType.Physical, DamageType.Fire, DamageType.Lightning, DamageType.Poison, DamageType.Physical, DamageType.Physical));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
var a = 0;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
|
|||||||
{
|
{
|
||||||
WeaponDamage(Targets, 1.50f, DamageType.Cold);
|
WeaponDamage(Targets, 1.50f, DamageType.Cold);
|
||||||
EffectActor Explosion1 = SpawnEffect(defaultEff, TargetPosition, 0, WaitSeconds(2f));
|
EffectActor Explosion1 = SpawnEffect(defaultEff, TargetPosition, 0, WaitSeconds(2f));
|
||||||
Explosion.PlayEffect(Effect.PlayEffectGroup, 471410);
|
Explosion1.PlayEffect(Effect.PlayEffectGroup, 471410);
|
||||||
foreach (var Target in Targets.Actors)
|
foreach (var Target in Targets.Actors)
|
||||||
AddBuff(Target, new DebuffChilled(0.4f, WaitSeconds(0.5f)));
|
AddBuff(Target, new DebuffChilled(0.4f, WaitSeconds(0.5f)));
|
||||||
}
|
}
|
||||||
@ -304,7 +304,6 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
|
|||||||
{
|
{
|
||||||
var PowerData = (DiIiS_NA.Core.MPQ.FileFormats.Power)MPQStorage.Data.Assets[SNOGroup.Power][this.PowerSNO].Data;
|
var PowerData = (DiIiS_NA.Core.MPQ.FileFormats.Power)MPQStorage.Data.Assets[SNOGroup.Power][this.PowerSNO].Data;
|
||||||
|
|
||||||
bool hitAnything = false;
|
|
||||||
TargetPosition = PowerMath.TranslateDirection2D(User.Position, TargetPosition, User.Position, 7f);
|
TargetPosition = PowerMath.TranslateDirection2D(User.Position, TargetPosition, User.Position, 7f);
|
||||||
DamageType DType = DamageType.Physical;
|
DamageType DType = DamageType.Physical;
|
||||||
if (Rune_E > 0) DType = DamageType.Poison;
|
if (Rune_E > 0) DType = DamageType.Poison;
|
||||||
@ -573,8 +572,6 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
|
|||||||
attack.AddWeaponDamage(3f, DType);
|
attack.AddWeaponDamage(3f, DType);
|
||||||
attack.OnHit = hit =>
|
attack.OnHit = hit =>
|
||||||
{
|
{
|
||||||
int baseEffectSkill = 467461;
|
|
||||||
|
|
||||||
Effect = SpawnProxy(hit.Target.Position);
|
Effect = SpawnProxy(hit.Target.Position);
|
||||||
Effect.AddComplexEffect(RuneSelect(467461, 467557, 467500, 467643, 469460, 469275), _beamEnd);
|
Effect.AddComplexEffect(RuneSelect(467461, 467557, 467500, 467643, 469460, 469275), _beamEnd);
|
||||||
//Effect.AddComplexEffect(baseEffectSkill, _beamEnd);
|
//Effect.AddComplexEffect(baseEffectSkill, _beamEnd);
|
||||||
@ -805,8 +802,8 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
|
|||||||
|
|
||||||
projectile.OnUpdate = () =>
|
projectile.OnUpdate = () =>
|
||||||
{
|
{
|
||||||
if (!User.World.CheckLocationForFlag(projectile.Position, DiIiS_NA.Core.MPQ.FileFormats.Scene.NavCellFlags.AllowProjectile))
|
//if (!User.World.CheckLocationForFlag(projectile.Position, DiIiS_NA.Core.MPQ.FileFormats.Scene.NavCellFlags.AllowProjectile))
|
||||||
;// projectile.Destroy();
|
// projectile.Destroy();
|
||||||
};
|
};
|
||||||
|
|
||||||
yield return WaitSeconds(5f);
|
yield return WaitSeconds(5f);
|
||||||
@ -1886,8 +1883,6 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
|
|||||||
if (Rune_B > 0)
|
if (Rune_B > 0)
|
||||||
(User as PlayerSystem.Player).AddPercentageHP(-3);
|
(User as PlayerSystem.Player).AddPercentageHP(-3);
|
||||||
|
|
||||||
int Count = 0;
|
|
||||||
|
|
||||||
Proxy.PlayEffectGroup(RuneSelect(465009, 465021, 465016, 465027, 465011, 465026));
|
Proxy.PlayEffectGroup(RuneSelect(465009, 465021, 465016, 465027, 465011, 465026));
|
||||||
foreach (var act in Flesh)
|
foreach (var act in Flesh)
|
||||||
{
|
{
|
||||||
|
@ -152,18 +152,18 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads
|
|||||||
});
|
});
|
||||||
((this.Target as NecromancerSkeleton_A).Master as Player).NecroSkeletons.Remove(this.Target);
|
((this.Target as NecromancerSkeleton_A).Master as Player).NecroSkeletons.Remove(this.Target);
|
||||||
}
|
}
|
||||||
if (this is BaseGolem ||
|
if (this.Target is BaseGolem ||
|
||||||
this is IceGolem ||
|
this.Target is IceGolem ||
|
||||||
this is BoneGolem ||
|
this.Target is BoneGolem ||
|
||||||
this is DecayGolem ||
|
this.Target is DecayGolem ||
|
||||||
this is ConsumeFleshGolem ||
|
this.Target is ConsumeFleshGolem ||
|
||||||
this is BloodGolem)
|
this.Target is BloodGolem)
|
||||||
{
|
{
|
||||||
((this.Target as NecromancerSkeleton_A).Master as Player).InGameClient.SendMessage(new MessageSystem.Message.Definitions.Pet.PetDetachMessage()
|
((this.Target as Minion).Master as Player).InGameClient.SendMessage(new MessageSystem.Message.Definitions.Pet.PetDetachMessage()
|
||||||
{
|
{
|
||||||
PetId = this.Target.DynamicID(((this.Target as Minion).Master as Player))
|
PetId = this.Target.DynamicID(((this.Target as Minion).Master as Player))
|
||||||
});
|
});
|
||||||
((this.Target as NecromancerSkeleton_A).Master as Player).ActiveGolem = null;
|
((this.Target as Minion).Master as Player).ActiveGolem = null;
|
||||||
}
|
}
|
||||||
if (this.Target is Player)
|
if (this.Target is Player)
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents
|
|||||||
if (ActorSNO != -1)
|
if (ActorSNO != -1)
|
||||||
plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraFocusMessage() { ActorID = (int)world.GetActorBySNO(ActorSNO).DynamicID(plr), Duration = 1f, Snap = false });
|
plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraFocusMessage() { ActorID = (int)world.GetActorBySNO(ActorSNO).DynamicID(plr), Duration = 1f, Snap = false });
|
||||||
foreach (var actor in world.Actors.Values)
|
foreach (var actor in world.Actors.Values)
|
||||||
if (actor !is ActorSystem.Gizmo)
|
if (actor is not ActorSystem.Gizmo)
|
||||||
actor.Reveal(plr);
|
actor.Reveal(plr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -386,8 +386,6 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
|
|||||||
NPC.ForceConversationSNO = conversation;
|
NPC.ForceConversationSNO = conversation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
;// Logger.Warn("Не удалось присвоить диалог для NPC.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,8 +37,6 @@ namespace DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Effect
|
|||||||
|
|
||||||
public override void Encode(GameBitBuffer buffer)
|
public override void Encode(GameBitBuffer buffer)
|
||||||
{
|
{
|
||||||
if (Effect == Effect.ParagonLevelUp)
|
|
||||||
;
|
|
||||||
buffer.WriteUInt(32, ActorId);
|
buffer.WriteUInt(32, ActorId);
|
||||||
buffer.WriteInt(7, (int)Effect - (-1));
|
buffer.WriteInt(7, (int)Effect - (-1));
|
||||||
buffer.WriteBool(OptionalParameter.HasValue);
|
buffer.WriteBool(OptionalParameter.HasValue);
|
||||||
|
@ -189,7 +189,6 @@ namespace DiIiS_NA
|
|||||||
var line = Console.ReadLine();
|
var line = Console.ReadLine();
|
||||||
CommandManager.Parse(line);
|
CommandManager.Parse(line);
|
||||||
}
|
}
|
||||||
await boundChannel.CloseAsync();
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ namespace DiIiS_NA.REST.Manager
|
|||||||
|
|
||||||
_threads[SelectThreadWithMinConnections()].AddSocket(newSocket);
|
_threads[SelectThreadWithMinConnections()].AddSocket(newSocket);
|
||||||
}
|
}
|
||||||
catch (Exception err)
|
catch
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ namespace DiIiS_NA.REST.Networking
|
|||||||
_listener = new TcpListener(bindIP, port);
|
_listener = new TcpListener(bindIP, port);
|
||||||
_listener.Start();
|
_listener.Start();
|
||||||
}
|
}
|
||||||
catch (SocketException ex)
|
catch
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -76,8 +76,6 @@ namespace DiIiS_NA.REST.Networking
|
|||||||
{
|
{
|
||||||
Thread.Sleep(sleepTime);
|
Thread.Sleep(sleepTime);
|
||||||
|
|
||||||
uint tickStart = 0;
|
|
||||||
|
|
||||||
AddNewSockets();
|
AddNewSockets();
|
||||||
|
|
||||||
for (var i = 0; i < _Sockets.Count; ++i)
|
for (var i = 0; i < _Sockets.Count; ++i)
|
||||||
|
@ -935,12 +935,10 @@ namespace bgs.protocol
|
|||||||
public const int InvitationMessageFieldNumber = 1;
|
public const int InvitationMessageFieldNumber = 1;
|
||||||
private bool hasInvitationMessage;
|
private bool hasInvitationMessage;
|
||||||
private string invitationMessage_ = "";
|
private string invitationMessage_ = "";
|
||||||
[global::System.ObsoleteAttribute()]
|
|
||||||
public bool HasInvitationMessage
|
public bool HasInvitationMessage
|
||||||
{
|
{
|
||||||
get { return hasInvitationMessage; }
|
get { return hasInvitationMessage; }
|
||||||
}
|
}
|
||||||
[global::System.ObsoleteAttribute()]
|
|
||||||
public string InvitationMessage
|
public string InvitationMessage
|
||||||
{
|
{
|
||||||
get { return invitationMessage_; }
|
get { return invitationMessage_; }
|
||||||
|
@ -373,7 +373,6 @@ namespace bgs.protocol.channel.v1 {
|
|||||||
get { return result.ServiceType; }
|
get { return result.ServiceType; }
|
||||||
set { SetServiceType(value); }
|
set { SetServiceType(value); }
|
||||||
}
|
}
|
||||||
[global::System.ObsoleteAttribute()]
|
|
||||||
public Builder SetServiceType(uint value) {
|
public Builder SetServiceType(uint value) {
|
||||||
PrepareBuilder();
|
PrepareBuilder();
|
||||||
result.hasServiceType = true;
|
result.hasServiceType = true;
|
||||||
|
@ -2439,7 +2439,6 @@ namespace bgs.protocol.channel.v1 {
|
|||||||
get { return result.MemberId; }
|
get { return result.MemberId; }
|
||||||
set { SetMemberId(value); }
|
set { SetMemberId(value); }
|
||||||
}
|
}
|
||||||
[global::System.ObsoleteAttribute()]
|
|
||||||
public Builder SetMemberId(global::bgs.protocol.EntityId value) {
|
public Builder SetMemberId(global::bgs.protocol.EntityId value) {
|
||||||
pb::ThrowHelper.ThrowIfNull(value, "value");
|
pb::ThrowHelper.ThrowIfNull(value, "value");
|
||||||
PrepareBuilder();
|
PrepareBuilder();
|
||||||
@ -2447,7 +2446,6 @@ namespace bgs.protocol.channel.v1 {
|
|||||||
result.memberId_ = value;
|
result.memberId_ = value;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
[global::System.ObsoleteAttribute()]
|
|
||||||
public Builder SetMemberId(global::bgs.protocol.EntityId.Builder builderForValue) {
|
public Builder SetMemberId(global::bgs.protocol.EntityId.Builder builderForValue) {
|
||||||
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
|
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
|
||||||
PrepareBuilder();
|
PrepareBuilder();
|
||||||
@ -2455,7 +2453,6 @@ namespace bgs.protocol.channel.v1 {
|
|||||||
result.memberId_ = builderForValue.Build();
|
result.memberId_ = builderForValue.Build();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
[global::System.ObsoleteAttribute()]
|
|
||||||
public Builder MergeMemberId(global::bgs.protocol.EntityId value) {
|
public Builder MergeMemberId(global::bgs.protocol.EntityId value) {
|
||||||
pb::ThrowHelper.ThrowIfNull(value, "value");
|
pb::ThrowHelper.ThrowIfNull(value, "value");
|
||||||
PrepareBuilder();
|
PrepareBuilder();
|
||||||
|
Loading…
Reference in New Issue
Block a user