Barbarian Fix

This commit is contained in:
Gitea 2022-08-20 10:09:50 +10:00
parent 6911f5c846
commit 2ed0f1c7bb
7 changed files with 30 additions and 34 deletions

View File

@ -77,7 +77,7 @@ namespace DiIiS_NA.LoginServer.ServicesSystem.Services
Init.SetChatRestrictionContentLicenseId(0); Init.SetChatRestrictionContentLicenseId(0);
Init.SetAchievementsContentHandle(D3.OnlineService.ContentHandle.CreateBuilder().SetHash("d143e14d7d59897bd8bedb040ab40738bbfcb3d234fd52338d90e67fe43c573e").SetRegion("EU").SetUsage(".achu")); Init.SetAchievementsContentHandle(D3.OnlineService.ContentHandle.CreateBuilder().SetHash("20375546335DA13E31554A104FE036B5BCC878D715108F1FCEB50AB85BD87478").SetRegion("EU").SetUsage(".achu"));
HeroDigestListResponse.Builder d = HeroDigestListResponse.CreateBuilder(); HeroDigestListResponse.Builder d = HeroDigestListResponse.CreateBuilder();
foreach (Toon t in Client.Account.GameAccount.Toons) foreach (Toon t in Client.Account.GameAccount.Toons)
{ {

View File

@ -25,8 +25,6 @@ using System.Collections.Generic;
//Blizzless Project 2022 //Blizzless Project 2022
using System.Linq; using System.Linq;
//Blizzless Project 2022 //Blizzless Project 2022
using System.Text;
//Blizzless Project 2022
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
@ -42,7 +40,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
var ShockWavePos = PowerMath.TranslateDirection2D(User.Position, TargetPosition, var ShockWavePos = PowerMath.TranslateDirection2D(User.Position, TargetPosition,
User.Position, User.Position,
ScriptFormula(23)); ScriptFormula(23));
var maxHits = 2; var maxHits = 1;
for (int i = 0; i < maxHits; ++i) for (int i = 0; i < maxHits; ++i)
{ {
AttackPayload attack = new AttackPayload(this); AttackPayload attack = new AttackPayload(this);
@ -76,7 +74,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
else else
{ {
if (Rand.NextDouble() < ScriptFormula(0)) if (Rand.NextDouble() < ScriptFormula(0))
Knockback(hitPayload.Target, ScriptFormula(5), ScriptFormula(6), ScriptFormula(7)); Knockback(hitPayload.Target, 0.8f, 2, -0.03f);
} }
}; };
attack.Apply(); attack.Apply();
@ -704,7 +702,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
if (Rune_B > 0) if (Rune_B > 0)
{ {
AttackPayload attack = new AttackPayload(this); AttackPayload attack = new AttackPayload(this);
attack.Targets = GetEnemiesInArcDirection(User.Position, TargetPosition, ScriptFormula(14), ScriptFormula(15)); attack.Targets = GetEnemiesInArcDirection(User.Position, TargetPosition, 22, 1);
attack.AddWeaponDamage(ScriptFormula(23), DamageType.Physical); attack.AddWeaponDamage(ScriptFormula(23), DamageType.Physical);
attack.Apply(); attack.Apply();
yield break; yield break;

View File

@ -90,8 +90,6 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads
public void Apply() public void Apply()
{ {
Task.Delay(1).ContinueWith((a) => {
if (this.Targets == null) this.Targets = new TargetList(); if (this.Targets == null) this.Targets = new TargetList();
if (this.Target.World != null) if (this.Target.World != null)
{ {
@ -104,7 +102,6 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads
{ {
return; return;
} }
if (this.Target is Player && this.DamageEntries.Count > 0) if (this.Target is Player && this.DamageEntries.Count > 0)
{ {
Player player = (Player)this.Target; Player player = (Player)this.Target;
@ -113,14 +110,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads
extra.OnTargeted(player, null); extra.OnTargeted(player, null);
} }
if (this.Context.User is Player && this.Context.Target is Monster && this.Context.Target.GBHandle.Type == 1) if (this.Context.User is Player && this.Context.Target is Monster && this.Context.Target.GBHandle.Type == 1)
{ {
(this.Context.User as Player).ExpBonusData.MonsterAttacked((this.Context.User as Player).InGameClient.Game.TickCounter); (this.Context.User as Player).ExpBonusData.MonsterAttacked((this.Context.User as Player).InGameClient.Game.TickCounter);
((this.Context.Target as Monster).Brain as AISystem.Brains.MonsterBrain).AttackedBy = this.Context.User; ((this.Context.Target as Monster).Brain as AISystem.Brains.MonsterBrain).AttackedBy = this.Context.User;
} }
// main targets
foreach (Actor target in this.Targets.Actors) foreach (Actor target in this.Targets.Actors)
{ {
if (target == null || target.World == null || target.World != null && target.World.PowerManager.IsDeletingActor(target)) if (target == null || target.World == null || target.World != null && target.World.PowerManager.IsDeletingActor(target))
continue; continue;
@ -143,9 +139,6 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads
payload.Apply(); payload.Apply();
} }
} }
});
} }
private bool _DoCriticalHit(Actor user, Actor target, float chcBonus = 0f) private bool _DoCriticalHit(Actor user, Actor target, float chcBonus = 0f)

View File

@ -100,7 +100,6 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads
plr.World.BuffManager.AddBuff(plr, plr, new SpiritVesselCooldownBuff()); plr.World.BuffManager.AddBuff(plr, plr, new SpiritVesselCooldownBuff());
return; return;
} }
if (plr.SkillSet.HasPassive(156484) && plr.World.BuffManager.GetFirstBuff<NearDeathExperienceCooldownBuff>(plr) == null) //NearDeathExperience (monk) if (plr.SkillSet.HasPassive(156484) && plr.World.BuffManager.GetFirstBuff<NearDeathExperienceCooldownBuff>(plr) == null) //NearDeathExperience (monk)
{ {
plr.Attributes[GameAttribute.Hitpoints_Cur] = plr.Attributes[GameAttribute.Hitpoints_Max_Total] * 0.35f; plr.Attributes[GameAttribute.Hitpoints_Cur] = plr.Attributes[GameAttribute.Hitpoints_Max_Total] * 0.35f;
@ -114,14 +113,14 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads
{ {
Hireling mon = (Hireling)this.Target; Hireling mon = (Hireling)this.Target;
mon.Dead = true; mon.Dead = true;
Task.Delay(10000).ContinueWith(a => {
if (mon.Dead) if (mon.Dead)
{ {
mon.Attributes[GameAttribute.Hitpoints_Cur] = mon.Attributes[GameAttribute.Hitpoints_Max_Total]; mon.Attributes[GameAttribute.Hitpoints_Cur] = mon.Attributes[GameAttribute.Hitpoints_Max_Total];
mon.Attributes.BroadcastChangedIfRevealed(); mon.Attributes.BroadcastChangedIfRevealed();
mon.Dead = false; mon.Dead = false;
} }
});
return; return;
} }
this.Successful = true; this.Successful = true;

View File

@ -31,9 +31,12 @@ namespace DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Attribute
public override void Encode(GameBitBuffer buffer) public override void Encode(GameBitBuffer buffer)
{ {
buffer.WriteUInt(32, ActorID); //if (ActorID != 0)
Attribute.Encode(buffer); {
Attribute.EncodeValue(buffer); buffer.WriteUInt(32, ActorID);
Attribute.Encode(buffer);
Attribute.EncodeValue(buffer);
}
} }
public override void AsText(StringBuilder b, int pad) public override void AsText(StringBuilder b, int pad)

View File

@ -34,10 +34,13 @@ namespace DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Attribute
public override void Encode(GameBitBuffer buffer) public override void Encode(GameBitBuffer buffer)
{ {
buffer.WriteUInt(32, ActorID); //if (ActorID != 0)
buffer.WriteInt(4, atKeyVals.Length); {
for (int i = 0; i < atKeyVals.Length; i++) { atKeyVals[i].Encode(buffer); } buffer.WriteUInt(32, ActorID);
for (int i = 0; i < atKeyVals.Length; i++) { atKeyVals[i].EncodeValue(buffer); } buffer.WriteInt(4, atKeyVals.Length);
for (int i = 0; i < atKeyVals.Length; i++) { atKeyVals[i].Encode(buffer); }
for (int i = 0; i < atKeyVals.Length; i++) { atKeyVals[i].EncodeValue(buffer); }
}
} }
public override void AsText(StringBuilder b, int pad) public override void AsText(StringBuilder b, int pad)

View File

@ -22,7 +22,7 @@ namespace DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Game
{ {
this.SNOPackHash = snoPacketHash; this.SNOPackHash = snoPacketHash;
this.ProtocolHash = protocol; this.ProtocolHash = protocol;
this.Version = "DiIiS Server - 2.7.1.78185"; this.Version = "DiIiS Server - 2.7.3.82753";
} }
public VersionsMessage() : base(Opcodes.VersionsMessage) { } public VersionsMessage() : base(Opcodes.VersionsMessage) { }