Merge pull request #88 from iamdroppy/fixed-attributes

Speed modifier with persistent attributes.
This commit is contained in:
pr701 2023-01-23 22:55:33 +03:00 committed by GitHub
commit 6da8166656
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
66 changed files with 16158 additions and 16232 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

View File

@ -133,18 +133,18 @@ namespace DiIiS_NA.GameServer.ClientSystem
OnJoin = true, //without cutscenes
});
if (client.Player.PlayerIndex > 0)
{
//make sure toons Difficulty is set
toon.CurrentDifficulty = (int)game.Difficulty;
client.SendMessage(new HandicapMessage(Opcodes.HandicapMessage)
{
Difficulty = (uint)game.Difficulty
});
}
if (client.Player.PlayerIndex > 0)
{
//make sure toons Difficulty is set
toon.CurrentDifficulty = game.Difficulty;
client.SendMessage(new HandicapMessage(Opcodes.HandicapMessage)
{
Difficulty = (uint)game.Difficulty
});
}
toon.LoginTime = DateTimeExtensions.ToUnixTime(DateTime.UtcNow);
toon.LoginTime = DateTimeExtensions.ToUnixTime(DateTime.UtcNow);
Logger.Debug("Log in time:" + toon.LoginTime.ToString());
game.Enter(client.Player);

View File

@ -1,4 +1,4 @@
//Blizzless Project 2022
//Blizzless Project 2022
using DiIiS_NA.Core.Helpers.Math;
//Blizzless Project 2022
using DiIiS_NA.Core.MPQ;
@ -113,12 +113,13 @@ namespace DiIiS_NA.GameServer.CommandManager
for (int i = 0; i < amount; i++)
{
var position = new Vector3D(player.Position.X + (float)RandomHelper.NextDouble() * 20f,
player.Position.Y + (float)RandomHelper.NextDouble() * 20f,
player.Position.Z);
player.Position.Y + (float)RandomHelper.NextDouble() * 20f,
player.Position.Z);
var monster = player.World.SpawnMonster((ActorSno)actorSNO, position);
}
return $"Spawned {amount} mobs with ActorSNO: {actorSNO}";
}
@ -185,7 +186,7 @@ namespace DiIiS_NA.GameServer.CommandManager
return "You can only invoke this command while ingame.";
var player = invokerClient.InGameClient.Player;
player.BlacksmithUnlocked = true;
player.JewelerUnlocked = true;
player.MysticUnlocked = true;
@ -209,7 +210,8 @@ namespace DiIiS_NA.GameServer.CommandManager
}
}
[CommandGroup("platinum", "Platinum for your character.\nOptionally specify the number of levels: !platinum [count]")]
[CommandGroup("platinum",
"Platinum for your character.\nOptionally specify the number of levels: !platinum [count]")]
public class PlatinumCommand : CommandGroup
{
[DefaultCommand]
@ -256,7 +258,7 @@ namespace DiIiS_NA.GameServer.CommandManager
return "You can only invoke this command while ingame.";
var player = invokerClient.InGameClient.Player;
player.Inventory.OnBuySharedStashSlots(null);
return string.Format("Stash Upgraded");
@ -290,7 +292,8 @@ namespace DiIiS_NA.GameServer.CommandManager
}
}
[CommandGroup("achiplatinum", "Platinum for your character.\nOptionally specify the number of levels: !platinum [count]")]
[CommandGroup("achiplatinum",
"Platinum for your character.\nOptionally specify the number of levels: !platinum [count]")]
public class PlatinumAchiCommand : CommandGroup
{
[DefaultCommand]
@ -389,8 +392,8 @@ namespace DiIiS_NA.GameServer.CommandManager
for (int i = 0; i < amount; i++)
{
var position = new Vector3D(player.Position.X + (float)RandomHelper.NextDouble() * 20f,
player.Position.Y + (float)RandomHelper.NextDouble() * 20f,
player.Position.Z);
player.Position.Y + (float)RandomHelper.NextDouble() * 20f,
player.Position.Z);
var item = ItemGenerator.Cook(player, name);
item.EnterWorld(position);
@ -432,8 +435,8 @@ namespace DiIiS_NA.GameServer.CommandManager
for (int i = 0; i < amount; i++)
{
var position = new Vector3D(player.Position.X + (float)RandomHelper.NextDouble() * 20f,
player.Position.Y + (float)RandomHelper.NextDouble() * 20f,
player.Position.Z);
player.Position.Y + (float)RandomHelper.NextDouble() * 20f,
player.Position.Z);
var item = ItemGenerator.GenerateRandom(player, type);
item.EnterWorld(position);
@ -461,6 +464,7 @@ namespace DiIiS_NA.GameServer.CommandManager
var msg = new InventoryDropItemMessage { ItemID = item.DynamicID(player) };
player.Inventory.Consume(invokerClient.InGameClient, msg);
}
return $"Dropped {bpItems.Count} Items for you";
}
}
@ -495,8 +499,10 @@ namespace DiIiS_NA.GameServer.CommandManager
invokerClient.InGameClient.Player.ChangeWorld(world, world.StartingPoints.First().Position);
var proximity = new System.Drawing.RectangleF(invokerClient.InGameClient.Player.Position.X - 1f, invokerClient.InGameClient.Player.Position.Y - 1f, 2f, 2f);
var scenes = invokerClient.InGameClient.Player.World.QuadTree.Query<GSSystem.MapSystem.Scene>(proximity);
var proximity = new System.Drawing.RectangleF(invokerClient.InGameClient.Player.Position.X - 1f,
invokerClient.InGameClient.Player.Position.Y - 1f, 2f, 2f);
var scenes =
invokerClient.InGameClient.Player.World.QuadTree.Query<GSSystem.MapSystem.Scene>(proximity);
if (scenes.Count == 0) return ""; // cork (is it real?)
var scene = scenes[0]; // Parent scene /fasbat
@ -510,18 +516,23 @@ namespace DiIiS_NA.GameServer.CommandManager
var levelArea = scene.Specification.SNOLevelAreas[0];
//handling quest triggers
if (invokerClient.InGameClient.Player.World.Game.SideQuestProgress.GlobalQuestTriggers.ContainsKey(levelArea)) //EnterLevelArea
if (invokerClient.InGameClient.Player.World.Game.SideQuestProgress.GlobalQuestTriggers
.ContainsKey(levelArea)) //EnterLevelArea
{
var trigger = invokerClient.InGameClient.Player.World.Game.SideQuestProgress.GlobalQuestTriggers[levelArea];
var trigger =
invokerClient.InGameClient.Player.World.Game.SideQuestProgress.GlobalQuestTriggers[levelArea];
if (trigger.triggerType == QuestStepObjectiveType.EnterLevelArea)
{
try
{
trigger.questEvent.Execute(invokerClient.InGameClient.Player.World); // launch a questEvent
}
catch { }
catch
{
}
}
}
foreach (var bounty in invokerClient.InGameClient.Player.World.Game.QuestManager.Bounties)
bounty.CheckLevelArea(levelArea);
return $"Teleported to: {MPQStorage.Data.Assets[SNOGroup.Worlds][worldId].Name} [id: {worldId}]";
@ -559,449 +570,450 @@ namespace DiIiS_NA.GameServer.CommandManager
}
}
[CommandGroup("speed", "Modify speed walk of you character.")]
[CommandGroup("speed", "Modify speed walk of you character.\nUsage: !speed <value>\nReset: !speed")]
public class ModifySpeedCommand : CommandGroup
{
[DefaultCommand]
public string ModifySpeed(string[] @params, BattleClient invokerClient)
{
if (invokerClient == null)
return "You can not invoke this command from console.";
if (invokerClient.InGameClient == null)
return "You can only invoke this command while ingame.";
if (invokerClient?.InGameClient == null)
return "This command can only be used in-game.";
if (@params == null)
return "Change the movement speed. Min 0 (Base), Max 2.\n You can use decimal values like 1,3 for example.";
return
"Change the movement speed. Min 0 (Base), Max 2.\n You can use decimal values like 1,3 for example.";
float speedValue;
foreach (char ch in @params[0])
const float maxSpeed = 3; // 2;
const float baseSpeed = 0.36f;
if (@params.Any())
{
if (Char.IsLetter(ch))
return "Only Numbers";
if (!float.TryParse(@params[0], out speedValue) || speedValue < 0 || speedValue > maxSpeed)
return ("Invalid speed value. Must be a number between 0 and 3.");
}
else
{
speedValue = 0;
}
if (@params[0].Contains(","))
return "jojo";
float SpeedValue = float.Parse(@params[0]);
float MaxSpeed = 2;
float BaseSpeed = 0.36f;
var playerSpeed = invokerClient.InGameClient.Player.Attributes;
if (SpeedValue <= BaseSpeed) // Base Run Speed [Necrosummon]
if (playerSpeed.FixedMap.Contains(FixedAttribute.Speed))
playerSpeed.FixedMap.Remove(FixedAttribute.Speed);
if (speedValue <= baseSpeed) // Base Run Speed [Necrosummon]
{
playerSpeed[GameAttribute.Running_Rate] = BaseSpeed;
return "Speed changed to Base Speed";
playerSpeed[GameAttribute.Running_Rate] = baseSpeed;
return $"Speed reset to Base Speed ({baseSpeed:0.000}).";
}
if (SpeedValue > MaxSpeed)
{
playerSpeed[GameAttribute.Running_Rate] = MaxSpeed;
return $"MaxSpeed {MaxSpeed}";
}
else
playerSpeed[GameAttribute.Running_Rate] = SpeedValue;
playerSpeed.FixedMap.Add(FixedAttribute.Speed, attr => attr[GameAttribute.Running_Rate] = speedValue);
playerSpeed.BroadcastChangedIfRevealed();
return $"Speed changed to {SpeedValue}";
}
}
[CommandGroup("quest", "Retrieves information about quest states and manipulates quest progress.\n Usage: quest [triggers | trigger eventType eventValue | advance snoQuest]")]
public class QuestCommand : CommandGroup
{
[DefaultCommand]
public string Quest(string[] @params, BattleClient invokerClient)
{
if (invokerClient == null)
return "You can not invoke this command from console.";
if (invokerClient.InGameClient == null)
return "You can only invoke this command while ingame.";
return "";
return $"Speed changed to {speedValue}";
}
[Command("advance", "Advances a quest by a single step\n Usage: advance")]
public string Advance(string[] @params, BattleClient invokerClient)
[CommandGroup("quest",
"Retrieves information about quest states and manipulates quest progress.\n Usage: quest [triggers | trigger eventType eventValue | advance snoQuest]")]
public class QuestCommand : CommandGroup
{
try
[DefaultCommand]
public string Quest(string[] @params, BattleClient invokerClient)
{
invokerClient.InGameClient.Game.QuestManager.Advance();
return String.Format("Advancing main quest line");
if (invokerClient == null)
return "You can not invoke this command from console.";
if (invokerClient.InGameClient == null)
return "You can only invoke this command while ingame.";
return "";
}
catch (Exception e)
[Command("advance", "Advances a quest by a single step\n Usage: advance")]
public string Advance(string[] @params, BattleClient invokerClient)
{
return e.Message;
try
{
invokerClient.InGameClient.Game.QuestManager.Advance();
return String.Format("Advancing main quest line");
}
catch (Exception e)
{
return e.Message;
}
}
[Command("sideadvance", "Advances a side-quest by a single step\n Usage: sideadvance")]
public string SideAdvance(string[] @params, BattleClient invokerClient)
{
try
{
invokerClient.InGameClient.Game.QuestManager.SideAdvance();
return String.Format("Advancing side quest line");
}
catch (Exception e)
{
return e.Message;
}
}
[Command("event", "Launches chosen side-quest by snoID\n Usage: event snoId")]
public string Event(string[] @params, BattleClient invokerClient)
{
if (@params == null)
return Fallback();
if (@params.Count() != 1)
return "Invalid arguments. Type 'help text public' to get help.";
int questId = Int32.Parse(@params[0]);
try
{
invokerClient.InGameClient.Game.QuestManager.LaunchSideQuest(questId, true);
return String.Format("Advancing side quest line");
}
catch (Exception e)
{
return e.Message;
}
}
[Command("timer", "Send broadcasted text message.\n Usage: public 'message'")]
public string Timer(string[] @params, BattleClient invokerClient)
{
if (@params == null)
return Fallback();
if (@params.Count() != 2)
return "Invalid arguments. Type 'help text public' to get help.";
int eventId = Int32.Parse(@params[0]);
int duration = Int32.Parse(@params[1]);
invokerClient.InGameClient.Game.QuestManager.LaunchQuestTimer(eventId, (float)duration,
new Action<int>((q) => { }));
return String.Format("Message sended.");
}
}
[Command("sideadvance", "Advances a side-quest by a single step\n Usage: sideadvance")]
public string SideAdvance(string[] @params, BattleClient invokerClient)
[CommandGroup("lookup",
"Searches in sno databases.\nUsage: lookup [actor|conv|power|scene|la|sp|weather] <pattern>")]
public class LookupCommand : CommandGroup
{
try
[DefaultCommand]
public string Search(string[] @params, BattleClient invokerClient)
{
invokerClient.InGameClient.Game.QuestManager.SideAdvance();
return String.Format("Advancing side quest line");
if (@params == null)
return Fallback();
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup actor' to get help.";
var pattern = @params[0].ToLower();
foreach (var groupPair in MPQStorage.Data.Assets)
{
foreach (var pair in groupPair.Value)
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
}
}
return matches.Aggregate(matches.Count >= 1 ? "Matches:\n" : "No matches found.",
(current, match) => current +
$"[{match.SNOId.ToString("D6")}] [{match.Group}] {match.Name}\n");
}
catch (Exception e)
[Command("actor", "Allows you to search for an actor.\nUsage: lookup actor <pattern>")]
public string Actor(string[] @params, BattleClient invokerClient)
{
return e.Message;
}
}
var matches = new List<Asset>();
[Command("event", "Launches chosen side-quest by snoID\n Usage: event snoId")]
public string Event(string[] @params, BattleClient invokerClient)
{
if (@params == null)
return Fallback();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup actor' to get help.";
if (@params.Count() != 1)
return "Invalid arguments. Type 'help text public' to get help.";
var pattern = @params[0].ToLower();
int questId = Int32.Parse(@params[0]);
try
{
invokerClient.InGameClient.Game.QuestManager.LaunchSideQuest(questId, true);
return String.Format("Advancing side quest line");
}
catch (Exception e)
{
return e.Message;
}
}
[Command("timer", "Send broadcasted text message.\n Usage: public 'message'")]
public string Timer(string[] @params, BattleClient invokerClient)
{
if (@params == null)
return Fallback();
if (@params.Count() != 2)
return "Invalid arguments. Type 'help text public' to get help.";
int eventId = Int32.Parse(@params[0]);
int duration = Int32.Parse(@params[1]);
invokerClient.InGameClient.Game.QuestManager.LaunchQuestTimer(eventId, (float)duration, new Action<int>((q) => { }));
return String.Format("Message sended.");
}
}
[CommandGroup("lookup", "Searches in sno databases.\nUsage: lookup [actor|conv|power|scene|la|sp|weather] <pattern>")]
public class LookupCommand : CommandGroup
{
[DefaultCommand]
public string Search(string[] @params, BattleClient invokerClient)
{
if (@params == null)
return Fallback();
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup actor' to get help.";
var pattern = @params[0].ToLower();
foreach (var groupPair in MPQStorage.Data.Assets)
{
foreach (var pair in groupPair.Value)
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Actor])
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
}
return matches.Aggregate(matches.Count >= 1 ? "Actor Matches:\n" : "No match found.",
(current, match) => current +
$"[{match.SNOId.ToString("D6")}] {match.Name} ({(match.Data as DiIiS_NA.Core.MPQ.FileFormats.Actor).Type} {(((match.Data as DiIiS_NA.Core.MPQ.FileFormats.Actor).Type == ActorType.Gizmo) ? ((int)(match.Data as DiIiS_NA.Core.MPQ.FileFormats.Actor).TagMap[ActorKeys.GizmoGroup]).ToString() : "")})\n");
}
return matches.Aggregate(matches.Count >= 1 ? "Matches:\n" : "No matches found.",
(current, match) => current +
$"[{match.SNOId.ToString("D6")}] [{match.Group}] {match.Name}\n");
}
[Command("actor", "Allows you to search for an actor.\nUsage: lookup actor <pattern>")]
public string Actor(string[] @params, BattleClient invokerClient)
{
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup actor' to get help.";
var pattern = @params[0].ToLower();
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Actor])
[Command("rope", "Allows you to search for an rope.\nUsage: lookup rope <pattern>")]
public string Rope(string[] @params, BattleClient invokerClient)
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup actor' to get help.";
var pattern = @params[0].ToLower();
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Rope])
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
}
return matches.Aggregate(matches.Count >= 1 ? "Rope Matches:\n" : "No match found.",
(current, match) => current + $"[{match.SNOId.ToString("D6")}] {match.Name}\n");
}
return matches.Aggregate(matches.Count >= 1 ? "Actor Matches:\n" : "No match found.",
(current, match) => current +
$"[{match.SNOId.ToString("D6")}] {match.Name} ({(match.Data as DiIiS_NA.Core.MPQ.FileFormats.Actor).Type} {(((match.Data as DiIiS_NA.Core.MPQ.FileFormats.Actor).Type == ActorType.Gizmo) ? ((int)(match.Data as DiIiS_NA.Core.MPQ.FileFormats.Actor).TagMap[ActorKeys.GizmoGroup]).ToString() : "")})\n");
}
[Command("rope", "Allows you to search for an rope.\nUsage: lookup rope <pattern>")]
public string Rope(string[] @params, BattleClient invokerClient)
{
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup actor' to get help.";
var pattern = @params[0].ToLower();
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Rope])
[Command("conv", "Allows you to search for an conversation.\nUsage: lookup conv <pattern>")]
public string Conversation(string[] @params, BattleClient invokerClient)
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup actor' to get help.";
var pattern = @params[0].ToLower();
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Conversation])
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
}
return matches.Aggregate(matches.Count >= 1 ? "Conversation Matches:\n" : "No match found.",
(current, match) => current + $"[{match.SNOId.ToString("D6")}] {match.Name}\n");
}
return matches.Aggregate(matches.Count >= 1 ? "Rope Matches:\n" : "No match found.",
(current, match) => current + $"[{match.SNOId.ToString("D6")}] {match.Name}\n");
}
[Command("conv", "Allows you to search for an conversation.\nUsage: lookup conv <pattern>")]
public string Conversation(string[] @params, BattleClient invokerClient)
{
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup actor' to get help.";
var pattern = @params[0].ToLower();
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Conversation])
[Command("power", "Allows you to search for a power.\nUsage: lookup power <pattern>")]
public string Power(string[] @params, BattleClient invokerClient)
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup power' to get help.";
if (@params[0].ToLower() == "id")
{
var num = Int32.Parse(@params[1]);
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Power])
{
if (pair.Value.SNOId == num)
matches.Add(pair.Value);
}
}
else
{
var pattern = @params[0].ToLower();
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Power])
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
}
}
return matches.Aggregate(matches.Count >= 1 ? "Power Matches:\n" : "No match found.",
(current, match) => current + $"[{match.SNOId.ToString("D6")}] {match.Name}\n");
}
return matches.Aggregate(matches.Count >= 1 ? "Conversation Matches:\n" : "No match found.",
(current, match) => current + $"[{match.SNOId.ToString("D6")}] {match.Name}\n");
}
[Command("power", "Allows you to search for a power.\nUsage: lookup power <pattern>")]
public string Power(string[] @params, BattleClient invokerClient)
{
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup power' to get help.";
if (@params[0].ToLower() == "id")
[Command("world",
"Allows you to search for a world.\nUsage: lookup world <pattern> OR lookup world id <snoId>")]
public string World(string[] @params, BattleClient invokerClient)
{
var num = Int32.Parse(@params[1]);
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Power])
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup world' to get help.";
if (@params[0].ToLower() == "id")
{
var num = Int32.Parse(@params[1]);
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Worlds])
{
if (pair.Value.SNOId == num)
matches.Add(pair.Value);
}
}
else
{
var pattern = @params[0].ToLower();
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Worlds])
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
}
}
return matches.Aggregate(matches.Count >= 1 ? "World Matches:\n" : "No match found.",
(current, match) => current +
$"[{match.SNOId.ToString("D6")}] {match.Name} - {(match.Data as World).DynamicWorld}\n");
}
[Command("qr", "Show QuestRange of an actor.\nUsage: lookup qr <id>")]
public string QuestRange(string[] @params, BattleClient invokerClient)
{
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup world' to get help.";
var num = Int32.Parse(@params[0]);
string qr_id = "-1";
string qr_name = "None";
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.QuestRange])
{
if (pair.Value.SNOId == num)
matches.Add(pair.Value);
{
qr_id = pair.Value.SNOId.ToString("D6");
qr_name = pair.Value.Name;
}
}
return $"[{qr_id}] {qr_name}";
}
else
public static int GetExitBits(Asset scene)
{
if (scene.Name.Contains("_N_")) return 1;
else if (scene.Name.Contains("_S_")) return 2;
else if (scene.Name.Contains("_NS_")) return 3;
else if (scene.Name.Contains("_E_")) return 4;
else if (scene.Name.Contains("_NE_")) return 5;
else if (scene.Name.Contains("_SE_")) return 6;
else if (scene.Name.Contains("_NSE_")) return 7;
else if (scene.Name.Contains("_W_")) return 8;
else if (scene.Name.Contains("_NW_")) return 9;
else if (scene.Name.Contains("_SW_")) return 10;
else if (scene.Name.Contains("_NSW_")) return 11;
else if (scene.Name.Contains("_EW_")) return 12;
else if (scene.Name.Contains("_NEW_")) return 13;
else if (scene.Name.Contains("_SEW_")) return 14;
else if (scene.Name.Contains("_NSEW_")) return 15;
else return 0;
}
[Command("la", "Allows you to search for a LevelArea.\nUsage: lookup la <pattern>")]
public string LevelArea(string[] @params, BattleClient invokerClient)
{
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup la' to get help.";
var pattern = @params[0].ToLower();
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Power])
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.LevelArea])
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
}
return matches.Aggregate(matches.Count >= 1 ? "LevelArea Matches:\n" : "No match found.",
(current, match) => current + $"[{match.SNOId.ToString("D6")}] {match.Name}\n");
}
return matches.Aggregate(matches.Count >= 1 ? "Power Matches:\n" : "No match found.",
(current, match) => current + $"[{match.SNOId.ToString("D6")}] {match.Name}\n");
}
[Command("world", "Allows you to search for a world.\nUsage: lookup world <pattern> OR lookup world id <snoId>")]
public string World(string[] @params, BattleClient invokerClient)
{
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup world' to get help.";
if (@params[0].ToLower() == "id")
[Command("sp", "List all Starting Points in world.\nUsage: lookup sp")]
public string StartingPoint(string[] @params, BattleClient invokerClient)
{
var num = Int32.Parse(@params[1]);
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Worlds])
{
if (pair.Value.SNOId == num)
matches.Add(pair.Value);
}
var matches = invokerClient.InGameClient.Player.World.StartingPoints;
return matches.Aggregate(matches.Count >= 1 ? "Starting Points:\n" : "No match found.",
(current, match) => current +
$"[{match.GlobalID.ToString("D6")}] {match.Name} - {match.TargetId}\n");
}
else
[Command("weather", "Allows you to search for a Weather.\nUsage: lookup weather <pattern>")]
public string Weather(string[] @params, BattleClient invokerClient)
{
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup weather' to get help.";
var pattern = @params[0].ToLower();
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Worlds])
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Weather])
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
}
return matches.Aggregate(matches.Count >= 1 ? "Weather Matches:\n" : "No match found.",
(current, match) => current + $"[{match.SNOId.ToString("D6")}] {match.Name}\n");
}
return matches.Aggregate(matches.Count >= 1 ? "World Matches:\n" : "No match found.",
(current, match) => current +
$"[{match.SNOId.ToString("D6")}] {match.Name} - {(match.Data as World).DynamicWorld}\n");
}
[Command("qr", "Show QuestRange of an actor.\nUsage: lookup qr <id>")]
public string QuestRange(string[] @params, BattleClient invokerClient)
{
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup world' to get help.";
var num = Int32.Parse(@params[0]);
string qr_id = "-1";
string qr_name = "None";
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.QuestRange])
[Command("scene", "Allows you to search for a scene.\nUsage: lookup scene <pattern>")]
public string Scene(string[] @params, BattleClient invokerClient)
{
if (pair.Value.SNOId == num)
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup scene' to get help.";
var pattern = @params[0].ToLower();
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Scene])
{
qr_id = pair.Value.SNOId.ToString("D6");
qr_name = pair.Value.Name;
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
}
return matches.Aggregate(matches.Count >= 1 ? "Scene Matches:\n" : "No match found.",
(current, match) => current +
$"[{match.SNOId.ToString("D6")}] {match.Name} - {GetExitBits(match)}\n");
}
return $"[{qr_id}] {qr_name}";
}
public static int GetExitBits(Asset scene)
{
if (scene.Name.Contains("_N_")) return 1;
else if (scene.Name.Contains("_S_")) return 2;
else if (scene.Name.Contains("_NS_")) return 3;
else if (scene.Name.Contains("_E_")) return 4;
else if (scene.Name.Contains("_NE_")) return 5;
else if (scene.Name.Contains("_SE_")) return 6;
else if (scene.Name.Contains("_NSE_")) return 7;
else if (scene.Name.Contains("_W_")) return 8;
else if (scene.Name.Contains("_NW_")) return 9;
else if (scene.Name.Contains("_SW_")) return 10;
else if (scene.Name.Contains("_NSW_")) return 11;
else if (scene.Name.Contains("_EW_")) return 12;
else if (scene.Name.Contains("_NEW_")) return 13;
else if (scene.Name.Contains("_SEW_")) return 14;
else if (scene.Name.Contains("_NSEW_")) return 15;
else return 0;
}
[Command("la", "Allows you to search for a LevelArea.\nUsage: lookup la <pattern>")]
public string LevelArea(string[] @params, BattleClient invokerClient)
{
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup la' to get help.";
var pattern = @params[0].ToLower();
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.LevelArea])
[Command("eg", "Allows you to search for an EffectGroup.\nUsage: lookup eg <pattern>")]
public string EffectGroup(string[] @params, BattleClient invokerClient)
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
}
var matches = new List<Asset>();
return matches.Aggregate(matches.Count >= 1 ? "LevelArea Matches:\n" : "No match found.",
(current, match) => current + $"[{match.SNOId.ToString("D6")}] {match.Name}\n");
}
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup eg' to get help.";
[Command("sp", "List all Starting Points in world.\nUsage: lookup sp")]
public string StartingPoint(string[] @params, BattleClient invokerClient)
{
var matches = invokerClient.InGameClient.Player.World.StartingPoints;
var pattern = @params[0].ToLower();
return matches.Aggregate(matches.Count >= 1 ? "Starting Points:\n" : "No match found.",
(current, match) => current +
$"[{match.GlobalID.ToString("D6")}] {match.Name} - {match.TargetId}\n");
}
[Command("weather", "Allows you to search for a Weather.\nUsage: lookup weather <pattern>")]
public string Weather(string[] @params, BattleClient invokerClient)
{
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup weather' to get help.";
var pattern = @params[0].ToLower();
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Weather])
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
}
return matches.Aggregate(matches.Count >= 1 ? "Weather Matches:\n" : "No match found.",
(current, match) => current + $"[{match.SNOId.ToString("D6")}] {match.Name}\n");
}
[Command("scene", "Allows you to search for a scene.\nUsage: lookup scene <pattern>")]
public string Scene(string[] @params, BattleClient invokerClient)
{
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup scene' to get help.";
var pattern = @params[0].ToLower();
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.Scene])
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
}
return matches.Aggregate(matches.Count >= 1 ? "Scene Matches:\n" : "No match found.",
(current, match) => current +
$"[{match.SNOId.ToString("D6")}] {match.Name} - {GetExitBits(match)}\n");
}
[Command("eg", "Allows you to search for an EffectGroup.\nUsage: lookup eg <pattern>")]
public string EffectGroup(string[] @params, BattleClient invokerClient)
{
var matches = new List<Asset>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup eg' to get help.";
var pattern = @params[0].ToLower();
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.EffectGroup])
{
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
}
return matches.Aggregate(matches.Count >= 1 ? "EffectGroup Matches:\n" : "No match found.",
(current, match) => current +
$"[{match.SNOId.ToString("D6")}] {match.Name} - {GetExitBits(match)}\n");
}
[Command("item", "Allows you to search for an item.\nUsage: lookup item <pattern>")]
public string Item(string[] @params, BattleClient invokerClient)
{
var matches = new List<ItemTable>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup item' to get help.";
var pattern = @params[0].ToLower();
foreach (var asset in MPQStorage.Data.Assets[SNOGroup.GameBalance].Values)
{
var data = asset.Data as GameBalance;
if (data == null || data.Type != BalanceType.Items) continue;
foreach (var itemDefinition in data.Item)
foreach (var pair in MPQStorage.Data.Assets[SNOGroup.EffectGroup])
{
if (itemDefinition.Name.ToLower().Contains(pattern))
matches.Add(itemDefinition);
if (pair.Value.Name.ToLower().Contains(pattern))
matches.Add(pair.Value);
}
return matches.Aggregate(matches.Count >= 1 ? "EffectGroup Matches:\n" : "No match found.",
(current, match) => current +
$"[{match.SNOId.ToString("D6")}] {match.Name} - {GetExitBits(match)}\n");
}
[Command("item", "Allows you to search for an item.\nUsage: lookup item <pattern>")]
public string Item(string[] @params, BattleClient invokerClient)
{
var matches = new List<ItemTable>();
if (@params.Count() < 1)
return "Invalid arguments. Type 'help lookup item' to get help.";
var pattern = @params[0].ToLower();
foreach (var asset in MPQStorage.Data.Assets[SNOGroup.GameBalance].Values)
{
var data = asset.Data as GameBalance;
if (data == null || data.Type != BalanceType.Items) continue;
foreach (var itemDefinition in data.Item)
{
if (itemDefinition.Name.ToLower().Contains(pattern))
matches.Add(itemDefinition);
}
}
return matches.Aggregate(matches.Count >= 1 ? "Item Matches:\n" : "No match found.",
(current, match) => current + $"[{match.SNOActor.ToString("D6")}] {match.Name}\n");
}
return matches.Aggregate(matches.Count >= 1 ? "Item Matches:\n" : "No match found.",
(current, match) => current + $"[{match.SNOActor.ToString("D6")}] {match.Name}\n");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -656,24 +656,23 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
}, target);
}
public void SetIdleAnimation(int animationSNO)
public void SetIdleAnimation(AnimationSno animationSNO)
{
if (World == null || animationSNO == -1) return;
if (this.World == null || animationSNO == AnimationSno._NONE) return;
World.BroadcastIfRevealed(plr => new SetIdleAnimationMessage
{
ActorID = DynamicID(plr),
AnimationSNO = animationSNO
ActorID = this.DynamicID(plr),
AnimationSNO = (int)animationSNO
}, this);
}
public void PlayAnimationAsSpawn(int animationSNO)
public void PlayAnimationAsSpawn(AnimationSno animationSNO)
{
if (this is Monster)
{
var anim =
(DiIiS_NA.Core.MPQ.FileFormats.Anim)MPQStorage.Data.Assets[SNOGroup.Anim][
animationSNO].Data;
// unused
//var Anim = (DiIiS_NA.Core.MPQ.FileFormats.Anim)DiIiS_NA.Core.MPQ.MPQStorage.Data.Assets[SNOGroup.Anim][animationSNO].Data;
World.BroadcastIfRevealed(plr => new PlayAnimationMessage
{
@ -696,9 +695,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
}
}
public void PlayAnimation(int animationType, int animationSNO, float speed = 1.0f, int? ticksToPlay = null, int type2 = 0)
public void PlayAnimation(int animationType, AnimationSno animationSNO, float speed = 1.0f, int? ticksToPlay = null, int type2 = 0)
{
if (World == null || animationSNO == -1) return;
if (this.World == null || animationSNO == AnimationSno._NONE) return;
World.BroadcastIfRevealed(plr => new PlayAnimationMessage
{
@ -710,7 +709,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
new()
{
Duration = ticksToPlay ?? -2, // -2 = play animation once through
AnimationSNO = animationSNO,
AnimationSNO = (int)animationSNO,
PermutationIndex = 0x0, // TODO: implement variations?
AnimationTag = 0,
Speed = speed,
@ -719,7 +718,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
}, this);
}
public void PlayActionAnimation(int animationSNO, float speed = 1.0f, int? ticksToPlay = null)
public void PlayActionAnimation(AnimationSno animationSNO, float speed = 1.0f, int? ticksToPlay = null)
{
PlayAnimation(3, animationSNO, speed, ticksToPlay);
}
@ -969,11 +968,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
if (Tags != null)
if (Tags.ContainsKey(MarkerKeys.Group1Hash))
if (Tags[MarkerKeys.Group1Hash] == -1248096796)
PlayActionAnimation(11514);
PlayActionAnimation(AnimationSno.zombie_male_skinny_eating);
}
// set idle animation for workers
else if (World.SNO == WorldSno.trout_tristram_inn && SNO == ActorSno._omninpc_tristram_male_a)
PlayActionAnimation(102329);
PlayActionAnimation(AnimationSno.omninpc_male_hth_injured);
else if (SNO == ActorSno._leah)
player.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Inventory.VisualInventoryMessage()
{

View File

@ -58,7 +58,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
Logger.Trace("Breaked barricade, id: {0}", SNO);
if (AnimationSet.TagMapAnimDefault.ContainsKey(AnimationSetKeys.DeathDefault))
if (AnimationSet.Animations.ContainsKey(AnimationSetKeys.DeathDefault.ID))
World.BroadcastIfRevealed(plr => new PlayAnimationMessage
{
ActorID = DynamicID(plr),
@ -69,7 +69,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
new PlayAnimationMessageSpec()
{
Duration = 10,
AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.DeathDefault], //{DeathDefault = 10217}
AnimationSNO = (int)AnimationSet.Animations[AnimationSetKeys.DeathDefault.ID], //{DeathDefault = 10217}
PermutationIndex = 0,
AnimationTag = 0,
Speed = 1

View File

@ -57,7 +57,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
Logger.Trace("Breaked barricade, id: {0}", SNO);
if (AnimationSet.TagMapAnimDefault.ContainsKey(AnimationSetKeys.DeathDefault))
if (this.AnimationSet.Animations.ContainsKey(AnimationSetKeys.DeathDefault.ID))
World.BroadcastIfRevealed(plr => new PlayAnimationMessage
{
ActorID = DynamicID(plr),
@ -68,7 +68,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
new PlayAnimationMessageSpec()
{
Duration = 10,
AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.DeathDefault],
AnimationSNO = (int)AnimationSet.Animations[AnimationSetKeys.DeathDefault.ID],
PermutationIndex = 0,
AnimationTag = 0,
Speed = 1

View File

@ -41,7 +41,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
bool Activated = false;
PlayAnimation(5, AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening]);
this.PlayAnimation(5, AnimationSet.Animations[AnimationSetKeys.Opening.ID]);
Attributes[GameAttribute.Team_Override] = (Activated ? -1 : 2);
Attributes[GameAttribute.Untargetable] = !Activated;
Attributes[GameAttribute.NPC_Is_Operatable] = Activated;
@ -81,7 +81,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
}
else
{
PlayAnimation(5, AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening]);
this.PlayAnimation(5, AnimationSet.Animations[AnimationSetKeys.Opening.ID]);
}
return true;
}

View File

@ -106,7 +106,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
(source as Player).AddAchievementCounter(74987243307171, 1);
}
if (AnimationSet.TagMapAnimDefault.ContainsKey(AnimationSetKeys.DeathDefault))
if (this.AnimationSet.Animations.ContainsKey(AnimationSetKeys.DeathDefault.ID))
World.BroadcastIfRevealed(plr => new PlayAnimationMessage
{
ActorID = DynamicID(plr),
@ -117,7 +117,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
new PlayAnimationMessageSpec()
{
Duration = 10,
AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.DeathDefault],
AnimationSNO = (int)AnimationSet.Animations[AnimationSetKeys.DeathDefault.ID],
PermutationIndex = 0,
AnimationTag = 0,
Speed = 1

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,59 +1,26 @@
//Blizzless Project 2022
using System.Linq;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.AISystem.Brains;
//Blizzless Project 2022
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;
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
namespace DiIiS_NA.D3_GameServer.GSSystem.ActorSystem.Implementations.Minions
{
class AncientKorlic : Minion
{
public new int SummonLimit = 1;
class AncientKorlic : AncientBarbarian
{
private static readonly int[] powers = new int[]
{
30592, //Weapon_Instant
187092, //basic melee
168823, //cleave
168824 //furious charge //Only Active with Rune_A
};
public AncientKorlic(World world, PowerContext context) : base(world, ActorSno._barbarian_calloftheancients_1, context)
{
}
public AncientKorlic(World world, PowerContext context, int AncientsID)
: base(world, ActorSno._barbarian_calloftheancients_1, context.User, null)
{
Scale = 1.2f; //they look cooler bigger :)
//TODO: get a proper value for this.
WalkSpeed *= 5;
DamageCoefficient = context.ScriptFormula(11);
SetBrain(new MinionBrain(this));
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
(Brain as MinionBrain).AddPresetPower(168824); //furious charge //Only Active with Rune_A
//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;
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
public override AnimationSno IntroAnimation => AnimationSno.barbarian_male_ancients_korlic_intro;
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 (Master != null)
{
if (Master is Player)
{
if ((Master as Player).Followers.Values.Count(a => a == SNO) > 1)
(Master as Player).DestroyFollower(SNO);
}
}
LifeTime = TickTimer.WaitSeconds(world.Game, 30f);
}
}
protected override int[] Powers => powers;
}
}

View File

@ -1,59 +1,26 @@
//Blizzless Project 2022
using System.Linq;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.AISystem.Brains;
//Blizzless Project 2022
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;
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
namespace DiIiS_NA.D3_GameServer.GSSystem.ActorSystem.Implementations.Minions
{
class AncientMawdawc : Minion
{
public new int SummonLimit = 1;
class AncientMawdawc : AncientBarbarian
{
private static readonly int[] powers = new int[]
{
30592, //Weapon_Instant
187092, //basic melee
168827, //Seismic Slam //Only Active with Rune_C
168828 //Weapon Throw
};
public AncientMawdawc(World world, PowerContext context) : base(world, ActorSno._barbarian_calloftheancients_3, context)
{
}
public AncientMawdawc(World world, PowerContext context, int AncientsID)
: base(world, ActorSno._barbarian_calloftheancients_3, context.User, null)
{
Scale = 1.2f; //they look cooler bigger :)
//TODO: get a proper value for this.
WalkSpeed *= 5;
DamageCoefficient = context.ScriptFormula(11);
SetBrain(new MinionBrain(this));
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
(Brain as MinionBrain).AddPresetPower(168828); //Weapon Throw
//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;
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
public override AnimationSno IntroAnimation => AnimationSno.barbarian_male_ancients_mawdawc_intro;
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 (Master != null)
{
if (Master is Player)
{
if ((Master as Player).Followers.Values.Count(a => a == SNO) > 1)
(Master as Player).DestroyFollower(SNO);
}
}
LifeTime = TickTimer.WaitSeconds(world.Game, 30f);
}
}
protected override int[] Powers => powers;
}
}

View File

@ -1,59 +1,26 @@
//Blizzless Project 2022
using System.Linq;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.AISystem.Brains;
//Blizzless Project 2022
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;
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Minions
namespace DiIiS_NA.D3_GameServer.GSSystem.ActorSystem.Implementations.Minions
{
class AncientTalic : Minion
{
public new int SummonLimit = 1;
class AncientTalic : AncientBarbarian
{
private static readonly int[] powers = new int[]
{
30592, //Weapon_Instant
187092, //basic melee
168825, //Leap //Only Active with Rune_E
168830 //WhirlWind
};
public AncientTalic(World world, PowerContext context) : base(world, ActorSno._barbarian_calloftheancients_2, context)
{
}
public AncientTalic(World world, PowerContext context, int AncientsID)
: base(world, ActorSno._barbarian_calloftheancients_2, context.User, null)
{
Scale = 1.2f; //they look cooler bigger :)
//TODO: get a proper value for this.
WalkSpeed *= 5;
DamageCoefficient = context.ScriptFormula(11);
SetBrain(new MinionBrain(this));
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
(Brain as MinionBrain).AddPresetPower(168830); //WhirlWind
//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;
Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
public override AnimationSno IntroAnimation => AnimationSno.barbarian_male_ancients_talic_intro;
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 (Master != null)
{
if (Master is Player)
{
if ((Master as Player).Followers.Values.Count(a => a == SNO) > 1)
(Master as Player).DestroyFollower(SNO);
}
}
LifeTime = TickTimer.WaitSeconds(world.Game, 30f);
}
}
protected override int[] Powers => powers;
}
}

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

@ -59,7 +59,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
ActorSno._x1_westmarchfemale_deathmaidenkill
))
{
if (man.CurrentScene.SceneSNO.Id == CurrentScene.SceneSNO.Id) man.PlayActionAnimation(306544);
if (man.CurrentScene.SceneSNO.Id == this.CurrentScene.SceneSNO.Id) man.PlayActionAnimation(AnimationSno.x1_westmhub_guard_wispkilled_transform_01);
}
}
break;
@ -85,7 +85,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
ActorSno._x1_westm_intro_human_female
))
{
if (man.CurrentScene.SceneSNO.Id == CurrentScene.SceneSNO.Id) man.PlayActionAnimation(306544);
if (man.CurrentScene.SceneSNO.Id == this.CurrentScene.SceneSNO.Id) man.PlayActionAnimation(AnimationSno.x1_westmhub_guard_wispkilled_transform_01);
}

View File

@ -1,28 +1,21 @@
//Blizzless Project 2022
using System;
//Blizzless Project 2022
using System.Linq;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.MapSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.Core.Types.TagMap;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.PlayerSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.World;
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
//[ Info] [AttackPayload]: Игрок с индесом: 0 - задамажил: ID: 449323 Name: Barbarian_KKG_Event, NumInWorld: 0
//[ Info] [AttackPayload]: Игрок с индесом: 0 - задамажил: ID: 435818 Name: Barbarian_KKG, NumInWorld: 0
[HandledSNO(ActorSno._barbarian_kkg, ActorSno._barbarian_kkg_event)] //Barbarian_KKG
//[ Info] [AttackPayload]: Игрок с индесом: 0 - задамажил: ID: 449323 Name: Barbarian_KKG_Event, NumInWorld: 0
//[ Info] [AttackPayload]: Игрок с индесом: 0 - задамажил: ID: 435818 Name: Barbarian_KKG, NumInWorld: 0
[HandledSNO(ActorSno._barbarian_kkg, ActorSno._barbarian_kkg_event)] //Barbarian_KKG
public class Barbarian_KKG : NPC
{
public Barbarian_KKG(World world, ActorSno sno, TagMap tags)
: base(world, sno, tags)
{
PlayActionAnimation(449259);
this.PlayActionAnimation(AnimationSno.barbarian_kkg_follower_hth_kkgevent_sit);
}
protected override void ReadTags()

View File

@ -1,21 +1,16 @@
//Blizzless Project 2022
using System;
//Blizzless Project 2022
using System.Linq;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.MapSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.Core.Types.TagMap;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.PlayerSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.World;
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
{
//[ Info] [AttackPayload]: Игрок с индесом: 0 - задамажил: ID: 437089 Name: Barbarian_KKG_Follower_NPC, NumInWorld: 0
[HandledSNO(ActorSno._barbarian_kkg_follower_npc)] //Barbarian_KKG_Follower_NPC
//[ Info] [AttackPayload]: Игрок с индесом: 0 - задамажил: ID: 437089 Name: Barbarian_KKG_Follower_NPC, NumInWorld: 0
[HandledSNO(ActorSno._barbarian_kkg_follower_npc)] //Barbarian_KKG_Follower_NPC
public class Barbarian_KKG_Follower_NPC : NPC
{
private bool _collapsed = false;
@ -52,10 +47,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
if (!player.KanaiUnlocked)
{
_collapsed = true;
PlayActionAnimation(439753);
this.PlayActionAnimation(AnimationSno.barbarian_male_hth_kkgevent_point_01);
var Cube = World.GetActorBySNO(ActorSno._p4_ruins_frost_kanaicube_altar);
Cube.PlayActionAnimation(441642);
Cube.PlayActionAnimation(AnimationSno.p4_ruins_frost_kanaicube_altar_active);
//{[Actor] [Type: Gizmo] SNOId:437895 GlobalId: 1017303610 Position: x:331.9304 y:867.761 z:5.41071 Name: p4_Ruins_Frost_KanaiCube_Altar}
foreach (var plr in player.InGameClient.Game.Players.Values)
plr.GrantCriteria(74987252674266);

View File

@ -11,16 +11,6 @@ using DiIiS_NA.GameServer.MessageSystem;
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Misc;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.World;
//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.ActorSystem.Implementations
{
@ -47,16 +37,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
if (!base.Reveal(player))
return false;
if (Attributes[GameAttribute.Untargetable])
{
PlayAnimation(5, AnimationSet.TagMapAnimDefault[AnimationSetKeys.Open]);
SetIdleAnimation(AnimationSet.TagMapAnimDefault[AnimationSetKeys.Open]);
}
else
{
PlayAnimation(5, AnimationSet.TagMapAnimDefault[AnimationSetKeys.IdleDefault]);
SetIdleAnimation(AnimationSet.TagMapAnimDefault[AnimationSetKeys.IdleDefault]);
}
var animation = Attributes[GameAttribute.Untargetable] ? AnimationSet.Animations[AnimationSetKeys.Open.ID] : AnimationSet.Animations[AnimationSetKeys.IdleDefault.ID];
PlayAnimation(5, animation);
SetIdleAnimation(animation);
player.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Map.MapMarkerInfoMessage()
{

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

@ -59,8 +59,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
_collapsed = true;
PlayActionAnimation(10264);
World.PowerManager.RunPower(this, 153000);
this.PlayActionAnimation(AnimationSno.trdun_cath_lever_type2_closing);
this.World.PowerManager.RunPower(this, 153000);
Task.Delay(RandomHelper.Next(5,10) * 1000).ContinueWith(delegate { _collapsed = false; });
}

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

@ -10,14 +10,6 @@ using DiIiS_NA.GameServer.MessageSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.World;
//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.ActorSystem.Implementations.ScriptObjects
@ -51,7 +43,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.ScriptObjects
public override void OnTargeted(Player player, TargetMessage message)
{
base.OnTargeted(player, message);
PlayAnimation(5, 9859, 1f);
this.PlayAnimation(5, AnimationSno.skeletonking_spawn_from_throne, 1f);
bool status = false;

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

@ -11,12 +11,6 @@ using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Animation;
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.ActorSystem.Implementations.ScriptObjects
{
@ -84,8 +78,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.ScriptObjects
if (player.Position.DistanceSquared(ref _position) < ActorData.Sphere.Radius * ActorData.Sphere.Radius * Scale * Scale && !_collapsed)
{
_collapsed = true;
#region Animation of big gates
PlayAnimation(11, 312534, 1);
#region Анимация больших ворот
PlayAnimation(11, AnimationSno.x1_westm_door_giant_clicky_closing_soul, 1);
World.BroadcastIfRevealed(plr => new SetIdleAnimationMessage
{
ActorID = DynamicID(plr),

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

@ -23,7 +23,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.ScriptObjects
public override bool Reveal(Player player)
{
if (!_collapsed)
PlayAnimation(5, 130011); //- shaking
this.PlayAnimation(5, AnimationSno.trdun_skeletonking_sealed_door_1000_pounder_idle); //- Тряска
//this.PlayAnimation(5, 116098); //- Fault
return base.Reveal(player);
@ -34,8 +34,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.ScriptObjects
if (player.Position.DistanceSquared(ref _position) < ActorData.Sphere.Radius * ActorData.Sphere.Radius * 3f * Scale && !_collapsed)
{
_collapsed = true;
PlayAnimation(5, 116098); //- Fault
World.SpawnMonster(ActorSno._unburied_a_unique, Position);
this.PlayAnimation(5, AnimationSno.trdun_skeletonking_sealed_door_1000_pounder_death); //- Разлом
this.World.SpawnMonster(ActorSno._unburied_a_unique, this.Position);
}
}

View File

@ -6,12 +6,8 @@ using DiIiS_NA.GameServer.GSSystem.MapSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.PlayerSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.TickerSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.ACD;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.World;
namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
@ -59,7 +55,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
public override void OnTargeted(Player player, TargetMessage message)
{
PlayAnimation(5, 447873);
this.PlayAnimation(5, AnimationSno.p4_setdung_portal_neph_rc_portalopen);
foreach (var plr in World.Game.Players.Values)
{
@ -86,7 +82,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
if (!base.Reveal(player))
return false;
PlayAnimation(5, 449254);
this.PlayAnimation(5, AnimationSno.p4_setdung_portal_neph_rc_idle_shimmer);
return true;
}
/*
@ -108,7 +104,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
if (!PlrNear)
{
PlrNear = true;
PlayAnimation(5, 449255);
this.PlayAnimation(5, AnimationSno.p4_setdung_portal_neph_rc_idle_shimmertoopaque);
}
}
else
@ -116,7 +112,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
if (PlrNear)
{
PlrNear = false;
PlayAnimation(5, 447868);
this.PlayAnimation(5, AnimationSno.p4_setdung_portal_neph_rc_fadein);
}
}
}

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

@ -57,6 +57,7 @@ using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Quest;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Platinum;
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
using DiIiS_NA.GameServer.Core.Types.TagMap;
namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
{
@ -529,10 +530,8 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
var HubWorld = player.InGameClient.Game.GetWorld(WorldSno.x1_tristram_adventure_mode_hub);
var NStone = HubWorld.GetActorBySNO(ActorSno._x1_openworld_lootrunobelisk_b);
bool Activated = true;
NStone.SetIdleAnimation(
NStone.AnimationSet.TagMapAnimDefault[Core.Types.TagMap.AnimationSetKeys.IdleDefault]);
NStone.PlayActionAnimation(
NStone.AnimationSet.TagMapAnimDefault[Core.Types.TagMap.AnimationSetKeys.Closing]);
NStone.SetIdleAnimation(NStone.AnimationSet.Animations[AnimationSetKeys.IdleDefault.ID]);
NStone.PlayActionAnimation(NStone.AnimationSet.Animations[AnimationSetKeys.Closing.ID]);
NStone.Attributes[GameAttribute.Team_Override] = (Activated ? -1 : 2);
NStone.Attributes[GameAttribute.Untargetable] = !Activated;
NStone.Attributes[GameAttribute.NPC_Is_Operatable] = Activated;
@ -802,7 +801,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem
foreach (var wall in wrld.GetActorsBySNO(ActorSno._trdun_cath_bonewall_a_door))
if (wall.Position.Z > -23f)
{
wall.PlayAnimation(11, 108568);
wall.PlayAnimation(11, AnimationSno.trdun_cath_bonewall_a_death);
wall.Attributes[GameAttribute.Deleted_On_Server] = true;
wall.Attributes[GameAttribute.Could_Have_Ragdolled] = true;
wall.Attributes.BroadcastChangedIfRevealed();

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

@ -1,5 +1,6 @@
//Blizzless Project 2022
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
using DiIiS_NA.D3_GameServer.GSSystem.ActorSystem.Implementations.Minions;
using DiIiS_NA.GameServer.Core.Types.Math;
//Blizzless Project 2022
using DiIiS_NA.GameServer.Core.Types.TagMap;
@ -2332,6 +2333,16 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
[ImplementsPowerSNO(SkillsSystem.Skills.Barbarian.Situational.CallOfTheAncients)]
public class CallOfTheAncients : Skill
{
private AncientBarbarian SpawnAncient(int number)
{
return number switch
{
0 => new AncientKorlic(World, this),
1 => new AncientTalic(World, this),
2 => new AncientMawdawc(World, this),
_ => throw new Exception("number shoild be less than 3"),
};
}
public override IEnumerable<TickTimer> Main()
{
if ((User as Player).SkillSet.HasPassive(204603))
@ -2342,39 +2353,14 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
List<Actor> ancients = new List<Actor>();
for (int i = 0; i < 3; i++)
{
if (i == 0)
{
var ancient = new AncientKorlic(World, this, i);
ancient.Brain.DeActivate();
ancient.Position = RandomDirection(User.Position, 3f, 8f); //Kind of hacky until we get proper collisiondetection
ancient.Attributes[GameAttribute.Untargetable] = true;
ancient.EnterWorld(ancient.Position);
ancient.PlayActionAnimation(97105);
ancients.Add(ancient);
yield return WaitSeconds(0.2f);
}
if (i == 1)
{
var ancient = new AncientTalic(World, this, i);
ancient.Brain.DeActivate();
ancient.Position = RandomDirection(User.Position, 3f, 8f); //Kind of hacky until we get proper collisiondetection
ancient.Attributes[GameAttribute.Untargetable] = true;
ancient.EnterWorld(ancient.Position);
ancient.PlayActionAnimation(97109);
ancients.Add(ancient);
yield return WaitSeconds(0.2f);
}
if (i == 2)
{
var ancient = new AncientMawdawc(World, this, i);
ancient.Brain.DeActivate();
ancient.Position = RandomDirection(User.Position, 3f, 8f); //Kind of hacky until we get proper collisiondetection
ancient.Attributes[GameAttribute.Untargetable] = true;
ancient.EnterWorld(ancient.Position);
ancient.PlayActionAnimation(97107);
ancients.Add(ancient);
yield return WaitSeconds(0.2f);
}
var ancient = SpawnAncient(i);
ancient.Brain.DeActivate();
ancient.Position = RandomDirection(User.Position, 3f, 8f); //Kind of hacky until we get proper collisiondetection
ancient.Attributes[GameAttribute.Untargetable] = true;
ancient.EnterWorld(ancient.Position);
ancient.PlayActionAnimation(ancient.IntroAnimation);
ancients.Add(ancient);
yield return WaitSeconds(0.2f);
}
yield return WaitSeconds(0.8f);

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

@ -3811,7 +3811,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
ally.Position = RandomDirection(User.Position, 3f, 8f); //Kind of hacky until we get proper collisiondetection
ally.Attributes[GameAttribute.Untargetable] = true;
ally.EnterWorld(ally.Position);
ally.PlayActionAnimation(130606);
ally.PlayActionAnimation(AnimationSno.mystically_female_spawn2);
(ally as Minion).Brain.Activate();
ally.Attributes[GameAttribute.Untargetable] = false;
@ -3881,7 +3881,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
ally.Position = RandomDirection(User.Position, 3f, 8f); //Kind of hacky until we get proper collisiondetection
ally.Attributes[GameAttribute.Untargetable] = true;
ally.EnterWorld(ally.Position);
ally.PlayActionAnimation(130606);
ally.PlayActionAnimation(AnimationSno.mystically_female_spawn2);
(ally as Minion).Brain.Activate();
ally.Attributes[GameAttribute.Untargetable] = false;

View File

@ -2070,8 +2070,8 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
float targetDistance = PowerMath.Distance2D(TargetPosition, Golem.Position);
if (Rune_E > 0)
{
((User as PlayerSystem.Player).ActiveGolem as Minion).Brain.DeActivate();
(User as PlayerSystem.Player).ActiveGolem.PlayActionAnimation(474026);
((this.User as PlayerSystem.Player).ActiveGolem as Minion).Brain.DeActivate();
(this.User as PlayerSystem.Player).ActiveGolem.PlayActionAnimation(AnimationSno.p6_icegolem_generic_cast);
var proxy = SpawnProxy(TargetPosition, WaitSeconds(3f));
proxy.PlayEffectGroup(474839);
@ -2100,7 +2100,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
yield return WaitSeconds(targetDistance * 0.024f);
//Индикация зоны
(User as PlayerSystem.Player).ActiveGolem.PlayActionAnimation(466348);
(this.User as PlayerSystem.Player).ActiveGolem.PlayActionAnimation(AnimationSno.p6_bonegolem_active_01);
var proxy = SpawnProxy(TargetPosition, WaitSeconds(2f));
//Рывок
proxy.PlayEffectGroup(466735); //[466735] p6_necro_golem_bone_areaIndicator

View File

@ -22,8 +22,6 @@ using DiIiS_NA.GameServer.GSSystem.TickerSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.ACD;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Effect;
//Blizzless Project 2022
using System;
@ -32,12 +30,36 @@ 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
{
static class WitchDoctorPowerContextExtensions
{
internal static bool ShouldSpawnFetishSycophant(this PowerContext powerContext)
{
return (powerContext.User as Player).SkillSet.HasPassive(218588) && FastRandom.Instance.Next(100) < 15;
}
internal static void MakeFetishSpawn(this Minion fetish)
{
fetish.Brain.DeActivate();
fetish.Position = PowerContext.RandomDirection(fetish.Master.Position, 3f, 8f);
fetish.Attributes[GameAttribute.Untargetable] = true;
fetish.EnterWorld(fetish.Position);
fetish.PlayActionAnimation(AnimationSno.fetish_spawn_01);
}
internal static void MakeFetishLive(this Minion fetish, float? customLifeTime = 60f)
{
fetish.Brain.Activate();
fetish.Attributes[GameAttribute.Untargetable] = false;
fetish.Attributes.BroadcastChangedIfRevealed();
if (customLifeTime != null)
fetish.LifeTime = TickTimer.WaitSeconds(fetish.World.Game, customLifeTime.Value);
fetish.PlayActionAnimation(AnimationSno.fetish_idle_01);
}
}
//Complete
#region PoisonDart
[ImplementsPowerSNO(SkillsSystem.Skills.WitchDoctor.PhysicalRealm.PoisonDart)]
@ -93,21 +115,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
};
proj.Launch(TargetPosition, 1f);
if ((User as Player).SkillSet.HasPassive(218588) && FastRandom.Instance.Next(100) < 5) //FetishSycophants (wd)
if (this.ShouldSpawnFetishSycophant()) //FetishSycophants (wd)
{
var Fetish = new FetishMelee(World, this, 0);
Fetish.Brain.DeActivate();
Fetish.Position = RandomDirection(User.Position, 3f, 8f);
Fetish.Attributes[GameAttribute.Untargetable] = true;
Fetish.EnterWorld(Fetish.Position);
Fetish.PlayActionAnimation(90118);
var fetish = new FetishMelee(World, this, 0);
fetish.MakeFetishSpawn();
yield return WaitSeconds(0.5f);
(Fetish as Minion).Brain.Activate();
Fetish.Attributes[GameAttribute.Untargetable] = false;
Fetish.Attributes.BroadcastChangedIfRevealed();
Fetish.LifeTime = WaitSeconds(60f);
Fetish.PlayActionAnimation(87190);
fetish.MakeFetishLive();
}
}
}
@ -124,21 +138,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
StartCooldown(EvalTag(PowerKeys.CooldownTime));
UsePrimaryResource(EvalTag(PowerKeys.ResourceCost));
if ((User as Player).SkillSet.HasPassive(218588) && FastRandom.Instance.Next(100) < 5) //FetishSycophants (wd)
if (this.ShouldSpawnFetishSycophant()) //FetishSycophants (wd)
{
var Fetish = new FetishMelee(World, this, 0);
Fetish.Brain.DeActivate();
Fetish.Position = RandomDirection(User.Position, 3f, 8f);
Fetish.Attributes[GameAttribute.Untargetable] = true;
Fetish.EnterWorld(Fetish.Position);
Fetish.PlayActionAnimation(90118);
var fetish = new FetishMelee(World, this, 0);
fetish.MakeFetishSpawn();
yield return WaitSeconds(0.5f);
Fetish.Brain.Activate();
Fetish.Attributes[GameAttribute.Untargetable] = false;
Fetish.Attributes.BroadcastChangedIfRevealed();
Fetish.LifeTime = WaitSeconds(60f);
Fetish.PlayActionAnimation(87190);
fetish.MakeFetishLive();
}
if (Rune_C > 0)
@ -150,10 +156,10 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
// HACK: holy hell there is alot of hardcoded animation timings here
bigtoad.PlayActionAnimation(110766); // spawn ani
bigtoad.PlayActionAnimation(AnimationSno.gianttoad_spawn); // spawn ani
yield return WaitSeconds(1f);
bigtoad.PlayActionAnimation(110520); // attack ani
bigtoad.PlayActionAnimation(AnimationSno.gianttoad_attack_01); // attack ani
TickTimer waitAttackEnd = WaitSeconds(1.5f);
yield return WaitSeconds(0.3f); // wait for attack ani to play a bit
@ -177,7 +183,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
if (!waitAttackEnd.TimedOut)
yield return waitAttackEnd;
bigtoad.PlayActionAnimation(110636); // disgest ani, 5 seconds
bigtoad.PlayActionAnimation(AnimationSno.gianttoad_idle_digest); // disgest ani, 5 seconds
for (int n = 0; n < 5 && ValidTarget(); ++n)
{
WeaponDamage(Target, 0.039f, DamageType.Poison);
@ -188,14 +194,14 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
{
_SetHiddenAttribute(Target, false);
bigtoad.PlayActionAnimation(110637); // regurgitate ani
World.BuffManager.AddBuff(bigtoad, Target, new KnockbackBuff(36f));
bigtoad.PlayActionAnimation(AnimationSno.gianttoad_regurgitate); // regurgitate ani
this.World.BuffManager.AddBuff(bigtoad, Target, new Implementations.KnockbackBuff(36f));
Target.PlayEffectGroup(18281); // actual regurgitate efg isn't working so use generic acid effect
yield return WaitSeconds(0.9f);
}
}
bigtoad.PlayActionAnimation(110764); // despawn ani
bigtoad.PlayActionAnimation(AnimationSno.gianttoad_despawn); // despawn ani
yield return WaitSeconds(0.7f);
bigtoad.Destroy();
}
@ -379,7 +385,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
{
//produce a health globe or summon a dog
if (FastRandom.Instance.NextDouble() > 0.5)
Target.World.SpawnHealthGlobe(Target, plr, Target.Position);
Target.World.SpawnHealthGlobe(Target, this.plr, Target.Position);
else
{
var dog = new ZombieDog(User.World, plr, 0);
@ -387,13 +393,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
dog.Position = Target.Position;
dog.Attributes[GameAttribute.Untargetable] = true;
dog.EnterWorld(dog.Position);
dog.PlayActionAnimation(11437);
Task.Delay(1000).ContinueWith(d =>
dog.PlayActionAnimation(AnimationSno.zombiedog_summon_01);
Task.Delay(1000).ContinueWith(d =>
{
dog.Brain.Activate();
dog.Attributes[GameAttribute.Untargetable] = false;
dog.Attributes.BroadcastChangedIfRevealed();
dog.PlayActionAnimation(11431);
dog.PlayActionAnimation(AnimationSno.zombiedog_idle_01);
});
}
@ -600,21 +606,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
ActorSno._witchdoctor_zombiecharger_projectile_alabasterrune
);
if ((User as Player).SkillSet.HasPassive(218588) && FastRandom.Instance.Next(100) < 5) //FetishSycophants (wd)
if (this.ShouldSpawnFetishSycophant()) //FetishSycophants (wd)
{
var Fetish = new FetishMelee(World, this, 0);
Fetish.Brain.DeActivate();
Fetish.Position = RandomDirection(User.Position, 3f, 8f);
Fetish.Attributes[GameAttribute.Untargetable] = true;
Fetish.EnterWorld(Fetish.Position);
Fetish.PlayActionAnimation(90118);
var fetish = new FetishMelee(World, this, 0);
fetish.MakeFetishSpawn();
yield return WaitSeconds(0.5f);
(Fetish as Minion).Brain.Activate();
Fetish.Attributes[GameAttribute.Untargetable] = false;
Fetish.Attributes.BroadcastChangedIfRevealed();
Fetish.LifeTime = WaitSeconds(60f);
Fetish.PlayActionAnimation(87190);
fetish.MakeFetishLive();
}
if (Rune_A > 0)
@ -870,21 +868,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
{
UsePrimaryResource(ScriptFormula(0) * 0.25f); //resourceCostReduction
if ((User as Player).SkillSet.HasPassive(218588) && FastRandom.Instance.Next(100) < 5) //FetishSycophants (wd)
if (this.ShouldSpawnFetishSycophant()) //FetishSycophants (wd)
{
var Fetish = new FetishMelee(World, this, 0);
Fetish.Brain.DeActivate();
Fetish.Position = RandomDirection(User.Position, 3f, 8f);
Fetish.Attributes[GameAttribute.Untargetable] = true;
Fetish.EnterWorld(Fetish.Position);
Fetish.PlayActionAnimation(90118);
var fetish = new FetishMelee(World, this, 0);
fetish.MakeFetishSpawn();
yield return WaitSeconds(0.5f);
(Fetish as Minion).Brain.Activate();
Fetish.Attributes[GameAttribute.Untargetable] = false;
Fetish.Attributes.BroadcastChangedIfRevealed();
Fetish.LifeTime = WaitSeconds(60f);
Fetish.PlayActionAnimation(87190);
fetish.MakeFetishLive();
}
if (Rune_A > 0)
@ -1025,21 +1015,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
{
UsePrimaryResource(EvalTag(PowerKeys.ResourceCost));
if ((User as Player).SkillSet.HasPassive(218588) && FastRandom.Instance.Next(100) < 5) //FetishSycophants (wd)
if (this.ShouldSpawnFetishSycophant()) //FetishSycophants (wd)
{
var Fetish = new FetishMelee(World, this, 0);
Fetish.Brain.DeActivate();
Fetish.Position = RandomDirection(User.Position, 3f, 8f);
Fetish.Attributes[GameAttribute.Untargetable] = true;
Fetish.EnterWorld(Fetish.Position);
Fetish.PlayActionAnimation(90118);
var fetish = new FetishMelee(World, this, 0);
fetish.MakeFetishSpawn();
yield return WaitSeconds(0.5f);
(Fetish as Minion).Brain.Activate();
Fetish.Attributes[GameAttribute.Untargetable] = false;
Fetish.Attributes.BroadcastChangedIfRevealed();
Fetish.LifeTime = WaitSeconds(60f);
Fetish.PlayActionAnimation(87190);
fetish.MakeFetishLive();
}
Projectile[] grenades = new Projectile[1];
@ -1422,21 +1404,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
{
UsePrimaryResource(EvalTag(PowerKeys.ResourceCost));
if ((User as Player).SkillSet.HasPassive(218588) && FastRandom.Instance.Next(100) < 5) //FetishSycophants (wd)
if (this.ShouldSpawnFetishSycophant()) //FetishSycophants (wd)
{
var Fetish = new FetishMelee(World, this, 0);
Fetish.Brain.DeActivate();
Fetish.Position = RandomDirection(User.Position, 3f, 8f);
Fetish.Attributes[GameAttribute.Untargetable] = true;
Fetish.EnterWorld(Fetish.Position);
Fetish.PlayActionAnimation(90118);
var fetish = new FetishMelee(World, this, 0);
fetish.MakeFetishSpawn();
yield return WaitSeconds(0.5f);
(Fetish as Minion).Brain.Activate();
Fetish.Attributes[GameAttribute.Untargetable] = false;
Fetish.Attributes.BroadcastChangedIfRevealed();
Fetish.LifeTime = WaitSeconds(60f);
Fetish.PlayActionAnimation(87190);
fetish.MakeFetishLive();
}
//cast, spread to those in radius, from there jump to other mobs in area within (__?__)
@ -1703,21 +1677,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
{
UsePrimaryResource(EvalTag(PowerKeys.ResourceCost));
if ((User as Player).SkillSet.HasPassive(218588) && FastRandom.Instance.Next(100) < 5) //FetishSycophants (wd)
if (this.ShouldSpawnFetishSycophant()) //FetishSycophants (wd)
{
var Fetish = new FetishMelee(World, this, 0);
Fetish.Brain.DeActivate();
Fetish.Position = RandomDirection(User.Position, 3f, 8f);
Fetish.Attributes[GameAttribute.Untargetable] = true;
Fetish.EnterWorld(Fetish.Position);
Fetish.PlayActionAnimation(90118);
var fetish = new FetishMelee(World, this, 0);
fetish.MakeFetishSpawn();
yield return WaitSeconds(0.5f);
Fetish.Brain.Activate();
Fetish.Attributes[GameAttribute.Untargetable] = false;
Fetish.Attributes.BroadcastChangedIfRevealed();
Fetish.LifeTime = WaitSeconds(60f);
Fetish.PlayActionAnimation(87190);
fetish.MakeFetishLive();
}
if (Rune_E > 0)
@ -1998,13 +1964,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
dog.Position = Target.Position;
dog.Attributes[GameAttribute.Untargetable] = true;
dog.EnterWorld(dog.Position);
dog.PlayActionAnimation(11437);
Task.Delay(1000).ContinueWith(d =>
dog.PlayActionAnimation(AnimationSno.zombiedog_summon_01);
Task.Delay(1000).ContinueWith(d =>
{
dog.Brain.Activate();
dog.Attributes[GameAttribute.Untargetable] = false;
dog.Attributes.BroadcastChangedIfRevealed();
dog.PlayActionAnimation(11431);
dog.PlayActionAnimation(AnimationSno.zombiedog_idle_01);
});
}
}
@ -2028,21 +1994,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
StartCooldown(EvalTag(PowerKeys.CooldownTime));
UsePrimaryResource(EvalTag(PowerKeys.ResourceCost));
if ((User as Player).SkillSet.HasPassive(218588) && FastRandom.Instance.Next(100) < 5) //FetishSycophants (wd)
if (this.ShouldSpawnFetishSycophant()) //FetishSycophants (wd)
{
var Fetish = new FetishMelee(World, this, 0);
Fetish.Brain.DeActivate();
Fetish.Position = RandomDirection(User.Position, 3f, 8f);
Fetish.Attributes[GameAttribute.Untargetable] = true;
Fetish.EnterWorld(Fetish.Position);
Fetish.PlayActionAnimation(90118);
var fetish = new FetishMelee(World, this, 0);
fetish.MakeFetishSpawn();
yield return WaitSeconds(0.5f);
(Fetish as Minion).Brain.Activate();
Fetish.Attributes[GameAttribute.Untargetable] = false;
Fetish.Attributes.BroadcastChangedIfRevealed();
Fetish.LifeTime = WaitSeconds(60f);
Fetish.PlayActionAnimation(87190);
fetish.MakeFetishLive();
}
if (Rune_C > 0)
@ -2162,29 +2120,21 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
StartCooldown(ScriptFormula(18));
int maxFetishes = (int)(ScriptFormula(0) + ScriptFormula(9));
List<Actor> Fetishes = new List<Actor>();
var fetishes = new List<Minion>();
for (int i = 0; i < maxFetishes; i++)
{
var Fetish = new FetishMelee(World, this, i);
Fetish.Brain.DeActivate();
Fetish.Position = RandomDirection(User.Position, 3f, 8f); //Kind of hacky until we get proper collisiondetection
Fetish.Attributes[GameAttribute.Untargetable] = true;
Fetish.EnterWorld(Fetish.Position);
Fetish.PlayActionAnimation(90118);
Fetishes.Add(Fetish);
var fetish = new FetishMelee(this.World, this, i);
fetish.MakeFetishSpawn();
fetishes.Add(fetish);
yield return WaitSeconds(0.2f);
}
if (Rune_C > 0)
{
for (int i = 0; i < ScriptFormula(10); i++)
{
var Fetish = new FetishShaman(World, this, i);
Fetish.Brain.DeActivate();
Fetish.Position = RandomDirection(User.Position, 3f, 8f); //Kind of hacky until we get proper collisiondetection
Fetish.Attributes[GameAttribute.Untargetable] = true;
Fetish.EnterWorld(Fetish.Position);
Fetish.PlayActionAnimation(90118);
Fetishes.Add(Fetish);
var fetish = new FetishShaman(this.World, this, i);
fetish.MakeFetishSpawn();
fetishes.Add(fetish);
yield return WaitSeconds(0.2f);
}
}
@ -2192,23 +2142,16 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
{
for (int i = 0; i < ScriptFormula(13); i++)
{
var Fetish = new FetishHunter(World, this, i);
Fetish.Brain.DeActivate();
Fetish.Position = RandomDirection(User.Position, 3f, 8f); //Kind of hacky until we get proper collisiondetection
Fetish.Attributes[GameAttribute.Untargetable] = true;
Fetish.EnterWorld(Fetish.Position);
Fetish.PlayActionAnimation(90118);
Fetishes.Add(Fetish);
var fetish = new FetishHunter(this.World, this, i);
fetish.MakeFetishSpawn();
fetishes.Add(fetish);
yield return WaitSeconds(0.2f);
}
}
yield return WaitSeconds(0.5f);
foreach (Actor Fetish in Fetishes)
foreach (var Fetish in fetishes)
{
(Fetish as Minion).Brain.Activate();
Fetish.Attributes[GameAttribute.Untargetable] = false;
Fetish.Attributes.BroadcastChangedIfRevealed();
Fetish.PlayActionAnimation(87190); //Not sure why this is required, but after the summon is done, it'll just be frozen otherwise.
Fetish.MakeFetishLive(customLifeTime: null);
if (Rune_A > 0)
{
Fetish.PlayEffectGroup(133761);
@ -2279,14 +2222,14 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
dog.Position = RandomDirection(User.Position, 3f, 8f);
dog.Attributes[GameAttribute.Untargetable] = true;
dog.EnterWorld(dog.Position);
dog.PlayActionAnimation(11437);
dog.PlayActionAnimation(AnimationSno.zombiedog_summon_01);
_dogsSummoned++;
yield return WaitSeconds(0.5f);
dog.Brain.Activate();
dog.Attributes[GameAttribute.Untargetable] = false;
dog.Attributes.BroadcastChangedIfRevealed();
dog.PlayActionAnimation(11431);
dog.PlayActionAnimation(AnimationSno.zombiedog_idle_01);
}
if (_dogsSummoned >= 3)
@ -2336,13 +2279,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
garg.Position = RandomDirection(User.Position, 3f, 8f); //Kind of hacky until we get proper collisiondetection
garg.Attributes[GameAttribute.Untargetable] = true;
garg.EnterWorld(garg.Position);
garg.PlayActionAnimation(155988);
garg.PlayActionAnimation(AnimationSno.gargantuan_summon);
yield return WaitSeconds(0.8f);
(garg as Minion).Brain.Activate();
garg.Attributes[GameAttribute.Untargetable] = false;
garg.Attributes.BroadcastChangedIfRevealed();
garg.PlayActionAnimation(144967); //Not sure why this is required, but after the summon is done, it'll just be frozen otherwise.
garg.PlayActionAnimation(AnimationSno.gargantuan_idle_01); //Not sure why this is required, but after the summon is done, it'll just be frozen otherwise.
if (Rune_A > 0)
AddBuff(garg, new GargantuanPrepareBuff());
@ -2467,7 +2410,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
hex.Position = RandomDirection(User.Position, 3f, 8f); //Kind of hacky until we get proper collisiondetection
hex.Attributes[GameAttribute.Untargetable] = true;
hex.EnterWorld(hex.Position);
hex.PlayActionAnimation(90118);
hex.PlayActionAnimation(AnimationSno.fetish_spawn_01);
yield return WaitSeconds(0.8f);
(hex as Minion).Brain.Activate();
@ -2595,21 +2538,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
}
}
if ((User as Player).SkillSet.HasPassive(218588) && FastRandom.Instance.Next(100) < 5) //FetishSycophants (wd)
if (this.ShouldSpawnFetishSycophant()) //FetishSycophants (wd)
{
var Fetish = new FetishMelee(World, this, 0);
Fetish.Brain.DeActivate();
Fetish.Position = RandomDirection(User.Position, 3f, 8f);
Fetish.Attributes[GameAttribute.Untargetable] = true;
Fetish.EnterWorld(Fetish.Position);
Fetish.PlayActionAnimation(90118);
var fetish = new FetishMelee(World, this, 0);
fetish.MakeFetishSpawn();
yield return WaitSeconds(0.5f);
(Fetish as Minion).Brain.Activate();
Fetish.Attributes[GameAttribute.Untargetable] = false;
Fetish.Attributes.BroadcastChangedIfRevealed();
Fetish.LifeTime = WaitSeconds(60f);
Fetish.PlayActionAnimation(87190);
fetish.MakeFetishLive();
}
yield break;
@ -2691,7 +2626,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
dog.Position = RandomDirection(User.Position, 3f, 8f); //Kind of hacky until we get proper collisiondetection
dog.Attributes[GameAttribute.Untargetable] = true;
dog.EnterWorld(dog.Position);
dog.PlayActionAnimation(11437);
dog.PlayActionAnimation(AnimationSno.zombiedog_summon_01);
dogs.Add(dog);
yield return WaitSeconds(0.2f);
}
@ -2701,7 +2636,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations
(dog as Minion).Brain.Activate();
dog.Attributes[GameAttribute.Untargetable] = false;
dog.Attributes.BroadcastChangedIfRevealed();
dog.PlayActionAnimation(11431); //Not sure why this is required, but after the summon is done, it'll just be frozen otherwise.
dog.PlayActionAnimation(AnimationSno.zombiedog_idle_01); //Not sure why this is required, but after the summon is done, it'll just be frozen otherwise.
if (Rune_A > 0)
{
AddBuff(dog, new BurningDogBuff());

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

@ -256,25 +256,30 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads
switch (Target.SNO)
{
//Boss-A1 Q2
case ActorSno._skeleton_a_cain_unique: Target.PlayAnimation(11, 199484, 1f); break;
case ActorSno._skeleton_a_cain_unique:
//Йондар
case ActorSno._adventurer_d_templarintrounique: Target.PlayAnimation(11, 199484, 1f); break;
//Разнощик чумы
case ActorSno._fleshpitflyer_b: Target.PlayAnimation(11, 8535, 1f); break;
case ActorSno._adventurer_d_templarintrounique:
//Темные жрецы
case ActorSno._triunevessel_event31: Target.PlayAnimation(11, 199484, 1f); break;
case ActorSno._triunevessel_event31:
//Падшие
case ActorSno._fallengrunt_a:
Target.PlayAnimation(11, AnimationSno.triunesummoner_death_02_persistentblood, 1f);
break;
//Разнощик чумы
case ActorSno._fleshpitflyer_b:
//Пчелы
case ActorSno._sandwasp_a:
case ActorSno._fleshpitflyer_leoric_inferno:
Target.PlayAnimation(11, 8535, 1f);
Target.PlayAnimation(11, AnimationSno.fleshpitflyer_death, 1f);
break;
//X1_LR_Boss_Angel_Corrupt_A
case ActorSno._x1_lr_boss_angel_corrupt_a: Target.PlayAnimation(11, 142005, 1f); break;
//Падшие
case ActorSno._fallengrunt_a: Target.PlayAnimation(11, 199484, 1f); break;
case ActorSno._x1_lr_boss_angel_corrupt_a:
Target.PlayAnimation(11, AnimationSno.angel_corrupt_death_01, 1f);
break;
default:
if (FindBestDeathAnimationSNO() != -1)
Target.PlayAnimation(11, FindBestDeathAnimationSNO(), 1f);
var animation = FindBestDeathAnimationSNO();
if (animation != AnimationSno._NONE)
Target.PlayAnimation(11, animation, 1f);
else
{
Logger.Warn("Death animation not found: ActorSNOId = {0}", Target.SNO);
@ -527,7 +532,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads
avatar.EnterWorld(avatar.Position);
Task.Delay(1000).ContinueWith(d =>
Task.Delay(1000).ContinueWith(d =>
{
(avatar as Minion).Brain.Activate();
avatar.Attributes[GameAttribute.Untargetable] = false;
@ -542,15 +547,15 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads
dog.Position = PowerContext.RandomDirection(plr.Position, 3f, 8f);
dog.Attributes[GameAttribute.Untargetable] = true;
dog.EnterWorld(dog.Position);
dog.PlayActionAnimation(11437);
dog.PlayActionAnimation(AnimationSno.zombiedog_summon_01);
Context.DogsSummoned++;
Task.Delay(1000).ContinueWith(d =>
Task.Delay(1000).ContinueWith(d =>
{
dog.Brain.Activate();
dog.Attributes[GameAttribute.Untargetable] = false;
dog.Attributes.BroadcastChangedIfRevealed();
dog.PlayActionAnimation(11431);
dog.PlayActionAnimation(AnimationSno.zombiedog_idle_01);
});
}
@ -1169,49 +1174,47 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads
//}
}
private int FindBestDeathAnimationSNO()
private AnimationSno FindBestDeathAnimationSNO()
{
if (Context != null)
{
// check if power has special death animation, and roll chance to use it
TagKeyInt specialDeathTag = GetTagForSpecialDeath(Context.EvalTag(PowerKeys.SpecialDeathType));
if (specialDeathTag != null)
{
float specialDeathChance = Context.EvalTag(PowerKeys.SpecialDeathChance);
if (PowerContext.Rand.NextDouble() < specialDeathChance)
{
int specialSNO = GetSnoFromTag(specialDeathTag);
if (specialSNO != -1)
{
return specialSNO;
}
}
// decided not to use special death or actor doesn't have it, just fall back to normal death anis
}
return AnimationSno._NONE;
int sno = GetSnoFromTag(DeathDamageType.DeathAnimationTag);
if (sno != -1)
return sno;
// check if power has special death animation, and roll chance to use it
TagKeyInt specialDeathTag = GetTagForSpecialDeath(Context.EvalTag(PowerKeys.SpecialDeathType));
if (specialDeathTag != null)
{
float specialDeathChance = Context.EvalTag(PowerKeys.SpecialDeathChance);
if (PowerContext.Rand.NextDouble() < specialDeathChance)
{
var specialSNO = GetSNOFromTag(specialDeathTag);
if (specialSNO != AnimationSno._NONE)
{
return specialSNO;
}
}
// decided not to use special death or actor doesn't have it, just fall back to normal death anis
}
//if (this.Target.ActorSNO.Name.Contains("Spiderling")) return _GetSNOFromTag(new TagKeyInt(69764));
var sno = GetSNOFromTag(this.DeathDamageType.DeathAnimationTag);
if (sno != AnimationSno._NONE)
return sno;
//Logger.Debug("monster animations:");
//foreach (var anim in this.Target.AnimationSet.TagMapAnimDefault)
// Logger.Debug("animation: {0}", anim.ToString());
//if (this.Target.ActorSNO.Name.Contains("Spiderling")) return _GetSNOFromTag(new TagKeyInt(69764));
// load default ani if all else fails
return GetSnoFromTag(AnimationSetKeys.DeathDefault);
}
else
return -1;
}
//Logger.Debug("monster animations:");
//foreach (var anim in this.Target.AnimationSet.TagMapAnimDefault)
// Logger.Debug("animation: {0}", anim.ToString());
private int GetSnoFromTag(TagKeyInt tag)
// load default ani if all else fails
return GetSNOFromTag(AnimationSetKeys.DeathDefault);
}
private AnimationSno GetSNOFromTag(TagKeyInt tag)
{
if (Target.AnimationSet != null && Target.AnimationSet.TagMapAnimDefault.ContainsKey(tag))
return Target.AnimationSet.TagMapAnimDefault[tag];
if (Target.AnimationSet != null && Target.AnimationSet.Animations.ContainsKey(tag.ID))
return (AnimationSno)Target.AnimationSet.Animations[tag.ID];
else
return -1;
return AnimationSno._NONE;
}
private static TagKeyInt GetTagForSpecialDeath(int specialDeathType)

View File

@ -821,10 +821,10 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads
if (Target.World.BuffManager.GetFirstBuff<KnockbackBuff>(Target) == null &&
Target.AnimationSet != null)
{
if (Target.AnimationSet.TagMapAnimDefault.ContainsKey(AnimationSetKeys.GetHit) && FastRandom.Instance.Next(100) < 33)
if (Target.AnimationSet.Animations.ContainsKey(AnimationSetKeys.GetHit.ID) && FastRandom.Instance.Next(100) < 33)
{
int hitAni = Target.AnimationSet.TagMapAnimDefault[AnimationSetKeys.GetHit];
if (hitAni != -1)
var hitAni = Target.AnimationSet.Animations[AnimationSetKeys.GetHit.ID];
if (hitAni != AnimationSno._NONE)
{
// HACK: hardcoded animation speed/ticks, need to base those off hit recovery speed
Target.PlayAnimation(6, hitAni, 1.0f, 40);

View File

@ -1,5 +1,6 @@
//Blizzless Project 2022
using DiIiS_NA.Core.Logging;
using DiIiS_NA.Core.MPQ.FileFormats;
using DiIiS_NA.D3_GameServer.Core.Types.SNO;
//Blizzless Project 2022
using DiIiS_NA.GameServer.Core.Types.TagMap;
@ -15,12 +16,6 @@ using DiIiS_NA.GameServer.MessageSystem.Message.Fields;
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
{
@ -30,20 +25,20 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem
public abstract IEnumerable<TickTimer> Main();
static new readonly Logger Logger = LogManager.CreateLogger();
public DiIiS_NA.Core.MPQ.FileFormats.Power DataOfSkill;
public Power DataOfSkill;
public sealed override IEnumerable<TickTimer> Run()
{
DataOfSkill = (DiIiS_NA.Core.MPQ.FileFormats.Power)DiIiS_NA.Core.MPQ.MPQStorage.Data.Assets[Core.Types.SNO.SNOGroup.Power][PowerSNO].Data;
DataOfSkill = (Power)DiIiS_NA.Core.MPQ.MPQStorage.Data.Assets[Core.Types.SNO.SNOGroup.Power][PowerSNO].Data;
// play starting animation and effects
_PlayActionAnimation();
_PlayCastEffect();
PlayActionAnimation();
PlayCastEffect();
float contactDelay = GetContactDelay();
if (contactDelay > 0f)
yield return WaitSeconds(contactDelay);
_PlayContactEffect();
PlayContactEffect();
// run main effects script
foreach (TickTimer timer in Main())
@ -61,24 +56,24 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem
return User is Player && (User as Player).Toon.Gender == 2; // 2 = female
}
}
public virtual int GetActionAnimationSNO()
public virtual AnimationSno GetActionAnimationSNO()
{
try
{
int tag = EvalTag(PowerKeys.AnimationTag);
if (User.AnimationSet != null && User.AnimationSet.Animations.ContainsKey(tag))
return User.AnimationSet.Animations[tag];
else
if (User.AnimationSet != null)
return User.AnimationSet.GetAnimationTag(DiIiS_NA.Core.MPQ.FileFormats.AnimationTags.Attack2);
else
return -1;
if (User.AnimationSet == null)
{
if (User.AnimationSet.Animations.ContainsKey(tag))
return User.AnimationSet.Animations[tag];
else return (AnimationSno)User.AnimationSet.GetAnimationTag(AnimationTags.Attack2);
}
}
catch
catch (Exception e)
{
return -1;
Logger.Error("GetActionAnimationSNO throws error {0}", e.Message);
}
return AnimationSno._NONE;
}
@ -110,26 +105,26 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem
return 1f;
}
private void _PlayActionAnimation()
private void PlayActionAnimation()
{
float speed = GetActionSpeed();
int animationSNO = GetActionAnimationSNO();
var animationSNO = GetActionAnimationSNO();
#region Патч анимаций
if(animationSNO == -1)
switch (User.SNO)
if(animationSNO == AnimationSno._NONE)
switch (this.User.SNO)
{
case ActorSno._x1_skeletonarcher_westmarch_a: //x1_SkeletonArcher_Westmarch_A
if (PowerSNO == 30334)
animationSNO = 303905;
if (this.PowerSNO == 30334)
animationSNO = AnimationSno.x1_skeletonarcher_westmarch_attack_01;
break;
case ActorSno._p6_necro_skeletonmage_f_archer: //p6_necro_skeletonMage_F_archer
animationSNO = 303905;
animationSNO = AnimationSno.x1_skeletonarcher_westmarch_attack_01;
speed = 2f;
break;
}
#endregion
if (animationSNO != -1 && speed > 0f)
if (animationSNO != AnimationSno._NONE && speed > 0f)
{
if (User is Player)
{
@ -143,7 +138,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem
new PlayAnimationMessageSpec
{
Duration = (int)(60f / speed), // ticks
AnimationSNO = animationSNO,
AnimationSNO = (int)animationSNO,
PermutationIndex = 0x0,
AnimationTag = 0,
Speed = 1,
@ -166,7 +161,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem
new PlayAnimationMessageSpec
{
Duration = (int)(60f / speed), // ticks
AnimationSNO = animationSNO,
AnimationSNO = (int)animationSNO,
PermutationIndex = 0x0,
AnimationTag = 0,
Speed = User.SNO == ActorSno._pt_blacksmith_nonvendor || User.SNO == ActorSno._leah ? 1 : speed,
@ -177,14 +172,14 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem
}
}
private void _PlayCastEffect()
private void PlayCastEffect()
{
int sno = GetCastEffectSNO();
if (sno != -1)
User.PlayEffectGroup(sno);
}
private void _PlayContactEffect()
private void PlayContactEffect()
{
int sno = GetContactEffectSNO();
if (sno != -1)

View File

@ -413,12 +413,12 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
var world = Game.GetWorld(WorldSno.trout_adriascellar);
CapitanDaltyn = world.SpawnMonster(ActorSno._unique_captaindaltyn, new Vector3D { X = 52.587f, Y = 103.368f, Z = 0.1f });
CapitanDaltyn.Attributes[GameAttribute.Quest_Monster] = true;
CapitanDaltyn.PlayAnimation(5, 11523);
CapitanDaltyn.PlayAnimation(5, AnimationSno.zombie_male_skinny_spawn);
foreach (Vector3D point in Zombies)
{
var Zombie = world.SpawnMonster(ActorSno._zombieskinny_a, point);
Zombie.Attributes[GameAttribute.Quest_Monster] = true;
Zombie.PlayAnimation(5, 11523);
Zombie.PlayAnimation(5, AnimationSno.zombie_male_skinny_spawn);
}
});
ListenKill(ActorSno._unique_captaindaltyn, 1, new Advance());
@ -918,8 +918,8 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
{ //act.AddRopeEffect(182614, Kormak_Imprisoned); //[111529] triuneSummoner_Summon_rope
Kormak_Imprisoned.AddRopeEffect(182614, act); //[111529] triuneSummoner_Summon_rope
act.SetFacingRotation(ActorSystem.Movement.MovementHelpers.GetFacingAngle(act, Kormak_Imprisoned));
act.PlayActionAnimation(158306);
act.SetIdleAnimation(158306);
act.PlayActionAnimation(AnimationSno.triunecultist_emote_outraisedhands);
act.SetIdleAnimation(AnimationSno.triunecultist_emote_outraisedhands);
}
}
catch { }
@ -1000,7 +1000,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
}
foreach (var Wall in world.GetActorsBySNO(ActorSno._trdun_cath_bonewall_a_door))
{
Wall.PlayAnimation(11, 108568);
Wall.PlayAnimation(11, AnimationSno.trdun_cath_bonewall_a_death);
Wall.Attributes[GameAttribute.Deleted_On_Server] = true;
Wall.Attributes[GameAttribute.Could_Have_Ragdolled] = true;
Wall.Attributes.BroadcastChangedIfRevealed();
@ -1220,7 +1220,8 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
ListenProximity(ActorSno._woodfencee_fields_trout, new Advance()); //if going through graveyard
var Gate = world.GetActorBySNO(ActorSno._cemetary_gate_trout_wilderness_no_lock);
Gate.Field2 = 16;
Gate.PlayAnimation(5, Gate.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening]);
var animation = Gate.AnimationSet.Animations[AnimationSetKeys.Opening.ID];
Gate.PlayAnimation(5, animation);
world.BroadcastIfRevealed(plr => new MessageSystem.Message.Definitions.ACD.ACDCollFlagsMessage
{
ActorID = Gate.DynamicID(plr),
@ -1895,7 +1896,8 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
var world = Game.GetWorld(WorldSno.trout_townattack_chapelcellar_a);
foreach (var Table in world.GetActorsBySNO(ActorSno._trout_townattack_cellar_altar)) {
Table.SetUsable(false);
Table.SetIdleAnimation(Table.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Open]);
var animation = Table.AnimationSet.Animations[AnimationSetKeys.Open.ID];
Table.SetIdleAnimation(animation);
}
foreach (var Maghda in world.GetActorsBySNO(ActorSno._maghda_a_tempprojection)) Maghda.Destroy();
});

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

@ -484,7 +484,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
TurnImmediately = true
}, Myst);
Myst.PlayActionAnimation(324119);
Myst.PlayActionAnimation(AnimationSno.mystic_crawl_01);
AddQuestConversation(Myst, 305750);
(Myst as InteractiveNPC).Conversations.Clear();
(Myst as InteractiveNPC).Conversations.Add(new ActorSystem.Interactions.ConversationInteraction(305750));
@ -1372,8 +1372,8 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
backgroundActor.Unreveal(plr);
portal.Unreveal(plr);
}
if (Game.CurrentQuest == 269552)
RamWorld.GetActorBySNO(ActorSno._x1_pand_batteringram_background).PlayActionAnimation(299978);
if (this.Game.CurrentQuest == 269552)
RamWorld.GetActorBySNO(ActorSno._x1_pand_batteringram_background).PlayActionAnimation(AnimationSno.x1_pand_batteringram_background_stage1);
});
@ -1464,8 +1464,8 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
{
RamWorld.GetActorBySNO(ActorSno._g_portal_archtall_blue).Reveal(plr);
}
if (Game.CurrentQuest != 269552)
RamWorld.GetActorBySNO(ActorSno._x1_pand_batteringram_background).SetIdleAnimation(360069);
if (this.Game.CurrentQuest != 269552)
RamWorld.GetActorBySNO(ActorSno._x1_pand_batteringram_background).SetIdleAnimation(AnimationSno.x1_pand_batteringram_background_move_in_and_out_hit_03_dead);
//RamWorld.GetActorBySNO(295438).PlayActionAnimation(299978);
//Open(this.Game.GetWorld(295225), 345259);
Open(RamWorld, ActorSno._x1_pand_batteringram_background);

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)
{