Translation, small refactoring, etc.

This commit is contained in:
Lucca Faria Ferri 2023-01-21 17:52:11 -08:00
parent df29776fb7
commit 9bf81750ee
164 changed files with 2821 additions and 2828 deletions

View File

@ -43,7 +43,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
var val = new ByteStringPresenceField<D3.OnlineService.EntityId>(FieldKeyHelper.Program.D3, FieldKeyHelper.OriginatingClass.Account, 2, 0, this.LastSelectedGameAccount);
var val = new ByteStringPresenceField<D3.OnlineService.EntityId>(FieldKeyHelper.Program.D3, FieldKeyHelper.OriginatingClass.Account, 2, 0, LastSelectedGameAccount);
return val;
}
}
@ -53,8 +53,8 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
get
{
ByteStringPresenceField<D3.OnlineService.EntityId> val = null;
if (this.GameAccount.CurrentToon != null)
val = new ByteStringPresenceField<D3.OnlineService.EntityId>(FieldKeyHelper.Program.D3, FieldKeyHelper.OriginatingClass.Account, 1, 0, this.GameAccount.CurrentToon.D3EntityID);
if (GameAccount.CurrentToon != null)
val = new ByteStringPresenceField<D3.OnlineService.EntityId>(FieldKeyHelper.Program.D3, FieldKeyHelper.OriginatingClass.Account, 1, 0, GameAccount.CurrentToon.D3EntityID);
else
{
var Fake = D3.OnlineService.EntityId.CreateBuilder().SetIdHigh(0).SetIdLow(0);
@ -77,7 +77,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
var val = new BoolPresenceField(FieldKeyHelper.Program.BNet, FieldKeyHelper.OriginatingClass.Account, 2, 0, this.IsOnline);
var val = new BoolPresenceField(FieldKeyHelper.Program.BNet, FieldKeyHelper.OriginatingClass.Account, 2, 0, IsOnline);
return val;
}
}
@ -86,7 +86,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
var val = new StringPresenceField(FieldKeyHelper.Program.BNet, FieldKeyHelper.OriginatingClass.Account, 4, 0, this.BattleTagName + "#" + HashCode.ToString("D4"));
var val = new StringPresenceField(FieldKeyHelper.Program.BNet, FieldKeyHelper.OriginatingClass.Account, 4, 0, BattleTagName + "#" + HashCode.ToString("D4"));
return val;
}
}
@ -95,7 +95,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
var val = new StringPresenceField(FieldKeyHelper.Program.BNet, FieldKeyHelper.OriginatingClass.Account, 2, 0, this.BroadcastMessage);
var val = new StringPresenceField(FieldKeyHelper.Program.BNet, FieldKeyHelper.OriginatingClass.Account, 2, 0, BroadcastMessage);
return val;
}
}
@ -105,7 +105,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
get
{
var val = new EntityIdPresenceFieldList(FieldKeyHelper.Program.BNet, FieldKeyHelper.OriginatingClass.Account, 3, 0);
val.Value.Add(this.GameAccount.BnetEntityId);
val.Value.Add(GameAccount.BnetEntityId);
return val;
}
}
@ -117,15 +117,15 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
get
{
var val = new IntPresenceField(FieldKeyHelper.Program.BNet, FieldKeyHelper.OriginatingClass.Account, 6, 0, 0);
val.Value = (long)this.LastOnline;
val.Value = (long)LastOnline;
return val;
}
set
{
this.LastOnline = (ulong)value.Value;
this.DBAccount.LastOnline = (ulong)value.Value;
DBSessions.SessionUpdate(this.DBAccount);
LastOnline = (ulong)value.Value;
DBAccount.LastOnline = (ulong)value.Value;
DBSessions.SessionUpdate(DBAccount);
}
}
@ -152,7 +152,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
return this.DBAccount.Email;
return DBAccount.Email;
}
private set
{
@ -160,34 +160,34 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
}
public string SaltedTicket
{
get { return this.DBAccount.SaltedTicket; }
get { return DBAccount.SaltedTicket; }
internal set
{
this.DBAccount.SaltedTicket = value;
DBSessions.SessionUpdate(this.DBAccount);
DBAccount.SaltedTicket = value;
DBSessions.SessionUpdate(DBAccount);
}
}
public byte[] Salt
{
get { return this.DBAccount.Salt.ToArray(); }
get { return DBAccount.Salt.ToArray(); }
internal set
{
this.DBAccount.Salt = value;
DBSessions.SessionUpdate(this.DBAccount);
DBAccount.Salt = value;
DBSessions.SessionUpdate(DBAccount);
}
} // s- User's salt.
public byte[] FullSalt
{
get { return this.DBAccount.Salt.ToArray(); }
get { return DBAccount.Salt.ToArray(); }
} // s- User's salt.
public byte[] PasswordVerifier
{
get { return this.DBAccount.PasswordVerifier; }
get { return DBAccount.PasswordVerifier; }
internal set
{
this.DBAccount.PasswordVerifier = value;
DBSessions.SessionUpdate(this.DBAccount);
DBAccount.PasswordVerifier = value;
DBSessions.SessionUpdate(DBAccount);
}
} // v - password verifier.
@ -195,12 +195,12 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
return this.DBAccount.HashCode;
return DBAccount.HashCode;
}
private set
{
this.DBAccount.HashCode = value;
DBSessions.SessionUpdate(this.DBAccount);
DBAccount.HashCode = value;
DBSessions.SessionUpdate(DBAccount);
}
}
@ -208,21 +208,21 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
bool staff = (this.DBAccount.UserLevel > Account.UserLevels.Tester);
bool staff = (DBAccount.UserLevel > UserLevels.Tester);
//(controller as HandlerController).Client.Account.GameAccount.ProgramField.Value
if(this.GameAccount.ProgramField.Value == "APP")
return string.Format("{0}", this.DBAccount.BattleTagName);
else if (this.GameAccount.ProgramField.Value == "D3")
return string.Format("{0}", this.DBAccount.BattleTagName);
if(GameAccount.ProgramField.Value == "APP")
return string.Format("{0}", DBAccount.BattleTagName);
else if (GameAccount.ProgramField.Value == "D3")
return string.Format("{0}", DBAccount.BattleTagName);
//return string.Format(staff ? " {{icon:bnet}} {{c_legendary}}{0}{{/c}}" : ("{0}"), this.DBAccount.BattleTagName);
else
return string.Format("{0}", this.DBAccount.BattleTagName);
return string.Format("{0}", DBAccount.BattleTagName);
//return (staff ? " {icon:bnet} " : (premium ? " {icon:gold} " : "")) + dbAcc.BattleTagName;
} //{c_blue}{/c}
private set
{
this.DBAccount.BattleTagName = value;
DBSessions.SessionUpdate(this.DBAccount);
DBAccount.BattleTagName = value;
DBSessions.SessionUpdate(DBAccount);
}
}
@ -230,7 +230,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
return this.BattleTagName + "#" + this.HashCode.ToString("D4");
return BattleTagName + "#" + HashCode.ToString("D4");
}
set
{
@ -238,19 +238,19 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
throw new Exception("BattleTag must contain '#'");
var split = value.Split('#');
this.DBAccount.BattleTagName = split[0];
this.DBAccount.HashCode = Convert.ToInt32(split[1]);
DBSessions.SessionUpdate(this.DBAccount);
DBAccount.BattleTagName = split[0];
DBAccount.HashCode = Convert.ToInt32(split[1]);
DBSessions.SessionUpdate(DBAccount);
}
}
public UserLevels UserLevel
{
get { return this.DBAccount.UserLevel; }
get { return DBAccount.UserLevel; }
internal set
{
this.DBAccount.UserLevel = value;
DBSessions.SessionUpdate(this.DBAccount);
DBAccount.UserLevel = value;
DBSessions.SessionUpdate(DBAccount);
}
} // user level for account.
@ -263,16 +263,16 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
if (this.CurrentGameAccountId == 0) return null;
if (this._currentGameAccount == null)
this._currentGameAccount = GameAccountManager.GetAccountByPersistentID(this.CurrentGameAccountId);
if (CurrentGameAccountId == 0) return null;
if (_currentGameAccount == null)
_currentGameAccount = GameAccountManager.GetAccountByPersistentID(CurrentGameAccountId);
return this._currentGameAccount;
return _currentGameAccount;
}
set
{
this._currentGameAccount = value;
this.CurrentGameAccountId = value.PersistentID;
_currentGameAccount = value;
CurrentGameAccountId = value.PersistentID;
}
}
@ -283,7 +283,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
return this.GameAccount.D3GameAccountId;
return GameAccount.D3GameAccountId;
}
}
@ -292,18 +292,18 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
public Account(DBAccount dbAccount)
: base(dbAccount.Id)
{
this.DBAccount = dbAccount;
var account_relations = DBSessions.SessionQueryWhere<DBAccountLists>(dbl => dbl.ListOwner.Id == this.PersistentID);
this.FriendsIds = new HashSet<ulong>(account_relations.Where(dbl => dbl.Type == "FRIEND").Select(a => a.ListTarget.Id)).ToList();
this.IgnoreIds = new HashSet<ulong>(account_relations.Where(dbl => dbl.Type == "IGNORE").Select(a => a.ListTarget.Id)).ToList();
this.LastOnline = dbAccount.LastOnline;
DBAccount = dbAccount;
var account_relations = DBSessions.SessionQueryWhere<DBAccountLists>(dbl => dbl.ListOwner.Id == PersistentID);
FriendsIds = new HashSet<ulong>(account_relations.Where(dbl => dbl.Type == "FRIEND").Select(a => a.ListTarget.Id)).ToList();
IgnoreIds = new HashSet<ulong>(account_relations.Where(dbl => dbl.Type == "IGNORE").Select(a => a.ListTarget.Id)).ToList();
LastOnline = dbAccount.LastOnline;
SetFields();
}
private void SetFields()
{
this.BnetEntityId = bgs.protocol.EntityId.CreateBuilder().SetHigh((ulong)EntityIdHelper.HighIdType.AccountId).SetLow(this.PersistentID).Build();
BnetEntityId = bgs.protocol.EntityId.CreateBuilder().SetHigh((ulong)EntityIdHelper.HighIdType.AccountId).SetLow(PersistentID).Build();
}
public void Update(IList<FieldOperation> operations)
@ -331,7 +331,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
}
}
if (operationsToUpdate.Count > 0)
base.UpdateSubscribers(Subscribers, operationsToUpdate);
UpdateSubscribers(Subscribers, operationsToUpdate);
}
private Field.Builder DoSet(Field field)
@ -339,7 +339,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
FieldOperation.Builder operation = FieldOperation.CreateBuilder();
Field.Builder returnField = Field.CreateBuilder().SetKey(field.Key);
if (this.GameAccount.LoggedInClient == null) return returnField;
if (GameAccount.LoggedInClient == null) return returnField;
switch ((FieldKeyHelper.Program)field.Key.Program)
{
@ -352,7 +352,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
if (field.Key.Group == 1 && field.Key.Field == 2) // Account's broadcast message
{
Logger.Trace("{0} set broadcast message to {1}.", this, field.Value.StringValue);
this.BroadcastMessage = field.Value.StringValue;
BroadcastMessage = field.Value.StringValue;
}
else if (field.Key.Group == 1 && field.Key.Field == 7) // Account's AFK status
{
@ -392,22 +392,22 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
}*/
}
public bgs.protocol.presence.v1.Field QueryField(bgs.protocol.presence.v1.FieldKey queryKey)
public Field QueryField(FieldKey queryKey)
{
var field = bgs.protocol.presence.v1.Field.CreateBuilder().SetKey(queryKey);
var field = Field.CreateBuilder().SetKey(queryKey);
switch ((FieldKeyHelper.Program)queryKey.Program)
{
case FieldKeyHelper.Program.D3:
if (queryKey.Group == 1 && queryKey.Field == 1) // Account's last selected toon.
{
if (this.IsOnline) // check if the account is online actually.
field.SetValue(bgs.protocol.Variant.CreateBuilder().SetMessageValue(this.GameAccount.LastPlayedHeroId.ToByteString()).Build());
if (IsOnline) // check if the account is online actually.
field.SetValue(bgs.protocol.Variant.CreateBuilder().SetMessageValue(GameAccount.LastPlayedHeroId.ToByteString()).Build());
}
else if (queryKey.Group == 1 && queryKey.Field == 2) // Account's last selected Game Account
{
if (this.IsOnline) // check if the account is online actually.
field.SetValue(bgs.protocol.Variant.CreateBuilder().SetMessageValue(this.LastSelectedGameAccount.ToByteString()).Build());
if (IsOnline) // check if the account is online actually.
field.SetValue(bgs.protocol.Variant.CreateBuilder().SetMessageValue(LastSelectedGameAccount.ToByteString()).Build());
}
else
{
@ -417,11 +417,11 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
case FieldKeyHelper.Program.BNet:
if (queryKey.Group == 1 && queryKey.Field == 4) // Account's battleTag
{
field.SetValue(bgs.protocol.Variant.CreateBuilder().SetStringValue(this.BattleTag).Build());
field.SetValue(bgs.protocol.Variant.CreateBuilder().SetStringValue(BattleTag).Build());
}
else if (queryKey.Group == 1 && queryKey.Field == 2) // Account's broadcast message
{
field.SetValue(bgs.protocol.Variant.CreateBuilder().SetStringValue(this.BroadcastMessage).Build());
field.SetValue(bgs.protocol.Variant.CreateBuilder().SetStringValue(BroadcastMessage).Build());
}
else
{
@ -440,7 +440,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
var operations = ChangedFields.GetChangedFieldList();
ChangedFields.ClearChanged();
base.UpdateSubscribers(this.Subscribers, operations);
UpdateSubscribers(Subscribers, operations);
}
//account class generated
@ -450,7 +450,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
//Bnet, Account,3,index -> GameAccount EntityIds
//Bnet, Account,4,0 -> BattleTag
public override List<bgs.protocol.presence.v1.FieldOperation> GetSubscriptionNotifications()
public override List<FieldOperation> GetSubscriptionNotifications()
{
//TODO: Create delegate-move this out
/*this.GameAccountListField.Value.Clear();
@ -460,20 +460,20 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
}*/
var operationList = new List<bgs.protocol.presence.v1.FieldOperation>();
var operationList = new List<FieldOperation>();
//if (this.LastSelectedHero != AccountHasNoToons)
//operationList.Add(this.LastPlayedHeroIdField.GetFieldOperation());
if (this.LastSelectedGameAccount != AccountHasNoToons)
if (LastSelectedGameAccount != AccountHasNoToons)
{
operationList.Add(this.LastPlayedToonIdField.GetFieldOperation());
operationList.Add(this.LastPlayedGameAccountIdField.GetFieldOperation());
operationList.Add(LastPlayedToonIdField.GetFieldOperation());
operationList.Add(LastPlayedGameAccountIdField.GetFieldOperation());
}
operationList.Add(this.RealIDTagField.GetFieldOperation());
operationList.Add(this.AccountOnlineField.GetFieldOperation());
operationList.AddRange(this.GameAccountListField.GetFieldOperationList());
operationList.Add(this.AccountBattleTagField.GetFieldOperation());
operationList.Add(this.BroadcastMessageField.GetFieldOperation());
operationList.Add(this.LastOnlineField.GetFieldOperation());
operationList.Add(RealIDTagField.GetFieldOperation());
operationList.Add(AccountOnlineField.GetFieldOperation());
operationList.AddRange(GameAccountListField.GetFieldOperationList());
operationList.Add(AccountBattleTagField.GetFieldOperation());
operationList.Add(BroadcastMessageField.GetFieldOperation());
operationList.Add(LastOnlineField.GetFieldOperation());
return operationList;
}
@ -489,13 +489,13 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
if (password.Length < 8 || password.Length > 16)
return false;
var calculatedVerifier = SRP6a.CalculatePasswordVerifierForAccount(this.Email, password, this.FullSalt);
return calculatedVerifier.SequenceEqual(this.PasswordVerifier);
var calculatedVerifier = SRP6a.CalculatePasswordVerifierForAccount(Email, password, FullSalt);
return calculatedVerifier.SequenceEqual(PasswordVerifier);
}
public override string ToString()
{
return String.Format("{{ Account: {0} [lowId: {1}] }}", this.Email, this.BnetEntityId.Low);
return String.Format("{{ Account: {0} [lowId: {1}] }}", Email, BnetEntityId.Low);
}
/// <summary>

View File

@ -64,9 +64,9 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
}
set
{
lock (this.DBGameAccount)
lock (DBGameAccount)
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
dbGAcc.DBAccount = value.DBAccount;
DBSessions.SessionUpdate(dbGAcc);
}
@ -79,16 +79,16 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
return DBSessions.SessionGet<DBGameAccount>(this.PersistentID);
return DBSessions.SessionGet<DBGameAccount>(PersistentID);
}
set { }
}
public D3.OnlineService.EntityId D3GameAccountId
public EntityId D3GameAccountId
{
get
{
return D3.OnlineService.EntityId.CreateBuilder().SetIdHigh(BnetEntityId.High).SetIdLow(PersistentID).Build();
return EntityId.CreateBuilder().SetIdHigh(BnetEntityId.High).SetIdLow(PersistentID).Build();
}
}
@ -117,7 +117,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
return new IntPresenceField(FieldKeyHelper.Program.D3, FieldKeyHelper.OriginatingClass.GameAccount, 3, 0, this.CurrentActivity);
return new IntPresenceField(FieldKeyHelper.Program.D3, FieldKeyHelper.OriginatingClass.GameAccount, 3, 0, CurrentActivity);
}
}
@ -126,7 +126,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
get
{
var val = new ByteStringPresenceField<D3.Guild.GuildSummary>(FieldKeyHelper.Program.D3, FieldKeyHelper.OriginatingClass.GameAccount, 7, 0);
val.Value = this.Clan.Summary;
val.Value = Clan.Summary;
return val;
}
}
@ -144,9 +144,9 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
if (this.CurrentToon == null)
if (CurrentToon == null)
return Toons.Count > 0 ? Toons.First().D3EntityID : AccountHasNoToons;
return this.CurrentToon.D3EntityID;
return CurrentToon.D3EntityID;
}
}
@ -179,11 +179,11 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
if (this.LoggedInClient != null && this.LoggedInClient.CurrentChannel != null)
if (LoggedInClient != null && LoggedInClient.CurrentChannel != null)
{
return bgs.protocol.channel.v1.ChannelId.CreateBuilder()
.SetType(0)
.SetId((uint)this.LoggedInClient.CurrentChannel.D3EntityId.IdLow)
.SetId((uint)LoggedInClient.CurrentChannel.D3EntityId.IdLow)
.SetHost(bgs.protocol.ProcessId.CreateBuilder().SetLabel(1).SetEpoch(0))
.Build();
}
@ -193,7 +193,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
set
{
if (value != null)
this.LoggedInClient.CurrentChannel = ChannelManager.GetChannelByChannelId (value);
LoggedInClient.CurrentChannel = ChannelManager.GetChannelByChannelId (value);
}
}
@ -201,9 +201,9 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
if (this.LoggedInClient != null && this.LoggedInClient.CurrentChannel != null)
if (LoggedInClient != null && LoggedInClient.CurrentChannel != null)
{
return this.LoggedInClient.CurrentChannel.D3EntityId;
return LoggedInClient.CurrentChannel.D3EntityId;
}
else
return null;
@ -211,7 +211,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
set
{
if (value != null)
this.LoggedInClient.CurrentChannel = ChannelManager.GetChannelByEntityId(value);
LoggedInClient.CurrentChannel = ChannelManager.GetChannelByEntityId(value);
}
}
@ -250,7 +250,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
get
{
var val = new EntityIdPresenceField(FieldKeyHelper.Program.BNet, FieldKeyHelper.OriginatingClass.GameAccount, 7, 0);
val.Value = this.Owner.BnetEntityId;
val.Value = Owner.BnetEntityId;
return val;
}
}
@ -274,7 +274,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
return new IntPresenceField(FieldKeyHelper.Program.BNet, FieldKeyHelper.OriginatingClass.GameAccount, 4, 0, (long)this.LastOnline);
return new IntPresenceField(FieldKeyHelper.Program.BNet, FieldKeyHelper.OriginatingClass.GameAccount, 4, 0, (long)LastOnline);
}
}
@ -287,10 +287,10 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
if (this._bannerConfiguration != null)
return this._bannerConfiguration;
if (_bannerConfiguration != null)
return _bannerConfiguration;
var res = BannerConfiguration.CreateBuilder();
if (this.DBGameAccount.Banner == null || this.DBGameAccount.Banner.Length < 1)
if (DBGameAccount.Banner == null || DBGameAccount.Banner.Length < 1)
{
res = BannerConfiguration.CreateBuilder()
.SetBannerShape(189701627)
@ -306,25 +306,25 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
//.SetEpicBanner((uint)StringHashHelper.HashNormal("Banner_Epic_03_PVP_Class_Completion"))
//.SetEpicBanner((uint)StringHashHelper.HashNormal("Banner_Epic_01_Hardcore"))
lock (this.DBGameAccount)
lock (DBGameAccount)
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
dbGAcc.Banner = res.Build().ToByteArray();
DBSessions.SessionUpdate(dbGAcc);
}
}
else
res = BannerConfiguration.CreateBuilder(BannerConfiguration.ParseFrom(this.DBGameAccount.Banner));
res = BannerConfiguration.CreateBuilder(BannerConfiguration.ParseFrom(DBGameAccount.Banner));
this._bannerConfiguration = res.Build();
return this._bannerConfiguration;
_bannerConfiguration = res.Build();
return _bannerConfiguration;
}
set
{
this._bannerConfiguration = value;
lock (this.DBGameAccount)
_bannerConfiguration = value;
lock (DBGameAccount)
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
dbGAcc.Banner = value.ToByteArray();
DBSessions.SessionUpdate(dbGAcc);
}
@ -356,7 +356,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
if (this.CurrentToon.IsHardcore)
if (CurrentToon.IsHardcore)
return "D3_GOLD_HC";
else
return "D3_GOLD";
@ -369,16 +369,16 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
if (this._currentToonId == 0) return null;
return ToonManager.GetToonByLowID(this._currentToonId);
if (_currentToonId == 0) return null;
return ToonManager.GetToonByLowID(_currentToonId);
}
set
{
if (value.GameAccount.PersistentID != this.PersistentID) return; //just in case...
this._currentToonId = value.PersistentID;
lock (this.DBGameAccount)
if (value.GameAccount.PersistentID != PersistentID) return; //just in case...
_currentToonId = value.PersistentID;
lock (DBGameAccount)
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
dbGAcc.LastPlayedHero = value.DBToon;
DBSessions.SessionUpdate(dbGAcc);
}
@ -401,13 +401,13 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
return this.DBGameAccount.Gold;
return DBGameAccount.Gold;
}
set
{
lock (this.DBGameAccount)
lock (DBGameAccount)
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
dbGAcc.Gold = value;
DBSessions.SessionUpdate(dbGAcc);
}
@ -418,13 +418,13 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
return this.DBGameAccount.HardcoreGold;
return DBGameAccount.HardcoreGold;
}
set
{
lock (this.DBGameAccount)
lock (DBGameAccount)
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
dbGAcc.HardcoreGold = value;
DBSessions.SessionUpdate(dbGAcc);
}
@ -435,13 +435,13 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
return this.DBGameAccount.BloodShards;
return DBGameAccount.BloodShards;
}
set
{
lock (this.DBGameAccount)
lock (DBGameAccount)
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
dbGAcc.BloodShards = value;
DBSessions.SessionUpdate(dbGAcc);
}
@ -452,13 +452,13 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
return this.DBGameAccount.HardcoreBloodShards;
return DBGameAccount.HardcoreBloodShards;
}
set
{
lock (this.DBGameAccount)
lock (DBGameAccount)
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
dbGAcc.HardcoreBloodShards = value;
DBSessions.SessionUpdate(dbGAcc);
}
@ -469,13 +469,13 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
return this.DBGameAccount.TotalBloodShards;
return DBGameAccount.TotalBloodShards;
}
set
{
lock (this.DBGameAccount)
lock (DBGameAccount)
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
dbGAcc.TotalBloodShards = value;
DBSessions.SessionUpdate(dbGAcc);
}
@ -504,7 +504,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
get
{
GameAccountSettings res = null;
if (this.DBGameAccount.UISettings == null || this.DBGameAccount.UISettings.Length < 1)
if (DBGameAccount.UISettings == null || DBGameAccount.UISettings.Length < 1)
{
res = GameAccountSettings.CreateBuilder()
//.SetChatFontSize(8)
@ -513,23 +513,23 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
.AddAutoJoinChannelsDeprecated("D3_GeneralChat")
.Build();
lock (this.DBGameAccount)
lock (DBGameAccount)
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
dbGAcc.UISettings = res.ToByteArray();
DBSessions.SessionUpdate(dbGAcc);
}
}
else
res = GameAccountSettings.ParseFrom(this.DBGameAccount.UISettings);
res = GameAccountSettings.ParseFrom(DBGameAccount.UISettings);
return res;
}
set
{
lock (this.DBGameAccount)
lock (DBGameAccount)
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
dbGAcc.UISettings = value.ToByteArray();
DBSessions.SessionUpdate(dbGAcc);
}
@ -553,9 +553,9 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
//.SetActionBindingVoiceptt(D3.Client.ActionBinding.CreateBuilder().SetKey1(112).SetKey2(-1).SetKeyModifierFlags1(0).SetKeyModifierFlags2(0).Build())
.Build();
lock (this.DBGameAccount)
lock (DBGameAccount)
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
dbGAcc.UIPrefs = res.ToByteArray();
DBSessions.SessionUpdate(dbGAcc);
}
@ -567,9 +567,9 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
}
set
{
lock (this.DBGameAccount)
lock (DBGameAccount)
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
dbGAcc.UIPrefs = value.ToByteArray();
DBSessions.SessionUpdate(dbGAcc);
}
@ -590,13 +590,13 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
if (this._achievements == null)
this.SetField();
return this._achievements;
if (_achievements == null)
SetField();
return _achievements;
}
set
{
this._achievements = value;
_achievements = value;
}
}
@ -604,13 +604,13 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
if (this._criteria == null)
this.SetField();
return this._criteria;
if (_criteria == null)
SetField();
return _criteria;
}
set
{
this._criteria = value;
_criteria = value;
}
}
@ -620,7 +620,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
uint highestLevel = 1;
var _toons = DBSessions.SessionQueryWhere<DBToon>(
dbi =>
dbi.DBGameAccount.Id == this.PersistentID
dbi.DBGameAccount.Id == PersistentID
&& dbi.Class == className).ToList();
foreach (var toon in _toons)
{
@ -639,7 +639,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
uint highestLevel = 0;
var _toons = DBSessions.SessionQueryWhere<DBToon>(
dbi =>
dbi.DBGameAccount.Id == this.PersistentID
dbi.DBGameAccount.Id == PersistentID
&& dbi.isHardcore == true).ToList();
foreach (var toon in _toons)
{
@ -650,7 +650,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
public bool InviteToGuild(Guild guild, GameAccount inviter)
{
if (guild.IsClan && this.Clan != null)
if (guild.IsClan && Clan != null)
return false;
else
{
@ -659,10 +659,10 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
.SetGuildName(guild.Name)
.SetInviterId(inviter.PersistentID)
.SetCategory(guild.Category)
.SetInviteType(inviter.PersistentID == this.PersistentID ? 1U : 0U)
.SetInviteType(inviter.PersistentID == PersistentID ? 1U : 0U)
.SetExpireTime(3600);
if (guild.IsClan) invite.SetGuildTag(guild.Prefix);
this.GuildInvites.Add(invite.Build());
GuildInvites.Add(invite.Build());
var update = D3.Notification.GuildInvitesListUpdate.CreateBuilder();
@ -670,16 +670,16 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
var notification = bgs.protocol.notification.v1.Notification.CreateBuilder();
notification.SetSenderId(bgs.protocol.EntityId.CreateBuilder().SetHigh(0UL).SetLow(0UL));
notification.SetTargetAccountId(this.Owner.BnetEntityId);
notification.SetTargetId(this.BnetEntityId);
notification.SetTargetAccountId(Owner.BnetEntityId);
notification.SetTargetId(BnetEntityId);
notification.SetType("D3.NotificationMessage");
notification.AddAttribute(bgs.protocol.Attribute.CreateBuilder()
.SetName("D3.NotificationMessage.MessageId").SetValue(bgs.protocol.Variant.CreateBuilder().SetIntValue(0)));
notification.AddAttribute(bgs.protocol.Attribute.CreateBuilder()
.SetName("D3.NotificationMessage.Payload").SetValue(bgs.protocol.Variant.CreateBuilder().SetMessageValue(update.Build().ToByteString())));
this.LoggedInClient.MakeRPC((lid) =>
bgs.protocol.notification.v1.NotificationListener.CreateStub(this.LoggedInClient).OnNotificationReceived(new HandlerController() { ListenerId = lid
LoggedInClient.MakeRPC((lid) =>
bgs.protocol.notification.v1.NotificationListener.CreateStub(LoggedInClient).OnNotificationReceived(new HandlerController() { ListenerId = lid
}, notification.Build(), callback => { }));
return true;
}
@ -689,7 +689,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
var profile = AccountProfile.CreateBuilder()
.SetParagonLevel((uint)dbGAcc.ParagonLevel)
.SetDeprecatedBestLadderParagonLevel((uint)dbGAcc.ParagonLevel)
@ -701,15 +701,15 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
.SetGoldCollected(dbGAcc.TotalGold)
//deprecated //.SetHighestDifficulty(Convert.ToUInt32(progress[0], 10))
.SetNumFallenHeroes(3)
.SetParagonLevelHardcore(0) // Уровень совершенства в гер. режиме
.SetBountiesCompleted((uint)dbGAcc.TotalBounties) //Выполнено поручений
.SetLootRunsCompleted(0) //Закрыто нефалемских порталов
.SetParagonLevelHardcore(0) // Hardcore Paragon Level
.SetBountiesCompleted((uint)dbGAcc.TotalBounties) // Bounties Completed
.SetLootRunsCompleted(0) // Loot Runs Completed
.SetPvpWins(0)
.SetPvpTakedowns(0)
.SetPvpDamage(0)
.SetMonstersKilled(dbGAcc.TotalKilled) //Убито монстров
.SetElitesKilled(this.DBGameAccount.ElitesKilled) //Убито особых противников
.SetGoldCollected(this.DBGameAccount.TotalGold) //Собрано золото
.SetMonstersKilled(dbGAcc.TotalKilled) //Monsters killed
.SetElitesKilled(DBGameAccount.ElitesKilled) //Убито особых противников
.SetGoldCollected(DBGameAccount.TotalGold) //Собрано золото
.SetHighestHardcoreLevel(0) // Максимальный уровень в гер. режиме
.SetHardcoreMonstersKilled(0) // Убито монстров в гер. режиме
@ -752,7 +752,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
EntityId.CreateBuilder().SetIdHigh(0).SetIdLow(0).Build();
//Platinum
public int Platinum { get { return this.DBGameAccount.Platinum; } set { lock (this.DBGameAccount) { var dbGA = this.DBGameAccount; dbGA.Platinum = value; DBSessions.SessionUpdate(dbGA); } } }
public int Platinum { get { return DBGameAccount.Platinum; } set { lock (DBGameAccount) { var dbGA = DBGameAccount; dbGA.Platinum = value; DBSessions.SessionUpdate(dbGA); } } }
public List<Toon> Toons
{
@ -763,16 +763,16 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
: base(dbGameAccount.Id)
{
//DBGameAccount = dbGameAccount;
this.AccountId = dbGameAccount.DBAccount.Id;
AccountId = dbGameAccount.DBAccount.Id;
if (dbGameAccount.LastPlayedHero != null)
this._currentToonId = dbGameAccount.LastPlayedHero.Id;
this.LastOnline = dbGameAccount.LastOnline;
var banner = this.BannerConfiguration; //just pre-loading it
_currentToonId = dbGameAccount.LastPlayedHero.Id;
LastOnline = dbGameAccount.LastOnline;
var banner = BannerConfiguration; //just pre-loading it
const ulong bnetGameAccountHigh = ((ulong)EntityIdHelper.HighIdType.GameAccountId) + (0x0100004433);// + (0x0100004433);
this.BnetEntityId = bgs.protocol.EntityId.CreateBuilder().SetHigh(bnetGameAccountHigh).SetLow(PersistentID).Build();
this.ProgramField.Value = "D3";
BnetEntityId = bgs.protocol.EntityId.CreateBuilder().SetHigh(bnetGameAccountHigh).SetLow(PersistentID).Build();
ProgramField.Value = "D3";
}
private void SetField()
@ -780,7 +780,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
Achievements = new List<AchievementUpdateRecord>();
AchievementCriteria = new List<CriteriaUpdateRecord>();
var achs = DBSessions.SessionQueryWhere<Core.Storage.AccountDataBase.Entities.DBAchievements>(dbi => dbi.DBGameAccount.Id == this.PersistentID).ToList();
var achs = DBSessions.SessionQueryWhere<Core.Storage.AccountDataBase.Entities.DBAchievements>(dbi => dbi.DBGameAccount.Id == PersistentID).ToList();
foreach (var ach in achs)
{
if (ach.AchievementId == 1)
@ -846,7 +846,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
//checking last online
var dbAcc = this.Owner.DBAccount;
var dbAcc = Owner.DBAccount;
ChangedFields.SetPresenceFieldValue(GameAccountStatusField);
ChangedFields.SetPresenceFieldValue(LastOnlineField);
@ -871,13 +871,13 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
return (GameAccountFlags)this.DBGameAccount.Flags | GameAccountFlags.HardcoreAdventureModeUnlocked;
return (GameAccountFlags)DBGameAccount.Flags | GameAccountFlags.HardcoreAdventureModeUnlocked;
}
set
{
lock (this.DBGameAccount)
lock (DBGameAccount)
{
var dbGAcc = this.DBGameAccount;
var dbGAcc = DBGameAccount;
dbGAcc.Flags = (int)value;
DBSessions.SessionUpdate(dbGAcc);
}
@ -890,7 +890,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
Digest.Builder builder = Digest.CreateBuilder().SetVersion(116)
// 7447=>99, 7728=> 100, 8801=>102, 8296=>105, 8610=>106, 8815=>106, 8896=>106, 9183=>107
.SetBannerConfiguration(this.BannerConfiguration)
.SetBannerConfiguration(BannerConfiguration)
//.SetFlags((uint)this.Flags) //1 - Enable Hardcore
.SetFlags((uint)114)
.SetLastPlayedHeroId(LastPlayedHeroId)
@ -901,11 +901,11 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
.SetChallengeRiftAccountData(D3.ChallengeRifts.AccountData.CreateBuilder()
.SetLastChallengeRewardEarned(416175).SetLastChallengeTried(416175)
)
.AddAltLevels((uint)this.DBGameAccount.ParagonLevel)
.AddAltLevels((uint)DBGameAccount.ParagonLevel)
//.AddAltLevels((uint)this.DBGameAccount.ParagonLevelHardcore)
;
if (this.Clan != null)
builder.SetGuildId(this.Clan.PersistentId);
if (Clan != null)
builder.SetGuildId(Clan.PersistentId);
return builder.Build();
}
@ -915,7 +915,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
get
{
return (uint)this.Achievements.Where(a => a.Completion != -1).Count() * 10U;
return (uint)Achievements.Where(a => a.Completion != -1).Count() * 10U;
}
}
@ -925,7 +925,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
{
var operations = ChangedFields.GetChangedFieldList();
ChangedFields.ClearChanged();
base.UpdateSubscribers(Subscribers, operations);
UpdateSubscribers(Subscribers, operations);
}
public override List<FieldOperation> GetSubscriptionNotifications()
@ -968,7 +968,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
operationList.Add(BattleTagField.GetFieldOperation());
operationList.Add(GameAccountNameField.GetFieldOperation());
operationList.Add(OwnerIdField.GetFieldOperation());
if (this.Clan != null)
if (Clan != null)
operationList.Add(ClanIdField.GetFieldOperation());
operationList.Add(GameVersionField.GetFieldOperation());
operationList.Add(PartyIdField.GetFieldOperation());
@ -1005,12 +1005,12 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
}
}
if (operationsToUpdate.Count > 0)
base.UpdateSubscribers(Subscribers, operationsToUpdate);
UpdateSubscribers(Subscribers, operationsToUpdate);
}
public void TestUpdate()
{
var operations = this.GetSubscriptionNotifications();
var operations = GetSubscriptionNotifications();
/*
operations.Add(
FieldOperation.CreateBuilder()
@ -1038,7 +1038,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
case FieldKeyHelper.Program.D3:
if (field.Key.Group == 2 && field.Key.Field == 3) //CurrentActivity
{
this.CurrentActivity = (int)field.Value.IntValue;
CurrentActivity = (int)field.Value.IntValue;
returnField.SetValue(field.Value);
Logger.Trace("{0} set CurrentActivity to {1}", this, field.Value.IntValue);
}
@ -1068,7 +1068,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
Channel channel = ChannelManager.GetChannelByChannelId(bgs.protocol.channel.v1.ChannelId.ParseFrom(field.Value.MessageValue));
//this.PartyId = EntityId.CreateBuilder().SetIdLow(NewChannelID.Id).SetIdHigh(0x600000000000000).Build();
this.PartyChannelId = bgs.protocol.channel.v1.ChannelId.ParseFrom(field.Value.MessageValue);
PartyChannelId = bgs.protocol.channel.v1.ChannelId.ParseFrom(field.Value.MessageValue);
LoggedInClient.CurrentChannel = channel;
var c = bgs.protocol.channel.v1.ChannelId.ParseFrom(field.Value.MessageValue);
//returnField.SetValue(bgs.protocol.Variant.CreateBuilder().SetMessageValue(PartyChannelId.ToByteString()).Build());
@ -1081,7 +1081,7 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
}
else
{
this.PartyId = null;
PartyId = null;
//if(PartyChannelId != null)
// returnField.SetValue(bgs.protocol.Variant.CreateBuilder().SetMessageValue(PartyChannelId.ToByteString()).Build());
//else

View File

@ -20,8 +20,8 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
{
public class ChannelInvitationManager : RPCObject
{
public readonly Dictionary<ulong, bgs.protocol.Invitation> _onGoingInvitations = new Dictionary<ulong, bgs.protocol.Invitation>();
public static Dictionary<ulong, bgs.protocol.Invitation> GoingInvitations = new Dictionary<ulong, bgs.protocol.Invitation>();
public readonly Dictionary<ulong, Invitation> _onGoingInvitations = new Dictionary<ulong, Invitation>();
public static Dictionary<ulong, Invitation> GoingInvitations = new Dictionary<ulong, Invitation>();
public static ulong InvitationIdCounter = 1;
@ -29,13 +29,13 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
{
// TODO: Hardcoded 1 as channel persistent id in this case...
this.BnetEntityId = bgs.protocol.EntityId.CreateBuilder().SetHigh((ulong)EntityIdHelper.HighIdType.ChannelId).SetLow(10000000000).Build();
BnetEntityId = EntityId.CreateBuilder().SetHigh((ulong)EntityIdHelper.HighIdType.ChannelId).SetLow(10000000000).Build();
}
public bgs.protocol.Invitation GetInvitationById(ulong Id)
public Invitation GetInvitationById(ulong Id)
{
if (!this._onGoingInvitations.ContainsKey(Id))
if (!_onGoingInvitations.ContainsKey(Id))
{
foreach (var inv in _onGoingInvitations.Values)
if (inv.GetExtension(bgs.protocol.channel.v1.ChannelInvitation.ChannelInvitationProp).ChannelDescription.ChannelId.Low == Id)
@ -44,20 +44,20 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
}
else
return this._onGoingInvitations[Id];
return _onGoingInvitations[Id];
}
public void ClearInvitations()
{
this._onGoingInvitations.Clear();
_onGoingInvitations.Clear();
}
public void HandleInvitation(BattleClient client, bgs.protocol.Invitation invitation)
public void HandleInvitation(BattleClient client, Invitation invitation)
{
var invitee = this.Subscribers.FirstOrDefault(subscriber => subscriber.Key.Account.GameAccount.BnetEntityId.Low == invitation.InviteeIdentity.GameAccountId.Low).Key;
var invitee = Subscribers.FirstOrDefault(subscriber => subscriber.Key.Account.GameAccount.BnetEntityId.Low == invitation.InviteeIdentity.GameAccountId.Low).Key;
if (invitee == null) return;
this._onGoingInvitations.Add(invitation.Id, invitation);
_onGoingInvitations.Add(invitation.Id, invitation);
GoingInvitations.Add(invitation.Id, invitation);
var notification = bgs.protocol.channel.v1.InvitationAddedNotification.CreateBuilder().SetInvitation(invitation);
@ -69,7 +69,7 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
public Channel HandleAccept(BattleClient client, bgs.protocol.channel.v1.AcceptInvitationRequest request)
{
Invitation invitation = null;
if (!this._onGoingInvitations.ContainsKey(request.InvitationId))
if (!_onGoingInvitations.ContainsKey(request.InvitationId))
{
foreach (var inv in _onGoingInvitations.Values)
if(inv.GetExtension(bgs.protocol.channel.v1.ChannelInvitation.ChannelInvitationProp).ChannelDescription.ChannelId.Low == request.InvitationId)
@ -80,12 +80,12 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
}
if (invitation == null)
invitation = this._onGoingInvitations[request.InvitationId];
invitation = _onGoingInvitations[request.InvitationId];
var channel = ChannelManager.GetChannelByEntityId(invitation.GetExtension(bgs.protocol.channel.v1.ChannelInvitation.ChannelInvitationProp).ChannelDescription.ChannelId);
var notification = bgs.protocol.channel.v1.InvitationRemovedNotification.CreateBuilder().SetInvitation(invitation.ToBuilder()).SetReason((uint)InvitationRemoveReason.Accepted);
this._onGoingInvitations.Remove(invitation.Id);
_onGoingInvitations.Remove(invitation.Id);
GoingInvitations.Remove(request.InvitationId);
client.MakeTargetedRPC(this, (lid) =>
@ -94,7 +94,7 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
channel.Join(client, request.ObjectId);
var stateNotification = bgs.protocol.channel.v1.UpdateChannelStateNotification.CreateBuilder()
.SetAgentId(bgs.protocol.EntityId.CreateBuilder().SetHigh(0).SetLow(0).Build())
.SetAgentId(EntityId.CreateBuilder().SetHigh(0).SetLow(0).Build())
.SetStateChange(bgs.protocol.channel.v1.ChannelState.CreateBuilder().AddInvitation(invitation).SetReason(0).Build())
.Build();
@ -109,12 +109,12 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
public void HandleHardJoin(BattleClient client, bgs.protocol.channel.v1.AcceptInvitationRequest request)
{
if (!this._onGoingInvitations.ContainsKey(request.InvitationId)) return;
if (!_onGoingInvitations.ContainsKey(request.InvitationId)) return;
var invitation = this._onGoingInvitations[request.InvitationId];
var invitation = _onGoingInvitations[request.InvitationId];
var channel = ChannelManager.GetChannelByEntityId(invitation.GetExtension(bgs.protocol.channel.v1.ChannelInvitation.ChannelInvitationProp).ChannelDescription.ChannelId);
this._onGoingInvitations.Remove(invitation.Id);
_onGoingInvitations.Remove(invitation.Id);
var a = GameAccountManager.GetAccountByPersistentID(invitation.InviteeIdentity.GameAccountId.Low);
var JoinClient = a.LoggedInClient;
@ -132,10 +132,10 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
var notification = bgs.protocol.matchmaking.v1.MatchmakingResultNotification.CreateBuilder();
var connectInfo = bgs.protocol.matchmaking.v1.ConnectInfo.CreateBuilder();
connectInfo.SetAddress(bgs.protocol.Address.CreateBuilder().SetAddress_(GAME_SERVER_IP).SetPort(GAME_SERVER_PORT));
connectInfo.SetAddress(Address.CreateBuilder().SetAddress_(GAME_SERVER_IP).SetPort(GAME_SERVER_PORT));
connectInfo.AddAttribute(bgs.protocol.v2.Attribute.CreateBuilder().SetName("GameAccount").SetValue(bgs.protocol.v2.Variant.CreateBuilder().SetBlobValue(member.Build().ToByteString())));
connectInfo.AddAttribute(bgs.protocol.v2.Attribute.CreateBuilder().SetName("Token").SetValue(bgs.protocol.v2.Variant.CreateBuilder().SetUintValue(0xEEF4364684EE186E))); // FIXME
//connectInfo.AddAttribute(AttributeOfServer); // Настройки игры
//connectInfo.AddAttribute(AttributeOfServer); // Game settings
var gh = bgs.protocol.matchmaking.v1.GameHandle.CreateBuilder();
gh.SetMatchmaker(bgs.protocol.matchmaking.v1.MatchmakerHandle.CreateBuilder()
@ -155,9 +155,9 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
if (JoinClient.CurrentChannel != null)
{
var channelStatePermission = bgs.protocol.channel.v1.ChannelState.CreateBuilder()
.AddAttribute(bgs.protocol.Attribute.CreateBuilder()
.AddAttribute(Attribute.CreateBuilder()
.SetName("D3.Party.JoinPermissionPreviousToLock")
.SetValue(bgs.protocol.Variant.CreateBuilder().SetIntValue(1).Build())
.SetValue(Variant.CreateBuilder().SetIntValue(1).Build())
.Build()).Build();
var notificationPermission = bgs.protocol.channel.v1.UpdateChannelStateNotification.CreateBuilder()
@ -174,9 +174,9 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
.SetSenderId(client.Account.GameAccount.BnetEntityId)
.SetTargetId(JoinClient.Account.GameAccount.BnetEntityId)
.SetType("GO_ENTRY");
var attrF = bgs.protocol.Attribute.CreateBuilder()
var attrF = Attribute.CreateBuilder()
.SetName("game_request_id")
.SetValue(bgs.protocol.Variant.CreateBuilder().SetUintValue(gameFound.RequestId).Build());
.SetValue(Variant.CreateBuilder().SetUintValue(gameFound.RequestId).Build());
notificationFound.AddAttribute(attrF);
JoinClient.MakeRPC((lid) =>
@ -234,7 +234,7 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
channel.Join(client, request.ObjectId);
var stateNotification = bgs.protocol.channel.v1.UpdateChannelStateNotification.CreateBuilder()
.SetAgentId(bgs.protocol.EntityId.CreateBuilder().SetHigh(0).SetLow(0).Build())
.SetAgentId(EntityId.CreateBuilder().SetHigh(0).SetLow(0).Build())
.SetStateChange(bgs.protocol.channel.v1.ChannelState.CreateBuilder().AddInvitation(invitation).SetReason(0).Build())
.Build();
@ -256,13 +256,13 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
public Channel HandleAcceptAnother(BattleClient client, bgs.protocol.channel.v1.AcceptInvitationRequest request)
{
if (!this._onGoingInvitations.ContainsKey(request.InvitationId)) return null;
if (!_onGoingInvitations.ContainsKey(request.InvitationId)) return null;
var invitation = this._onGoingInvitations[request.InvitationId];
var invitation = _onGoingInvitations[request.InvitationId];
var channel = ChannelManager.GetChannelByEntityId(invitation.GetExtension(bgs.protocol.channel.v1.ChannelInvitation.ChannelInvitationProp).ChannelDescription.ChannelId);
var notification = bgs.protocol.channel.v1.InvitationRemovedNotification.CreateBuilder().SetInvitation(invitation.ToBuilder()).SetReason((uint)InvitationRemoveReason.Accepted);
this._onGoingInvitations.Remove(invitation.Id);
_onGoingInvitations.Remove(invitation.Id);
var a = GameAccountManager.GetAccountByPersistentID(invitation.InviteeIdentity.GameAccountId.Low);
//client.MakeTargetedRPC(this, (lid) =>
@ -280,7 +280,7 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
var inviter = GameAccountManager.GetAccountByPersistentID(invitation.InviterIdentity.GameAccountId.Low);
var stateNotification = bgs.protocol.channel.v1.UpdateChannelStateNotification.CreateBuilder()
.SetAgentId(bgs.protocol.EntityId.CreateBuilder().SetHigh(0).SetLow(0).Build())
.SetAgentId(EntityId.CreateBuilder().SetHigh(0).SetLow(0).Build())
.SetStateChange(bgs.protocol.channel.v1.ChannelState.CreateBuilder().AddInvitation(invitation).SetReason(0).Build())
.Build();
@ -298,19 +298,19 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
public void HandleDecline(BattleClient client, bgs.protocol.channel.v1.DeclineInvitationRequest request)
{
if (!this._onGoingInvitations.ContainsKey(request.InvitationId)) return;
var invitation = this._onGoingInvitations[request.InvitationId];
if (!_onGoingInvitations.ContainsKey(request.InvitationId)) return;
var invitation = _onGoingInvitations[request.InvitationId];
var inviter = GameAccountManager.GetAccountByPersistentID(invitation.InviterIdentity.GameAccountId.Low);
if (inviter == null || inviter.LoggedInClient == null) return;
var notification =
bgs.protocol.channel.v1.UpdateChannelStateNotification.CreateBuilder()
.SetAgentId(bgs.protocol.EntityId.CreateBuilder().SetHigh(0).SetLow(0)) // caps have this set to high: 0 low: 0 /raist.
.SetAgentId(EntityId.CreateBuilder().SetHigh(0).SetLow(0)) // caps have this set to high: 0 low: 0 /raist.
.SetStateChange(bgs.protocol.channel.v1.ChannelState.CreateBuilder().AddInvitation(invitation)
.SetReason((uint)InvitationRemoveReason.Declined));
this._onGoingInvitations.Remove(invitation.Id);
_onGoingInvitations.Remove(invitation.Id);
GoingInvitations.Remove(request.InvitationId);
inviter.LoggedInClient.MakeTargetedRPC(inviter.LoggedInClient.CurrentChannel, (lid) =>
@ -319,9 +319,9 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
public void Revoke(BattleClient client, bgs.protocol.channel.v1.RevokeInvitationRequest request)
{
if (!this._onGoingInvitations.ContainsKey(request.InvitationId)) return;
this.CheckSubscribers();
var invitation = this._onGoingInvitations[request.InvitationId];
if (!_onGoingInvitations.ContainsKey(request.InvitationId)) return;
CheckSubscribers();
var invitation = _onGoingInvitations[request.InvitationId];
var inviter = GameAccountManager.GetAccountByPersistentID(invitation.InviterIdentity.GameAccountId.Low);
var channel = ChannelManager.GetChannelByEntityId(request.ChannelId);
@ -329,11 +329,11 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
//notify inviter about revoke
var updateChannelNotification =
bgs.protocol.channel.v1.UpdateChannelStateNotification.CreateBuilder()
.SetAgentId(bgs.protocol.EntityId.CreateBuilder().SetHigh(0).SetLow(0)) // caps have this set to high: 0 low: 0 /dustin
.SetAgentId(EntityId.CreateBuilder().SetHigh(0).SetLow(0)) // caps have this set to high: 0 low: 0 /dustin
.SetStateChange(bgs.protocol.channel.v1.ChannelState.CreateBuilder().AddInvitation(invitation)
.SetReason((uint)InvitationRemoveReason.Revoked));
this._onGoingInvitations.Remove(request.InvitationId);
_onGoingInvitations.Remove(request.InvitationId);
GoingInvitations.Remove(request.InvitationId);
inviter.LoggedInClient.MakeTargetedRPC(inviter.LoggedInClient.CurrentChannel, (lid) =>
@ -345,7 +345,7 @@ namespace DiIiS_NA.LoginServer.ChannelSystem
.SetInvitation(invitation);
//.SetReason((uint)InvitationRemoveReason.Declined);
if (!this.Subscribers.Any(subscriber => subscriber.Key.Account.GameAccount.BnetEntityId.Low == invitation.InviteeIdentity.AccountId.Low)) return;
if (Subscribers.All(subscriber => subscriber.Key.Account.GameAccount.BnetEntityId.Low != invitation.InviteeIdentity.AccountId.Low)) return;
client.MakeTargetedRPC(this, (lid) =>
bgs.protocol.channel.v1.ChannelInvitationListener.CreateStub(client).OnReceivedInvitationRemoved(new HandlerController() { ListenerId = lid }, invitationRemoved.Build(), callback => { }));

View File

@ -98,7 +98,7 @@ namespace DiIiS_NA.Core.Discord.Modules
var messages = await Context.Guild.GetTextChannel(AnnounceChannelId).GetMessagesAsync(10).FlattenAsync();
await Context.Guild.GetTextChannel(AnnounceChannelId).DeleteMessagesAsync(messages);
await Context.Guild.GetTextChannel(AnnounceChannelId).SendMessageAsync("Servers status: :tools: **PLANNED MAINTENANCE**.");
await Context.Guild.GetTextChannel(AnnounceChannelId).SendMessageAsync($"@here Servers will be restarted in **{minutes}** minutes for a planned maintenance.\n----\nСерверы будут перезагружены через **{minutes}** минут для плановых профилактических работ.");
await Context.Guild.GetTextChannel(AnnounceChannelId).SendMessageAsync($"@here Servers will be restarted in **{minutes}** minutes for a planned maintenance.");
}
[Command("online")]

View File

@ -24,9 +24,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Actions
protected ActorAction(Actor owner)
{
this.Owner = owner;
this.Started = false;
this.Done = false;
Owner = owner;
Started = false;
Done = false;
}
public abstract void Start(int tickCounter);

View File

@ -32,15 +32,15 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Actions
_power.World = owner.World;
_power.User = owner;
_powerRan = false;
_baseAttackRadius = this.Owner.ActorData.Cylinder.Ax2 + (_power.EvalTag(PowerKeys.AttackRadius) > 0f ? (powerSNO == 30592 ? 10f : _power.EvalTag(PowerKeys.AttackRadius)) : 35f);
_baseAttackRadius = Owner.ActorData.Cylinder.Ax2 + (_power.EvalTag(PowerKeys.AttackRadius) > 0f ? (powerSNO == 30592 ? 10f : _power.EvalTag(PowerKeys.AttackRadius)) : 35f);
_ownerMover = new ActorMover(owner);
_target = target;
}
public override void Start(int tickCounter)
{
this.Started = true;
this.Update(tickCounter);
Started = true;
Update(tickCounter);
}
public override void Update(int tickCounter)
@ -49,7 +49,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Actions
if (_powerRan)
{
if (_powerFinishTimer.TimedOut)
this.Done = true;
Done = true;
return;
}
@ -57,31 +57,31 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Actions
// try to get nearest target if no target yet acquired
if (_target == null)
{
if (this.Owner is Minion || this.Owner is Hireling) // assume minions are player controlled and are targeting monsters
if (Owner is Minion || Owner is Hireling) // assume minions are player controlled and are targeting monsters
{
if ((this.Owner.World.Game.PvP || this.Owner.World.IsPvP) && (this.Owner as Minion).Master != null)
_target = this.Owner.GetPlayersInRange(MaxTargetRange)
if ((Owner.World.Game.PvP || Owner.World.IsPvP) && (Owner as Minion).Master != null)
_target = Owner.GetPlayersInRange(MaxTargetRange)
.Where(
p => p.GlobalID != (this.Owner as Minion).Master.GlobalID)
p => p.GlobalID != (Owner as Minion).Master.GlobalID)
.OrderBy(
(player) => PowerMath.Distance2D(player.Position, this.Owner.Position))
(player) => PowerMath.Distance2D(player.Position, Owner.Position))
.FirstOrDefault();
else
_target = this.Owner.GetMonstersInRange(MaxTargetRange).OrderBy(
(monster) => PowerMath.Distance2D(monster.Position, this.Owner.Position))
_target = Owner.GetMonstersInRange(MaxTargetRange).OrderBy(
(monster) => PowerMath.Distance2D(monster.Position, Owner.Position))
.FirstOrDefault();
}
else // monsters targeting players
{
_target = this.Owner.GetPlayersInRange(MaxTargetRange).OrderBy(
(player) => PowerMath.Distance2D(player.Position, this.Owner.Position))
_target = Owner.GetPlayersInRange(MaxTargetRange).OrderBy(
(player) => PowerMath.Distance2D(player.Position, Owner.Position))
.FirstOrDefault();
}
}
if (_target != null)
{
float targetDistance = PowerMath.Distance2D(_target.Position, this.Owner.Position);
float targetDistance = PowerMath.Distance2D(_target.Position, Owner.Position);
// if target has moved out of range, deselect it as the target
if (targetDistance > MaxTargetRange)
@ -91,8 +91,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Actions
else if (targetDistance < _baseAttackRadius + _target.ActorData.Cylinder.Ax2) // run power if within range
{
// stop any movement
_ownerMover.Move(this.Owner.Position, this.Owner.WalkSpeed);
if (this.Owner is Monster)
_ownerMover.Move(Owner.Position, Owner.WalkSpeed);
if (Owner is Monster)
{
/*(this.Owner as Monster).CorrectedPosition = new Core.Types.Math.Vector3D(this.Owner.Position.X, this.Owner.Position.Y, _target.Position.Z);
//if()
@ -116,14 +116,14 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Actions
//this.Target.World.BroadcastIfRevealed(plr => new MessageSystem.Message.Definitions.ACD.ACDTranslateSyncMessage() { ActorId = this.Target.DynamicID(plr), Position = this.Target.Position, Snap = false }, this.Target);
//*/
this.Owner.World.PowerManager.RunPower(this.Owner, _power, _target, _target.Position);
_powerFinishTimer = new SecondsTickTimer(this.Owner.World.Game,
Owner.World.PowerManager.RunPower(Owner, _power, _target, _target.Position);
_powerFinishTimer = new SecondsTickTimer(Owner.World.Game,
_power.EvalTag(PowerKeys.AttackSpeed));// + _power.EvalTag(PowerKeys.CooldownTime));
_powerRan = true;
}
else
{
this.Done = true;
Done = true;
}
}
}
@ -132,9 +132,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Actions
{
// TODO: make this per-power instead?
if (_powerRan)
this.Owner.World.PowerManager.CancelAllPowers(this.Owner);
Owner.World.PowerManager.CancelAllPowers(Owner);
this.Done = true;
Done = true;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -58,11 +58,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
public BossPortal(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Field2 = 0x9;//16;
Field2 = 0x9;//16;
this.Attributes[GameAttribute.MinimapActive] = true;
this.Attributes[GameAttribute.Untargetable] = false;
var bossEncounter = ((this.ActorSNO.Target as DiIiS_NA.Core.MPQ.FileFormats.Actor).TagMap[MarkerKeys.BossEncounter].Target as DiIiS_NA.Core.MPQ.FileFormats.BossEncounter);
Attributes[GameAttribute.MinimapActive] = true;
Attributes[GameAttribute.Untargetable] = false;
var bossEncounter = ((ActorSNO.Target as DiIiS_NA.Core.MPQ.FileFormats.Actor).TagMap[MarkerKeys.BossEncounter].Target as DiIiS_NA.Core.MPQ.FileFormats.BossEncounter);
DestWorld = bossEncounter.Worlds[0];
switch (DestWorld)
{
@ -73,7 +73,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
case 109143:
DestArea = 109149; break;
case 182976:
DestArea = 62726; this.Scale = 0.75f; break;
DestArea = 62726; Scale = 0.75f; break;
case 159580:
DestArea = 58494; break;
case 58493:
@ -113,83 +113,83 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
}
DestPoint = bossEncounter.I11;
//get EncounterSNO
switch (this.SNO)
switch (SNO)
{
case ActorSno._boss_portal_cainintro: //CainIntro
this.Encounter = 168925;
Encounter = 168925;
break;
case ActorSno._boss_portal_skeletonking: //Leoric
this.Encounter = 159592;
Encounter = 159592;
break;
case ActorSno._boss_portal_spiderqueen: //SpiderQueen
this.Encounter = 181436;
Encounter = 181436;
break;
case ActorSno._boss_portal_butcher: //Butcher
this.Encounter = 158915;
Encounter = 158915;
break;
case ActorSno._boss_portal_maghda: //Maghda
this.Encounter = 195226;
Encounter = 195226;
break;
case ActorSno._boss_portal_binkleshulkout: //Cain Death
this.Encounter = 159591;
Encounter = 159591;
break;
//case 159578: //Belial Audience
//this.Encounter = 162231;
//break;
case ActorSno._boss_portal_adriasewer: //Adria Rescue
this.Encounter = 159584;
Encounter = 159584;
break;
case ActorSno._boss_portal_blacksoulstone: //Zoltun Kulle
this.Encounter = 159586;
Encounter = 159586;
break;
case ActorSno._boss_portal_belial: //Belial
this.Encounter = 159585;
Encounter = 159585;
break;
case ActorSno._boss_portal_siegebreaker: //SiegeBreaker
this.Encounter = 226716;
Encounter = 226716;
break;
case ActorSno._boss_portal_mistressofpain: //Cydaea
this.Encounter = 161246;
Encounter = 161246;
break;
case ActorSno._boss_portal_azmodan: //Azmodan
this.Encounter = 159582;
Encounter = 159582;
break;
case ActorSno._boss_portal_adriabetrayal: //Adria_Betrayal
this.Encounter = 159583;
Encounter = 159583;
break;
case ActorSno._boss_portal_1000monsterfight: //Iskatu
this.Encounter = 182960;
Encounter = 182960;
break;
case ActorSno._boss_portal_despair: //Rakanoth
this.Encounter = 161247;
Encounter = 161247;
break;
case ActorSno._bossportal_imperius_spirebase: //Imperius_Spire
this.Encounter = 220541;
Encounter = 220541;
break;
case ActorSno._boss_portal_diablo: //Diablo
this.Encounter = 161280;
Encounter = 161280;
break;
case ActorSno._x1_urzael_bossportal: //Urzael
this.Encounter = 298128;
Encounter = 298128;
break;
case ActorSno._x1_boss_portal_adria: //Adria
this.Encounter = 293007;
Encounter = 293007;
break;
case ActorSno._x1_boss_portal_batteringram: //BatteringRam
this.Encounter = 296315;
Encounter = 296315;
break;
case ActorSno._x1_fortress_malthael_boss_portal: //Malthael
this.Encounter = 278965;
Encounter = 278965;
break;
case ActorSno._boss_portal_greed:
this.Encounter = 380760;
Encounter = 380760;
break;
default:
this.Encounter = 0;
Encounter = 0;
break;
}
this.Destination = new ResolvedPortalDestination
Destination = new ResolvedPortalDestination
{
WorldSNO = DestWorld,
DestLevelAreaSNO = DestArea,
@ -215,7 +215,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
}
public override bool Reveal(Player player)
{
if (eventPortals.Contains(this.SNO)) return false;
if (eventPortals.Contains(SNO)) return false;
if (!base.Reveal(player))
return false;
/*
@ -232,8 +232,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
//*/
player.InGameClient.SendMessage(new PortalSpecifierMessage()
{
ActorID = this.DynamicID(player),
Destination = this.Destination
ActorID = DynamicID(player),
Destination = Destination
});
return true;
}
@ -245,18 +245,18 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
public override void OnTargeted(Player player, TargetMessage message)
{
Logger.Trace("(OnTargeted) BossPortal has been activated, Id: {0}", this.SNO);
if (this.Encounter == 0) return;
Logger.Trace("(OnTargeted) BossPortal has been activated, Id: {0}", SNO);
if (Encounter == 0) return;
//if (this.World.Game.CurrentEncounter.activated) return;
this.World.Game.CurrentEncounter.activated = true;
this.World.Game.CurrentEncounter.SnoId = this.Encounter;
World.Game.CurrentEncounter.activated = true;
World.Game.CurrentEncounter.SnoId = Encounter;
foreach (Player plr in this.World.Game.Players.Values)
foreach (Player plr in World.Game.Players.Values)
plr.InGameClient.SendMessage(new BossEncounterMessage(Opcodes.BossJoinEncounterMessage)
{
PlayerIndex = plr.PlayerIndex,
snoEncounter = this.Encounter
snoEncounter = Encounter
});
}
}

View File

@ -13,9 +13,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
public Environment(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Field2 = 0x10;//16;
this.Field7 = 0x00000000;
this.CollFlags = 1;
Field2 = 0x10;//16;
Field7 = 0x00000000;
CollFlags = 1;
}
}
}

View File

@ -24,11 +24,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
public Gizmo(World world, ActorSno sno, TagMap tags, bool is_marker = false)
: base(world, sno, tags, is_marker)
{
this.Field2 = 0x9;//16;
this.Field7 = 0x00000001;
Field2 = 0x9;//16;
Field7 = 0x00000001;
//this.CollFlags = 1; // this.CollFlags = 0; a hack for passing through blockers /fasbat
if (this.Attributes[GameAttribute.TeamID] == 10) this.Attributes[GameAttribute.TeamID] = 1; //fix for bugged gizmos
this.Attributes[GameAttribute.Hitpoints_Cur] = 1;
if (Attributes[GameAttribute.TeamID] == 10) Attributes[GameAttribute.TeamID] = 1; //fix for bugged gizmos
Attributes[GameAttribute.Hitpoints_Cur] = 1;
//this.Attributes[GameAttribute.MinimapActive] = true;
}
@ -41,20 +41,20 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
public override void OnTargeted(Player player, TargetMessage message)
{
if (this.Attributes[GameAttribute.Disabled] == true) return;
Logger.Trace("(OnTargeted) Gizmo has been activated! Id: {0}, Type: {1}", this.SNO, this.ActorData.TagMap[ActorKeys.GizmoGroup]);
if (Attributes[GameAttribute.Disabled] == true) return;
Logger.Trace("(OnTargeted) Gizmo has been activated! Id: {0}, Type: {1}", SNO, ActorData.TagMap[ActorKeys.GizmoGroup]);
//handling quest triggers
if (this.World.Game.QuestProgress.QuestTriggers.ContainsKey((int)this.SNO))
if (World.Game.QuestProgress.QuestTriggers.ContainsKey((int)SNO))
{
var trigger = this.World.Game.QuestProgress.QuestTriggers[(int)this.SNO];
var trigger = World.Game.QuestProgress.QuestTriggers[(int)SNO];
if (trigger.triggerType == DiIiS_NA.Core.MPQ.FileFormats.QuestStepObjectiveType.InteractWithActor)
{
this.World.Game.QuestProgress.UpdateCounter((int)this.SNO);
if (trigger.count == this.World.Game.QuestProgress.QuestTriggers[(int)this.SNO].counter)
World.Game.QuestProgress.UpdateCounter((int)SNO);
if (trigger.count == World.Game.QuestProgress.QuestTriggers[(int)SNO].counter)
try
{
trigger.questEvent.Execute(this.World); // launch a questEvent
trigger.questEvent.Execute(World); // launch a questEvent
}
catch (Exception e)
{
@ -62,27 +62,27 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
}
}
}
else if (this.World.Game.SideQuestProgress.QuestTriggers.ContainsKey((int)this.SNO))
else if (World.Game.SideQuestProgress.QuestTriggers.ContainsKey((int)SNO))
{
var trigger = this.World.Game.SideQuestProgress.QuestTriggers[(int)this.SNO];
var trigger = World.Game.SideQuestProgress.QuestTriggers[(int)SNO];
if (trigger.triggerType == DiIiS_NA.Core.MPQ.FileFormats.QuestStepObjectiveType.InteractWithActor)
{
this.World.Game.SideQuestProgress.UpdateSideCounter((int)this.SNO);
if (trigger.count == this.World.Game.SideQuestProgress.QuestTriggers[(int)this.SNO].counter)
trigger.questEvent.Execute(this.World); // launch a questEvent
World.Game.SideQuestProgress.UpdateSideCounter((int)SNO);
if (trigger.count == World.Game.SideQuestProgress.QuestTriggers[(int)SNO].counter)
trigger.questEvent.Execute(World); // launch a questEvent
}
}
if (this.World.Game.SideQuestProgress.GlobalQuestTriggers.ContainsKey((int)this.SNO))
if (World.Game.SideQuestProgress.GlobalQuestTriggers.ContainsKey((int)SNO))
{
var trigger = this.World.Game.SideQuestProgress.GlobalQuestTriggers[(int)this.SNO];
var trigger = World.Game.SideQuestProgress.GlobalQuestTriggers[(int)SNO];
if (trigger.triggerType == DiIiS_NA.Core.MPQ.FileFormats.QuestStepObjectiveType.InteractWithActor)
{
this.World.Game.SideQuestProgress.UpdateGlobalCounter((int)this.SNO);
if (trigger.count == this.World.Game.SideQuestProgress.GlobalQuestTriggers[(int)this.SNO].counter)
World.Game.SideQuestProgress.UpdateGlobalCounter((int)SNO);
if (trigger.count == World.Game.SideQuestProgress.GlobalQuestTriggers[(int)SNO].counter)
try
{
trigger.questEvent.Execute(this.World); // launch a questEvent
this.World.Game.SideQuestProgress.GlobalQuestTriggers.Remove((int)this.SNO);
trigger.questEvent.Execute(World); // launch a questEvent
World.Game.SideQuestProgress.GlobalQuestTriggers.Remove((int)SNO);
}
catch (Exception e)
{

View File

@ -13,8 +13,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
public HandledSNOAttribute(params ActorSno[] snoIds)
{
this.SNOIds = new List<ActorSno>();
this.SNOIds.AddRange(snoIds);
SNOIds = new List<ActorSno>();
SNOIds.AddRange(snoIds);
}
}
}

View File

@ -29,14 +29,14 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Artisans
public Artisan(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.MinimapActive] = true;
Attributes[GameAttribute.MinimapActive] = true;
Interactions.Add(new CraftInteraction());
//Interactions.Add(new IdentifyAllInteraction());
}
public override void OnCraft(Player player)
{
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.OpenArtisanWindowMessage) { ActorID = this.DynamicID(player) });
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.OpenArtisanWindowMessage) { ActorID = DynamicID(player) });
//player.InGameClient.SendMessage(new OpenArtisanWindowMessage() { ArtisanID = this.DynamicID(player) });
}

View File

@ -53,8 +53,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Artisans
public override void OnTargeted(Player player, TargetMessage message)
{
player.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Misc.ANNDataMessage(Opcodes.OpenArtisanWindowMessage) { ActorID = this.DynamicID(player) });
switch (this.SNO)
player.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Misc.ANNDataMessage(Opcodes.OpenArtisanWindowMessage) { ActorID = DynamicID(player) });
switch (SNO)
{
case ActorSno._pt_blacksmith_repairshortcut:
case ActorSno._pt_blacksmith_forgeweaponshortcut:
@ -74,9 +74,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Artisans
}
public override bool Reveal(Player player)
{
if (this.World.Game.CurrentAct != 3000)
if (World.Game.CurrentAct != 3000)
{
switch (this.SNO)
switch (SNO)
{
case ActorSno._pt_blacksmith_repairshortcut:
case ActorSno._pt_blacksmith_forgeweaponshortcut:

View File

@ -35,7 +35,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Artisans
public override void OnCraft(Player player)
{
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.OpenArtisanWindowMessage) { ActorID = this.DynamicID(player) });
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.OpenArtisanWindowMessage) { ActorID = DynamicID(player) });
player.ArtisanInteraction = "Blacksmith";
}

View File

@ -22,7 +22,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Artisans
{
}
public void OnAddSocket(PlayerSystem.Player player, Item item)
public void OnAddSocket(Player player, Item item)
{
// TODO: Animate Jeweler? Who knows. /fasbat
item.Attributes[GameAttribute.Sockets] += 1;
@ -32,7 +32,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Artisans
public override void OnCraft(Player player)
{
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.OpenArtisanWindowMessage) { ActorID = this.DynamicID(player) });
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.OpenArtisanWindowMessage) { ActorID = DynamicID(player) });
player.ArtisanInteraction = "Jeweler";
}

View File

@ -24,7 +24,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Artisans
public override void OnCraft(Player player)
{
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.OpenArtisanWindowMessage) { ActorID = this.DynamicID(player) });
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.OpenArtisanWindowMessage) { ActorID = DynamicID(player) });
player.ArtisanInteraction = "Mystic";
}

View File

@ -22,24 +22,24 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Artisans
public Nephalem(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.NPC_Is_Operatable] = true;
this.Attributes[GameAttribute.Is_NPC] = true;
this.Attributes[GameAttribute.In_Tiered_Loot_Run_Level] = 0;
this.Attributes[GameAttribute.MinimapActive] = true;
this.Attributes[GameAttribute.NPC_Has_Interact_Options, 0] = true;
this.Attributes[GameAttribute.NPC_Has_Interact_Options, 1] = true;
this.Attributes[GameAttribute.NPC_Has_Interact_Options, 2] = true;
this.Attributes[GameAttribute.NPC_Has_Interact_Options, 3] = true;
Attributes[GameAttribute.NPC_Is_Operatable] = true;
Attributes[GameAttribute.Is_NPC] = true;
Attributes[GameAttribute.In_Tiered_Loot_Run_Level] = 0;
Attributes[GameAttribute.MinimapActive] = true;
Attributes[GameAttribute.NPC_Has_Interact_Options, 0] = true;
Attributes[GameAttribute.NPC_Has_Interact_Options, 1] = true;
Attributes[GameAttribute.NPC_Has_Interact_Options, 2] = true;
Attributes[GameAttribute.NPC_Has_Interact_Options, 3] = true;
//this.Attributes[GameAttribute.Conversation_Icon] = 2;
//this.ForceConversationSNO =
}
public override void OnCraft(Player player)
{
if (this.World.Game.ActiveNephalemKilledBoss == true)
if (World.Game.ActiveNephalemKilledBoss == true)
{
this.World.Game.ActiveNephalemKilledBoss = false;
foreach (var plr in this.World.Game.Players.Values)
World.Game.ActiveNephalemKilledBoss = false;
foreach (var plr in World.Game.Players.Values)
{
plr.InGameClient.SendMessage(new QuestCounterMessage()
{
@ -62,7 +62,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Artisans
}
}
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.OpenArtisanWindowMessage) { ActorID = this.DynamicID(player) });
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.OpenArtisanWindowMessage) { ActorID = DynamicID(player) });
player.ArtisanInteraction = "Mystic";
}

View File

@ -32,7 +32,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Artisans
if (world.Game.CurrentAct == 3000)
{
this.Conversations.Add(new ConversationInteraction(430146));
Conversations.Add(new ConversationInteraction(430146));
//[430335] [Worlds] a3dun_ruins_frost_city_a_02
//[428493] [Worlds] a3dun_ruins_frost_city_a_01
//this.Attributes[GameAttribute.Conversation_Icon, 0] = 1;
@ -48,7 +48,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Artisans
public override bool Reveal(Player player)
{
if (this.SNO == ActorSno._kanaicube_stand)
if (SNO == ActorSno._kanaicube_stand)
if (!player.KanaiUnlocked)
Interactions.Clear();
else
@ -72,7 +72,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Artisans
public override void OnTargeted(Player player, MessageSystem.Message.Definitions.World.TargetMessage message)
{
player.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Misc.ANNDataMessage(Opcodes.OpenArtisanWindowMessage) { ActorID = this.DynamicID(player) });
player.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Misc.ANNDataMessage(Opcodes.OpenArtisanWindowMessage) { ActorID = DynamicID(player) });
player.ArtisanInteraction = "Cube";
}
}

View File

@ -49,7 +49,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Banner(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.BannerPlayerIndex = bannerActors.FirstOrDefault(x => x.Value.Contains(this.SNO)).Key;
BannerPlayerIndex = bannerActors.FirstOrDefault(x => x.Value.Contains(SNO)).Key;
}
public int BannerPlayerIndex = 0;
@ -63,13 +63,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
Logger.Trace("(OnTargeted) Banner has been activated ");
if (this.World.Game.Players.Count == 1 || this.BannerPlayerIndex == 0)
if (World.Game.Players.Count == 1 || BannerPlayerIndex == 0)
{
player.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Base.SimpleMessage(Opcodes.OpenBannerCustomizationMessage));
return;
}
var banner_player = this.World.Game.Players.Values.Single(p => p.PlayerIndex == this.BannerPlayerIndex);
var banner_player = World.Game.Players.Values.Single(p => p.PlayerIndex == BannerPlayerIndex);
if (banner_player == null || banner_player.World == null)
{
@ -78,23 +78,23 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
}
//if banner has been disabled for events like active greater active swarm /advocaite
if(!player.Attributes[GameAttributeB.Banner_Usable])
if(!player.Attributes[GameAttribute.Banner_Usable])
{
return;
}
player.ShowConfirmation(this.DynamicID(player), (() => {
player.ShowConfirmation(DynamicID(player), (() => {
player.StartCasting(150, new Action(() => {
if (banner_player.PlayerDirectBanner == null)
{
if (banner_player.World == this.World)
if (banner_player.World == World)
player.Teleport(banner_player.Position);
else
player.ChangeWorld(banner_player.World, banner_player.Position);
}
else
{
if (banner_player.PlayerDirectBanner.World == this.World)
if (banner_player.PlayerDirectBanner.World == World)
player.Teleport(banner_player.PlayerDirectBanner.Position);
else
player.ChangeWorld(banner_player.PlayerDirectBanner.World, banner_player.PlayerDirectBanner.Position);

View File

@ -77,19 +77,19 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Boss(MapSystem.World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
if (sno == ActorSno._zoltunkulle && world.SNO == WorldSno.a2dun_zolt_lobby) this.SetVisible(false);
this.Attributes[GameAttribute.MinimapActive] = true;
if (sno == ActorSno._zoltunkulle && world.SNO == WorldSno.a2dun_zolt_lobby) SetVisible(false);
Attributes[GameAttribute.MinimapActive] = true;
//this.Attributes[GameAttribute.Immune_To_Charm] = true;
this.Attributes[GameAttribute.//Blizzless Project 2022
Attributes[GameAttribute.//Blizzless Project 2022
using_Bossbar] = true;
this.Attributes[GameAttribute.InBossEncounter] = true;
this.Attributes[GameAttribute.Hitpoints_Max] *= 10.0f;
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] *= 7.8f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] *= 7.8f;
this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total];
this.Attributes[GameAttribute.TeamID] = 10;
Attributes[GameAttribute.InBossEncounter] = true;
Attributes[GameAttribute.Hitpoints_Max] *= 10.0f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] *= 7.8f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] *= 7.8f;
Attributes[GameAttribute.Hitpoints_Cur] = Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.TeamID] = 10;
this.WalkSpeed *= 0.5f;
WalkSpeed *= 0.5f;
MonsterBrain monsterBrain = (Brain as MonsterBrain);
switch (sno)
{
@ -167,7 +167,7 @@ using_Bossbar] = true;
monsterBrain.AddPresetPower(83008);
break;
case ActorSno._belial_trueform://Belial (small)
this.HasLoot = false;
HasLoot = false;
break;
case ActorSno._belial://Belial (big)
monsterBrain.AddPresetPower(152540);
@ -203,9 +203,9 @@ using_Bossbar] = true;
public override bool Reveal(PlayerSystem.Player player)
{
if (this.SNO == ActorSno._terrordemon_a_unique_1000monster)
if (SNO == ActorSno._terrordemon_a_unique_1000monster)
{
this.Destroy();
Destroy();
return false;
}

View File

@ -18,16 +18,16 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public CR_Glass(MapSystem.World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.TeamID] = 2;
this.Attributes[GameAttribute.MinimapActive] = true;
this.Attributes.BroadcastChangedIfRevealed();
Attributes[GameAttribute.TeamID] = 2;
Attributes[GameAttribute.MinimapActive] = true;
Attributes.BroadcastChangedIfRevealed();
}
public override void OnTargeted(Player player, TargetMessage message)
{
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.ANNDataMessage46)
{
ActorID = this.DynamicID(player)
ActorID = DynamicID(player)
});
}
}

View File

@ -36,19 +36,19 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public void ReceiveDamage(Actor source, float damage)
{
if (this.SNO == ActorSno._trout_highlands_goatman_totem_gharbad && this.World.Game.CurrentSideQuest != 225253) return;
if (SNO == ActorSno._trout_highlands_goatman_totem_gharbad && World.Game.CurrentSideQuest != 225253) return;
World.BroadcastIfRevealed(plr => new FloatingNumberMessage
{
Number = damage,
ActorID = this.DynamicID(plr),
ActorID = DynamicID(plr),
Type = FloatingNumberMessage.FloatType.White
}, this);
Attributes[GameAttribute.Hitpoints_Cur] = Math.Max(Attributes[GameAttribute.Hitpoints_Cur] - damage, 0);
Attributes.BroadcastChangedIfRevealed();
if (Attributes[GameAttribute.Hitpoints_Cur] == 0 && !this.SNO.IsUndestroyable())
if (Attributes[GameAttribute.Hitpoints_Cur] == 0 && !SNO.IsUndestroyable())
Die(source);
}
@ -56,12 +56,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
base.OnTargeted(null, null);
Logger.Trace("Breaked barricade, id: {0}", this.SNO);
Logger.Trace("Breaked barricade, id: {0}", SNO);
if (this.AnimationSet.TagMapAnimDefault.ContainsKey(AnimationSetKeys.DeathDefault))
if (AnimationSet.TagMapAnimDefault.ContainsKey(AnimationSetKeys.DeathDefault))
World.BroadcastIfRevealed(plr => new PlayAnimationMessage
{
ActorID = this.DynamicID(plr),
ActorID = DynamicID(plr),
AnimReason = 11,
UnitAniimStartTime = 0,
tAnim = new PlayAnimationMessageSpec[]
@ -78,19 +78,19 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
}, this);
this.Attributes[GameAttribute.Deleted_On_Server] = true;
this.Attributes[GameAttribute.Could_Have_Ragdolled] = true;
this.Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
Attributes[GameAttribute.Deleted_On_Server] = true;
Attributes[GameAttribute.Could_Have_Ragdolled] = true;
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
Attributes.BroadcastChangedIfRevealed();
Task.Delay(1500).ContinueWith(delegate
{
this.World.PowerManager.RunPower(this, 30209);
var DataOfSkill = DiIiS_NA.Core.MPQ.MPQStorage.Data.Assets[GameServer.Core.Types.SNO.SNOGroup.Anim][10217].Data;
World.PowerManager.RunPower(this, 30209);
var DataOfSkill = DiIiS_NA.Core.MPQ.MPQStorage.Data.Assets[Core.Types.SNO.SNOGroup.Anim][10217].Data;
this.Destroy();
Destroy();
});
}

View File

@ -35,19 +35,19 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public void ReceiveDamage(Actor source, float damage)
{
if (this.SNO == ActorSno._trout_highlands_goatman_totem_gharbad && this.World.Game.CurrentSideQuest != 225253) return;
if (SNO == ActorSno._trout_highlands_goatman_totem_gharbad && World.Game.CurrentSideQuest != 225253) return;
World.BroadcastIfRevealed(plr => new FloatingNumberMessage
{
Number = damage,
ActorID = this.DynamicID(plr),
ActorID = DynamicID(plr),
Type = FloatingNumberMessage.FloatType.White
}, this);
Attributes[GameAttribute.Hitpoints_Cur] = Math.Max(Attributes[GameAttribute.Hitpoints_Cur] - damage, 0);
Attributes.BroadcastChangedIfRevealed();
if (Attributes[GameAttribute.Hitpoints_Cur] == 0 && !this.SNO.IsUndestroyable())
if (Attributes[GameAttribute.Hitpoints_Cur] == 0 && !SNO.IsUndestroyable())
Die(source);
}
@ -55,12 +55,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
base.OnTargeted(null, null);
Logger.Trace("Breaked barricade, id: {0}", this.SNO);
Logger.Trace("Breaked barricade, id: {0}", SNO);
if (this.AnimationSet.TagMapAnimDefault.ContainsKey(AnimationSetKeys.DeathDefault))
if (AnimationSet.TagMapAnimDefault.ContainsKey(AnimationSetKeys.DeathDefault))
World.BroadcastIfRevealed(plr => new PlayAnimationMessage
{
ActorID = this.DynamicID(plr),
ActorID = DynamicID(plr),
AnimReason = 11,
UnitAniimStartTime = 0,
tAnim = new PlayAnimationMessageSpec[]
@ -77,17 +77,17 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
}, this);
this.Attributes[GameAttribute.Deleted_On_Server] = true;
this.Attributes[GameAttribute.Could_Have_Ragdolled] = true;
this.Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
Attributes[GameAttribute.Deleted_On_Server] = true;
Attributes[GameAttribute.Could_Have_Ragdolled] = true;
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
Attributes.BroadcastChangedIfRevealed();
Task.Delay(1400).ContinueWith(delegate
{
this.World.PowerManager.RunPower(this, 186216);
this.Destroy();
World.PowerManager.RunPower(this, 186216);
Destroy();
});
}

View File

@ -32,16 +32,16 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public ChallengeObelisk(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.TeamID] = 2;
this.Attributes[GameAttribute.MinimapActive] = true;
this.Attributes.BroadcastChangedIfRevealed();
Attributes[GameAttribute.TeamID] = 2;
Attributes[GameAttribute.MinimapActive] = true;
Attributes.BroadcastChangedIfRevealed();
}
public override void OnTargeted(Player player, TargetMessage message)
{
bool Activated = false;
this.PlayAnimation(5, AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening]);
PlayAnimation(5, AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening]);
Attributes[GameAttribute.Team_Override] = (Activated ? -1 : 2);
Attributes[GameAttribute.Untargetable] = !Activated;
Attributes[GameAttribute.NPC_Is_Operatable] = Activated;
@ -52,11 +52,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
Attributes.BroadcastChangedIfRevealed();
CollFlags = 0;
TickTimer Timeout = new SecondsTickTimer(this.World.Game, 3.5f);
TickTimer Timeout = new SecondsTickTimer(World.Game, 3.5f);
var Boom = Task<bool>.Factory.StartNew(() => WaitToSpawn(Timeout));
Boom.ContinueWith(delegate
{
var actor = this.World.GetActorBySNO(ActorSno._x1_openworld_challenge_rifts_portal);
var actor = World.GetActorBySNO(ActorSno._x1_openworld_challenge_rifts_portal);
actor.SetVisible(true);
actor.Reveal(player);
@ -75,13 +75,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
return false;
if (!Attributes[GameAttribute.Operatable])
{
var actor = this.World.GetActorBySNO(ActorSno._x1_openworld_challenge_rifts_portal);
var actor = World.GetActorBySNO(ActorSno._x1_openworld_challenge_rifts_portal);
actor.SetVisible(false);
actor.Unreveal(player);
}
else
{
this.PlayAnimation(5, AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening]);
PlayAnimation(5, AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening]);
}
return true;
}

View File

@ -23,18 +23,18 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Champion(MapSystem.World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Hitpoints_Max] *= 4.0f;
this.Attributes[GameAttribute.Immune_To_Charm] = true;
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] *= 2.5f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] *= 2.5f;
this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.Hitpoints_Max] *= 4.0f;
Attributes[GameAttribute.Immune_To_Charm] = true;
Attributes[GameAttribute.Damage_Weapon_Min, 0] *= 2.5f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] *= 2.5f;
Attributes[GameAttribute.Hitpoints_Cur] = Attributes[GameAttribute.Hitpoints_Max_Total];
//MonsterAffixGenerator.Generate(this, this.World.Game.Difficulty + 1);
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.3f;
this.NamePrefix = MonsterAffixGenerator.GeneratePrefixName();
this.NameSuffix = MonsterAffixGenerator.GenerateSuffixName();
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
WalkSpeed = 0.3f;
NamePrefix = MonsterAffixGenerator.GeneratePrefixName();
NameSuffix = MonsterAffixGenerator.GenerateSuffixName();
}
@ -51,7 +51,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
player.InGameClient.SendMessage(new RareMonsterNamesMessage()
{
ann = DynamicID(player),
RareNames = new int[2] { this.NamePrefix, this.NameSuffix },
RareNames = new int[2] { NamePrefix, NameSuffix },
MonsterAffixes = affixGbids
});

View File

@ -22,8 +22,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public override void OnPlayerApproaching(PlayerSystem.Player player)
{
if (this.World.Game.PvP) return;
if (player.Position.DistanceSquared(ref _position) < ActorData.Sphere.Radius * ActorData.Sphere.Radius * this.Scale * this.Scale && !_checkpointReached)
if (World.Game.PvP) return;
if (player.Position.DistanceSquared(ref _position) < ActorData.Sphere.Radius * ActorData.Sphere.Radius * Scale * Scale && !_checkpointReached)
{
_checkpointReached = true;
@ -33,7 +33,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
Effect = Effect.Checkpoint
});
player.CheckPointPosition = this.Position;
player.CheckPointPosition = Position;
player.Attributes[GameAttribute.Corpse_Resurrection_Charges] = 3; // Reset corpse resurrection charges
}
}

View File

@ -33,12 +33,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
try
{
if (player.Position.DistanceSquared(ref _position) < 225f && !_collapsed && this.Randomed)
if (player.Position.DistanceSquared(ref _position) < 225f && !_collapsed && Randomed)
{
_collapsed = true;
this.World.Game.SideQuestGizmo = this;
this.World.Game.QuestManager.LaunchSideQuest(eventIds[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(0, eventIds.Count())], true);
World.Game.SideQuestGizmo = this;
World.Game.QuestManager.LaunchSideQuest(eventIds[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(0, eventIds.Count())], true);
}
}
catch { }
@ -56,7 +56,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public void Activate()
{
var rewardChests = this.GetActorsInRange<LootContainer>(20f).Where(c => c.rewardChestAvailable == false).ToList();
var rewardChests = GetActorsInRange<LootContainer>(20f).Where(c => c.rewardChestAvailable == false).ToList();
foreach (var chest in rewardChests)
{
@ -65,7 +65,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
chest.Reveal(plr);
}
this.Destroy();
Destroy();
}
}
}

View File

@ -37,12 +37,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
try
{
if (player.Position.DistanceSquared(ref _position) < 225f && !_collapsed && this.Randomed)
if (player.Position.DistanceSquared(ref _position) < 225f && !_collapsed && Randomed)
{
_collapsed = true;
this.World.Game.SideQuestGizmo = this;
this.World.Game.QuestManager.LaunchSideQuest(eventIds[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(0, eventIds.Count())], true);
World.Game.SideQuestGizmo = this;
World.Game.QuestManager.LaunchSideQuest(eventIds[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(0, eventIds.Count())], true);
}
}
catch { }
@ -60,51 +60,51 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public void Activate()
{
this.World.BroadcastIfRevealed(plr => new ANNDataMessage(Opcodes.ShrineActivatedMessage) { ActorID = this.DynamicID(plr) }, this);
World.BroadcastIfRevealed(plr => new ANNDataMessage(Opcodes.ShrineActivatedMessage) { ActorID = DynamicID(plr) }, this);
var type = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(0, 4);
switch (type)
{
case 0: //blessed
foreach (var plr in this.GetPlayersInRange(100f))
foreach (var plr in GetPlayersInRange(100f))
{
this.World.BuffManager.AddBuff(this, plr, new PowerSystem.Implementations.ShrineBlessedBuff(TickTimer.WaitSeconds(this.World.Game, 120.0f)));
World.BuffManager.AddBuff(this, plr, new PowerSystem.Implementations.ShrineBlessedBuff(TickTimer.WaitSeconds(World.Game, 120.0f)));
plr.GrantCriteria(74987243307423);
}
break;
case 1: //enlightened
foreach (var plr in this.GetPlayersInRange(100f))
foreach (var plr in GetPlayersInRange(100f))
{
this.World.BuffManager.AddBuff(this, plr, new PowerSystem.Implementations.ShrineEnlightenedBuff(TickTimer.WaitSeconds(this.World.Game, 120.0f)));
World.BuffManager.AddBuff(this, plr, new PowerSystem.Implementations.ShrineEnlightenedBuff(TickTimer.WaitSeconds(World.Game, 120.0f)));
plr.GrantCriteria(74987243307424);
}
break;
case 2: //fortune
foreach (var plr in this.GetPlayersInRange(100f))
foreach (var plr in GetPlayersInRange(100f))
{
this.World.BuffManager.AddBuff(this, plr, new PowerSystem.Implementations.ShrineFortuneBuff(TickTimer.WaitSeconds(this.World.Game, 120.0f)));
World.BuffManager.AddBuff(this, plr, new PowerSystem.Implementations.ShrineFortuneBuff(TickTimer.WaitSeconds(World.Game, 120.0f)));
plr.GrantCriteria(74987243307425);
}
break;
case 3: //frenzied
foreach (var plr in this.GetPlayersInRange(100f))
foreach (var plr in GetPlayersInRange(100f))
{
this.World.BuffManager.AddBuff(this, plr, new PowerSystem.Implementations.ShrineFrenziedBuff(TickTimer.WaitSeconds(this.World.Game, 120.0f)));
World.BuffManager.AddBuff(this, plr, new PowerSystem.Implementations.ShrineFrenziedBuff(TickTimer.WaitSeconds(World.Game, 120.0f)));
plr.GrantCriteria(74987243307426);
}
break;
default:
foreach (var plr in this.GetPlayersInRange(100f))
foreach (var plr in GetPlayersInRange(100f))
{
this.World.BuffManager.AddBuff(this, plr, new PowerSystem.Implementations.ShrineEnlightenedBuff(TickTimer.WaitSeconds(this.World.Game, 120.0f)));
World.BuffManager.AddBuff(this, plr, new PowerSystem.Implementations.ShrineEnlightenedBuff(TickTimer.WaitSeconds(World.Game, 120.0f)));
}
break;
}
this.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true;
Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true;
//this.Attributes[GameAttribute.Gizmo_Operator_ACDID] = unchecked((int)player.DynamicID);
this.Attributes[GameAttribute.Gizmo_State] = 1;
Attributes[GameAttribute.Gizmo_State] = 1;
Attributes.BroadcastChangedIfRevealed();
var rewardChests = this.GetActorsInRange<LootContainer>(20f).Where(c => c.rewardChestAvailable == false).ToList();
var rewardChests = GetActorsInRange<LootContainer>(20f).Where(c => c.rewardChestAvailable == false).ToList();
foreach (var chest in rewardChests)
{

View File

@ -51,12 +51,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public void ReceiveDamage(Actor source, float damage /* critical, type */)
{
if (this.SNO == ActorSno._trout_highlands_goatman_totem_gharbad && this.World.Game.CurrentSideQuest != 225253) return;
if (SNO == ActorSno._trout_highlands_goatman_totem_gharbad && World.Game.CurrentSideQuest != 225253) return;
World.BroadcastIfRevealed(plr => new FloatingNumberMessage
{
Number = damage,
ActorID = this.DynamicID(plr),
ActorID = DynamicID(plr),
Type = FloatingNumberMessage.FloatType.White
}, this);
@ -65,7 +65,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
Attributes.BroadcastChangedIfRevealed();
if (Attributes[GameAttribute.Hitpoints_Cur] == 0 && !this.SNO.IsUndestroyable())
if (Attributes[GameAttribute.Hitpoints_Cur] == 0 && !SNO.IsUndestroyable())
{
Die(source);
}
@ -76,40 +76,40 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
base.OnTargeted(null, null);
if (haveDrop)
{
var dropRates = this.World.Game.IsHardcore ? LootManager.GetSeasonalDropRates((int)this.Quality, 70) : LootManager.GetDropRates((int)this.Quality, 70);
var dropRates = World.Game.IsHardcore ? LootManager.GetSeasonalDropRates((int)Quality, 70) : LootManager.GetDropRates((int)Quality, 70);
foreach (var rate in dropRates)
foreach (var plr in this.GetPlayersInRange(30))
foreach (var plr in GetPlayersInRange(30))
{
float seed = (float)FastRandom.Instance.NextDouble();
if (seed < 0.95f)
this.World.SpawnGold(this, plr);
World.SpawnGold(this, plr);
if (seed < 0.06f)
this.World.SpawnRandomCraftItem(this, plr);
World.SpawnRandomCraftItem(this, plr);
if (seed < 0.04f)
this.World.SpawnRandomGem(this, plr);
World.SpawnRandomGem(this, plr);
if (seed < 0.10f)
this.World.SpawnRandomPotion(this, plr);
World.SpawnRandomPotion(this, plr);
if (seed < (rate * (1f + plr.Attributes[GameAttribute.Magic_Find])))
{
var lootQuality = this.World.Game.IsHardcore ? LootManager.GetSeasonalLootQuality((int)this.Quality, this.World.Game.Difficulty) : LootManager.GetLootQuality((int)this.Quality, this.World.Game.Difficulty);
this.World.SpawnRandomEquip(plr, plr, lootQuality);
var lootQuality = World.Game.IsHardcore ? LootManager.GetSeasonalLootQuality((int)Quality, World.Game.Difficulty) : LootManager.GetLootQuality((int)Quality, World.Game.Difficulty);
World.SpawnRandomEquip(plr, plr, lootQuality);
}
else
break;
}
}
Logger.Trace("Breaked barricade, id: {0}", this.SNO);
Logger.Trace("Breaked barricade, id: {0}", SNO);
if (source != null && source is Player && tombs.Contains(this.SNO))
if (source != null && source is Player && tombs.Contains(SNO))
{
(source as Player).AddAchievementCounter(74987243307171, 1);
}
if (this.AnimationSet.TagMapAnimDefault.ContainsKey(AnimationSetKeys.DeathDefault))
if (AnimationSet.TagMapAnimDefault.ContainsKey(AnimationSetKeys.DeathDefault))
World.BroadcastIfRevealed(plr => new PlayAnimationMessage
{
ActorID = this.DynamicID(plr),
ActorID = DynamicID(plr),
AnimReason = 11,
UnitAniimStartTime = 0,
tAnim = new PlayAnimationMessageSpec[]
@ -126,38 +126,38 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
}, this);
this.Attributes[GameAttribute.Deleted_On_Server] = true;
this.Attributes[GameAttribute.Could_Have_Ragdolled] = true;
Attributes[GameAttribute.Deleted_On_Server] = true;
Attributes[GameAttribute.Could_Have_Ragdolled] = true;
Attributes.BroadcastChangedIfRevealed();
//handling quest triggers
if (this.World.Game.QuestProgress.QuestTriggers.ContainsKey((int)this.SNO))
if (World.Game.QuestProgress.QuestTriggers.ContainsKey((int)SNO))
{
var trigger = this.World.Game.QuestProgress.QuestTriggers[(int)this.SNO];
var trigger = World.Game.QuestProgress.QuestTriggers[(int)SNO];
if (trigger.triggerType == DiIiS_NA.Core.MPQ.FileFormats.QuestStepObjectiveType.KillMonster)
{
this.World.Game.QuestProgress.UpdateCounter((int)this.SNO);
if (trigger.count == this.World.Game.QuestProgress.QuestTriggers[(int)this.SNO].counter)
trigger.questEvent.Execute(this.World); // launch a questEvent
World.Game.QuestProgress.UpdateCounter((int)SNO);
if (trigger.count == World.Game.QuestProgress.QuestTriggers[(int)SNO].counter)
trigger.questEvent.Execute(World); // launch a questEvent
}
else
if (trigger.triggerType == DiIiS_NA.Core.MPQ.FileFormats.QuestStepObjectiveType.MonsterFromGroup)
{
this.World.Game.QuestProgress.UpdateCounter((int)this.SNO);
World.Game.QuestProgress.UpdateCounter((int)SNO);
}
}
else if (this.World.Game.SideQuestProgress.QuestTriggers.ContainsKey((int)this.SNO))
else if (World.Game.SideQuestProgress.QuestTriggers.ContainsKey((int)SNO))
{
var trigger = this.World.Game.SideQuestProgress.QuestTriggers[(int)this.SNO];
var trigger = World.Game.SideQuestProgress.QuestTriggers[(int)SNO];
if (trigger.triggerType == DiIiS_NA.Core.MPQ.FileFormats.QuestStepObjectiveType.KillMonster)
{
this.World.Game.SideQuestProgress.UpdateSideCounter((int)this.SNO);
if (trigger.count == this.World.Game.SideQuestProgress.QuestTriggers[(int)this.SNO].counter)
trigger.questEvent.Execute(this.World); // launch a questEvent
World.Game.SideQuestProgress.UpdateSideCounter((int)SNO);
if (trigger.count == World.Game.SideQuestProgress.QuestTriggers[(int)SNO].counter)
trigger.questEvent.Execute(World); // launch a questEvent
}
}
this.Destroy();
Destroy();
}

View File

@ -42,31 +42,31 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
if (NearestPortal != null)
{
NearestPortal.SetVisible(false);
foreach (var plr in this.World.Players.Values)
foreach (var plr in World.Players.Values)
NearestPortal.Unreveal(plr);
}
}
public override bool Reveal(Player player)
{
if (this.SNO == ActorSno._trout_cultists_summoning_portal_b) return false;
if (this.SNO == ActorSno._a2dun_aqd_godhead_door_largepuzzle && this.World.SNO != WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large) return false; //dakab door
if (this.SNO == ActorSno._a2dun_aqd_godhead_door && this.World.SNO == WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large) return false; //not dakab door
if (SNO == ActorSno._trout_cultists_summoning_portal_b) return false;
if (SNO == ActorSno._a2dun_aqd_godhead_door_largepuzzle && World.SNO != WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large) return false; //dakab door
if (SNO == ActorSno._a2dun_aqd_godhead_door && World.SNO == WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large) return false; //not dakab door
if (this.SNO == ActorSno._a2dun_zolt_random_portal_timed) //Treasure Room door
this.isOpened = true;
if (SNO == ActorSno._a2dun_zolt_random_portal_timed) //Treasure Room door
isOpened = true;
if (this.SNO == ActorSno._caout_oasis_mine_entrance_a && (float)DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() < 0.3f) //Mysterious Cave door
this.isOpened = true;
if (SNO == ActorSno._caout_oasis_mine_entrance_a && (float)DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() < 0.3f) //Mysterious Cave door
isOpened = true;
if (!base.Reveal(player))
return false;
if (this.isOpened == true)
if (isOpened == true)
{
player.InGameClient.SendMessage(new SetIdleAnimationMessage
{
ActorID = this.DynamicID(player),
ActorID = DynamicID(player),
AnimationSNO = AnimationSetKeys.Open.ID
});
}
@ -79,7 +79,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
if (NearestPortal != null)
{
NearestPortal.SetVisible(false);
foreach (var plr in this.World.Players.Values)
foreach (var plr in World.Players.Values)
NearestPortal.Unreveal(plr);
}
}
@ -90,7 +90,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
World.BroadcastIfRevealed(plr => new PlayAnimationMessage
{
ActorID = this.DynamicID(plr),
ActorID = DynamicID(plr),
AnimReason = 5,
UnitAniimStartTime = 0,
tAnim = new PlayAnimationMessageSpec[]
@ -115,24 +115,24 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
World.BroadcastIfRevealed(plr => new SetIdleAnimationMessage
{
ActorID = this.DynamicID(plr),
ActorID = DynamicID(plr),
AnimationSNO = AnimationSetKeys.Open.ID
}, this);
this.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true;
Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true;
//this.Attributes[GameAttribute.Gizmo_Operator_ACDID] = unchecked((int)player.DynamicID);
this.Attributes[GameAttribute.Gizmo_State] = 1;
this.CollFlags = 0;
this.isOpened = true;
Attributes[GameAttribute.Gizmo_State] = 1;
CollFlags = 0;
isOpened = true;
TickerSystem.TickTimer Timeout = new TickerSystem.SecondsTickTimer(this.World.Game, 1.8f);
TickerSystem.TickTimer Timeout = new TickerSystem.SecondsTickTimer(World.Game, 1.8f);
if (NearestPortal != null)
{
var Boom = System.Threading.Tasks.Task<bool>.Factory.StartNew(() => WaitToSpawn(Timeout));
var Boom = Task<bool>.Factory.StartNew(() => WaitToSpawn(Timeout));
Boom.ContinueWith(delegate
{
NearestPortal.SetVisible(true);
foreach (var plr in this.World.Players.Values)
foreach (var plr in World.Players.Values)
NearestPortal.Unreveal(plr);
});
}
@ -142,11 +142,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public override void OnTargeted(Player player, TargetMessage message)
{
if (this.Attributes[GameAttribute.Disabled]) return;
this.Open();
if (Attributes[GameAttribute.Disabled]) return;
Open();
base.OnTargeted(player, message);
this.Attributes[GameAttribute.Disabled] = true;
Attributes[GameAttribute.Disabled] = true;
}
private bool WaitToSpawn(TickerSystem.TickTimer timer)

View File

@ -35,11 +35,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
//this.Field2 = 0x9;//16;
this.Attributes[GameAttribute.MinimapActive] = true;
Attributes[GameAttribute.MinimapActive] = true;
//this.Attributes[GameAttribute.MinimapIconOverride] = 218394;
if (this.World.SNO.IsDungeon())
if (World.SNO.IsDungeon())
{
this.Destination = new ResolvedPortalDestination()
Destination = new ResolvedPortalDestination()
{
DestLevelAreaSNO = 332339,
WorldSNO = (int)WorldSno.x1_tristram_adventure_mode_hub,
@ -60,29 +60,29 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
if (actor is Portal)
Exit = actor as Portal;
if (Exit != null)
this.Destination = Exit.Destination;
Destination = Exit.Destination;
}
else if (Destination == null)
this.Destination = this.World.PrevLocation;
Destination = World.PrevLocation;
player.InGameClient.SendMessage(new PortalSpecifierMessage()
{
ActorID = this.DynamicID(player),
Destination = this.Destination
ActorID = DynamicID(player),
Destination = Destination
});
return true;
}
public StartingPoint GetSmartStartingPoint(World world)
{
if (this.Destination.StartingPointActorTag != 0)
if (Destination.StartingPointActorTag != 0)
{
StartingPoint NeededStartingPoint = world.GetStartingPointById(this.Destination.StartingPointActorTag);
var DestWorld = world.Game.GetWorld((WorldSno)this.Destination.WorldSNO);
StartingPoint NeededStartingPoint = world.GetStartingPointById(Destination.StartingPointActorTag);
var DestWorld = world.Game.GetWorld((WorldSno)Destination.WorldSNO);
var StartingPoints = DestWorld.GetActorsBySNO(ActorSno._start_location_0);
foreach (var ST in StartingPoints)
{
if (ST.CurrentScene.SceneSNO.Id == this.Destination.StartingPointActorTag)
if (ST.CurrentScene.SceneSNO.Id == Destination.StartingPointActorTag)
NeededStartingPoint = (ST as StartingPoint);
}
if (NeededStartingPoint != null)
@ -97,22 +97,22 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
Logger.Debug("(OnTargeted) Portal has been activated ");
if (this.World.SNO.IsDungeon())
if (World.SNO.IsDungeon())
{
this.Destination.DestLevelAreaSNO = 332339;
this.Destination.WorldSNO = (int)WorldSno.x1_tristram_adventure_mode_hub;
this.Destination.StartingPointActorTag = 24;
Destination.DestLevelAreaSNO = 332339;
Destination.WorldSNO = (int)WorldSno.x1_tristram_adventure_mode_hub;
Destination.StartingPointActorTag = 24;
}
var world = this.World.Game.GetWorld((WorldSno)this.Destination.WorldSNO);
var world = World.Game.GetWorld((WorldSno)Destination.WorldSNO);
if (world == null)
{
Logger.Warn("Portal's destination world does not exist (WorldSNO = {0})", this.Destination.WorldSNO);
Logger.Warn("Portal's destination world does not exist (WorldSNO = {0})", Destination.WorldSNO);
return;
}
var startingPoint = world.GetStartingPointById(this.Destination.StartingPointActorTag);
var startingPoint = world.GetStartingPointById(Destination.StartingPointActorTag);
if (startingPoint == null)
startingPoint = GetSmartStartingPoint(world);
@ -120,9 +120,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
if (startingPoint != null)
{
player.ShowConfirmation(this.DynamicID(player), (() => {
player.ShowConfirmation(DynamicID(player), (() => {
player.StartCasting(150, new Action(() => {
if (world == this.World)
if (world == World)
player.Teleport(startingPoint.Position);
else
player.ChangeWorld(world, startingPoint);
@ -131,7 +131,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
}
else
Logger.Warn("Portal's tagged starting point does not exist (Tag = {0})", this.Destination.StartingPointActorTag);
Logger.Warn("Portal's tagged starting point does not exist (Tag = {0})", Destination.StartingPointActorTag);
}
}
}

View File

@ -28,7 +28,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public EquipmentManager(MapSystem.World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.MinimapActive] = true;
Attributes[GameAttribute.MinimapActive] = true;
}
public override void OnTargeted(Player player, TargetMessage message)
@ -36,7 +36,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
// player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.ANNDataMessage23) - Бафф (шрайн)
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.ANNDataMessage45)
{
ActorID = this.DynamicID(player)
ActorID = DynamicID(player)
});
}
@ -45,7 +45,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
player.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Map.MapMarkerInfoMessage()
{
HashedName = DiIiS_NA.Core.Helpers.Hash.StringHashHelper.HashItemName("EquipmentManagerTest"),
Place = new MessageSystem.Message.Fields.WorldPlace { Position = this.Position, WorldID = this.World.GlobalID },
Place = new MessageSystem.Message.Fields.WorldPlace { Position = Position, WorldID = World.GlobalID },
ImageInfo = -1,
Label = -1,
snoStringList = -1,

View File

@ -24,9 +24,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Ghost(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.CollFlags = 0;
this.WalkSpeed = 0;
this.Attributes[GameAttribute.Invulnerable] = true;
CollFlags = 0;
WalkSpeed = 0;
Attributes[GameAttribute.Invulnerable] = true;
}
}
}

View File

@ -29,24 +29,24 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
: base(world, sno, tags)
{
// Override minimap icon in markerset tags
this.WalkSpeed = 0;
this.Brain = new MonsterBrain(this);
this.Attributes[GameAttribute.MinimapActive] = true;
WalkSpeed = 0;
Brain = new MonsterBrain(this);
Attributes[GameAttribute.MinimapActive] = true;
//this.Attributes[GameAttribute.MinimapIconOverride] = 123152;
this.Attributes[GameAttribute.Hitpoints_Max] *= 3f;
this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.Hitpoints_Max] *= 3f;
Attributes[GameAttribute.Hitpoints_Cur] = Attributes[GameAttribute.Hitpoints_Max_Total];
//this.Attributes[GameAttribute.Immune_To_Charm] = true;
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 0f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 0f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = 0f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 0f;
//(this.Brain as MonsterBrain).AddPresetPower(54055); //TreasureGoblinPause
(this.Brain as MonsterBrain).AddPresetPower(105371); //TreasureGoblin_Escape
(Brain as MonsterBrain).AddPresetPower(105371); //TreasureGoblin_Escape
}
public override bool Reveal(Player player)
{
if (this.World.SNO == WorldSno.a1dun_spidercave_01 || this.World.SNO == WorldSno.trout_oldtistram_cellar_3)
if (World.SNO == WorldSno.a1dun_spidercave_01 || World.SNO == WorldSno.trout_oldtistram_cellar_3)
{
this.Destroy();
Destroy();
return false;
}

View File

@ -22,10 +22,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
: base(world, sno, tags)
{
this.playerIndex = playerIndex;
this.Attributes[GameAttribute.MinimapActive] = true;
this.Attributes[GameAttribute.Headstone_Player_ANN] = 1;
this.Attributes[GameAttribute.TeamID] = 1;
if (this.World.Game.PvP) this.Attributes[GameAttribute.Disabled] = true;
Attributes[GameAttribute.MinimapActive] = true;
Attributes[GameAttribute.Headstone_Player_ANN] = 1;
Attributes[GameAttribute.TeamID] = 1;
if (World.Game.PvP) Attributes[GameAttribute.Disabled] = true;
}
@ -39,8 +39,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public override void OnTargeted(PlayerSystem.Player player, TargetMessage message)
{
base.OnTargeted(player, message);
if (this.playerIndex > -1)
this.GetPlayersInRange(100f).Where(p => p.PlayerIndex == this.playerIndex).First().Resurrect();
if (playerIndex > -1)
GetPlayersInRange(100f).Where(p => p.PlayerIndex == playerIndex).First().Resurrect();
//this.Destroy();
}
}

View File

@ -23,8 +23,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Healer(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.TeamID] = 0;
this.Attributes[GameAttribute.MinimapActive] = true;
Attributes[GameAttribute.TeamID] = 0;
Attributes[GameAttribute.MinimapActive] = true;
}
public override void OnTargeted(PlayerSystem.Player player, TargetMessage message)

View File

@ -34,9 +34,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
//Logger.Warn("Healthwell has no function, Powers not implemented");
this.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true;
Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true;
//this.Attributes[GameAttribute.Gizmo_Operator_ACDID] = unchecked((int)player.DynamicID);
this.Attributes[GameAttribute.Gizmo_State] = 1;
Attributes[GameAttribute.Gizmo_State] = 1;
Attributes.BroadcastChangedIfRevealed();
player.AddPercentageHP(50);
player.AddAchievementCounter(74987243307169, 1);
@ -47,7 +47,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
player.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Map.MapMarkerInfoMessage()
{
HashedName = DiIiS_NA.Core.Helpers.Hash.StringHashHelper.HashItemName("x1_OpenWorld_LootRunObelisk_B"),
Place = new MessageSystem.Message.Fields.WorldPlace { Position = this.Position, WorldID = this.World.GlobalID },
Place = new MessageSystem.Message.Fields.WorldPlace { Position = Position, WorldID = World.GlobalID },
ImageInfo = 218234,
Label = -1,
snoStringList = -1,

View File

@ -35,38 +35,38 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public HearthPortal(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.MinimapActive] = true;
this.SetVisible(false);
Attributes[GameAttribute.MinimapActive] = true;
SetVisible(false);
}
public override void OnTargeted(Player player, TargetMessage message)
{
Logger.Trace("(OnTargeted) HearthPortal has been activated ");
var world = this.World.Game.GetWorld(this.ReturnWorld);
var world = World.Game.GetWorld(ReturnWorld);
if (world == null)
{
Logger.Warn("HearthPortal's world does not exist (WorldSNO = {0})", this.ReturnWorld);
Logger.Warn("HearthPortal's world does not exist (WorldSNO = {0})", ReturnWorld);
return;
}
if (this.World.Game.QuestManager.SideQuests.ContainsKey(120396) && this.World.Game.QuestManager.SideQuests[120396].Completed && this.ReturnWorld == WorldSno.a2dun_zolt_timed01_level01) return;
if (World.Game.QuestManager.SideQuests.ContainsKey(120396) && World.Game.QuestManager.SideQuests[120396].Completed && ReturnWorld == WorldSno.a2dun_zolt_timed01_level01) return;
Vector3D exCheckpoint = player.CheckPointPosition;
if (world == this.World)
if (world == World)
player.Teleport(ReturnPosition);
else
player.ChangeWorld(world, ReturnPosition);
player.CheckPointPosition = exCheckpoint;
this.SetVisible(false);
SetVisible(false);
}
public override bool Reveal(Player player)
{
if (player != this.Owner) return false;
if (player != Owner) return false;
return base.Reveal(player);
}
}

View File

@ -53,7 +53,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public HiddenVendor(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Enabled = (FastRandom.Instance.Next(100) < 40);
Enabled = (FastRandom.Instance.Next(100) < 40);
}
protected override List<Item> GetVendorItems()
@ -62,7 +62,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
for (int i = 0; i < 9; i++)
{
var itm = ItemGenerator.GenerateRandomEquip(this, this.level, 6, 7);
var itm = ItemGenerator.GenerateRandomEquip(this, level, 6, 7);
itm.Attributes[GameAttribute.Item_Cost_Percent_Bonus] = 3f;
list.Add(itm);
}
@ -72,7 +72,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public override bool Reveal(PlayerSystem.Player player)
{
if (!this.Enabled) return false;
if (!Enabled) return false;
return base.Reveal(player);
}

View File

@ -25,7 +25,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
proxySNO = ActorSno._hireling_enchantress_proxy;
skillKit = 484938;
hirelingGBID = StringHashHelper.HashItemName("Enchantress");
this.Attributes[GameAttribute.Hireling_Class] = 3;
Attributes[GameAttribute.Hireling_Class] = 3;
}
public override Hireling CreateHireling(MapSystem.World world, ActorSno sno, TagMap tags)
@ -41,9 +41,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 102057:
case 101969:
player.HirelingInfo[3].Skill1SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 102057 ? 101969 : 102057)] = 0;
this.Attributes.BroadcastChangedIfRevealed();
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 102057 ? 101969 : 102057)] = 0;
Attributes.BroadcastChangedIfRevealed();
dbhireling.Skill1SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -51,9 +51,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 102133:
case 101461:
player.HirelingInfo[3].Skill2SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 102133 ? 101461 : 102133)] = 0;
this.Attributes.BroadcastChangedIfRevealed();
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 102133 ? 101461 : 102133)] = 0;
Attributes.BroadcastChangedIfRevealed();
dbhireling.Skill2SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -61,9 +61,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 101990:
case 220872:
player.HirelingInfo[3].Skill3SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 101990 ? 220872 : 101990)] = 0;
this.Attributes.BroadcastChangedIfRevealed();
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 101990 ? 220872 : 101990)] = 0;
Attributes.BroadcastChangedIfRevealed();
dbhireling.Skill3SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -71,9 +71,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 101425:
case 201524:
player.HirelingInfo[3].Skill4SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 101425 ? 201524 : 101425)] = 0;
this.Attributes.BroadcastChangedIfRevealed();
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 101425 ? 201524 : 101425)] = 0;
Attributes.BroadcastChangedIfRevealed();
dbhireling.Skill4SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -97,15 +97,15 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
player.HirelingInfo[3].Skill3SNOId = -1;
player.HirelingInfo[3].Skill4SNOId = -1;
this.Attributes[GameAttribute.Skill, 102057] = 0;
this.Attributes[GameAttribute.Skill, 101969] = 0;
this.Attributes[GameAttribute.Skill, 102133] = 0;
this.Attributes[GameAttribute.Skill, 101461] = 0;
this.Attributes[GameAttribute.Skill, 101990] = 0;
this.Attributes[GameAttribute.Skill, 220872] = 0;
this.Attributes[GameAttribute.Skill, 101425] = 0;
this.Attributes[GameAttribute.Skill, 201524] = 0;
this.Attributes.SendChangedMessage(player.InGameClient);
Attributes[GameAttribute.Skill, 102057] = 0;
Attributes[GameAttribute.Skill, 101969] = 0;
Attributes[GameAttribute.Skill, 102133] = 0;
Attributes[GameAttribute.Skill, 101461] = 0;
Attributes[GameAttribute.Skill, 101990] = 0;
Attributes[GameAttribute.Skill, 220872] = 0;
Attributes[GameAttribute.Skill, 101425] = 0;
Attributes[GameAttribute.Skill, 201524] = 0;
Attributes.SendChangedMessage(player.InGameClient);
}

View File

@ -54,33 +54,33 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
public bool IsProxy { get { return SNO == proxySNO; } }
public bool IsHireling { get { return SNO == hirelingSNO; } }
public bool HasHireling { get { return this.hirelingSNO != ActorSno.__NONE; } }
public bool HasProxy { get { return this.proxySNO != ActorSno.__NONE; } }
public bool HasHireling { get { return hirelingSNO != ActorSno.__NONE; } }
public bool HasProxy { get { return proxySNO != ActorSno.__NONE; } }
public int PetType { get { return IsProxy ? 22 : 0; } }
private Dictionary<Player, Dictionary<int, Item>> _equipment = new Dictionary<Player, Dictionary<int, Item>>();
public Hireling(MapSystem.World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.TeamID] = 2;
Attributes[GameAttribute.TeamID] = 2;
Interactions.Add(new HireInteraction());
Interactions.Add(new InventoryInteraction());
if (skillKit != -1)
this.Attributes[GameAttribute.SkillKit] = skillKit;
Attributes[GameAttribute.SkillKit] = skillKit;
}
public void SetUpAttributes(Player player)
{
this.owner = player;
owner = player;
var info = player.HirelingInfo[this.Attributes[GameAttribute.Hireling_Class]];
var info = player.HirelingInfo[Attributes[GameAttribute.Hireling_Class]];
//*
// TODO: fix this hardcoded crap
if (!IsProxy)
this.Attributes[GameAttribute.Buff_Visual_Effect, 0x000FFFFF] = true;
Attributes[GameAttribute.Buff_Visual_Effect, 0x000FFFFF] = true;
this.Attributes[GameAttribute.Level] = player.Level;
this.Attributes[GameAttribute.Experience_Next_Lo] = 0;
Attributes[GameAttribute.Level] = player.Level;
Attributes[GameAttribute.Experience_Next_Lo] = 0;
if (!IsHireling && !IsProxy) // original doesn't need more attribs
return;
@ -88,70 +88,70 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
if (info.Skill1SNOId != -1)
{
//scripted //this.Attributes[GameAttribute.Skill_Total, info.Skill1SNOId] = 1;
this.Attributes[GameAttribute.Skill, info.Skill1SNOId] = 1;
Attributes[GameAttribute.Skill, info.Skill1SNOId] = 1;
}
if (info.Skill2SNOId != -1)
{
//scripted //this.Attributes[GameAttribute.Skill_Total, info.Skill2SNOId] = 1;
this.Attributes[GameAttribute.Skill, info.Skill2SNOId] = 1;
Attributes[GameAttribute.Skill, info.Skill2SNOId] = 1;
}
if (info.Skill3SNOId != -1)
{
//scripted //this.Attributes[GameAttribute.Skill_Total, info.Skill3SNOId] = 1;
this.Attributes[GameAttribute.Skill, info.Skill3SNOId] = 1;
Attributes[GameAttribute.Skill, info.Skill3SNOId] = 1;
}
if (info.Skill4SNOId != -1)
{
//scripted //this.Attributes[GameAttribute.Skill_Total, info.Skill4SNOId] = 1;
this.Attributes[GameAttribute.Skill, info.Skill4SNOId] = 1;
Attributes[GameAttribute.Skill, info.Skill4SNOId] = 1;
}
/**/
this._lastResourceUpdateTick = 0;
this.Attributes[GameAttribute.SkillKit] = skillKit;
this.WalkSpeed = 0.45f;
_lastResourceUpdateTick = 0;
Attributes[GameAttribute.SkillKit] = skillKit;
WalkSpeed = 0.45f;
#region hardcoded attribs :/
//*
this.Attributes[GameAttribute.Attacks_Per_Second] = 1f;
this.Attributes[GameAttribute.Attacks_Per_Second_Item] = 1.199219f;
this.Attributes[GameAttribute.Casting_Speed] = 1;
this.Attributes[GameAttribute.Damage_Delta, 0] = 1f;
this.Attributes[GameAttribute.Damage_Min, 0] = 1f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 2f;
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 6f;
this.Attributes[GameAttribute.General_Cooldown] = 0;
this.Attributes[GameAttribute.Hit_Chance] = 1;
this.Attributes[GameAttribute.Hitpoints_Factor_Vitality] = 10f + Math.Max(this.Attributes[GameAttribute.Level] - 35, 0);
this.Attributes[GameAttribute.Hitpoints_Max] = 276f;
this.Attributes[GameAttribute.Hitpoints_Cur] = 1f;
this.Attributes[GameAttribute.Level_Cap] = 70;
this.Attributes[GameAttribute.Movement_Scalar] = 1;
this.Attributes[GameAttribute.Resource_Max, 0] = 1.0f;
this.Attributes[GameAttribute.Resource_Cur, 0] = 1.0f;
this.Attributes[GameAttribute.Resource_Type_Primary] = 0;
this.Attributes[GameAttribute.Running_Rate] = 0.3598633f;
this.Attributes[GameAttribute.Sprinting_Rate] = 0.3598633f;
this.Attributes[GameAttribute.Strafing_Rate] = 0.1799316f;
this.Attributes[GameAttribute.Walking_Rate] = 0.3598633f;
Attributes[GameAttribute.Attacks_Per_Second] = 1f;
Attributes[GameAttribute.Attacks_Per_Second_Item] = 1.199219f;
Attributes[GameAttribute.Casting_Speed] = 1;
Attributes[GameAttribute.Damage_Delta, 0] = 1f;
Attributes[GameAttribute.Damage_Min, 0] = 1f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 2f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = 6f;
Attributes[GameAttribute.General_Cooldown] = 0;
Attributes[GameAttribute.Hit_Chance] = 1;
Attributes[GameAttribute.Hitpoints_Factor_Vitality] = 10f + Math.Max(Attributes[GameAttribute.Level] - 35, 0);
Attributes[GameAttribute.Hitpoints_Max] = 276f;
Attributes[GameAttribute.Hitpoints_Cur] = 1f;
Attributes[GameAttribute.Level_Cap] = 70;
Attributes[GameAttribute.Movement_Scalar] = 1;
Attributes[GameAttribute.Resource_Max, 0] = 1.0f;
Attributes[GameAttribute.Resource_Cur, 0] = 1.0f;
Attributes[GameAttribute.Resource_Type_Primary] = 0;
Attributes[GameAttribute.Running_Rate] = 0.3598633f;
Attributes[GameAttribute.Sprinting_Rate] = 0.3598633f;
Attributes[GameAttribute.Strafing_Rate] = 0.1799316f;
Attributes[GameAttribute.Walking_Rate] = 0.3598633f;
if (IsProxy)
return;
this.Attributes[GameAttribute.Callout_Cooldown, 0x000FFFFF] = 0x00000797;
this.Attributes[GameAttribute.Buff_Visual_Effect, 0x000FFFFF] = true;
this.Attributes[GameAttribute.Buff_Icon_Count0, 0x000075C1] = 1;
this.Attributes[GameAttribute.Buff_Exclusive_Type_Active, 0x000075C1] = true;
this.Attributes[GameAttribute.Conversation_Icon, 0] = 1;
this.Attributes[GameAttribute.Buff_Exclusive_Type_Active, 0x20c51] = true;
this.Attributes[GameAttribute.Buff_Icon_End_Tick0, 0x00020C51] = 0x00000A75;
this.Attributes[GameAttribute.Buff_Icon_Start_Tick0, 0x00020C51] = 0x00000375;
this.Attributes[GameAttribute.Buff_Icon_Count0, 0x00020C51] = 3;
this.Attributes[GameAttribute.Callout_Cooldown, 0x1618a] = 743;
this.Attributes[GameAttribute.Callout_Cooldown, 0x01CAB6] = 743;
Attributes[GameAttribute.Callout_Cooldown, 0x000FFFFF] = 0x00000797;
Attributes[GameAttribute.Buff_Visual_Effect, 0x000FFFFF] = true;
Attributes[GameAttribute.Buff_Icon_Count0, 0x000075C1] = 1;
Attributes[GameAttribute.Buff_Exclusive_Type_Active, 0x000075C1] = true;
Attributes[GameAttribute.Conversation_Icon, 0] = 1;
Attributes[GameAttribute.Buff_Exclusive_Type_Active, 0x20c51] = true;
Attributes[GameAttribute.Buff_Icon_End_Tick0, 0x00020C51] = 0x00000A75;
Attributes[GameAttribute.Buff_Icon_Start_Tick0, 0x00020C51] = 0x00000375;
Attributes[GameAttribute.Buff_Icon_Count0, 0x00020C51] = 3;
Attributes[GameAttribute.Callout_Cooldown, 0x1618a] = 743;
Attributes[GameAttribute.Callout_Cooldown, 0x01CAB6] = 743;
//*/
#endregion
@ -164,69 +164,69 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
public void UpdateAttributes()
{
if (!this.IsHireling || this.owner == null)
if (!IsHireling || owner == null)
return;
//*
try
{
this.Attributes[GameAttribute.Vitality] = 5f + (this.Attributes[GameAttribute.Level] * 2) + (this.GetItemBonus(GameAttribute.Vitality_Item));// * 2.5f);
this.Attributes[GameAttribute.Strength] = 5f + (this.Attributes[GameAttribute.Level] * (this is Templar ? 3 : 1)) + (this.GetItemBonus(GameAttribute.Strength_Item));// * 2.5f);
this.Attributes[GameAttribute.Dexterity] = 5f + (this.Attributes[GameAttribute.Level] * (this is Scoundrel ? 3 : 1)) + (this.GetItemBonus(GameAttribute.Dexterity_Item));// * 2.5f);
this.Attributes[GameAttribute.Intelligence] = 5f + (this.Attributes[GameAttribute.Level] * (this is Enchantress ? 3 : 1)) + (this.GetItemBonus(GameAttribute.Intelligence_Item));// * 2.5f);
Attributes[GameAttribute.Vitality] = 5f + (Attributes[GameAttribute.Level] * 2) + (GetItemBonus(GameAttribute.Vitality_Item));// * 2.5f);
Attributes[GameAttribute.Strength] = 5f + (Attributes[GameAttribute.Level] * (this is Templar ? 3 : 1)) + (GetItemBonus(GameAttribute.Strength_Item));// * 2.5f);
Attributes[GameAttribute.Dexterity] = 5f + (Attributes[GameAttribute.Level] * (this is Scoundrel ? 3 : 1)) + (GetItemBonus(GameAttribute.Dexterity_Item));// * 2.5f);
Attributes[GameAttribute.Intelligence] = 5f + (Attributes[GameAttribute.Level] * (this is Enchantress ? 3 : 1)) + (GetItemBonus(GameAttribute.Intelligence_Item));// * 2.5f);
this.Attributes[GameAttribute.Attacks_Per_Second_Item] = this.GetItemBonus(GameAttribute.Attacks_Per_Second_Item);
Attributes[GameAttribute.Attacks_Per_Second_Item] = GetItemBonus(GameAttribute.Attacks_Per_Second_Item);
//*
this.Attributes[GameAttribute.Crit_Percent_Bonus_Capped] = this.GetItemBonus(GameAttribute.Crit_Percent_Bonus_Capped);
this.Attributes[GameAttribute.Weapon_Crit_Chance] = this.GetItemBonus(GameAttribute.Weapon_Crit_Chance);
this.Attributes[GameAttribute.Crit_Damage_Percent] = 0.5f + this.GetItemBonus(GameAttribute.Crit_Damage_Percent);
this.Attributes[GameAttribute.Crit_Percent_Bonus_Uncapped] = this.GetItemBonus(GameAttribute.Crit_Percent_Bonus_Uncapped);
Attributes[GameAttribute.Crit_Percent_Bonus_Capped] = GetItemBonus(GameAttribute.Crit_Percent_Bonus_Capped);
Attributes[GameAttribute.Weapon_Crit_Chance] = GetItemBonus(GameAttribute.Weapon_Crit_Chance);
Attributes[GameAttribute.Crit_Damage_Percent] = 0.5f + GetItemBonus(GameAttribute.Crit_Damage_Percent);
Attributes[GameAttribute.Crit_Percent_Bonus_Uncapped] = GetItemBonus(GameAttribute.Crit_Percent_Bonus_Uncapped);
this.Attributes[GameAttribute.Armor_Item] = this.GetItemBonus(GameAttribute.Armor_Item);
Attributes[GameAttribute.Armor_Item] = GetItemBonus(GameAttribute.Armor_Item);
//*
for (int i = 0; i < 7; i++)
{
this.Attributes[GameAttribute.Damage_Weapon_Min, i] = Math.Max(this.GetItemBonus(GameAttribute.Damage_Weapon_Min, i), 2f) + this.GetItemBonus(GameAttribute.Damage_Min, i);
this.Attributes[GameAttribute.Damage_Weapon_Delta, i] = Math.Max(this.GetItemBonus(GameAttribute.Damage_Weapon_Delta_Total, i), 2f) + this.GetItemBonus(GameAttribute.Damage_Delta, i);
this.Attributes[GameAttribute.Damage_Weapon_Bonus_Min, i] = this.GetItemBonus(GameAttribute.Damage_Weapon_Bonus_Min, i);
this.Attributes[GameAttribute.Damage_Weapon_Bonus_Delta, i] = this.GetItemBonus(GameAttribute.Damage_Weapon_Bonus_Delta, i);
this.Attributes[GameAttribute.Resistance, i] = this.GetItemBonus(GameAttribute.Resistance, i);
Attributes[GameAttribute.Damage_Weapon_Min, i] = Math.Max(GetItemBonus(GameAttribute.Damage_Weapon_Min, i), 2f) + GetItemBonus(GameAttribute.Damage_Min, i);
Attributes[GameAttribute.Damage_Weapon_Delta, i] = Math.Max(GetItemBonus(GameAttribute.Damage_Weapon_Delta_Total, i), 2f) + GetItemBonus(GameAttribute.Damage_Delta, i);
Attributes[GameAttribute.Damage_Weapon_Bonus_Min, i] = GetItemBonus(GameAttribute.Damage_Weapon_Bonus_Min, i);
Attributes[GameAttribute.Damage_Weapon_Bonus_Delta, i] = GetItemBonus(GameAttribute.Damage_Weapon_Bonus_Delta, i);
Attributes[GameAttribute.Resistance, i] = GetItemBonus(GameAttribute.Resistance, i);
}
//*/
this.Attributes[GameAttribute.Resistance_All] = this.GetItemBonus(GameAttribute.Resistance_All);
this.Attributes[GameAttribute.Resistance_Percent_All] = this.GetItemBonus(GameAttribute.Resistance_Percent_All);
this.Attributes[GameAttribute.Damage_Percent_Reduction_From_Melee] = this.GetItemBonus(GameAttribute.Damage_Percent_Reduction_From_Melee);
this.Attributes[GameAttribute.Damage_Percent_Reduction_From_Ranged] = this.GetItemBonus(GameAttribute.Damage_Percent_Reduction_From_Ranged);
Attributes[GameAttribute.Resistance_All] = GetItemBonus(GameAttribute.Resistance_All);
Attributes[GameAttribute.Resistance_Percent_All] = GetItemBonus(GameAttribute.Resistance_Percent_All);
Attributes[GameAttribute.Damage_Percent_Reduction_From_Melee] = GetItemBonus(GameAttribute.Damage_Percent_Reduction_From_Melee);
Attributes[GameAttribute.Damage_Percent_Reduction_From_Ranged] = GetItemBonus(GameAttribute.Damage_Percent_Reduction_From_Ranged);
this.Attributes[GameAttribute.Thorns_Fixed] = this.GetItemBonus(GameAttribute.Thorns_Fixed, 0);
Attributes[GameAttribute.Thorns_Fixed] = GetItemBonus(GameAttribute.Thorns_Fixed, 0);
this.Attributes[GameAttribute.Steal_Health_Percent] = this.GetItemBonus(GameAttribute.Steal_Health_Percent);
this.Attributes[GameAttribute.Hitpoints_On_Hit] = this.GetItemBonus(GameAttribute.Hitpoints_On_Hit);
this.Attributes[GameAttribute.Hitpoints_On_Kill] = this.GetItemBonus(GameAttribute.Hitpoints_On_Kill);
Attributes[GameAttribute.Steal_Health_Percent] = GetItemBonus(GameAttribute.Steal_Health_Percent);
Attributes[GameAttribute.Hitpoints_On_Hit] = GetItemBonus(GameAttribute.Hitpoints_On_Hit);
Attributes[GameAttribute.Hitpoints_On_Kill] = GetItemBonus(GameAttribute.Hitpoints_On_Kill);
this.Attributes[GameAttribute.Magic_Find] = this.GetItemBonus(GameAttribute.Magic_Find);
this.Attributes[GameAttribute.Gold_Find] = this.GetItemBonus(GameAttribute.Gold_Find);
Attributes[GameAttribute.Magic_Find] = GetItemBonus(GameAttribute.Magic_Find);
Attributes[GameAttribute.Gold_Find] = GetItemBonus(GameAttribute.Gold_Find);
this.Attributes[GameAttribute.Dodge_Chance_Bonus] = this.GetItemBonus(GameAttribute.Dodge_Chance_Bonus);
Attributes[GameAttribute.Dodge_Chance_Bonus] = GetItemBonus(GameAttribute.Dodge_Chance_Bonus);
this.Attributes[GameAttribute.Block_Amount_Item_Min] = this.GetItemBonus(GameAttribute.Block_Amount_Item_Min);
this.Attributes[GameAttribute.Block_Amount_Item_Delta] = this.GetItemBonus(GameAttribute.Block_Amount_Item_Delta);
this.Attributes[GameAttribute.Block_Amount_Bonus_Percent] = this.GetItemBonus(GameAttribute.Block_Amount_Bonus_Percent);
this.Attributes[GameAttribute.Block_Chance] = this.GetItemBonus(GameAttribute.Block_Chance_Item_Total);
Attributes[GameAttribute.Block_Amount_Item_Min] = GetItemBonus(GameAttribute.Block_Amount_Item_Min);
Attributes[GameAttribute.Block_Amount_Item_Delta] = GetItemBonus(GameAttribute.Block_Amount_Item_Delta);
Attributes[GameAttribute.Block_Amount_Bonus_Percent] = GetItemBonus(GameAttribute.Block_Amount_Bonus_Percent);
Attributes[GameAttribute.Block_Chance] = GetItemBonus(GameAttribute.Block_Chance_Item_Total);
//*/
this.Attributes[GameAttribute.Hitpoints_Max_Percent_Bonus_Item] = this.GetItemBonus(GameAttribute.Hitpoints_Max_Percent_Bonus_Item);
this.Attributes[GameAttribute.Hitpoints_Max_Bonus] = this.GetItemBonus(GameAttribute.Hitpoints_Max_Bonus);
this.Attributes[GameAttribute.Hitpoints_Factor_Vitality] = 10f + Math.Max(this.Attributes[GameAttribute.Level] - 35, 0);
this.Attributes[GameAttribute.Hitpoints_Regen_Per_Second] = this.GetItemBonus(GameAttribute.Hitpoints_Regen_Per_Second) + 10f + (10f * this.Attributes[GameAttribute.Level]);
Attributes[GameAttribute.Hitpoints_Max_Percent_Bonus_Item] = GetItemBonus(GameAttribute.Hitpoints_Max_Percent_Bonus_Item);
Attributes[GameAttribute.Hitpoints_Max_Bonus] = GetItemBonus(GameAttribute.Hitpoints_Max_Bonus);
Attributes[GameAttribute.Hitpoints_Factor_Vitality] = 10f + Math.Max(Attributes[GameAttribute.Level] - 35, 0);
Attributes[GameAttribute.Hitpoints_Regen_Per_Second] = GetItemBonus(GameAttribute.Hitpoints_Regen_Per_Second) + 10f + (10f * Attributes[GameAttribute.Level]);
this.Attributes[GameAttribute.Core_Attributes_From_Item_Bonus_Multiplier] = 1;
this.Attributes[GameAttribute.Hitpoints_Max_Percent_Bonus_Multiplicative] = 1;
this.Attributes[GameAttribute.Hitpoints_Max] = 276f; //+ (this.Attributes[GameAttribute.Vitality] * (10f + Math.Max(this.Attributes[GameAttribute.Level] - 35, 0)));
this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.Core_Attributes_From_Item_Bonus_Multiplier] = 1;
Attributes[GameAttribute.Hitpoints_Max_Percent_Bonus_Multiplicative] = 1;
Attributes[GameAttribute.Hitpoints_Max] = 276f; //+ (this.Attributes[GameAttribute.Vitality] * (10f + Math.Max(this.Attributes[GameAttribute.Level] - 35, 0)));
Attributes[GameAttribute.Hitpoints_Cur] = Attributes[GameAttribute.Hitpoints_Max_Total];
/**/
}
catch { }
this.Attributes.BroadcastChangedIfRevealed();
Attributes.BroadcastChangedIfRevealed();
/**/
}
@ -235,13 +235,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
if (hirelingSNO == ActorSno.__NONE)
return;
if (this.World.Game.Players.Count > 1) return;
if (World.Game.Players.Count > 1) return;
if (IsHireling || IsProxy)
return; // This really shouldn't happen.. /fasbat
this.Unreveal(player);
var hireling = CreateHireling(this.World, hirelingSNO, this.Tags);
Unreveal(player);
var hireling = CreateHireling(World, hirelingSNO, Tags);
hireling.SetUpAttributes(player);
hireling.GBHandle.Type = 4;
hireling.GBHandle.GBID = hirelingGBID;
@ -252,11 +252,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
hireling.Attributes[GameAttribute.Untargetable] = false;
hireling.Attributes[GameAttribute.NPC_Is_Escorting] = true;
hireling.RotationW = this.RotationW;
hireling.RotationAxis = this.RotationAxis;
hireling.RotationW = RotationW;
hireling.RotationAxis = RotationAxis;
//hireling.Brain.DeActivate();
hireling.EnterWorld(this.Position);
hireling.EnterWorld(Position);
hireling.Brain = new HirelingBrain(hireling, player);
//(hireling.Brain as HirelingBrain).Activate();
player.ActiveHireling = hireling;
@ -281,10 +281,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
if (IsHireling || IsProxy)
return;
if (player.ActiveHireling.Attributes[GameAttribute.Hireling_Class] == this.Attributes[GameAttribute.Hireling_Class])
if (player.ActiveHireling.Attributes[GameAttribute.Hireling_Class] == Attributes[GameAttribute.Hireling_Class])
return;
var hireling = CreateHireling(this.World, proxySNO, this.Tags);
var hireling = CreateHireling(World, proxySNO, Tags);
hireling.SetUpAttributes(player);
hireling.GBHandle.Type = 4;
hireling.GBHandle.GBID = hirelingGBID;
@ -297,48 +297,48 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
hireling.Attributes[GameAttribute.Pet_Type] = 1;
hireling.Attributes[GameAttribute.Pet_Owner] = player.PlayerIndex + 1;
hireling.RotationW = this.RotationW;
hireling.RotationAxis = this.RotationAxis;
hireling.RotationW = RotationW;
hireling.RotationAxis = RotationAxis;
hireling.EnterWorld(this.Position);
hireling.EnterWorld(Position);
}
public void Dismiss()
{
this.Destroy();
Destroy();
}
public void Update(int tickCounter)
{
if (this.Brain == null)
if (Brain == null)
return;
if (!this.Dead)
this.Brain.Update(tickCounter);
if (!Dead)
Brain.Update(tickCounter);
if (this.World.Game.TickCounter % 30 == 0 && !this.Dead)
if (World.Game.TickCounter % 30 == 0 && !Dead)
{
float tickSeconds = 1f / 60f * (this.World.Game.TickCounter - _lastResourceUpdateTick);
_lastResourceUpdateTick = this.World.Game.TickCounter;
float quantity = tickSeconds * this.Attributes[GameAttribute.Hitpoints_Regen_Per_Second];
float tickSeconds = 1f / 60f * (World.Game.TickCounter - _lastResourceUpdateTick);
_lastResourceUpdateTick = World.Game.TickCounter;
float quantity = tickSeconds * Attributes[GameAttribute.Hitpoints_Regen_Per_Second];
this.AddHP(quantity);
AddHP(quantity);
}
}
public override void AddHP(float quantity, bool GuidingLight = false)
{
if (this.Dead) return;
if (Dead) return;
if (quantity == 0) return;
if (quantity > 0)
{
if (this.Attributes[GameAttribute.Hitpoints_Cur] < this.Attributes[GameAttribute.Hitpoints_Max_Total])
if (Attributes[GameAttribute.Hitpoints_Cur] < Attributes[GameAttribute.Hitpoints_Max_Total])
{
this.Attributes[GameAttribute.Hitpoints_Cur] = Math.Min(
this.Attributes[GameAttribute.Hitpoints_Cur] + quantity,
this.Attributes[GameAttribute.Hitpoints_Max_Total]);
Attributes[GameAttribute.Hitpoints_Cur] = Math.Min(
Attributes[GameAttribute.Hitpoints_Cur] + quantity,
Attributes[GameAttribute.Hitpoints_Max_Total]);
this.Attributes.BroadcastChangedIfRevealed();
Attributes.BroadcastChangedIfRevealed();
}
}
}
@ -347,7 +347,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
{
return new VisualInventoryMessage()
{
ActorID = this.DynamicID(player),
ActorID = DynamicID(player),
EquipmentList = new VisualEquipment()
{
Equipment = new VisualItem[]
@ -415,13 +415,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
public override bool Reveal(Player player)
{
if (this.World.Game.PvP)
if (World.Game.PvP)
return false;
if (this.World.Game.Players.Count > 1)
if (World.Game.Players.Count > 1)
return false;
if (!IsHireling && ((player.ActiveHireling != null && this.Attributes[GameAttribute.Hireling_Class] == player.ActiveHireling.Attributes[GameAttribute.Hireling_Class])))// || (player.HirelingId != null && this.Attributes[GameAttribute.Hireling_Class] == player.HirelingId)))
if (!IsHireling && ((player.ActiveHireling != null && Attributes[GameAttribute.Hireling_Class] == player.ActiveHireling.Attributes[GameAttribute.Hireling_Class])))// || (player.HirelingId != null && this.Attributes[GameAttribute.Hireling_Class] == player.HirelingId)))
return false;
if (owner == null)
@ -434,21 +434,21 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
if (!_equipment.ContainsKey(player))
{
this.LoadInventory(player);
LoadInventory(player);
}
foreach (var item in this._equipment[player].Values)
foreach (var item in _equipment[player].Values)
item.Reveal(player);
player.InGameClient.SendMessage(GetVisualEquipment(player));
if (this.IsHireling && owner != null && owner == player)
if (IsHireling && owner != null && owner == player)
player.InGameClient.SendMessage(new PetMessage() //70-77
{
Owner = player.PlayerIndex,
Index = 10,
PetId = this.DynamicID(player),
Type = this.SNO == ActorSno._x1_malthael_npc ? 29 : 0,
PetId = DynamicID(player),
Type = SNO == ActorSno._x1_malthael_npc ? 29 : 0,
});
return true;
@ -459,49 +459,49 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
if (!base.Unreveal(player))
return false;
foreach (var item in this._equipment[player].Values)
foreach (var item in _equipment[player].Values)
item.Unreveal(player);
return true;
}
public void LoadInventory(Player player)
{
this._equipment.Add(player, new Dictionary<int, Item>());
var inventory_list = this.World.Game.GameDBSession.SessionQueryWhere<DBInventory>(dbi => dbi.DBToon.Id == player.Toon.PersistentID && dbi.HirelingId != 0 && dbi.HirelingId == this.Attributes[GameAttribute.Hireling_Class]);
_equipment.Add(player, new Dictionary<int, Item>());
var inventory_list = World.Game.GameDBSession.SessionQueryWhere<DBInventory>(dbi => dbi.DBToon.Id == player.Toon.PersistentID && dbi.HirelingId != 0 && dbi.HirelingId == Attributes[GameAttribute.Hireling_Class]);
foreach (var inv_item in inventory_list)
{
Item item = ItemGenerator.LoadFromDB(player, inv_item);
item.Owner = this;
item.Attributes[GameAttribute.Item_Equipped] = true;
item.SetInventoryLocation(inv_item.EquipmentSlot, 0, 0);
if (!this._equipment[player].ContainsKey(inv_item.EquipmentSlot))
this._equipment[player].Add(inv_item.EquipmentSlot, item);
if (!_equipment[player].ContainsKey(inv_item.EquipmentSlot))
_equipment[player].Add(inv_item.EquipmentSlot, item);
//Logger.Info("Item {0} added to hireling equipment", inv_item.GbId);
}
this.UpdateAttributes();
UpdateAttributes();
}
public void EquipItem(Player owner, int slot, Item item)
{
if (item.DBInventory == null) return;
if (this._equipment[owner].ContainsKey(slot))
this.UnequipItem(owner, slot, item);
if (_equipment[owner].ContainsKey(slot))
UnequipItem(owner, slot, item);
item.Owner = this;
item.SetInventoryLocation(slot, 0, 0);
item.DBInventory.HirelingId = this.Attributes[GameAttribute.Hireling_Class];
item.DBInventory.HirelingId = Attributes[GameAttribute.Hireling_Class];
item.DBInventory.EquipmentSlot = slot;
item.DBInventory.LocationX = 0;
item.DBInventory.LocationY = 0;
this.World.Game.GameDBSession.SessionUpdate(item.DBInventory);
World.Game.GameDBSession.SessionUpdate(item.DBInventory);
item.Attributes[GameAttribute.Item_Equipped] = true;
this._equipment[owner].Add(slot, item);
this.RefreshEquipment(owner);
this.UpdateAttributes();
_equipment[owner].Add(slot, item);
RefreshEquipment(owner);
UpdateAttributes();
if (this._equipment[owner].Count >= 6)
if (_equipment[owner].Count >= 6)
owner.GrantAchievement(74987243307149);
}
@ -509,39 +509,39 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
{
if (item.DBInventory == null) return;
if (!this._equipment[owner].ContainsKey(slot)) return;
if (!_equipment[owner].ContainsKey(slot)) return;
item.Owner = owner;
this._equipment[owner].Remove(slot);
this.World.Game.GameDBSession.SessionDelete(item.DBInventory);
_equipment[owner].Remove(slot);
World.Game.GameDBSession.SessionDelete(item.DBInventory);
owner.Inventory.PickUp(item);
item.Unreveal(owner);
item.Attributes[GameAttribute.Item_Equipped] = false;
item.Reveal(owner);
this.RefreshEquipment(owner);
this.UpdateAttributes();
RefreshEquipment(owner);
UpdateAttributes();
}
public void UnequipItemFromSlot(Player owner, int slot)
{
if (!this._equipment[owner].ContainsKey(slot)) return;
var item = this._equipment[owner][slot];
this.UnequipItem(owner, slot, item);
if (!_equipment[owner].ContainsKey(slot)) return;
var item = _equipment[owner][slot];
UnequipItem(owner, slot, item);
}
public Item GetItemByDynId(Player player, uint DynamicId)
{
if (this._equipment[player].Values.Where(it => it.IsRevealedToPlayer(player) && it.DynamicID(player) == DynamicId).Count() > 0)
return this._equipment[player].Values.Single(it => it.IsRevealedToPlayer(player) && it.DynamicID(player) == DynamicId);
if (_equipment[player].Values.Where(it => it.IsRevealedToPlayer(player) && it.DynamicID(player) == DynamicId).Count() > 0)
return _equipment[player].Values.Single(it => it.IsRevealedToPlayer(player) && it.DynamicID(player) == DynamicId);
else
return null;
}
public void RefreshEquipment(Player player)
{
foreach (var item in this._equipment[player].Values)
foreach (var item in _equipment[player].Values)
item.Unreveal(player);
foreach (var item in this._equipment[player].Values)
foreach (var item in _equipment[player].Values)
item.Reveal(player);
player.InGameClient.SendMessage(GetVisualEquipment(player));
@ -551,12 +551,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
public List<Item> GetEquippedItems(Player player)
{
return this._equipment[player].Values.ToList();
return _equipment[player].Values.ToList();
}
public float GetItemBonus(GameAttributeF attributeF)
{
var stats = this.GetEquippedItems(this.owner).Where(item => item.Attributes[GameAttribute.Durability_Cur] > 0 || item.Attributes[GameAttribute.Durability_Max] == 0);
var stats = GetEquippedItems(owner).Where(item => item.Attributes[GameAttribute.Durability_Cur] > 0 || item.Attributes[GameAttribute.Durability_Max] == 0);
if (attributeF == GameAttribute.Attacks_Per_Second_Item)
return stats.Count() > 0 ? stats.Select(item => item.Attributes[attributeF]).Where(a => a > 0f).Aggregate(1f, (x, y) => x * y) : 0f;
@ -566,22 +566,22 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
public int GetItemBonus(GameAttributeI attributeI)
{
return this.GetEquippedItems(this.owner).Where(item => item.Attributes[GameAttribute.Durability_Cur] > 0 || item.Attributes[GameAttribute.Durability_Max] == 0).Sum(item => item.Attributes[attributeI]);
return GetEquippedItems(owner).Where(item => item.Attributes[GameAttribute.Durability_Cur] > 0 || item.Attributes[GameAttribute.Durability_Max] == 0).Sum(item => item.Attributes[attributeI]);
}
public bool GetItemBonus(GameAttributeB attributeB)
{
return this.GetEquippedItems(this.owner).Where(item => item.Attributes[attributeB] == true).Count() > 0;
return GetEquippedItems(owner).Where(item => item.Attributes[attributeB] == true).Count() > 0;
}
public float GetItemBonus(GameAttributeF attributeF, int attributeKey)
{
return this.GetEquippedItems(this.owner).Where(item => item.Attributes[GameAttribute.Durability_Cur] > 0 || item.Attributes[GameAttribute.Durability_Max] == 0).Sum(item => item.Attributes[attributeF, attributeKey]);
return GetEquippedItems(owner).Where(item => item.Attributes[GameAttribute.Durability_Cur] > 0 || item.Attributes[GameAttribute.Durability_Max] == 0).Sum(item => item.Attributes[attributeF, attributeKey]);
}
public int GetItemBonus(GameAttributeI attributeI, int attributeKey)
{
return this.GetEquippedItems(this.owner).Where(item => item.Attributes[GameAttribute.Durability_Cur] > 0 || item.Attributes[GameAttribute.Durability_Max] == 0).Sum(item => item.Attributes[attributeI, attributeKey]);
return GetEquippedItems(owner).Where(item => item.Attributes[GameAttribute.Durability_Cur] > 0 || item.Attributes[GameAttribute.Durability_Max] == 0).Sum(item => item.Attributes[attributeI, attributeKey]);
}
#endregion
}

View File

@ -35,19 +35,19 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
skillKit = 0x8AFE;
hirelingGBID = StringHashHelper.HashItemName("Scoundrel");
Attributes[GameAttribute.Hireling_Class] = 4;
var MS = this.Attributes[GameAttribute.Movement_Scalar];
var RS = this.Attributes[GameAttribute.Run_Speed_Granted];
var MSRP = this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent];
this.Attributes[GameAttribute.Movement_Scalar] = 3f;
this.Attributes[GameAttribute.Run_Speed_Granted] = 3f;
var MS = Attributes[GameAttribute.Movement_Scalar];
var RS = Attributes[GameAttribute.Run_Speed_Granted];
var MSRP = Attributes[GameAttribute.Movement_Scalar_Reduction_Percent];
Attributes[GameAttribute.Movement_Scalar] = 3f;
Attributes[GameAttribute.Run_Speed_Granted] = 3f;
//this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.3f; Attributes[GameAttribute.Hitpoints_Max] = 9999f;
var HPM = this.Attributes[GameAttribute.Hitpoints_Max];
var HPMT = this.Attributes[GameAttribute.Hitpoints_Max_Total];
WalkSpeed = 0.3f; Attributes[GameAttribute.Hitpoints_Max] = 9999f;
var HPM = Attributes[GameAttribute.Hitpoints_Max];
var HPMT = Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.Hitpoints_Max_Percent_Bonus_Multiplicative] = 1;
Attributes[GameAttribute.Hitpoints_Max] = this.Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.Hitpoints_Max] = Attributes[GameAttribute.Hitpoints_Max_Total];
}
@ -63,7 +63,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
player.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Inventory.VisualInventoryMessage()
{
ActorID = this.DynamicID(player),
ActorID = DynamicID(player),
EquipmentList = new MessageSystem.Message.Fields.VisualEquipment()
{
Equipment = new MessageSystem.Message.Fields.VisualItem[]

View File

@ -25,9 +25,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
proxySNO = ActorSno._hireling_templar_proxy;
skillKit = 484941;
hirelingGBID = StringHashHelper.HashItemName("Templar");
this.Attributes[GameAttribute.Hireling_Class] = 0;
this.Attributes[GameAttribute.TeamID] = 2;
this.Attributes[GameAttribute.Team_Override] = 2;
Attributes[GameAttribute.Hireling_Class] = 0;
Attributes[GameAttribute.TeamID] = 2;
Attributes[GameAttribute.Team_Override] = 2;
}
public override Hireling CreateHireling(MapSystem.World world, ActorSno sno, TagMap tags)
@ -43,9 +43,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 102057:
case 101969:
player.HirelingInfo[3].Skill1SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 102057 ? 101969 : 102057)] = 0;
this.Attributes.BroadcastChangedIfRevealed();
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 102057 ? 101969 : 102057)] = 0;
Attributes.BroadcastChangedIfRevealed();
dbhireling.Skill1SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -53,9 +53,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 102133:
case 101461:
player.HirelingInfo[3].Skill2SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 102133 ? 101461 : 102133)] = 0;
this.Attributes.BroadcastChangedIfRevealed();
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 102133 ? 101461 : 102133)] = 0;
Attributes.BroadcastChangedIfRevealed();
dbhireling.Skill2SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -63,9 +63,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 101990:
case 220872:
player.HirelingInfo[3].Skill3SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 101990 ? 220872 : 101990)] = 0;
this.Attributes.BroadcastChangedIfRevealed();
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 101990 ? 220872 : 101990)] = 0;
Attributes.BroadcastChangedIfRevealed();
dbhireling.Skill3SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -73,9 +73,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 101425:
case 201524:
player.HirelingInfo[3].Skill4SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 101425 ? 201524 : 101425)] = 0;
this.Attributes.BroadcastChangedIfRevealed();
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 101425 ? 201524 : 101425)] = 0;
Attributes.BroadcastChangedIfRevealed();
dbhireling.Skill4SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -99,15 +99,15 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
player.HirelingInfo[3].Skill3SNOId = -1;
player.HirelingInfo[3].Skill4SNOId = -1;
this.Attributes[GameAttribute.Skill, 102057] = 0;
this.Attributes[GameAttribute.Skill, 101969] = 0;
this.Attributes[GameAttribute.Skill, 102133] = 0;
this.Attributes[GameAttribute.Skill, 101461] = 0;
this.Attributes[GameAttribute.Skill, 101990] = 0;
this.Attributes[GameAttribute.Skill, 220872] = 0;
this.Attributes[GameAttribute.Skill, 101425] = 0;
this.Attributes[GameAttribute.Skill, 201524] = 0;
this.Attributes.SendChangedMessage(player.InGameClient);
Attributes[GameAttribute.Skill, 102057] = 0;
Attributes[GameAttribute.Skill, 101969] = 0;
Attributes[GameAttribute.Skill, 102133] = 0;
Attributes[GameAttribute.Skill, 101461] = 0;
Attributes[GameAttribute.Skill, 101990] = 0;
Attributes[GameAttribute.Skill, 220872] = 0;
Attributes[GameAttribute.Skill, 101425] = 0;
Attributes[GameAttribute.Skill, 201524] = 0;
Attributes.SendChangedMessage(player.InGameClient);
}
public override bool Reveal(Player player)

View File

@ -41,9 +41,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 95675:
case 30460:
player.HirelingInfo[2].Skill1SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 95675 ? 30460 : 95675)] = 0;
this.Attributes.SendChangedMessage(player.InGameClient);
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 95675 ? 30460 : 95675)] = 0;
Attributes.SendChangedMessage(player.InGameClient);
dbhireling.Skill1SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -51,9 +51,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 97436:
case 30464:
player.HirelingInfo[2].Skill2SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 97436 ? 30464 : 97436)] = 0;
this.Attributes.SendChangedMessage(player.InGameClient);
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 97436 ? 30464 : 97436)] = 0;
Attributes.SendChangedMessage(player.InGameClient);
dbhireling.Skill2SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -61,9 +61,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 95690:
case 30458:
player.HirelingInfo[2].Skill3SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 95690 ? 30458 : 95690)] = 0;
this.Attributes.SendChangedMessage(player.InGameClient);
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 95690 ? 30458 : 95690)] = 0;
Attributes.SendChangedMessage(player.InGameClient);
dbhireling.Skill3SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -71,9 +71,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 200169:
case 30454:
player.HirelingInfo[2].Skill4SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 200169 ? 30454 : 200169)] = 0;
this.Attributes.SendChangedMessage(player.InGameClient);
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 200169 ? 30454 : 200169)] = 0;
Attributes.SendChangedMessage(player.InGameClient);
dbhireling.Skill4SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -97,15 +97,15 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
player.HirelingInfo[2].Skill3SNOId = -1;
player.HirelingInfo[2].Skill4SNOId = -1;
this.Attributes[GameAttribute.Skill, 95675] = 0;
this.Attributes[GameAttribute.Skill, 30460] = 0;
this.Attributes[GameAttribute.Skill, 97436] = 0;
this.Attributes[GameAttribute.Skill, 30464] = 0;
this.Attributes[GameAttribute.Skill, 95690] = 0;
this.Attributes[GameAttribute.Skill, 30458] = 0;
this.Attributes[GameAttribute.Skill, 200169] = 0;
this.Attributes[GameAttribute.Skill, 30454] = 0;
this.Attributes.SendChangedMessage(player.InGameClient);
Attributes[GameAttribute.Skill, 95675] = 0;
Attributes[GameAttribute.Skill, 30460] = 0;
Attributes[GameAttribute.Skill, 97436] = 0;
Attributes[GameAttribute.Skill, 30464] = 0;
Attributes[GameAttribute.Skill, 95690] = 0;
Attributes[GameAttribute.Skill, 30458] = 0;
Attributes[GameAttribute.Skill, 200169] = 0;
Attributes[GameAttribute.Skill, 30454] = 0;
Attributes.SendChangedMessage(player.InGameClient);
}

View File

@ -25,7 +25,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
proxySNO = ActorSno._hireling_templar_proxy;
skillKit = 484941;
hirelingGBID = StringHashHelper.HashItemName("Templar");
this.Attributes[GameAttribute.Hireling_Class] = 1;
Attributes[GameAttribute.Hireling_Class] = 1;
}
public override Hireling CreateHireling(MapSystem.World world, ActorSno sno, TagMap tags)
@ -41,9 +41,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 1747:
case 93938:
player.HirelingInfo[1].Skill1SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 1747 ? 93938 : 1747)] = 0;
this.Attributes.SendChangedMessage(player.InGameClient);
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 1747 ? 93938 : 1747)] = 0;
Attributes.SendChangedMessage(player.InGameClient);
dbhireling.Skill1SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -51,9 +51,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 30357:
case 93901:
player.HirelingInfo[1].Skill2SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 30357 ? 93901 : 30357)] = 0;
this.Attributes.SendChangedMessage(player.InGameClient);
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 30357 ? 93901 : 30357)] = 0;
Attributes.SendChangedMessage(player.InGameClient);
dbhireling.Skill2SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -61,9 +61,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 30360:
case 93888:
player.HirelingInfo[1].Skill3SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 30360 ? 93888 : 30360)] = 0;
this.Attributes.SendChangedMessage(player.InGameClient);
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 30360 ? 93888 : 30360)] = 0;
Attributes.SendChangedMessage(player.InGameClient);
dbhireling.Skill3SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -71,9 +71,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
case 30356:
case 30359:
player.HirelingInfo[1].Skill4SNOId = SkillSNOId;
this.Attributes[GameAttribute.Skill, SkillSNOId] = 1;
this.Attributes[GameAttribute.Skill, (SkillSNOId == 30356 ? 30359 : 30356)] = 0;
this.Attributes.SendChangedMessage(player.InGameClient);
Attributes[GameAttribute.Skill, SkillSNOId] = 1;
Attributes[GameAttribute.Skill, (SkillSNOId == 30356 ? 30359 : 30356)] = 0;
Attributes.SendChangedMessage(player.InGameClient);
dbhireling.Skill4SNOId = SkillSNOId;
player.World.Game.GameDBSession.SessionUpdate(dbhireling);
@ -97,15 +97,15 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings
player.HirelingInfo[1].Skill3SNOId = -1;
player.HirelingInfo[1].Skill4SNOId = -1;
this.Attributes[GameAttribute.Skill, 1747] = 0;
this.Attributes[GameAttribute.Skill, 93938] = 0;
this.Attributes[GameAttribute.Skill, 30357] = 0;
this.Attributes[GameAttribute.Skill, 93901] = 0;
this.Attributes[GameAttribute.Skill, 30360] = 0;
this.Attributes[GameAttribute.Skill, 93888] = 0;
this.Attributes[GameAttribute.Skill, 30356] = 0;
this.Attributes[GameAttribute.Skill, 30359] = 0;
this.Attributes.SendChangedMessage(player.InGameClient);
Attributes[GameAttribute.Skill, 1747] = 0;
Attributes[GameAttribute.Skill, 93938] = 0;
Attributes[GameAttribute.Skill, 30357] = 0;
Attributes[GameAttribute.Skill, 93901] = 0;
Attributes[GameAttribute.Skill, 30360] = 0;
Attributes[GameAttribute.Skill, 93888] = 0;
Attributes[GameAttribute.Skill, 30356] = 0;
Attributes[GameAttribute.Skill, 30359] = 0;
Attributes.SendChangedMessage(player.InGameClient);
}

View File

@ -37,7 +37,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
var list = new List<ItemsSystem.Item>
{
ItemsSystem.ItemGenerator.CookFromDefinition(this.World, ItemsSystem.ItemGenerator.GetItemDefinition(DiIiS_NA.Core.Helpers.Hash.StringHashHelper.HashItemName("HealthPotionBottomless")), 1, false) //HealthPotionConsole
ItemsSystem.ItemGenerator.CookFromDefinition(World, ItemsSystem.ItemGenerator.GetItemDefinition(DiIiS_NA.Core.Helpers.Hash.StringHashHelper.HashItemName("HealthPotionBottomless")), 1, false) //HealthPotionConsole
};
return list;

View File

@ -43,12 +43,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
protected override List<ItemsSystem.Item> GetVendorItems()
{
return itemGbIds.Select(x => ItemsSystem.ItemGenerator.CookFromDefinition(this.World, ItemsSystem.ItemGenerator.GetItemDefinition(x), 1, false)).ToList();
return itemGbIds.Select(x => ItemsSystem.ItemGenerator.CookFromDefinition(World, ItemsSystem.ItemGenerator.GetItemDefinition(x), 1, false)).ToList();
}
public override bool Reveal(PlayerSystem.Player player)
{
if (this.World.Game.CurrentAct != 3000) return false;
if (World.Game.CurrentAct != 3000) return false;
return base.Reveal(player);
}

View File

@ -40,22 +40,22 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public LegendaryChest(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.NameSNO = ActorSno._caout_stingingwinds_chest;
this.Field7 = 1;
NameSNO = ActorSno._caout_stingingwinds_chest;
Field7 = 1;
}
public override bool Reveal(Player player)
{
if (!this.ChestActive) return false;
if (!ChestActive) return false;
return base.Reveal(player);
}
public override void OnTargeted(Player player, TargetMessage message)
{
if (this.Attributes[GameAttribute.Disabled]) return;
if (Attributes[GameAttribute.Disabled]) return;
int chance = this.World.Game.IsHardcore ? 99 : 25; //S4 special
int chance = World.Game.IsHardcore ? 99 : 25; //S4 special
/*
if (!player.Inventory.HasItem(-110888638) || (!this.World.Game.IsHardcore && !player.Inventory.HasGold(250000)))
{
@ -68,16 +68,16 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
//player.InGameClient.SendMessage(new BroadcastTextMessage() { Field0 = string.Format("Legendary Chest has been opened. 1 Chain Key {0}consumed.", (this.World.Game.IsHardcore ? "" : "and 250k gold ")) });
player.Inventory.GetBag().GrabSomeItems(-110888638, 1);
if (!this.World.Game.IsHardcore)
if (!World.Game.IsHardcore)
player.Inventory.RemoveGoldAmount(250000);
if (FastRandom.Instance.Next(100) < chance)
this.World.SpawnRandomEquip(player, player, LootManager.Epic, player.Level);
World.SpawnRandomEquip(player, player, LootManager.Epic, player.Level);
else
this.World.SpawnRandomEquip(player, player, LootManager.Rare, player.Level);
World.SpawnRandomEquip(player, player, LootManager.Rare, player.Level);
var toon = player.Toon.DBToon;
toon.ChestsOpened++;
this.World.Game.GameDBSession.SessionUpdate(toon);
World.Game.GameDBSession.SessionUpdate(toon);
}
base.OnTargeted(player, message);

View File

@ -38,19 +38,19 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public LootContainer(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
if (this.SNO == ActorSno._a3dunrmpt_interactives_signal_fire_a_prop) this.Attributes[GameAttribute.MinimapActive] = true;
if (SNO == ActorSno._a3dunrmpt_interactives_signal_fire_a_prop) Attributes[GameAttribute.MinimapActive] = true;
if (this.SNO.IsChest() || this.SNO.IsCorpse()) haveDrop = true;
if (SNO.IsChest() || SNO.IsCorpse()) haveDrop = true;
switch (sno)
{
case ActorSno._trout_highlands_chest_bloody: //bloody
this.Quality = 1;
Quality = 1;
break;
case ActorSno._trout_fields_chest_rare: //rare
case ActorSno._a2dun_zolt_chest_rare: //Zolt_rare
case ActorSno._x1_global_chest_startsclean: //event
this.Quality = 2;
Quality = 2;
break;
}
@ -59,18 +59,18 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public override bool Reveal(Player player)
{
if (this.SNO == ActorSno._a2dun_aqd_chest_special_facepuzzle_large && this.World.SNO != WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large) return false; //dakab chest
if (this.SNO == ActorSno._a2dun_aqd_chest_rare_facepuzzlesmall && this.World.SNO == WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large) return false; //not dakab chest
if (SNO == ActorSno._a2dun_aqd_chest_special_facepuzzle_large && World.SNO != WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large) return false; //dakab chest
if (SNO == ActorSno._a2dun_aqd_chest_rare_facepuzzlesmall && World.SNO == WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large) return false; //not dakab chest
if (!rewardChestAvailable) return false; //event reward chest
if (!base.Reveal(player))
return false;
if (this.Attributes[GameAttribute.Disabled])
if (Attributes[GameAttribute.Disabled])
{
player.InGameClient.SendMessage(new SetIdleAnimationMessage
{
ActorID = this.DynamicID(player),
ActorID = DynamicID(player),
AnimationSNO = AnimationSetKeys.Open.ID
});
}
@ -81,10 +81,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public override void OnTargeted(Player player, TargetMessage message)
{
if (this.SNO == ActorSno._p4_setdung_totem_cru_thorns)
if (SNO == ActorSno._p4_setdung_totem_cru_thorns)
return;
if (this.Attributes[GameAttribute.Disabled]) return;
if (Attributes[GameAttribute.Disabled]) return;
base.OnTargeted(player, message);
@ -93,56 +93,56 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
if (ActorData.TagMap.ContainsKey(ActorKeys.Lore))
Logger.Debug("Lore detected: {0}", ActorData.TagMap[ActorKeys.Lore].Id);
if (this.SNO == ActorSno._trout_highlands_manor_firewood) //Leor bone
if (SNO == ActorSno._trout_highlands_manor_firewood) //Leor bone
{
foreach (var plr in this.GetPlayersInRange(30))
this.World.SpawnItem(this, plr, -629520052);
foreach (var plr in GetPlayersInRange(30))
World.SpawnItem(this, plr, -629520052);
}
if (this.SNO == ActorSno._trout_newtristram_adria_blackmushroom) //Black Mushroom
if (SNO == ActorSno._trout_newtristram_adria_blackmushroom) //Black Mushroom
{
foreach (var plr in this.GetPlayersInRange(30))
this.World.SpawnItem(this, plr, -1993550104);
foreach (var plr in GetPlayersInRange(30))
World.SpawnItem(this, plr, -1993550104);
}
if (this.SNO == ActorSno._caout_oasis_chest_rare_mapvendorcave) //Rainbow Chest
if (SNO == ActorSno._caout_oasis_chest_rare_mapvendorcave) //Rainbow Chest
{
foreach (var plr in this.GetPlayersInRange(30))
this.World.SpawnItem(this, plr, 725082635);
foreach (var plr in GetPlayersInRange(30))
World.SpawnItem(this, plr, 725082635);
}
if (haveDrop)
{
var dropRates = this.World.Game.IsHardcore ? LootManager.GetSeasonalDropRates((int)this.Quality, Program.MaxLevel) : LootManager.GetDropRates((int)this.Quality, Program.MaxLevel);
var dropRates = World.Game.IsHardcore ? LootManager.GetSeasonalDropRates((int)Quality, Program.MaxLevel) : LootManager.GetDropRates((int)Quality, Program.MaxLevel);
foreach (var rate in dropRates)
foreach (var plr in this.GetPlayersInRange(30))
foreach (var plr in GetPlayersInRange(30))
{
float seed = (float)FastRandom.Instance.NextDouble();
if (seed < 0.8f)
this.World.SpawnGold(this, plr);
World.SpawnGold(this, plr);
if (seed < 0.6f)
this.World.SpawnGold(this, plr);
World.SpawnGold(this, plr);
if (seed < 0.5f)
this.World.SpawnRandomCraftItem(this, plr);
World.SpawnRandomCraftItem(this, plr);
if (seed < 0.2f)
this.World.SpawnRandomCraftItem(this, plr);
World.SpawnRandomCraftItem(this, plr);
if (seed < 0.07f)
this.World.SpawnRandomGem(this, plr);
World.SpawnRandomGem(this, plr);
if (seed < 0.04f)
this.World.SpawnRandomGem(this, plr);
World.SpawnRandomGem(this, plr);
if (seed < 0.10f)
this.World.SpawnRandomPotion(this, plr);
World.SpawnRandomPotion(this, plr);
if (seed < (rate * (1f + plr.Attributes[GameAttribute.Magic_Find])))
{
var lootQuality = this.World.Game.IsHardcore ? LootManager.GetSeasonalLootQuality((int)this.Quality, this.World.Game.Difficulty) : LootManager.GetLootQuality((int)this.Quality, this.World.Game.Difficulty);
this.World.SpawnRandomEquip(plr, plr, lootQuality);
var lootQuality = World.Game.IsHardcore ? LootManager.GetSeasonalLootQuality((int)Quality, World.Game.Difficulty) : LootManager.GetLootQuality((int)Quality, World.Game.Difficulty);
World.SpawnRandomEquip(plr, plr, lootQuality);
}
else
break;
}
}
if (GeneratorsSystem.LoreRegistry.Lore.ContainsKey(this.World.SNO) && GeneratorsSystem.LoreRegistry.Lore[this.World.SNO].chests_lore.ContainsKey(this.SNO))
foreach (var p in this.GetPlayersInRange(30))
foreach (int loreId in GeneratorsSystem.LoreRegistry.Lore[this.World.SNO].chests_lore[this.SNO])
if (GeneratorsSystem.LoreRegistry.Lore.ContainsKey(World.SNO) && GeneratorsSystem.LoreRegistry.Lore[World.SNO].chests_lore.ContainsKey(SNO))
foreach (var p in GetPlayersInRange(30))
foreach (int loreId in GeneratorsSystem.LoreRegistry.Lore[World.SNO].chests_lore[SNO])
if (!p.HasLore(loreId))
{
World.DropItem(this, null, ItemGenerator.CreateLore(p, loreId));
@ -151,7 +151,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
World.BroadcastIfRevealed(plr => new PlayAnimationMessage
{
ActorID = this.DynamicID(plr),
ActorID = DynamicID(plr),
AnimReason = 5,
UnitAniimStartTime = 0,
tAnim = new PlayAnimationMessageSpec[]
@ -170,28 +170,28 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
World.BroadcastIfRevealed(plr => new SetIdleAnimationMessage
{
ActorID = this.DynamicID(plr),
ActorID = DynamicID(plr),
AnimationSNO = AnimationSetKeys.Open.ID
}, this);
this.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true;
Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true;
//this.Attributes[GameAttribute.Gizmo_Operator_ACDID] = unchecked((int)player.DynamicID);
this.Attributes[GameAttribute.Chest_Open, 0xFFFFFF] = true;
Attributes[GameAttribute.Chest_Open, 0xFFFFFF] = true;
Attributes.BroadcastChangedIfRevealed();
this.Attributes[GameAttribute.Disabled] = true;
Attributes[GameAttribute.Disabled] = true;
if (this.SNO == ActorSno._trdun_cath_chandelier_trap_switch2)
if (SNO == ActorSno._trdun_cath_chandelier_trap_switch2)
{
var lamp = this.GetActorsInRange(50f).Where(x => x.SNO == ActorSno._trdun_cath_chandelier_trap || x.SNO == ActorSno._trdun_cath_braizer_trap).First();
var lamp = GetActorsInRange(50f).Where(x => x.SNO == ActorSno._trdun_cath_chandelier_trap || x.SNO == ActorSno._trdun_cath_braizer_trap).First();
if (lamp != null)
(lamp as CathedralLamp).Die();
}
if (this.SNO == ActorSno._a2dun_zolt_centerpiece_a)
if (SNO == ActorSno._a2dun_zolt_centerpiece_a)
{
if (this.World.SNO == WorldSno.a2dun_zolt_level01)
foreach (var plr in this.World.Game.Players.Values)
if (World.SNO == WorldSno.a2dun_zolt_level01)
foreach (var plr in World.Game.Players.Values)
plr.InGameClient.SendMessage(new QuestCounterMessage()
{
snoQuest = 57337,
@ -202,7 +202,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
Checked = 1,
});
else
foreach (var plr in this.World.Game.Players.Values)
foreach (var plr in World.Game.Players.Values)
plr.InGameClient.SendMessage(new QuestCounterMessage()
{
snoQuest = 57337,

View File

@ -41,7 +41,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public LootRunPortal(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Destination = new ResolvedPortalDestination
Destination = new ResolvedPortalDestination
{
WorldSNO = (int)WorldSno.x1_westm_graveyard_deathorb,
DestLevelAreaSNO = 338946,
@ -58,7 +58,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
MinimapIcon = ActorData.TagMap[ActorKeys.MinimapMarker].Id;
}
this.Field2 = 0x9;//16;
Field2 = 0x9;//16;
}
public override bool Reveal(Player player)
@ -79,43 +79,43 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public override void OnTargeted(Player player, TargetMessage message)
{
Logger.Debug("(OnTargeted) Portal has been activated, Id: {0}, LevelArea: {1}, World: {2}", (int)this.SNO, this.Destination.DestLevelAreaSNO, this.Destination.WorldSNO);
Logger.Debug("(OnTargeted) Portal has been activated, Id: {0}, LevelArea: {1}, World: {2}", (int)SNO, Destination.DestLevelAreaSNO, Destination.WorldSNO);
var world = this.World.Game.GetWorld((WorldSno)this.Destination.WorldSNO);
var world = World.Game.GetWorld((WorldSno)Destination.WorldSNO);
if (world == null)
{
Logger.Warn("Portal's destination world does not exist (WorldSNO = {0})", this.Destination.WorldSNO);
Logger.Warn("Portal's destination world does not exist (WorldSNO = {0})", Destination.WorldSNO);
return;
}
var startingPoint = world.GetStartingPointById(this.Destination.StartingPointActorTag);
var startingPoint = world.GetStartingPointById(Destination.StartingPointActorTag);
if (startingPoint != null)
{
if (this.SNO == ActorSno._a2dun_zolt_portal_timedevent) //a2 timed event
if (SNO == ActorSno._a2dun_zolt_portal_timedevent) //a2 timed event
{
if (!this.World.Game.QuestManager.SideQuests[120396].Completed)
player.ShowConfirmation(this.DynamicID(player), (() => {
if (!World.Game.QuestManager.SideQuests[120396].Completed)
player.ShowConfirmation(DynamicID(player), (() => {
player.ChangeWorld(world, startingPoint);
}));
}
else
{
if (world == this.World)
if (world == World)
player.Teleport(startingPoint.Position);
else
player.ChangeWorld(world, startingPoint);
}
if (this.World.Game.QuestProgress.QuestTriggers.ContainsKey(this.Destination.DestLevelAreaSNO)) //EnterLevelArea
if (World.Game.QuestProgress.QuestTriggers.ContainsKey(Destination.DestLevelAreaSNO)) //EnterLevelArea
{
var trigger = this.World.Game.QuestProgress.QuestTriggers[this.Destination.DestLevelAreaSNO];
var trigger = World.Game.QuestProgress.QuestTriggers[Destination.DestLevelAreaSNO];
if (trigger.triggerType == DiIiS_NA.Core.MPQ.FileFormats.QuestStepObjectiveType.EnterLevelArea)
{
try
{
trigger.questEvent.Execute(this.World); // launch a questEvent
trigger.questEvent.Execute(World); // launch a questEvent
}
catch (Exception e)
{
@ -123,14 +123,14 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
}
}
}
if (this.World.Game.SideQuestProgress.QuestTriggers.ContainsKey(this.Destination.DestLevelAreaSNO)) //EnterLevelArea
if (World.Game.SideQuestProgress.QuestTriggers.ContainsKey(Destination.DestLevelAreaSNO)) //EnterLevelArea
{
var trigger = this.World.Game.SideQuestProgress.QuestTriggers[this.Destination.DestLevelAreaSNO];
var trigger = World.Game.SideQuestProgress.QuestTriggers[Destination.DestLevelAreaSNO];
if (trigger.triggerType == DiIiS_NA.Core.MPQ.FileFormats.QuestStepObjectiveType.EnterLevelArea)
{
try
{
trigger.questEvent.Execute(this.World); // launch a questEvent
trigger.questEvent.Execute(World); // launch a questEvent
}
catch (Exception e)
{
@ -138,15 +138,15 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
}
}
}
if (this.World.Game.SideQuestProgress.GlobalQuestTriggers.ContainsKey(this.Destination.DestLevelAreaSNO)) //EnterLevelArea
if (World.Game.SideQuestProgress.GlobalQuestTriggers.ContainsKey(Destination.DestLevelAreaSNO)) //EnterLevelArea
{
var trigger = this.World.Game.SideQuestProgress.GlobalQuestTriggers[this.Destination.DestLevelAreaSNO];
var trigger = World.Game.SideQuestProgress.GlobalQuestTriggers[Destination.DestLevelAreaSNO];
if (trigger.triggerType == DiIiS_NA.Core.MPQ.FileFormats.QuestStepObjectiveType.EnterLevelArea)
{
try
{
trigger.questEvent.Execute(this.World); // launch a questEvent
this.World.Game.SideQuestProgress.GlobalQuestTriggers.Remove(this.Destination.DestLevelAreaSNO);
trigger.questEvent.Execute(World); // launch a questEvent
World.Game.SideQuestProgress.GlobalQuestTriggers.Remove(Destination.DestLevelAreaSNO);
}
catch (Exception e)
{
@ -154,11 +154,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
}
}
}
foreach (var bounty in this.World.Game.QuestManager.Bounties)
bounty.CheckLevelArea(this.Destination.DestLevelAreaSNO);
foreach (var bounty in World.Game.QuestManager.Bounties)
bounty.CheckLevelArea(Destination.DestLevelAreaSNO);
}
else
Logger.Warn("Portal's tagged starting point does not exist (Tag = {0})", this.Destination.StartingPointActorTag);
Logger.Warn("Portal's tagged starting point does not exist (Tag = {0})", Destination.StartingPointActorTag);
}
}
}

View File

@ -25,10 +25,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.2f; //they look cooler bigger :)
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
this.DamageCoefficient = context.ScriptFormula(11);
WalkSpeed *= 5;
DamageCoefficient = context.ScriptFormula(11);
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
(Brain as MinionBrain).AddPresetPower(30592); //Weapon_Instant
(Brain as MinionBrain).AddPresetPower(187092); //basic melee
(Brain as MinionBrain).AddPresetPower(168823); //cleave
@ -44,12 +44,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
Attributes[GameAttribute.Pet_Type] = 0x8;
//Pet_Owner and Pet_Creator seems to be 0
if (this.Master != null)
if (Master != null)
{
if (this.Master is Player)
if (Master is Player)
{
if ((this.Master as Player).Followers.Values.Count(a => a == SNO) > 1)
(this.Master as Player).DestroyFollower(SNO);
if ((Master as Player).Followers.Values.Count(a => a == SNO) > 1)
(Master as Player).DestroyFollower(SNO);
}
}

View File

@ -25,10 +25,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.2f; //they look cooler bigger :)
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
this.DamageCoefficient = context.ScriptFormula(11);
WalkSpeed *= 5;
DamageCoefficient = context.ScriptFormula(11);
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
(Brain as MinionBrain).AddPresetPower(30592); //Weapon_Instant
(Brain as MinionBrain).AddPresetPower(187092); //basic melee
(Brain as MinionBrain).AddPresetPower(168827); //Seismic Slam //Only Active with Rune_C
@ -44,12 +44,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
Attributes[GameAttribute.Pet_Type] = 0x8;
//Pet_Owner and Pet_Creator seems to be 0
if (this.Master != null)
if (Master != null)
{
if (this.Master is Player)
if (Master is Player)
{
if ((this.Master as Player).Followers.Values.Count(a => a == SNO) > 1)
(this.Master as Player).DestroyFollower(SNO);
if ((Master as Player).Followers.Values.Count(a => a == SNO) > 1)
(Master as Player).DestroyFollower(SNO);
}
}

View File

@ -25,10 +25,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.2f; //they look cooler bigger :)
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
this.DamageCoefficient = context.ScriptFormula(11);
WalkSpeed *= 5;
DamageCoefficient = context.ScriptFormula(11);
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
(Brain as MinionBrain).AddPresetPower(30592); //Weapon_Instant
(Brain as MinionBrain).AddPresetPower(187092); //basic melee
(Brain as MinionBrain).AddPresetPower(168825); //Leap //Only Active with Rune_E
@ -44,12 +44,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
Attributes[GameAttribute.Pet_Type] = 0x8;
//Pet_Owner and Pet_Creator seems to be 0
if (this.Master != null)
if (Master != null)
{
if (this.Master is Player)
if (Master is Player)
{
if ((this.Master as Player).Followers.Values.Count(a => a == SNO) > 1)
(this.Master as Player).DestroyFollower(SNO);
if ((Master as Player).Followers.Values.Count(a => a == SNO) > 1)
(Master as Player).DestroyFollower(SNO);
}
}

View File

@ -41,11 +41,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
if (context.User.Attributes[GameAttribute.Rune_B, 0x000592ff] > 0) Scale = 2f; //Boar
if (context.User.Attributes[GameAttribute.Rune_C, 0x000592ff] > 0) Scale = 2f; //Wolf
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
this.DamageCoefficient = context.ScriptFormula(0);
this.Attributes[GameAttribute.Invulnerable] = true;
this.Attributes[GameAttribute.Is_Helper] = true;
this.Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
WalkSpeed *= 5;
DamageCoefficient = context.ScriptFormula(0);
Attributes[GameAttribute.Invulnerable] = true;
Attributes[GameAttribute.Is_Helper] = true;
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
if (CompanionSNO == ActorSno._dh_companion_ferret)
SetBrain(new LooterBrain(this, false));
else

View File

@ -25,10 +25,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 0.7f; //they look cooler bigger :)
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
this.DamageCoefficient = context.ScriptFormula(16) * 2f;
WalkSpeed *= 5;
DamageCoefficient = context.ScriptFormula(16) * 2f;
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
(Brain as MinionBrain).AddPresetPower(30592); //melee_instant
//(Brain as MinionBrain).AddPresetPower(30005); //AINearby
if (context.Rune_C > 0)

View File

@ -29,10 +29,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 0.7f; //they look cooler bigger :)
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
this.DamageCoefficient = context.ScriptFormula(16) * 2f;
WalkSpeed *= 5;
DamageCoefficient = context.ScriptFormula(16) * 2f;
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
(Brain as MinionBrain).AddPresetPower(30592); //melee_instant
//(Brain as MinionBrain).AddPresetPower(30005); //AINearby
if (context.Rune_C > 0)
@ -49,16 +49,16 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
Attributes[GameAttribute.Pet_Type] = 0x8;
//Pet_Owner and Pet_Creator seems to be 0
if (this.Master != null)
if (Master != null)
{
if (this.Master is Player)
if (Master is Player)
{
var rem = new List<uint>();
foreach (var fol in (this.Master as Player).Followers)
if (fol.Value == SNO && fol.Key != this.GlobalID)
foreach (var fol in (Master as Player).Followers)
if (fol.Value == SNO && fol.Key != GlobalID)
rem.Add(fol.Key);
foreach (var rm in rem)
(this.Master as Player).DestroyFollowerById(rm);
(Master as Player).DestroyFollowerById(rm);
}
}

View File

@ -26,10 +26,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.2f; //they look cooler bigger :)
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
this.DamageCoefficient = context.ScriptFormula(14) * 2f;
WalkSpeed *= 5;
DamageCoefficient = context.ScriptFormula(14) * 2f;
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
(Brain as MinionBrain).AddPresetPower(119166); //fetisharmy_hunter.pow
//TODO: These values should most likely scale, but we don't know how yet, so just temporary values.
//Attributes[GameAttribute.Hitpoints_Max] = 20f;

View File

@ -26,10 +26,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.2f; //they look cooler bigger :)
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
this.DamageCoefficient = context.ScriptFormula(22) * 2f;
WalkSpeed *= 5;
DamageCoefficient = context.ScriptFormula(22) * 2f;
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
//TODO: These values should most likely scale, but we don't know how yet, so just temporary values.
//Attributes[GameAttribute.Hitpoints_Max] = 20f;
//Attributes[GameAttribute.Hitpoints_Cur] = 20f;

View File

@ -26,10 +26,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.2f; //they look cooler bigger :)
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
this.DamageCoefficient = context.ScriptFormula(11) * 2f;
WalkSpeed *= 5;
DamageCoefficient = context.ScriptFormula(11) * 2f;
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
(Brain as MinionBrain).AddPresetPower(118442); //fetisharmy_shaman.pow
//TODO: These values should most likely scale, but we don't know how yet, so just temporary values.
//Attributes[GameAttribute.Hitpoints_Max] = 20f;

View File

@ -25,10 +25,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1f;
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
this.DamageCoefficient = context.ScriptFormula(24) * 2f;
WalkSpeed *= 5;
DamageCoefficient = context.ScriptFormula(24) * 2f;
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
//(Brain as MinionBrain).AddPresetPower(30005);
//(Brain as MinionBrain).AddPresetPower(30001);
(Brain as MinionBrain).AddPresetPower(30592);
@ -53,16 +53,16 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
Attributes[GameAttribute.Pet_Type] = 0x8;
//Pet_Owner and Pet_Creator seems to be 0
if (this.Master != null)
if (Master != null)
{
if (this.Master is Player)
if (Master is Player)
{
var rem = new List<uint>();
foreach (var fol in (this.Master as Player).Followers)
if (fol.Value == SNO && fol.Key != this.GlobalID)
foreach (var fol in (Master as Player).Followers)
if (fol.Value == SNO && fol.Key != GlobalID)
rem.Add(fol.Key);
foreach (var rm in rem)
(this.Master as Player).DestroyFollowerById(rm);
(Master as Player).DestroyFollowerById(rm);
}
}
}

View File

@ -39,7 +39,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.35f;
//TODO: get a proper value for this.
this.WalkSpeed *= 3;
WalkSpeed *= 3;
SetBrain(new MinionBrain(this));
//TODO: These values should most likely scale, but we don't know how yet, so just temporary values.
Attributes[GameAttribute.Hitpoints_Max] = 3000f * (master as Player).Attributes[GameAttribute.Hitpoints_Max];
@ -59,7 +59,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.35f;
//TODO: get a proper value for this.
this.WalkSpeed *= 3;
WalkSpeed *= 3;
SetBrain(new MinionBrain(this));
//TODO: These values should most likely scale, but we don't know how yet, so just temporary values.
Attributes[GameAttribute.Hitpoints_Max] = 3000f * (master as Player).Attributes[GameAttribute.Hitpoints_Max];
@ -79,7 +79,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.35f;
//TODO: get a proper value for this.
this.WalkSpeed *= 3;
WalkSpeed *= 3;
SetBrain(new MinionBrain(this));
//TODO: These values should most likely scale, but we don't know how yet, so just temporary values.
Attributes[GameAttribute.Hitpoints_Max] = 3000f * (master as Player).Attributes[GameAttribute.Hitpoints_Max];
@ -99,7 +99,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.35f;
//TODO: get a proper value for this.
this.WalkSpeed *= 3;
WalkSpeed *= 3;
SetBrain(new MinionBrain(this));
//TODO: These values should most likely scale, but we don't know how yet, so just temporary values.
Attributes[GameAttribute.Hitpoints_Max] = 3000f * (master as Player).Attributes[GameAttribute.Hitpoints_Max];
@ -118,7 +118,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.35f;
//TODO: get a proper value for this.
this.WalkSpeed *= 3;
WalkSpeed *= 3;
SetBrain(new MinionBrain(this));
//TODO: These values should most likely scale, but we don't know how yet, so just temporary values.
Attributes[GameAttribute.Hitpoints_Max] = 3000f * (master as Player).Attributes[GameAttribute.Hitpoints_Max];
@ -138,7 +138,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.35f;
//TODO: get a proper value for this.
this.WalkSpeed *= 3;
WalkSpeed *= 3;
SetBrain(new MinionBrain(this));
//TODO: These values should most likely scale, but we don't know how yet, so just temporary values.
Attributes[GameAttribute.Hitpoints_Max] = 3000f * (master as Player).Attributes[GameAttribute.Hitpoints_Max];

View File

@ -25,10 +25,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1f;
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
WalkSpeed *= 5;
SetBrain(new MinionBrain(this));
this.DamageCoefficient = 1f * 2f;
this.Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
DamageCoefficient = 1f * 2f;
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
(Brain as MinionBrain).AddPresetPower(196974); //chicken_walk.pow
(Brain as MinionBrain).AddPresetPower(188442); //explode.pow
(Brain as MinionBrain).AddPresetPower(107301); //Fetish.pow

View File

@ -26,11 +26,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
: base(world, ActorSno._fallenlunatic_a, master, null)
{
Scale = 0.75f;
this.WalkSpeed *= 5;
this.CollFlags = 0;
this.DamageCoefficient = 0;
this.Attributes[GameAttribute.Invulnerable] = true;
this.Attributes[GameAttribute.Is_Helper] = true;
WalkSpeed *= 5;
CollFlags = 0;
DamageCoefficient = 0;
Attributes[GameAttribute.Invulnerable] = true;
Attributes[GameAttribute.Is_Helper] = true;
SetBrain(new LooterBrain(this, true));
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
@ -40,7 +40,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
public override bool Reveal(Player player)
{
if (this.World.IsPvP)
if (World.IsPvP)
return false;
return base.Reveal(player);
}

View File

@ -25,10 +25,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.2f; //they look cooler bigger :)
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
this.DamageCoefficient = context.ScriptFormula(11);
WalkSpeed *= 5;
DamageCoefficient = context.ScriptFormula(11);
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
//TODO: These values should most likely scale, but we don't know how yet, so just temporary values.
//Attributes[GameAttribute.Hitpoints_Max] = 20f;
//Attributes[GameAttribute.Hitpoints_Cur] = 20f;
@ -42,16 +42,16 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
LifeTime = TickTimer.WaitSeconds(world.Game, lifetime);
if (this.Master != null && context.ScriptFormula(1) < (this.Master as Player).Followers.Values.Where(f => f == SNO).Count())
if (Master != null && context.ScriptFormula(1) < (Master as Player).Followers.Values.Where(f => f == SNO).Count())
{
if (this.Master is Player)
if (Master is Player)
{
var rem = new List<uint>();
foreach (var fol in (this.Master as Player).Followers.Where(f => f.Key != this.GlobalID).Take((this.Master as Player).Followers.Values.Where(f => f == SNO).Count() - (int)context.ScriptFormula(1)))
foreach (var fol in (Master as Player).Followers.Where(f => f.Key != GlobalID).Take((Master as Player).Followers.Values.Where(f => f == SNO).Count() - (int)context.ScriptFormula(1)))
if (fol.Value == SNO)
rem.Add(fol.Key);
foreach (var rm in rem)
(this.Master as Player).DestroyFollowerById(rm);
(Master as Player).DestroyFollowerById(rm);
}
}
}

View File

@ -27,10 +27,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.35f; //they look cooler bigger :)
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
this.DamageCoefficient = 5f;
WalkSpeed *= 5;
DamageCoefficient = 5f;
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Summoned_By_SNO] = 0x00058676;
Attributes[GameAttribute.Summoned_By_SNO] = 0x00058676;
(Brain as MinionBrain).AddPresetPower(169081); //melee_instant

View File

@ -26,7 +26,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
class NecromancerSkeleton_A : Minion
{
public NecromancerSkeleton_A(MapSystem.World world, ActorSno sno, ActorSystem.Actor master)
public NecromancerSkeleton_A(MapSystem.World world, ActorSno sno, Actor master)
: base(world, sno, master, null)
{
Scale = 1.35f;
@ -36,22 +36,22 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
context.World = master.World;
context.PowerSNO = 453801;
this.WalkSpeed *= 3;
this.DamageCoefficient = context.ScriptFormula(14) * 2f;
WalkSpeed *= 3;
DamageCoefficient = context.ScriptFormula(14) * 2f;
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Hitpoints_Max_Percent_Bonus_Item] = 1;
this.Attributes[GameAttribute.Hitpoints_Max_Bonus] = 1;
this.Attributes[GameAttribute.Hitpoints_Factor_Vitality] = 1f;
this.Attributes[GameAttribute.Hitpoints_Regen_Per_Second] = 0;
Attributes[GameAttribute.Hitpoints_Max_Percent_Bonus_Item] = 1;
Attributes[GameAttribute.Hitpoints_Max_Bonus] = 1;
Attributes[GameAttribute.Hitpoints_Factor_Vitality] = 1f;
Attributes[GameAttribute.Hitpoints_Regen_Per_Second] = 0;
this.Attributes[GameAttribute.Core_Attributes_From_Item_Bonus_Multiplier] = 1;
Attributes[GameAttribute.Core_Attributes_From_Item_Bonus_Multiplier] = 1;
Attributes[GameAttribute.Hitpoints_Max] = 20f * (Master as Player).Toon.Level;
Attributes[GameAttribute.Hitpoints_Max_Percent_Bonus_Multiplicative] = 1;
Attributes[GameAttribute.Hitpoints_Cur] = Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
this.Attributes[GameAttribute.Summoned_By_SNO] = 453801;
Attributes[GameAttribute.Summoned_By_SNO] = 453801;
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = 0.5f * context.User.Attributes[GameAttribute.Damage_Weapon_Min_Total, 0];

View File

@ -38,8 +38,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.2f;
//TODO: get a proper value for this.
this.WalkSpeed = 0f;
this.DamageCoefficient = context.ScriptFormula(2);
WalkSpeed = 0f;
DamageCoefficient = context.ScriptFormula(2);
SetBrain(new MinionBrain(this));
(Brain as MinionBrain).AddPresetPower(129661); //DemonHunter_Sentry_TurretAttack.pow
//TODO: These values should most likely scale, but we don't know how yet, so just temporary values.
@ -53,16 +53,16 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
Attributes[GameAttribute.Pet_Type] = 0x8;
//Pet_Owner and Pet_Creator seems to be 0
if (this.Master != null)
if (Master != null)
{
if (this.Master is Player)
if (Master is Player)
{
var rem = new List<uint>();
foreach (var fol in (this.Master as Player).Followers)
if (Sentries.Contains(fol.Value) && fol.Key != this.GlobalID)
foreach (var fol in (Master as Player).Followers)
if (Sentries.Contains(fol.Value) && fol.Key != GlobalID)
rem.Add(fol.Key);
foreach (var rm in rem)
(this.Master as Player).DestroyFollowerById(rm);
(Master as Player).DestroyFollowerById(rm);
}
}

View File

@ -30,17 +30,17 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
: base(world, SNO, context.User, null)
{
Scale = 1.2f;
this.WalkSpeed *= 5;
WalkSpeed *= 5;
float UsedEssense = 0f;
if (context.Rune_A > 0)
Rune_Flesh = true;
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
//(Brain as MinionBrain).AddPresetPower(119166);
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
this.DamageCoefficient = context.ScriptFormula(14) * 2f;
DamageCoefficient = context.ScriptFormula(14) * 2f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = (context.ScriptFormula(14) * context.User.Attributes[GameAttribute.Damage_Weapon_Min_Total, 0]);
//(UsedEssense * 3f)
if (context.Rune_B > 0)

View File

@ -27,10 +27,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.2f; //they look cooler bigger :)
//TODO: get a proper value for this.
this.WalkSpeed *= 2;
this.DamageCoefficient = 2f * 2f;
WalkSpeed *= 2;
DamageCoefficient = 2f * 2f;
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
//TODO: These values should most likely scale, but we don't know how yet, so just temporary values.
//Attributes[GameAttribute.Hitpoints_Max] = 20f;
//Attributes[GameAttribute.Hitpoints_Cur] = 20f;

View File

@ -27,10 +27,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
{
Scale = 1.35f;
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
this.DamageCoefficient = mul * 2f;
WalkSpeed *= 5;
DamageCoefficient = mul * 2f;
SetBrain(new MinionBrain(this));
this.Attributes[GameAttribute.Summoned_By_SNO] = 102573;
Attributes[GameAttribute.Summoned_By_SNO] = 102573;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = master.Attributes[GameAttribute.Damage_Weapon_Min_Total, 0];
Attributes[GameAttribute.Damage_Weapon_Delta, 0] = master.Attributes[GameAttribute.Damage_Weapon_Delta_Total, 0];

View File

@ -27,17 +27,17 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public Unique_CaptainDaltyn(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.MinimapActive] = true;
this.Attributes[GameAttribute.Immune_To_Charm] = true;
this.Attributes[GameAttribute.//Blizzless Project 2022
Attributes[GameAttribute.MinimapActive] = true;
Attributes[GameAttribute.Immune_To_Charm] = true;
Attributes[GameAttribute.//Blizzless Project 2022
using_Bossbar] = true;
this.Attributes[GameAttribute.InBossEncounter] = true;
Attributes[GameAttribute.InBossEncounter] = true;
this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total];
this.Attributes[GameAttribute.TeamID] = 10;
Attributes[GameAttribute.Hitpoints_Cur] = Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.TeamID] = 10;
this.WalkSpeed = 0.2f;
WalkSpeed = 0.2f;
}

View File

@ -63,10 +63,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public DarkCultists(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.3f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
WalkSpeed = 0.3f;
}
}
[HandledSNO(ActorSno._townattackcultistmelee)]
@ -75,10 +75,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public DarkCultistsTownAttackMelee(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.3f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
WalkSpeed = 0.3f;
}
}
[HandledSNO(
@ -93,10 +93,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
: base(world, sno, tags)
{
(Brain as MonsterBrain).AddPresetPower(30570);
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 10f;
this.WalkSpeed = 0.15f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 10f;
WalkSpeed = 0.15f;
}
}
[HandledSNO(ActorSno._townattack_summoner)]
@ -107,10 +107,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
{
(Brain as MonsterBrain).AddPresetPower(30547);
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.15f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
WalkSpeed = 0.15f;
}
}
[HandledSNO(ActorSno._townattack_cultist)]
@ -121,10 +121,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
{
(Brain as MonsterBrain).AddPresetPower(30570);
(Brain as MonsterBrain).AddPresetPower(30547);
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.15f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
WalkSpeed = 0.15f;
}
}
#endregion
@ -135,10 +135,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public Shark(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.3f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
WalkSpeed = 0.3f;
}
}
#endregion
@ -155,10 +155,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public Lacuni(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.3f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
WalkSpeed = 0.3f;
}
}
#endregion
@ -174,10 +174,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public Fallens(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.3f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
WalkSpeed = 0.3f;
}
}
#endregion
@ -191,13 +191,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
{
//(Brain as MonsterBrain).PresetPowers.Clear();
//(Brain as MonsterBrain).AddPresetPower(117580);
this.Field2 = 0x8;
this.CollFlags = 0;
this.WalkSpeed = 0;
Field2 = 0x8;
CollFlags = 0;
WalkSpeed = 0;
this.Attributes[GameAttribute.Movement_Scalar] = 0f;
this.Attributes[GameAttribute.Run_Speed_Granted] = 0f;
this.Spawner = true;
Attributes[GameAttribute.Movement_Scalar] = 0f;
Attributes[GameAttribute.Run_Speed_Granted] = 0f;
Spawner = true;
}
}
@ -218,7 +218,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public Malthael_Spirit(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.WalkSpeed = 0.2f;
WalkSpeed = 0.2f;
}
}
//273417
@ -234,7 +234,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public DeathMaiden(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.WalkSpeed = 0.3f;
WalkSpeed = 0.3f;
}
}
//282789
@ -248,7 +248,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public SkeletonArcher_Westmarch(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.WalkSpeed = 0.24f;
WalkSpeed = 0.24f;
//this.WalkSpeed /= 2f;
}
@ -264,7 +264,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public Skeleton_Westmarch(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.WalkSpeed = 0.25f;
WalkSpeed = 0.25f;
}
}
#endregion
@ -290,7 +290,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public DarkGhost(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.WalkSpeed = 0.25f;
WalkSpeed = 0.25f;
}
}
@ -520,10 +520,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public TriuneCultist(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.3f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
WalkSpeed = 0.3f;
}
}
#endregion
@ -541,9 +541,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public TombGuardian(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
(Brain as MonsterBrain).AddPresetPower(30503);
(Brain as MonsterBrain).AddPresetPower(30543); //Summon Skeletons
}
@ -666,13 +666,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
{
(Brain as MonsterBrain).PresetPowers.Clear();
(Brain as MonsterBrain).AddPresetPower(117580);
this.Field2 = 0x8;
this.CollFlags = 0;
this.WalkSpeed = 0;
Field2 = 0x8;
CollFlags = 0;
WalkSpeed = 0;
this.Attributes[GameAttribute.Movement_Scalar] = 0f;
this.Attributes[GameAttribute.Run_Speed_Granted] = 0f;
this.Spawner = true;
Attributes[GameAttribute.Movement_Scalar] = 0f;
Attributes[GameAttribute.Run_Speed_Granted] = 0f;
Spawner = true;
}
}
@ -688,10 +688,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
(Brain as MonsterBrain).PresetPowers.Clear();
(Brain as MonsterBrain).AddPresetPower(117580);
this.Attributes[GameAttribute.Movement_Scalar] = 0f;
this.Attributes[GameAttribute.Run_Speed_Granted] = 0f;
this.WalkSpeed = 0f;
this.Spawner = true;
Attributes[GameAttribute.Movement_Scalar] = 0f;
Attributes[GameAttribute.Run_Speed_Granted] = 0f;
WalkSpeed = 0f;
Spawner = true;
}
}
@ -723,10 +723,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public Goatman_Moonclan_Melee(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Brain = new MonsterBrain(this);
Brain = new MonsterBrain(this);
(Brain as MonsterBrain).AddPresetPower(30592); //melee_instant
this.WalkSpeed = 0.2f;
WalkSpeed = 0.2f;
}
}
[HandledSNO(ActorSno._goatman_melee_a_unique_01)] // [218428] Goatman_Melee_A_Unique_01
@ -735,10 +735,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public Goatman_Moonclan_Melee_Unique1(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Brain = new MonsterBrain(this);
Brain = new MonsterBrain(this);
(Brain as MonsterBrain).AddPresetPower(30592); //melee_instant
this.WalkSpeed = 0.2f;
WalkSpeed = 0.2f;
}
}
//218428
@ -748,11 +748,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public Goatman_Moonclan_Ranged(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Brain = new MonsterBrain(this);
Brain = new MonsterBrain(this);
//(Brain as MonsterBrain).AddPresetPower(30592); //melee_instant
(Brain as MonsterBrain).AddPresetPower(30252); //Range_instant
this.WalkSpeed = 0.2f;
WalkSpeed = 0.2f;
}
}
[HandledSNO(
@ -768,7 +768,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
(Brain as MonsterBrain).RemovePresetPower(30592); // Only distance attack
(Brain as MonsterBrain).AddPresetPower(77342);
(Brain as MonsterBrain).AddPresetPower(99077);
this.WalkSpeed = 0.2f;
WalkSpeed = 0.2f;
}
}
@ -780,10 +780,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public GoatmanMelee(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.2f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
WalkSpeed = 0.2f;
}
}
#endregion
@ -817,10 +817,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public TriuneWizard(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.35f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
WalkSpeed = 0.35f;
(Brain as MonsterBrain).AddPresetPower(99077);
}
}
@ -838,10 +838,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public TriuneBerserker(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.35f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
WalkSpeed = 0.35f;
(Brain as MonsterBrain).AddPresetPower(99077);
}
}
@ -853,7 +853,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public Overseer(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.WalkSpeed = 0.1f;
WalkSpeed = 0.1f;
}
}
#endregion
@ -864,8 +864,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public AzmodanProxy(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.WalkSpeed = 0.1f;
this.SetVisible(false);
WalkSpeed = 0.1f;
SetVisible(false);
}
}
#endregion
@ -912,7 +912,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
(Brain as MonsterBrain).RemovePresetPower(30503);
(Brain as MonsterBrain).RemovePresetPower(30592);
(Brain as MonsterBrain).AddPresetPower(30502);
this.WalkSpeed = 0.8f;
WalkSpeed = 0.8f;
}
}
#endregion
@ -932,7 +932,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public SnakemanMelee(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.WalkSpeed = 0.3f;
WalkSpeed = 0.3f;
}
}
[HandledSNO(
@ -950,7 +950,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public SnakemanCaster(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.WalkSpeed = 0.3f;
WalkSpeed = 0.3f;
}
}
[HandledSNO(
@ -969,7 +969,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public FastMummy(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.WalkSpeed = 0.3f;
WalkSpeed = 0.3f;
}
}
@ -988,7 +988,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
{
(Brain as MonsterBrain).RemovePresetPower(30592);
(Brain as MonsterBrain).AddPresetPower(30252);
this.WalkSpeed = 0.4f;
WalkSpeed = 0.4f;
}
}
#endregion
@ -1090,7 +1090,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
: base(world, sno, tags)
{
(Brain as MonsterBrain).AddPresetPower(66547);
this.WalkSpeed = 0.4f;
WalkSpeed = 0.4f;
}
}
#endregion
@ -1108,10 +1108,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public Wrath(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.3f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
WalkSpeed = 0.3f;
}
}
#endregion
@ -1122,10 +1122,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public Spider_Elemental_Cold_tesla_A(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.WalkSpeed = 0.3f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
WalkSpeed = 0.3f;
}
}
#endregion

View File

@ -27,22 +27,22 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Monsters
public A1dun_firewall(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Field2 = 0x8;
this.CollFlags = 0;
this.WalkSpeed = 0;
Field2 = 0x8;
CollFlags = 0;
WalkSpeed = 0;
this.Attributes[GameAttribute.Movement_Scalar] = 0f;
this.Attributes[GameAttribute.Run_Speed_Granted] = 0f;
this.Spawner = true;
this.Attributes[GameAttribute.Invulnerable] = true;
Attributes[GameAttribute.Movement_Scalar] = 0f;
Attributes[GameAttribute.Run_Speed_Granted] = 0f;
Spawner = true;
Attributes[GameAttribute.Invulnerable] = true;
this.CollFlags = 0;
this.WalkSpeed = 0;
this.Attributes[GameAttribute.Invulnerable] = true;
CollFlags = 0;
WalkSpeed = 0;
Attributes[GameAttribute.Invulnerable] = true;
(Brain as MonsterBrain).RemovePresetPower(30592);
//(Brain as MonsterBrain).AddPresetPower(96925);
(Brain as MonsterBrain).AddPresetPower(223284);
this.WalkSpeed = 0.0f;
WalkSpeed = 0.0f;
//[224754] [EffectGroup] a4dun_spire_firewall_slideExplode
//[223284] [Power] a4dun_spire_firewall
}

View File

@ -32,12 +32,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
var monsterLevels = (GameBalance)MPQStorage.Data.Assets[SNOGroup.GameBalance][19760].Data;
var monsterData = (Monster.Target as MonsterFF);
this.Attributes[GameAttribute.Hitpoints_Max] = 99999;
this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total];
this.Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
this.WalkSpeed = 0f; // TODO: this is probably multiplied by something erekose the 0.3 is because he is way too fast otherwise
Attributes[GameAttribute.Hitpoints_Max] = 99999;
Attributes[GameAttribute.Hitpoints_Cur] = Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
WalkSpeed = 0f; // TODO: this is probably multiplied by something erekose the 0.3 is because he is way too fast otherwise
}
@ -55,13 +55,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
if (!base.Reveal(player))
return false;
this.Attributes[GameAttribute.TeamID] = 2;
Attributes[GameAttribute.TeamID] = 2;
return true;
}
public void Update(int tickCounter)
{
if (this.Brain == null)
if (Brain == null)
return;
}
}

View File

@ -30,8 +30,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
Conversations.Add(new Interactions.ConversationInteraction(471065));
Conversations.Add(new Interactions.ConversationInteraction(471076));
this.Field7 = 1;
this.Attributes[GameAttribute.MinimapActive] = true;
Field7 = 1;
Attributes[GameAttribute.MinimapActive] = true;
}
public override void OnTargeted(Player player, TargetMessage message)

View File

@ -22,7 +22,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Cain(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Invulnerable] = true;
Attributes[GameAttribute.Invulnerable] = true;
}
protected override void ReadTags()

View File

@ -46,18 +46,18 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
var monsterLevels = (GameBalance)MPQStorage.Data.Assets[SNOGroup.GameBalance][19760].Data;
var monsterData = (Monster.Target as MonsterFF);
this.Attributes[GameAttribute.Level] = 1;
this.Attributes[GameAttribute.Hitpoints_Max] = 100000;
this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total];
this.Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
this.WalkSpeed = 0.3f * monsterData.AttributeModifiers[129]; // TODO: this is probably multiplied by something erekose the 0.3 is because he is way too fast otherwise
Attributes[GameAttribute.Level] = 1;
Attributes[GameAttribute.Hitpoints_Max] = 100000;
Attributes[GameAttribute.Hitpoints_Cur] = Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
WalkSpeed = 0.3f * monsterData.AttributeModifiers[129]; // TODO: this is probably multiplied by something erekose the 0.3 is because he is way too fast otherwise
}
protected override void ReadTags()
{
if (!Tags.ContainsKey(MarkerKeys.ConversationList) && this.World.Game.CurrentQuest == 87700)
if (!Tags.ContainsKey(MarkerKeys.ConversationList) && World.Game.CurrentQuest == 87700)
{
Tags.Add(MarkerKeys.ConversationList, new TagMapEntry(MarkerKeys.ConversationList.ID, 108832, 2));
}
@ -67,10 +67,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public void Update(int tickCounter)
{
if (this.Brain == null)
if (Brain == null)
return;
this.Brain.Update(tickCounter);
Brain.Update(tickCounter);
}
}
}

View File

@ -12,8 +12,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Fate(MapSystem.World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Field7 = 1;
this.Attributes[GameAttribute.TeamID] = 2;
Field7 = 1;
Attributes[GameAttribute.TeamID] = 2;
}
}

View File

@ -20,9 +20,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public GhostOnSpire(MapSystem.World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Field7 = 1;
this.Attributes[GameAttribute.TeamID] = 2;
this.Attributes.BroadcastChangedIfRevealed();
Field7 = 1;
Attributes[GameAttribute.TeamID] = 2;
Attributes.BroadcastChangedIfRevealed();
}
}

View File

@ -31,18 +31,18 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
var monsterLevels = (GameBalance)MPQStorage.Data.Assets[SNOGroup.GameBalance][19760].Data;
var monsterData = (Monster.Target as MonsterFF);
this.Attributes[GameAttribute.Level] = 1;
this.Attributes[GameAttribute.Hitpoints_Max] = 100000;
this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total];
this.Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
this.WalkSpeed = 0.3f * monsterData.AttributeModifiers[129]; // TODO: this is probably multiplied by something erekose the 0.3 is because he is way too fast otherwise
Attributes[GameAttribute.Level] = 1;
Attributes[GameAttribute.Hitpoints_Max] = 100000;
Attributes[GameAttribute.Hitpoints_Cur] = Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
WalkSpeed = 0.3f * monsterData.AttributeModifiers[129]; // TODO: this is probably multiplied by something erekose the 0.3 is because he is way too fast otherwise
}
protected override void ReadTags()
{
if (!Tags.ContainsKey(MarkerKeys.ConversationList) && this.World.Game.CurrentQuest == 87700)
if (!Tags.ContainsKey(MarkerKeys.ConversationList) && World.Game.CurrentQuest == 87700)
{
Tags.Add(MarkerKeys.ConversationList, new TagMapEntry(MarkerKeys.ConversationList.ID, 108832, 2));
}
@ -52,10 +52,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public void Update(int tickCounter)
{
if (this.Brain == null)
if (Brain == null)
return;
this.Brain.Update(tickCounter);
Brain.Update(tickCounter);
}
}
}

View File

@ -12,8 +12,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Hope(MapSystem.World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Field7 = 1;
this.Attributes[GameAttribute.TeamID] = 2;
Field7 = 1;
Attributes[GameAttribute.TeamID] = 2;
}
}

View File

@ -22,9 +22,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Humans(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Field7 = 1;
this.Attributes[GameAttribute.TeamID] = 2;
this.Attributes[GameAttribute.NPC_Has_Interact_Options, 0] = false;
Field7 = 1;
Attributes[GameAttribute.TeamID] = 2;
Attributes[GameAttribute.NPC_Has_Interact_Options, 0] = false;
}
public override bool Reveal(PlayerSystem.Player player)
@ -40,33 +40,33 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
try
{
if (player.Position.DistanceSquared(ref _position) < ActorData.Sphere.Radius * ActorData.Sphere.Radius * this.Scale * this.Scale && ! _collapsed)
if (player.Position.DistanceSquared(ref _position) < ActorData.Sphere.Radius * ActorData.Sphere.Radius * Scale * Scale && ! _collapsed)
{
_collapsed = true;
if (this.World.SNO == WorldSno.x1_westm_intro)
switch (this.SNO)
if (World.SNO == WorldSno.x1_westm_intro)
switch (SNO)
{
case ActorSno._x1_westm_intro_human_male:
if (this.Position.X > 1440)
StartConversation(this.World, 311433);
if (Position.X > 1440)
StartConversation(World, 311433);
else
{
foreach (var man in this.World.GetActorsBySNO(
foreach (var man in World.GetActorsBySNO(
ActorSno._x1_westm_intro_human_male,
ActorSno._x1_westm_intro_human_male2,
ActorSno._x1_westm_intro_human_female,
ActorSno._x1_westmarchfemale_deathmaidenkill
))
{
if (man.CurrentScene.SceneSNO.Id == this.CurrentScene.SceneSNO.Id) man.PlayActionAnimation(306544);
if (man.CurrentScene.SceneSNO.Id == CurrentScene.SceneSNO.Id) man.PlayActionAnimation(306544);
}
}
break;
case ActorSno._x1_westm_intro_human_male2:
if (this.Position.X > 1300 & this.Position.Y > 440)
if (Position.X > 1300 & Position.Y > 440)
{
StartConversation(this.World, 311435);
StartConversation(World, 311435);
//foreach(var 309191 )
/*
* + [0] {Ambush = 306544} DiIiS_NA.GameServer.Core.Types.TagMap.TagMapEntry
@ -79,13 +79,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
+ [5] {70976 = 328782} DiIiS_NA.GameServer.Core.Types.TagMap.TagMapEntry
+ [6] {98304 = 330015} DiIiS_NA.GameServer.Core.Types.TagMap.TagMapEntry
*/
foreach (var man in this.World.GetActorsBySNO(
foreach (var man in World.GetActorsBySNO(
ActorSno._x1_westm_intro_human_male,
ActorSno._x1_westm_intro_human_male2,
ActorSno._x1_westm_intro_human_female
))
{
if (man.CurrentScene.SceneSNO.Id == this.CurrentScene.SceneSNO.Id) man.PlayActionAnimation(306544);
if (man.CurrentScene.SceneSNO.Id == CurrentScene.SceneSNO.Id) man.PlayActionAnimation(306544);
}

View File

@ -22,7 +22,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Barbarian_KKG(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.PlayActionAnimation(449259);
PlayActionAnimation(449259);
}
protected override void ReadTags()

View File

@ -23,14 +23,14 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
: base(world, sno, tags)
{
//{[Actor] [Type: Monster] SNOId:437089 GlobalId: 1017303615 Position: x:348.598 y:853.68604 z:5.41089 Name: Barbarian_KKG_Follower_NPC}
//437394 - Рык
//437259 - сидит
//437260 - встаёт
//437258 - вышагивает вперёд
//439753 - исчезновение
//449259 - Появление на троне со вспышкой
//324250 - перекат
//437396 - мертвый
//437394 - Roar
//437259 - Sit
//437260 - Stand
//437258 - Walk Forward
//439753 - Disappear
//449259 - Appear on Throne with Flash
//324250 - Roll
//437396 - Dead
// this.Hidden = true;
// this.SetVisible(false);
@ -43,16 +43,16 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
base.ReadTags();
}
public override void OnPlayerApproaching(PlayerSystem.Player player)
public override void OnPlayerApproaching(Player player)
{
try
{
if (player.Position.DistanceSquared(ref _position) < ActorData.Sphere.Radius * ActorData.Sphere.Radius * this.Scale * this.Scale && !_collapsed)
if (player.Position.DistanceSquared(ref _position) < ActorData.Sphere.Radius * ActorData.Sphere.Radius * Scale * Scale && !_collapsed)
{
if (!player.KanaiUnlocked)
{
_collapsed = true;
this.PlayActionAnimation(439753);
PlayActionAnimation(439753);
var Cube = World.GetActorBySNO(ActorSno._p4_ruins_frost_kanaicube_altar);
Cube.PlayActionAnimation(441642);

View File

@ -21,7 +21,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public P2_HQ_ZoltunKulle_NPC(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Hidden = true;
Hidden = true;
}
protected override void ReadTags()

View File

@ -22,8 +22,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public LeahNPC(MapSystem.World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Field7 = 1;
this.Attributes[GameAttribute.TeamID] = 2;
Field7 = 1;
Attributes[GameAttribute.TeamID] = 2;
}
}

View File

@ -33,27 +33,27 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
var monsterLevels = (GameBalance)MPQStorage.Data.Assets[SNOGroup.GameBalance][19760].Data;
var monsterData = (Monster.Target as MonsterFF);
this.Attributes[GameAttribute.Level] = 1;
this.Attributes[GameAttribute.Hitpoints_Max] = 100000;
this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total];
this.Attributes[GameAttribute.Invulnerable] = true;
this.Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
Attributes[GameAttribute.Level] = 1;
Attributes[GameAttribute.Hitpoints_Max] = 100000;
Attributes[GameAttribute.Hitpoints_Cur] = Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.Invulnerable] = true;
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
if (world.SNO == WorldSno.x1_westmarch_overlook_d)
{
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 0f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 0f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = 0f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 0f;
}
else
{
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
}
this.WalkSpeed = 0.3f * monsterData.AttributeModifiers[129]; // TODO: this is probably multiplied by something erekose the 0.3 is because he is way too fast otherwise
WalkSpeed = 0.3f * monsterData.AttributeModifiers[129]; // TODO: this is probably multiplied by something erekose the 0.3 is because he is way too fast otherwise
}
protected override void ReadTags()
{
if (!Tags.ContainsKey(MarkerKeys.ConversationList) && this.World.Game.CurrentQuest == 87700)
if (!Tags.ContainsKey(MarkerKeys.ConversationList) && World.Game.CurrentQuest == 87700)
{
Tags.Add(MarkerKeys.ConversationList, new TagMapEntry(MarkerKeys.ConversationList.ID, 108832, 2));
}
@ -63,10 +63,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public void Update(int tickCounter)
{
if (this.Brain == null)
if (Brain == null)
return;
this.Brain.Update(tickCounter);
Brain.Update(tickCounter);
}
}
}

View File

@ -22,7 +22,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public MysticNoVendor(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Invulnerable] = true;
Attributes[GameAttribute.Invulnerable] = true;
}
protected override void ReadTags()
@ -37,7 +37,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public TemplarNPC(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Invulnerable] = true;
Attributes[GameAttribute.Invulnerable] = true;
}
protected override void ReadTags()

View File

@ -14,8 +14,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
public Cow(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Field7 = 1;
this.Attributes[GameAttribute.TeamID] = 2;
Field7 = 1;
Attributes[GameAttribute.TeamID] = 2;
}
}
}

View File

@ -14,8 +14,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Farnham(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Field7 = 1;
this.Attributes[GameAttribute.TeamID] = 2;
Field7 = 1;
Attributes[GameAttribute.TeamID] = 2;
}
}
}

View File

@ -14,8 +14,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Griswold(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Field7 = 1;
this.Attributes[GameAttribute.TeamID] = 2;
Field7 = 1;
Attributes[GameAttribute.TeamID] = 2;
}
}
}

View File

@ -14,8 +14,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Ogden(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Field7 = 1;
this.Attributes[GameAttribute.TeamID] = 2;
Field7 = 1;
Attributes[GameAttribute.TeamID] = 2;
}
}
}

View File

@ -14,8 +14,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Pepin(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Field7 = 1;
this.Attributes[GameAttribute.TeamID] = 2;
Field7 = 1;
Attributes[GameAttribute.TeamID] = 2;
}
}
}

View File

@ -32,18 +32,18 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
var monsterLevels = (GameBalance)MPQStorage.Data.Assets[SNOGroup.GameBalance][19760].Data;
var monsterData = (Monster.Target as MonsterFF);
this.Attributes[GameAttribute.Level] = 1;
this.Attributes[GameAttribute.Hitpoints_Max] = 100000;
this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total];
this.Attributes[GameAttribute.Attacks_Per_Second] = 1.2f;
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
this.WalkSpeed = 0.3f * monsterData.AttributeModifiers[129];
Attributes[GameAttribute.Level] = 1;
Attributes[GameAttribute.Hitpoints_Max] = 100000;
Attributes[GameAttribute.Hitpoints_Cur] = Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.Attacks_Per_Second] = 1.2f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
WalkSpeed = 0.3f * monsterData.AttributeModifiers[129];
}
protected override void ReadTags()
{
if (!Tags.ContainsKey(MarkerKeys.ConversationList) && this.World.Game.CurrentQuest == 87700)
if (!Tags.ContainsKey(MarkerKeys.ConversationList) && World.Game.CurrentQuest == 87700)
{
Tags.Add(MarkerKeys.ConversationList, new TagMapEntry(MarkerKeys.ConversationList.ID, 108832, 2));
}
@ -53,10 +53,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public void Update(int tickCounter)
{
if (this.Brain == null)
if (Brain == null)
return;
this.Brain.Update(tickCounter);
Brain.Update(tickCounter);
}
}
}

View File

@ -32,18 +32,18 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
var monsterLevels = (GameBalance)MPQStorage.Data.Assets[SNOGroup.GameBalance][19760].Data;
var monsterData = (Monster.Target as MonsterFF);
this.Attributes[GameAttribute.Level] = 1;
this.Attributes[GameAttribute.Hitpoints_Max] = 100000;
this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total];
this.Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
this.WalkSpeed = 0.3f * monsterData.AttributeModifiers[129]; // TODO: this is probably multiplied by something erekose the 0.3 is because he is way too fast otherwise
Attributes[GameAttribute.Level] = 1;
Attributes[GameAttribute.Hitpoints_Max] = 100000;
Attributes[GameAttribute.Hitpoints_Cur] = Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
WalkSpeed = 0.3f * monsterData.AttributeModifiers[129]; // TODO: this is probably multiplied by something erekose the 0.3 is because he is way too fast otherwise
}
protected override void ReadTags()
{
if (!Tags.ContainsKey(MarkerKeys.ConversationList) && this.World.Game.CurrentQuest == 87700)
if (!Tags.ContainsKey(MarkerKeys.ConversationList) && World.Game.CurrentQuest == 87700)
{
Tags.Add(MarkerKeys.ConversationList, new TagMapEntry(MarkerKeys.ConversationList.ID, 108832, 2));
}
@ -53,10 +53,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public void Update(int tickCounter)
{
if (this.Brain == null)
if (Brain == null)
return;
this.Brain.Update(tickCounter);
Brain.Update(tickCounter);
}
}
}

View File

@ -15,10 +15,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public NecromancerFlesh(MapSystem.World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Field2 = 16;//16;
this.Field7 = 0x00000001;
this.CollFlags = 1; // this.CollFlags = 0; a hack for passing through blockers /fasbat
this.Attributes[GameAttribute.Hitpoints_Cur] = 1;
Field2 = 16;//16;
Field7 = 0x00000001;
CollFlags = 1; // this.CollFlags = 0; a hack for passing through blockers /fasbat
Attributes[GameAttribute.Hitpoints_Cur] = 1;
}
}

View File

@ -30,16 +30,16 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public NephalemStone(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.TeamID] = 2;
this.Attributes[GameAttribute.MinimapActive] = true;
this.Attributes[GameAttribute.Untargetable] = false;
this.Attributes.BroadcastChangedIfRevealed();
this.Attributes[GameAttribute.MinimapIconOverride] = 221224;//327066;
Attributes[GameAttribute.TeamID] = 2;
Attributes[GameAttribute.MinimapActive] = true;
Attributes[GameAttribute.Untargetable] = false;
Attributes.BroadcastChangedIfRevealed();
Attributes[GameAttribute.MinimapIconOverride] = 221224;//327066;
}
public override void OnTargeted(Player player, TargetMessage message)
{
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.RiftStartEncounterMessage) { ActorID = this.DynamicID(player) });
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.RiftStartEncounterMessage) { ActorID = DynamicID(player) });
}
public override bool Reveal(Player player)
@ -49,20 +49,20 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
if (Attributes[GameAttribute.Untargetable])
{
this.PlayAnimation(5, AnimationSet.TagMapAnimDefault[AnimationSetKeys.Open]);
this.SetIdleAnimation(AnimationSet.TagMapAnimDefault[AnimationSetKeys.Open]);
PlayAnimation(5, AnimationSet.TagMapAnimDefault[AnimationSetKeys.Open]);
SetIdleAnimation(AnimationSet.TagMapAnimDefault[AnimationSetKeys.Open]);
}
else
{
this.PlayAnimation(5, AnimationSet.TagMapAnimDefault[AnimationSetKeys.IdleDefault]);
this.SetIdleAnimation(AnimationSet.TagMapAnimDefault[AnimationSetKeys.IdleDefault]);
PlayAnimation(5, AnimationSet.TagMapAnimDefault[AnimationSetKeys.IdleDefault]);
SetIdleAnimation(AnimationSet.TagMapAnimDefault[AnimationSetKeys.IdleDefault]);
}
player.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Map.MapMarkerInfoMessage()
{
HashedName = DiIiS_NA.Core.Helpers.Hash.StringHashHelper.HashItemName("x1_OpenWorld_LootRunObelisk_B"),
Place = new MessageSystem.Message.Fields.WorldPlace { Position = this.Position, WorldID = this.World.GlobalID },
Place = new MessageSystem.Message.Fields.WorldPlace { Position = Position, WorldID = World.GlobalID },
ImageInfo = 221224,
Label = -1,
snoStringList = 0x0000F063,

View File

@ -33,7 +33,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
//this.Field2 = 0x9;//16;
//this.Field7 = 0x00000001;
this.CollFlags = 0;
CollFlags = 0;
}
@ -41,15 +41,15 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
try
{
if (player.Position.DistanceSquared(ref _position) < ActorData.Sphere.Radius * ActorData.Sphere.Radius * this.Scale * this.Scale && !_collapsed)
if (player.Position.DistanceSquared(ref _position) < ActorData.Sphere.Radius * ActorData.Sphere.Radius * Scale * Scale && !_collapsed)
{
_collapsed = true;
if (this.SNO == ActorSno._caout_oasis_attack_plant) //caOut_Oasis_Attack_Plant
if (SNO == ActorSno._caout_oasis_attack_plant) //caOut_Oasis_Attack_Plant
{
Task.Delay(1000).ContinueWith(delegate
{
this.World.PowerManager.RunPower(this, 102874);
World.PowerManager.RunPower(this, 102874);
});
}
@ -58,7 +58,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
if (AnimationSet != null)
World.BroadcastIfRevealed(plr => new PlayAnimationMessage
{
ActorID = this.DynamicID(plr),
ActorID = DynamicID(plr),
AnimReason = 11,
UnitAniimStartTime = 0,
tAnim = new PlayAnimationMessageSpec[]
@ -77,20 +77,20 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
World.BroadcastIfRevealed(plr => new SetIdleAnimationMessage
{
ActorID = this.DynamicID(plr),
ActorID = DynamicID(plr),
AnimationSNO = AnimationSetKeys.DeadDefault.ID
}, this);
World.BroadcastIfRevealed(plr => new ACDCollFlagsMessage
{
ActorID = this.DynamicID(plr),
ActorID = DynamicID(plr),
CollFlags = 0
}, this);
this.Attributes[GameAttribute.Deleted_On_Server] = true;
Attributes[GameAttribute.Deleted_On_Server] = true;
Attributes.BroadcastChangedIfRevealed();
RelativeTickTimer destroy = new RelativeTickTimer(World.Game, duration, x => this.Destroy());
RelativeTickTimer destroy = new RelativeTickTimer(World.Game, duration, x => Destroy());
}
}
catch { }

View File

@ -19,17 +19,17 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public Rare(MapSystem.World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Hitpoints_Max] *= 5f;
this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total];
this.Attributes[GameAttribute.Immune_To_Charm] = true;
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] *= 3.5f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] *= 3.5f;
this.Attributes[GameAttribute.Movement_Scalar] = this.Attributes[GameAttribute.Movement_Scalar] * 0.5f;
this.Attributes[GameAttribute.Run_Speed_Granted] = this.Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
this.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
Attributes[GameAttribute.Hitpoints_Max] *= 5f;
Attributes[GameAttribute.Hitpoints_Cur] = Attributes[GameAttribute.Hitpoints_Max_Total];
Attributes[GameAttribute.Immune_To_Charm] = true;
Attributes[GameAttribute.Damage_Weapon_Min, 0] *= 3.5f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] *= 3.5f;
Attributes[GameAttribute.Movement_Scalar] = Attributes[GameAttribute.Movement_Scalar] * 0.5f;
Attributes[GameAttribute.Run_Speed_Granted] = Attributes[GameAttribute.Run_Speed_Granted] * 0.5f;
Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 20f;
this.NamePrefix = MonsterAffixGenerator.GeneratePrefixName();
this.NameSuffix = MonsterAffixGenerator.GenerateSuffixName();
NamePrefix = MonsterAffixGenerator.GeneratePrefixName();
NameSuffix = MonsterAffixGenerator.GenerateSuffixName();
}
private int NamePrefix = -1;
@ -48,7 +48,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
player.InGameClient.SendMessage(new RareMonsterNamesMessage()
{
ann = DynamicID(player),
RareNames = new int[2] { this.NamePrefix, this.NameSuffix },
RareNames = new int[2] { NamePrefix, NameSuffix },
MonsterAffixes = affixGbids
});

View File

@ -23,10 +23,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public RareMinion(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
this.Attributes[GameAttribute.Hitpoints_Max] *= 3.0f;
this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max];
this.Attributes[GameAttribute.Damage_Weapon_Min, 0] *= 1.5f;
this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] *= 1.5f;
Attributes[GameAttribute.Hitpoints_Max] *= 3.0f;
Attributes[GameAttribute.Hitpoints_Cur] = Attributes[GameAttribute.Hitpoints_Max];
Attributes[GameAttribute.Damage_Weapon_Min, 0] *= 1.5f;
Attributes[GameAttribute.Damage_Weapon_Delta, 0] *= 1.5f;
//MonsterAffixGenerator.Generate(this, this.World.Game.Difficulty + 1);
}

Some files were not shown because too many files have changed in this diff Show More