Extract Animation Sno ids into enum, replace some magic constants

This commit is contained in:
DeKaN 2023-01-21 00:18:03 +04:00 committed by pr701
parent d7bce32efb
commit 2547389215
37 changed files with 15446 additions and 15305 deletions

File diff suppressed because it is too large Load Diff

View File

@ -17,46 +17,57 @@ using System.Linq;
using System;
//Blizzless Project 2022
using DiIiS_NA.Core.Helpers.Math;
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
namespace DiIiS_NA.Core.MPQ.FileFormats
{
[FileFormat(SNOGroup.AnimSet)]
public class AnimSet : FileFormat
{
private static readonly AnimationTags[] deathTags = new AnimationTags[]
{
AnimationTags.DeathArcane,
AnimationTags.DeathFire,
AnimationTags.DeathLightning,
AnimationTags.DeathPoison,
AnimationTags.DeathPlague,
AnimationTags.DeathDismember,
AnimationTags.DeathDefault,
AnimationTags.DeathPulverise,
AnimationTags.DeathCold,
AnimationTags.DeathLava,
AnimationTags.DeathHoly,
AnimationTags.DeathSpirit,
AnimationTags.DeathFlyingOrDefault
};
public Header Header { get; private set; }
public int SNOParentAnimSet { get; private set; }
public TagMap TagMapAnimDefault { get; private set; }
public TagMap[] AnimSetTagMaps;
private TagMap TagMapAnimDefault;
private TagMap[] AnimSetTagMaps;
private Dictionary<int, int> _animations;
public Dictionary<int, int> Animations
private Dictionary<int, AnimationSno> _animations;
public Dictionary<int, AnimationSno> Animations
{
get
{
if (_animations == null)
{
_animations = new Dictionary<int, int>();
foreach (var x in TagMapAnimDefault.TagMapEntries)
{
_animations.Add(x.TagID, x.Int);
}
//not sure how better to do this, cant load parents anims on init as they may not be loaded first. - DarkLotus
if (SNOParentAnimSet != -1)
{
var ani = (FileFormats.AnimSet)MPQStorage.Data.Assets[SNOGroup.AnimSet][SNOParentAnimSet].Data;
foreach (var x in ani.Animations)
{
if (!_animations.ContainsKey(x.Key))
_animations.Add(x.Key, x.Value);
}
}
}
return _animations;
return _animations ??= InitAnimations();
}
}
private Dictionary<int, AnimationSno> InitAnimations()
{
var defaultAnimations = TagMapAnimDefault.TagMapEntries.ToDictionary(x => x.TagID, x => (AnimationSno)x.Int);
//not sure how better to do this, cant load parents anims on init as they may not be loaded first. - DarkLotus
if (SNOParentAnimSet != -1)
{
var ani = (AnimSet)MPQStorage.Data.Assets[SNOGroup.AnimSet][SNOParentAnimSet].Data;
return defaultAnimations.Union(ani.Animations.Where(x => !defaultAnimations.ContainsKey(x.Key))).ToDictionary(x => x.Key, x => (AnimationSno)x.Value);
}
return defaultAnimations;
}
public AnimSet(MpqFile file)
{
var stream = file.Open();
@ -74,24 +85,17 @@ namespace DiIiS_NA.Core.MPQ.FileFormats
stream.Close();
}
public int GetAniSNO(AnimationTags type)
public AnimationSno GetAniSNO(AnimationTags type)
{
if (Animations.Keys.Contains((int)type))
{
if (Animations[(int)type] != -1)
{
return Animations[(int)type];
}
return Animations[(int)type];
}
return -1;
return AnimationSno._NONE;
}
public bool TagExists(AnimationTags type)
{
if (Animations.Keys.Contains((int)type))
{
return true;
}
return false;
return Animations.Keys.Contains((int)type);
}
public int GetAnimationTag(AnimationTags type)
{
@ -101,32 +105,13 @@ namespace DiIiS_NA.Core.MPQ.FileFormats
}
return -1;
}
public int GetRandomDeath()
public AnimationSno GetRandomDeath()
{
int ani = -1;
if (!TagExists(AnimationTags.DeathDefault)) { return -1; }
while (ani == -1)
if (!TagExists(AnimationTags.DeathDefault))
{
Array values = Enum.GetValues(typeof(DeathTags));
ani = GetAniSNO((AnimationTags)values.GetValue(RandomHelper.Next(0, values.Length - 1)));
return AnimationSno._NONE;
}
return ani;
}
private enum DeathTags
{
Arcane = 73776,
Fire = 73744,
Lightning = 73760,
Poison = 73792,
Plague = 73856,
Dismember = 73872,
Default = 69712,
Pulverise = 73824,
Cold = 74016,
Lava = 74032,
Holy = 74048,
Spirit = 74064,
FlyingOrDefault = 71424
return deathTags.Select(x => GetAniSNO(x)).Where(x => x != AnimationSno._NONE).OrderBy(x => RandomHelper.Next()).First();
}
}
public enum AnimationTags

File diff suppressed because it is too large Load Diff

View File

@ -98,7 +98,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
new PlayAnimationMessageSpec()
{
Duration = 500,
AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening],
AnimationSNO = (int)AnimationSet.Animations[AnimationSetKeys.Opening.ID],
PermutationIndex = 0,
AnimationTag = 0,
Speed = 1

View File

@ -159,7 +159,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
new PlayAnimationMessageSpec()
{
Duration = 50,
AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening],
AnimationSNO = (int)AnimationSet.Animations[AnimationSetKeys.Opening.ID],
PermutationIndex = 0,
AnimationTag = 0,
Speed = 1

View File

@ -0,0 +1,51 @@
using System.Linq;
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
using DiIiS_NA.GameServer.GSSystem.ActorSystem;
using DiIiS_NA.GameServer.GSSystem.AISystem.Brains;
using DiIiS_NA.GameServer.GSSystem.MapSystem;
using DiIiS_NA.GameServer.GSSystem.PlayerSystem;
using DiIiS_NA.GameServer.GSSystem.PowerSystem;
using DiIiS_NA.GameServer.GSSystem.TickerSystem;
using DiIiS_NA.GameServer.MessageSystem;
namespace DiIiS_NA.D3_GameServer.GSSystem.ActorSystem.Implementations.Minions
{
abstract class AncientBarbarian : Minion
{
protected abstract int[] Powers { get; }
public abstract AnimationSno IntroAnimation { get; }
public AncientBarbarian(World world, ActorSno actorSno, PowerContext context) : base(world, actorSno, context.User, null)
{
Scale = 1.2f; //they look cooler bigger :)
//TODO: get a proper value for this.
this.WalkSpeed *= 5;
this.DamageCoefficient = context.ScriptFormula(11);
var brain = new MinionBrain(this);
foreach (var power in Powers)
{
brain.AddPresetPower(power);
}
SetBrain(brain);
Attributes[GameAttribute.Summoned_By_SNO] = context.PowerSNO;
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
Attributes[GameAttribute.Damage_Weapon_Min, 0] = context.ScriptFormula(11) * context.User.Attributes[GameAttribute.Damage_Weapon_Min_Total, 0];
Attributes[GameAttribute.Damage_Weapon_Delta, 0] = context.ScriptFormula(11) * context.User.Attributes[GameAttribute.Damage_Weapon_Delta_Total, 0];
Attributes[GameAttribute.Pet_Type] = 0x8;
//Pet_Owner and Pet_Creator seems to be 0
if (this.Master != null)
{
if (this.Master is Player)
{
if ((this.Master as Player).Followers.Values.Count(a => a == SNO) > 1)
(this.Master as Player).DestroyFollower(SNO);
}
}
LifeTime = TickTimer.WaitSeconds(world.Game, 30f);
}
}
}

View File

@ -1,6 +1,4 @@
//Blizzless Project 2022
using System.Linq;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.AISystem.Brains;
@ -9,11 +7,8 @@ using DiIiS_NA.GameServer.GSSystem.PowerSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.TickerSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.PlayerSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.MapSystem;
//Blizzless Project 2022
using System.Collections.Generic;
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions

View File

@ -66,7 +66,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
new PlayAnimationMessageSpec()
{
Duration = duration,
AnimationSNO = ActorData.TagMap.ContainsKey(ActorKeys.DeathAnimationTag) ? AnimationSet.TagMapAnimDefault[ActorData.TagMap[ActorKeys.DeathAnimationTag]].Int : AnimationSet.TagMapAnimDefault[AnimationSetKeys.DeathDefault] ,
AnimationSNO = (int)(ActorData.TagMap.ContainsKey(ActorKeys.DeathAnimationTag) ? AnimationSet.Animations[ActorData.TagMap[ActorKeys.DeathAnimationTag]] : AnimationSet.Animations[AnimationSetKeys.DeathDefault.ID]) ,
PermutationIndex = 0,
AnimationTag = 0,
Speed = 1

View File

@ -61,7 +61,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
new PlayAnimationMessageSpec()
{
Duration = 50,
AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening],
AnimationSNO = (int)AnimationSet.Animations[AnimationSetKeys.Opening.ID],
PermutationIndex = 0,
AnimationTag = 0,
Speed = 1

View File

@ -71,7 +71,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.ScriptObjects
new PlayAnimationMessageSpec()
{
Duration = 600,
AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening],
AnimationSNO = (int)AnimationSet.Animations[AnimationSetKeys.Opening.ID],
PermutationIndex = 0,
AnimationTag = 0,
Speed = 1

View File

@ -81,7 +81,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.ScriptObjects
new PlayAnimationMessageSpec()
{
Duration = idDuration,
AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening],
AnimationSNO = (int)AnimationSet.Animations[AnimationSetKeys.Opening.ID],
PermutationIndex = 0,
AnimationTag = 0,
Speed = 1

View File

@ -84,7 +84,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.ScriptObjects
new PlayAnimationMessageSpec()
{
Duration = 50,
AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening],
AnimationSNO = (int)AnimationSet.Animations[AnimationSetKeys.Opening.ID],
PermutationIndex = 0,
AnimationTag = 0,
Speed = 1

View File

@ -72,7 +72,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.ScriptObjects
new PlayAnimationMessageSpec()
{
Duration = 1000,
AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening],
AnimationSNO = (int)AnimationSet.Animations[AnimationSetKeys.Opening.ID],
PermutationIndex = 0,
AnimationTag = 0,
Speed = 1

View File

@ -1,32 +1,15 @@
//Blizzless Project 2022
using System;
//Blizzless Project 2022
using System.Collections.Generic;
//Blizzless Project 2022
using System.Linq;
//Blizzless Project 2022
using DiIiS_NA.Core.Helpers.Math;
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
//Blizzless Project 2022
using DiIiS_NA.GameServer.Core.Types.TagMap;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.ItemsSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.MapSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.PlayerSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Animation;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Base;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Quest;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.World;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Fields;
namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
@ -45,8 +28,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
if (Attributes[GameAttribute.Disabled]) return;
PlayAnimation(5, AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening]);
SetIdleAnimation(AnimationSetKeys.Open.ID);
PlayAnimation(5, AnimationSet.Animations[AnimationSetKeys.Opening.ID]);
SetIdleAnimation(AnimationSet.Animations[AnimationSetKeys.Opening.ID]);
Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true;
Attributes.BroadcastChangedIfRevealed();

View File

@ -1539,7 +1539,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem
//{[1013103213, {[Actor] [Type: Gizmo] SNOId:78439 GlobalId: 1013103213 Position: x:119.54008 y:140.65799 z:-4.535186 Name: Test_CainIntro_greybox_bridge_trOut_TempWorking}]}
//Обрушиваем мостик //EffectGroup "CainIntro_shake", 81546
var bridge = encWorld.GetActorBySNO(ActorSno._test_cainintro_greybox_bridge_trout_tempworking);
bridge.PlayAnimation(5, bridge.AnimationSet.TagMapAnimDefault[AnimationSetKeys.DeathDefault]);
bridge.PlayAnimation(5, bridge.AnimationSet.Animations[AnimationSetKeys.DeathDefault.ID]);
//}
foreach (var skeleton in Skeletons)
{
@ -1553,16 +1553,16 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem
//(Должен быть диалог Король скилет.)
var Leoric = encWorld.SpawnMonster(ActorSno._skeletonking_ghost, FakeLeoricPosition);
Leoric.PlayActionAnimation(668);
Leoric.PlayActionAnimation(AnimationSno.skeletonking_ghost_spawn);
Task.Delay(1000).ContinueWith(delegate
{
foreach (var plr in Players.Values)
plr.Conversations.StartConversation(17692); //Фраза Леорика
Task.Delay(14000).ContinueWith(delegate
Task.Delay(14000).ContinueWith(delegate
{
//Leoric.PlayActionAnimation(9854); //Леорик призывает скелетов
Leoric.PlayActionAnimation(9848); //Себаса
Leoric.PlayActionAnimation(AnimationSno.skeletonking_ghost_despawn); //Себаса
Task.Delay(1000).ContinueWith(delegate
{
foreach (var plr in Players.Values)

View File

@ -29,6 +29,7 @@ using DiIiS_NA.GameServer.GSSystem.PlayerSystem;
using DiIiS_NA.GameServer.GSSystem.PowerSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem;
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Animation;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Misc;
//Blizzless Project 2022
@ -568,42 +569,28 @@ namespace DiIiS_NA.GameServer.GSSystem.MapSystem
monster.EnterWorld(position);
if (monster.AnimationSet != null)
{
if (monster.AnimationSet.TagMapAnimDefault.ContainsKey(70097))
monster.World.BroadcastIfRevealed(plr => new MessageSystem.Message.Definitions.Animation.PlayAnimationMessage
{
ActorID = monster.DynamicID(plr),
AnimReason = 5,
UnitAniimStartTime = 0,
tAnim = new PlayAnimationMessageSpec[]
{
new PlayAnimationMessageSpec()
{
Duration = 150,
AnimationSNO = monster.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Spawn],
PermutationIndex = 0,
Speed = 1
}
}
var animationTag = new[] { AnimationSetKeys.Spawn.ID, AnimationSetKeys.Spawn2.ID }.FirstOrDefault(x => monster.AnimationSet.Animations.ContainsKey(x));
}, monster);
else if (monster.AnimationSet.TagMapAnimDefault.ContainsKey(291072))
monster.World.BroadcastIfRevealed(plr => new MessageSystem.Message.Definitions.Animation.PlayAnimationMessage
{
ActorID = monster.DynamicID(plr),
AnimReason = 5,
UnitAniimStartTime = 0,
tAnim = new PlayAnimationMessageSpec[]
{
new PlayAnimationMessageSpec()
{
Duration = 150,
AnimationSNO = monster.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Spawn2],
PermutationIndex = 0,
Speed = 1
}
}
if (animationTag > 0)
{
monster.World.BroadcastIfRevealed(plr => new PlayAnimationMessage
{
ActorID = monster.DynamicID(plr),
AnimReason = 5,
UnitAniimStartTime = 0,
tAnim = new PlayAnimationMessageSpec[]
{
new PlayAnimationMessageSpec()
{
Duration = 150,
AnimationSNO = (int)monster.AnimationSet.Animations[animationTag],
PermutationIndex = 0,
Speed = 1
}
}
}, monster);
}, monster);
}
}
}
return monster;

View File

@ -1715,7 +1715,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
#region Активация
NStone = World.GetActorBySNO(ActorSno._x1_openworld_lootrunobelisk_b);
NStone.PlayAnimation(5, NStone.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening]);
NStone.PlayAnimation(5, NStone.AnimationSet.Animations[AnimationSetKeys.Opening.ID]);
NStone.Attributes[GameAttribute.Team_Override] = (Activated ? -1 : 2);
NStone.Attributes[GameAttribute.Untargetable] = !Activated;
NStone.Attributes[GameAttribute.NPC_Is_Operatable] = Activated;
@ -1852,7 +1852,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
actor.Destroy();
#region Активация
NStone = World.GetActorBySNO(ActorSno._x1_openworld_lootrunobelisk_b);
NStone.PlayAnimation(5, NStone.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening]);
NStone.PlayAnimation(5, NStone.AnimationSet.Animations[AnimationSetKeys.Opening.ID]);
NStone.Attributes[GameAttribute.Team_Override] = (Activated ? -1 : 2);
NStone.Attributes[GameAttribute.Untargetable] = !Activated;
NStone.Attributes[GameAttribute.NPC_Is_Operatable] = Activated;
@ -3301,7 +3301,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
(ActiveGolem as Minion).Brain.Activate();
ActiveGolem.Attributes[GameAttribute.Untargetable] = false;
ActiveGolem.Attributes.BroadcastChangedIfRevealed();
ActiveGolem.PlayActionAnimation(462828);
ActiveGolem.PlayActionAnimation(AnimationSno.p6_bloodgolem_spawn_01);
}
}
}

View File

@ -1,4 +1,5 @@
//Blizzless Project 2022
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
using DiIiS_NA.GameServer.Core.Types.TagMap;
//Blizzless Project 2022
using System;
@ -23,21 +24,28 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem
}
}
public override int GetActionAnimationSNO()
public override AnimationSno GetActionAnimationSNO()
{
int tag;
switch (ComboIndex)
{
case 0: tag = EvalTag(PowerKeys.ComboAnimation1); break;
case 1: tag = EvalTag(PowerKeys.ComboAnimation2); break;
case 2: tag = EvalTag(PowerKeys.ComboAnimation3); break;
default: return -1;
case 0:
tag = EvalTag(PowerKeys.ComboAnimation1);
break;
case 1:
tag = EvalTag(PowerKeys.ComboAnimation2);
break;
case 2:
tag = EvalTag(PowerKeys.ComboAnimation3);
break;
default:
return AnimationSno._NONE;
}
if (User.AnimationSet.Animations.ContainsKey(tag))
return User.AnimationSet.Animations[tag];
else
return -1;
return AnimationSno._NONE;
}
public override float GetActionSpeed()

View File

@ -4,17 +4,7 @@ using DiIiS_NA.GameServer.GSSystem.TickerSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Animation;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Fields;
//Blizzless Project 2022
using System;
//Blizzless Project 2022
using System.Collections.Generic;
//Blizzless Project 2022
using System.Linq;
//Blizzless Project 2022
using System.Text;
//Blizzless Project 2022
using System.Threading.Tasks;
namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
{
@ -28,7 +18,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
foreach (var Summoner in Summoners)
targets.Actors.Add(Summoner);
WeaponDamage(targets, 100.00f, DamageType.Physical);
User.PlayAnimation(5, 147622);
User.PlayAnimation(5, AnimationSno.leah_hulkout_spellcast);
User.World.BroadcastInclusive(plr => new SetIdleAnimationMessage
{

View File

@ -1,15 +1,5 @@
//Blizzless Project 2022
using DiIiS_NA.Core.MPQ.FileFormats;
//Blizzless Project 2022
using System;
//Blizzless Project 2022
using System.Collections.Generic;
//Blizzless Project 2022
using System.Linq;
//Blizzless Project 2022
using System.Text;
//Blizzless Project 2022
using System.Threading.Tasks;
namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
{

View File

@ -1502,14 +1502,14 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
User.PlayEffectGroup(RuneSelect(241760, 353616, 324779, 353105, 354259, 354419)); //launch
dropPoint.PlayEffectGroup(RuneSelect(265543, 353540, 324791, 353106, 354266, 354546)); //pending
if ((User as Player).Toon.Gender == 2) User.PlayActionAnimation(311619, 1, 12);
else User.PlayActionAnimation(265049, 1, 12);
var animation1 = ((User as Player).Toon.Gender == 2) ? AnimationSno.x1_crusader_female_hth_attack_fallingsword_01 : AnimationSno.x1_crusader_male_hth_attack_fallingsword_01;
User.PlayActionAnimation(animation1, 1, 12);
yield return WaitTicks(12);
User.Teleport(dropPoint.Position);
if ((User as Player).Toon.Gender == 2) User.PlayActionAnimation(311620, 1, 50);
else User.PlayActionAnimation(272320, 1, 50);
var animation2 = ((User as Player).Toon.Gender == 2) ? AnimationSno.x1_crusader_female_hth_attack_fallingsword_02 : AnimationSno.x1_crusader_male_hth_attack_fallingsword_02;
User.PlayActionAnimation(animation2, 1, 50);
yield return WaitTicks(20);
dropPoint.PlayEffectGroup(RuneSelect(241761, 353634, 324826, 353109, 354245, 353851)); //impact
dropPoint.PlayEffectGroup(RuneSelect(275347, 353814, 324832, 353108, 354254, 354632)); //impactLightning

View File

@ -70,7 +70,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
public override void Init()
{
Timeout = WaitSeconds(7f);
User.PlayAnimation(5, 9865);
User.PlayAnimation(5, AnimationSno.skeletonking_whirlwind_start);
}
//This needs to be added into whirlwind, because your walking speed does become slower once whirlwind is active.
@ -93,7 +93,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
public override void Remove()
{
base.Remove();
User.PlayActionAnimation(9863);
User.PlayActionAnimation(AnimationSno.skeletonking_whirlwind_end);
User.Attributes[GameAttribute.Running_Rate] = User.Attributes[GameAttribute.Running_Rate] / EvalTag(PowerKeys.WalkingSpeedMultiplier);
User.Attributes.BroadcastChangedIfRevealed();
}
@ -105,7 +105,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
if (_AnimTimer == null || _AnimTimer.TimedOut)
{
_AnimTimer = WaitSeconds(4f);
User.PlayActionAnimation(81880);
User.PlayActionAnimation(AnimationSno.skeletonking_whirlwind_loop_fx);
}
if (_damageTimer == null || _damageTimer.TimedOut)
@ -329,7 +329,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
public override IEnumerable<TickTimer> Main()
{
var PowerData = (DiIiS_NA.Core.MPQ.FileFormats.Power)DiIiS_NA.Core.MPQ.MPQStorage.Data.Assets[SNOGroup.Power][136223].Data;
User.PlayActionAnimation(128843);
User.PlayActionAnimation(AnimationSno.diablo_ring_of_fire);
yield return WaitSeconds(0.5f);
//User.PlayEffectGroup(196518);
var Point = SpawnEffect(ActorSno._diablo_ringoffire_damagearea, TargetPosition, 0, WaitSeconds(1.5f));
@ -356,7 +356,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
{
var PowerData = (DiIiS_NA.Core.MPQ.FileFormats.Power)DiIiS_NA.Core.MPQ.MPQStorage.Data.Assets[SNOGroup.Power][136226].Data;
User.PlayActionAnimation(128843);
User.PlayActionAnimation(AnimationSno.diablo_ring_of_fire);
//RandomDirection(User.Position, 5, 45)
if (Target != null)
@ -384,7 +384,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
if (Target.Attributes[GameAttribute.Root_Immune] == false)
{
eff.PlayActionAnimation(197689);
eff.PlayActionAnimation(AnimationSno.a4dun_diablo_bone_prison_closing);
Target.Attributes[GameAttribute.IsRooted] = true;
Target.Attributes.BroadcastChangedIfRevealed();
}
@ -393,7 +393,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
}
public override void Remove()
{
eff.PlayActionAnimation(197691);
eff.PlayActionAnimation(AnimationSno.a4dun_diablo_bone_prison_opening);
base.Remove();
Target.Attributes[GameAttribute.IsRooted] = false;
Target.Attributes.BroadcastChangedIfRevealed();

View File

@ -119,7 +119,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
if (payload.Target == User && payload is DeathPayload)
{
if (User.GetActorsInRange(80f).Count > 100) return;
User.PlayAnimation(11, User.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Explode]);
User.PlayAnimation(11, User.AnimationSet.Animations[AnimationSetKeys.Explode.ID]);
for (int i = 0; i < 3; i++)
{
var monster = ActorFactory.Create(User.World, (User as Monster).SNOSummons[0], new TagMap());
@ -170,7 +170,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
SuicideTimer = null;
var dmgTargets = GetEnemiesInRadius(User.Position, 6f);
WeaponDamage(dmgTargets, 5.0f, DamageType.Physical);
User.PlayAnimation(11, User.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Attack]);
User.PlayAnimation(11, User.AnimationSet.Animations[AnimationSetKeys.Attack.ID]);
WeaponDamage(User, 1000.0f, DamageType.Physical);
//(User as Living).Kill();
//foreach (var anim in Target.AnimationSet.TagMapAnimDefault)

View File

@ -321,7 +321,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
{
float facingAngle = MovementHelpers.GetFacingAngle(atr, NStone);
atr.PlayActionAnimation(139775);
atr.PlayActionAnimation(AnimationSno.leah_channel_01);
//atr.PlayEffectGroup(205460); //Add Rope channel to NStone
atr.SetFacingRotation(facingAngle);
@ -867,8 +867,8 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
//ListenTeleport(201250, new LaunchConversationWithCutScene(195719, Tyrael.ActorSNO.Id));
ListenConversation(195719, new LeahTransformation_Line2());
//Смерть охраника PlayAnimation 206664(Отлёт)->211841(СМЕРТ)
Guardian.PlayActionAnimation(206664);
Guardian.PlayActionAnimation(211841);
Guardian.PlayActionAnimation(AnimationSno.omninpc_stranger_bss_event_crouching_knockback_intro);
Guardian.PlayActionAnimation(AnimationSno.omninpc_male_hth_crawl_event47_death_01);
ListenConversation(195721, new LeahTransformation_Line3());
ListenConversation(195723, new LaunchConversation(195725)); // Line4
ListenConversation(195725, new LaunchConversation(195739)); // Line5

View File

@ -283,8 +283,8 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
var Hope = Library.SpawnMonster(ActorSno._hope, new Vector3D(Hope_Bound.Position.X - 0.3854f, Hope_Bound.Position.Y + 0.44201f, Hope_Bound.Position.Z));
var Fate = Library.SpawnMonster(ActorSno._fate, new Vector3D(Hope_Bound.Position.X - 18.6041f, Hope_Bound.Position.Y + 2.35458f, Hope_Bound.Position.Z));
Hope.PlayAnimation(11,201931,1);
Fate.PlayAnimation(11, 204712, 1);
Hope.PlayAnimation(11, AnimationSno.omninpc_female_hope_spawn_01, 1);
Fate.PlayAnimation(11, AnimationSno.omninpc_male_fate_spawn_01, 1);
Hope.Attributes[GameAttribute.MinimapActive] = true;
(Hope as InteractiveNPC).Conversations.Clear();

View File

@ -35,7 +35,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations
Maghda.EnterWorld(Maghda.Position);
Maghda.Attributes[GameAttribute.Untargetable] = true;
Maghda.Attributes.BroadcastChangedIfRevealed();
Maghda.PlayAnimation(5, 193535);
Maghda.PlayAnimation(5, AnimationSno.maghdaprojection_transition_in_01);
StartConversation(AttackedTown, 194933);
}

View File

@ -172,7 +172,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations
var AllTablets = DrownedTempleWorld.GetActorsBySNO(ActorSno._a1dun_caves_nephalem_altar_tablet_a);
foreach (var Tablet in AllTablets)
{
Tablet.PlayAnimation(5, Tablet.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening]);
Tablet.PlayAnimation(5, Tablet.AnimationSet.Animations[AnimationSetKeys.Opening.ID]);
DrownedTempleWorld.BroadcastIfRevealed(plr => new SetIdleAnimationMessage
{
ActorID = Tablet.DynamicID(plr),

View File

@ -1,33 +1,14 @@
//Blizzless Project 2022
using DiIiS_NA.Core.Logging;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.ActorSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.GameSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.PlayerSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem;
//Blizzless Project 2022
using System.Linq;
//Blizzless Project 2022
using System;
//Blizzless Project 2022
using System.Collections.Generic;
//Blizzless Project 2022
using DiIiS_NA.LoginServer.AccountsSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents;
//Blizzless Project 2022
using DiIiS_NA.GameServer.Core.Types.Math;
//Blizzless Project 2022
using DiIiS_NA.Core.Helpers.Math;
//Blizzless Project 2022
using DiIiS_NA.GameServer.Core.Types.TagMap;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Animation;
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations
@ -72,7 +53,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations
foreach (var actor in actorstotarget)
{
actor.PlayAnimation(9, 0x00029A08, 1f);
actor.PlayAnimation(9, AnimationSno.omninpc_male_hth_zombie_transition_intro_01, 1f);
actor.Attributes[GameAttribute.Quest_Monster] = true;
actor.Attributes.BroadcastChangedIfRevealed();
}

View File

@ -65,7 +65,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations
StartConversation(world, 17923);
SkeletonKing_Bridge.PlayAnimation(5, SkeletonKing_Bridge.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening], 1f);
SkeletonKing_Bridge.PlayAnimation(5, SkeletonKing_Bridge.AnimationSet.Animations[AnimationSetKeys.Opening.ID], 1f);
world.BroadcastIfRevealed(plr => new SetIdleAnimationMessage
{

View File

@ -1,12 +1,11 @@
//Blizzless Project 2022
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
using DiIiS_NA.GameServer.GSSystem.ActorSystem.Movement;
//Blizzless Project 2022
using System;
namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations
{
class LeahTransformation_Line11 : QuestEvent
class LeahTransformation_Line11 : QuestEvent
{
public bool raised = false;
@ -19,7 +18,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations
{
StartConversation(world, 195767);
var Leah = world.GetActorBySNO(ActorSno._leah_event47);
Leah.PlayActionAnimation(201990);
Leah.PlayActionAnimation(AnimationSno.leah_bss_event_lvlup);
}
private bool StartConversation(MapSystem.World world, Int32 conversationId)

View File

@ -31,7 +31,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations
Task.Delay(7000).ContinueWith(delegate
{
Leah.PlayActionAnimation(201990);
Leah.PlayActionAnimation(AnimationSno.leah_bss_event_lvlup);
BPortal.Hidden = false;
BPortal.SetVisible(true);
foreach (var plr in world.Players.Values)
@ -39,7 +39,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations
Task.Delay(2000).ContinueWith(delegate
{
Leah.PlayActionAnimation(208444);
Leah.PlayActionAnimation(AnimationSno.leah_bss_event_open_portal_out);
Task.Delay(3000).ContinueWith(delegate
{

View File

@ -1,12 +1,5 @@
//Blizzless Project 2022
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
using DiIiS_NA.GameServer.Core.Types.Math;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.ActorSystem.Movement;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.PowerSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.TickerSystem;
//Blizzless Project 2022
using System;
//Blizzless Project 2022
@ -30,25 +23,25 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations
var RitualCircle = world.GetActorBySNO(ActorSno._event47_groundrune);
var Leah = world.GetActorBySNO(ActorSno._leah_event47);
var NStone = world.GetActorBySNO(ActorSno._a2dun_zolt_black_soulstone);
RitualCircle.PlayActionAnimation(194705); // stage1
RitualCircle.PlayActionAnimation(AnimationSno.emitter_event47_groundrune_stage01); // stage1
Task.Delay(1500).ContinueWith(delegate
{
RitualCircle.PlayActionAnimation(194706); // stage2
Leah.PlayActionAnimation(205941);
RitualCircle.PlayActionAnimation(AnimationSno.emitter_event47_groundrune_stage02); // stage2
Leah.PlayActionAnimation(AnimationSno.leah_bss_event_bound_shake);
Task.Delay(1500).ContinueWith(delegate
{
RitualCircle.PlayActionAnimation(194707); // stage3
RitualCircle.PlayActionAnimation(AnimationSno.emitter_event47_groundrune_stage03); // stage3
Task.Delay(1500).ContinueWith(delegate
{
RitualCircle.PlayActionAnimation(194709); // stage4
RitualCircle.PlayActionAnimation(AnimationSno.emitter_event47_groundrune_stage04); // stage4
Task.Delay(1500).ContinueWith(delegate
{
RitualCircle.PlayEffectGroup(199076);
NStone.Destroy();
StartConversation(world, 195749);
Leah.PlayActionAnimation(194492);
Leah.PlayActionAnimation(AnimationSno.leah_bss_event_kneel_to_getup);
});
});
});

View File

@ -89,7 +89,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents
foreach (var plant in Plants)
{
var Demon = world.SpawnMonster(ActorSno._bigred_a, plant);
Demon.PlayAnimation(11, 159227, 1, 6);
Demon.PlayAnimation(11, AnimationSno.bigred_hole_spawn_02, 1, 6);
Demons.Add(Demon);
}
Task.Delay(3000).ContinueWith(delegate
@ -100,9 +100,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents
Hope.SetVisible(true); Hope.Hidden = false; Hope.Reveal(plr);
Fate.SetVisible(true); Fate.Hidden = false; Fate.Reveal(plr);
}
Imperius.PlayActionAnimation(205702);
Fate.PlayActionAnimation(204712);
Hope.PlayActionAnimation(204712);
Imperius.PlayActionAnimation(AnimationSno.omninpc_male_imperius_tyreal_purpose_fall_to_knee);
Fate.PlayActionAnimation(AnimationSno.omninpc_male_fate_spawn_01);
Hope.PlayActionAnimation(AnimationSno.omninpc_male_fate_spawn_01);
//Fate.PlayAnimation(11, 204712, 1);
Task.Delay(3000).ContinueWith(delegate
{

View File

@ -13,7 +13,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents
public override void Execute(MapSystem.World world)
{
world.GetActorBySNO(ActorSno._x1_pand_batteringram_background).PlayActionAnimation(334748);
world.GetActorBySNO(ActorSno._x1_pand_batteringram_background).PlayActionAnimation(AnimationSno.x1_pand_batteringram_background_move_in_and_out_hit_03);
TickTimer Timeout = new SecondsTickTimer(world.Game, 5.5f);
var Boom = System.Threading.Tasks.Task<bool>.Factory.StartNew(() => WaitToSpawn(Timeout));
Boom.ContinueWith(delegate

View File

@ -26,7 +26,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents
world.SpawnMonster(ActorSno._x1_westmarchranged_b, RandomDirection(Center, 5f, 15f));
}
world.SpawnMonster(ActorSno._x1_leaperangel_a_fortressunique, RandomDirection(Center, 5f, 15f));
world.GetActorBySNO(ActorSno._x1_pand_batteringram_background).PlayActionAnimation(334746);
world.GetActorBySNO(ActorSno._x1_pand_batteringram_background).PlayActionAnimation(AnimationSno.x1_pand_batteringram_background_move_in_and_out_hit_01);
}
public static Vector3D RandomDirection(Vector3D position, float minRadius, float maxRadius)
{

View File

@ -4,8 +4,6 @@ using DiIiS_NA.D3_GameServer.Core.Types.SNO;
//Blizzless Project 2022
using DiIiS_NA.GameServer.Core.Types.Math;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem;
//Blizzless Project 2022
using System;
namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents
@ -27,7 +25,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents
}
world.SpawnMonster(ActorSno._x1_sniperangel_a_fortressunique, RandomDirection(Center, 5f, 15f));
world.GetActorBySNO(ActorSno._x1_pand_batteringram_background).PlayActionAnimation(334747);
world.GetActorBySNO(ActorSno._x1_pand_batteringram_background).PlayActionAnimation(AnimationSno.x1_pand_batteringram_background_move_in_and_out_hit_02);
}
public static Vector3D RandomDirection(Vector3D position, float minRadius, float maxRadius)
{

View File

@ -4,8 +4,6 @@ using DiIiS_NA.D3_GameServer.Core.Types.SNO;
//Blizzless Project 2022
using DiIiS_NA.GameServer.Core.Types.Math;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem;
//Blizzless Project 2022
using System;
namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents
@ -27,7 +25,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents
}
world.SpawnMonster(ActorSno._x1_westmarchbrute_c_fortressunique, RandomDirection(Center, 5f, 15f));
world.GetActorBySNO(ActorSno._x1_pand_batteringram_background).PlayActionAnimation(334747);
world.GetActorBySNO(ActorSno._x1_pand_batteringram_background).PlayActionAnimation(AnimationSno.x1_pand_batteringram_background_move_in_and_out_hit_03);
}
public static Vector3D RandomDirection(Vector3D position, float minRadius, float maxRadius)
{