BFA Update (still lots of testing to do tho)

This commit is contained in:
hondacrx
2018-12-10 12:46:25 -05:00
parent 468b053946
commit 8e20114e10
256 changed files with 35613 additions and 10459 deletions
+3
View File
@@ -228,6 +228,9 @@ namespace BNetServer.Networking
public BattlenetRpcErrorCode HandleVerifyWebCredentials(Bgs.Protocol.Authentication.V1.VerifyWebCredentialsRequest verifyWebCredentialsRequest)
{
if (verifyWebCredentialsRequest.WebCredentials.IsEmpty)
return BattlenetRpcErrorCode.Denied;
PreparedStatement stmt = DB.Login.GetPreparedStatement(LoginStatements.SEL_BNET_ACCOUNT_INFO);
stmt.AddValue(0, verifyWebCredentialsRequest.WebCredentials.ToStringUtf8());
@@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
using System.Text;
using Framework.Collections;
namespace Framework.Algorithms
{
public class DepthFirstSearch
{
private bool[] marked; // marked[v] = is there an s-v path?
private int count; // number of vertices connected to s
/**
* Computes the vertices in graph {@code G} that are
* connected to the source vertex {@code s}.
* @param G the graph
* @param s the source vertex
* @throws IllegalArgumentException unless {@code 0 <= s < V}
*/
public DepthFirstSearch(EdgeWeightedDigraph G, uint s, Action<uint> action)
{
marked = new bool[G.NumberOfVertices];
//validateVertex(s);
dfs(G, s, action);
}
// depth first search from v
private void dfs(EdgeWeightedDigraph G, uint v, Action<uint> action)
{
count++;
marked[v] = true;
foreach (var w in G.Adjacent((int)v))
{
if (!marked[w.To])
{
action(w.To);
dfs(G, w.To, action);
}
}
}
/**
* Is there a path between the source vertex {@code s} and vertex {@code v}?
* @param v the vertex
* @return {@code true} if there is a path, {@code false} otherwise
* @throws IllegalArgumentException unless {@code 0 <= v < V}
*/
public bool Marked(int v)
{
//validateVertex(v);
return marked[v];
}
/**
* Returns the number of vertices connected to the source vertex {@code s}.
* @return the number of vertices connected to the source vertex {@code s}
*/
public int Count()
{
return count;
}
}
}
@@ -0,0 +1,174 @@
using System;
using System.Collections.Generic;
using System.Text;
using Framework.Collections;
namespace Framework.Algorithms
{
/// <summary>
/// The DijkstraShortestPath class represents a data type for solving the single-source shortest paths problem
/// in edge-weighted digraphs where the edge weights are non-negative
/// </summary>
/// <seealso href="http://algs4.cs.princeton.edu/44sp/DijkstraSP.java.html">DijkstraSP class from Princeton University's Java Algorithms</seealso>
public class DijkstraShortestPath
{
private readonly double[] _distanceTo;
private readonly DirectedEdge[] _edgeTo;
private readonly IndexMinPriorityQueue<double> _priorityQueue;
/// <summary>
/// Computes a shortest paths tree from the specified sourceVertex to every other vertex in the edge-weighted directed graph
/// </summary>
/// <param name="graph">The edge-weighted directed graph</param>
/// <param name="sourceVertex">The source vertex to compute the shortest paths tree from</param>
/// <exception cref="ArgumentOutOfRangeException">Throws an ArgumentOutOfRangeException if an edge weight is negative</exception>
/// <exception cref="ArgumentNullException">Thrown if EdgeWeightedDigraph is null</exception>
public DijkstraShortestPath(EdgeWeightedDigraph graph, int sourceVertex)
{
if (graph == null)
{
throw new ArgumentNullException("graph", "EdgeWeightedDigraph cannot be null");
}
foreach (DirectedEdge edge in graph.Edges())
{
if (edge.Weight < 0)
{
throw new ArgumentOutOfRangeException($"Edge: '{edge}' has negative weight");
}
}
_distanceTo = new double[graph.NumberOfVertices];
_edgeTo = new DirectedEdge[graph.NumberOfVertices];
for (int v = 0; v < graph.NumberOfVertices; v++)
{
_distanceTo[v] = double.PositiveInfinity;
}
_distanceTo[sourceVertex] = 0.0;
_priorityQueue = new IndexMinPriorityQueue<double>(graph.NumberOfVertices);
_priorityQueue.Insert(sourceVertex, _distanceTo[sourceVertex]);
while (!_priorityQueue.IsEmpty())
{
int v = _priorityQueue.DeleteMin();
foreach (DirectedEdge edge in graph.Adjacent(v))
{
Relax(edge);
}
}
}
private void Relax(DirectedEdge edge)
{
uint v = edge.From;
uint w = edge.To;
if (_distanceTo[w] > _distanceTo[v] + edge.Weight)
{
_distanceTo[w] = _distanceTo[v] + edge.Weight;
_edgeTo[w] = edge;
if (_priorityQueue.Contains((int)w))
{
_priorityQueue.DecreaseKey((int)w, _distanceTo[w]);
}
else
{
_priorityQueue.Insert((int)w, _distanceTo[w]);
}
}
}
/// <summary>
/// Returns the length of a shortest path from the sourceVertex to the specified destinationVertex
/// </summary>
/// <param name="destinationVertex">The destination vertex to find a shortest path to</param>
/// <returns>The length of a shortest path from the sourceVertex to the specified destinationVertex or double.PositiveInfinity if no such path exists</returns>
public double DistanceTo(int destinationVertex)
{
return _distanceTo[destinationVertex];
}
/// <summary>
/// Is there a path from the sourceVertex to the specified destinationVertex?
/// </summary>
/// <param name="destinationVertex">The destination vertex to see if there is a path to</param>
/// <returns>True if there is a path from the sourceVertex to the specified destinationVertex, false otherwise</returns>
public bool HasPathTo(int destinationVertex)
{
return _distanceTo[destinationVertex] < double.PositiveInfinity;
}
/// <summary>
/// Returns an IEnumerable of DirectedEdges representing a shortest path from the sourceVertex to the specified destinationVertex
/// </summary>
/// <param name="destinationVertex">The destination vertex to find a shortest path to</param>
/// <returns>IEnumerable of DirectedEdges representing a shortest path from the sourceVertex to the specified destinationVertex</returns>
public IEnumerable<DirectedEdge> PathTo(int destinationVertex)
{
if (!HasPathTo(destinationVertex))
{
return null;
}
var path = new Stack<DirectedEdge>();
for (DirectedEdge edge = _edgeTo[destinationVertex]; edge != null; edge = _edgeTo[edge.From])
{
path.Push(edge);
}
return path;
}
// TODO: This method should be private and should be called from the bottom of the constructor
/// <summary>
/// check optimality conditions:
/// </summary>
/// <param name="graph">The edge-weighted directed graph</param>
/// <param name="sourceVertex">The source vertex to check optimality conditions from</param>
/// <returns>True if all optimality conditions are met, false otherwise</returns>
/// <exception cref="ArgumentNullException">Thrown on null EdgeWeightedDigraph</exception>
public bool Check(EdgeWeightedDigraph graph, int sourceVertex)
{
if (graph == null)
{
throw new ArgumentNullException("graph", "EdgeWeightedDigraph cannot be null");
}
if (_distanceTo[sourceVertex] != 0.0 || _edgeTo[sourceVertex] != null)
{
return false;
}
for (int v = 0; v < graph.NumberOfVertices; v++)
{
if (v == sourceVertex)
{
continue;
}
if (_edgeTo[v] == null && _distanceTo[v] != double.PositiveInfinity)
{
return false;
}
}
for (int v = 0; v < graph.NumberOfVertices; v++)
{
foreach (DirectedEdge edge in graph.Adjacent(v))
{
uint w = edge.To;
if (_distanceTo[v] + edge.Weight < _distanceTo[w])
{
return false;
}
}
}
for (int w = 0; w < graph.NumberOfVertices; w++)
{
if (_edgeTo[w] == null)
{
continue;
}
DirectedEdge edge = _edgeTo[w];
uint v = edge.From;
if (w != edge.To)
{
return false;
}
if (_distanceTo[v] + edge.Weight != _distanceTo[w])
{
return false;
}
}
return true;
}
}
}
@@ -0,0 +1,148 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Framework.Collections
{
/// <summary>
/// The EdgeWeightedDigrpah class represents an edge-weighted directed graph of vertices named 0 through V-1, where each directed edge
/// is of type DirectedEdge and has real-valued weight.
/// </summary>
/// <seealso href="http://algs4.cs.princeton.edu/44sp/EdgeWeightedDigraph.java.html">EdgeWeightedDigraph class from Princeton University's Java Algorithms</seealso>
public class EdgeWeightedDigraph
{
private readonly LinkedList<DirectedEdge>[] _adjacent;
/// <summary>
/// Constructs an empty edge-weighted digraph with the specified number of vertices and 0 edges
/// </summary>
/// <param name="vertices">Number of vertices in the Graph</param>
public EdgeWeightedDigraph(int vertices)
{
NumberOfVertices = vertices;
NumberOfEdges = 0;
_adjacent = new LinkedList<DirectedEdge>[NumberOfVertices];
for (int v = 0; v < NumberOfVertices; v++)
{
_adjacent[v] = new LinkedList<DirectedEdge>();
}
}
/// <summary>
/// The number of vertices in the edge-weighted digraph
/// </summary>
public int NumberOfVertices { get; private set; }
/// <summary>
/// The number of edges in the edge-weighted digraph
/// </summary>
public int NumberOfEdges { get; private set; }
/// <summary>
/// Adds the specified directed edge to the edge-weighted digraph
/// </summary>
/// <param name="edge">The DirectedEdge to add</param>
/// <exception cref="ArgumentNullException">DirectedEdge cannot be null</exception>
public void AddEdge(DirectedEdge edge)
{
if (edge == null)
{
throw new ArgumentNullException("edge", "DirectedEdge cannot be null");
}
_adjacent[edge.From].AddLast(edge);
}
/// <summary>
/// Returns an IEnumerable of the DirectedEdges incident from the specified vertex
/// </summary>
/// <param name="vertex">The vertex to find incident DirectedEdges from</param>
/// <returns>IEnumerable of the DirectedEdges incident from the specified vertex</returns>
public IEnumerable<DirectedEdge> Adjacent(int vertex)
{
return _adjacent[vertex];
}
/// <summary>
/// Returns an IEnumerable of all directed edges in the edge-weighted digraph
/// </summary>
/// <returns>IEnumerable of of all directed edges in the edge-weighted digraph</returns>
public IEnumerable<DirectedEdge> Edges()
{
for (int v = 0; v < NumberOfVertices; v++)
{
foreach (DirectedEdge edge in _adjacent[v])
{
yield return edge;
}
}
}
/// <summary>
/// Returns the number of directed edges incident from the specified vertex
/// This is known as the outdegree of the vertex
/// </summary>
/// <param name="vertex">The vertex to find find the outdegree of</param>
/// <returns>The number of directed edges incident from the specified vertex</returns>
public int OutDegree(int vertex)
{
return _adjacent[vertex].Count;
}
/// <summary>
/// Returns a string that represents the current edge-weighted digraph
/// </summary>
/// <returns>
/// A string that represents the current edge-weighted digraph
/// </returns>
public override string ToString()
{
var formattedString = new StringBuilder();
formattedString.AppendFormat("{0} vertices, {1} edges {2}", NumberOfVertices, NumberOfEdges, Environment.NewLine);
for (int v = 0; v < NumberOfVertices; v++)
{
formattedString.AppendFormat("{0}: ", v);
foreach (DirectedEdge edge in _adjacent[v])
{
formattedString.AppendFormat("{0} ", edge.To);
}
formattedString.AppendLine();
}
return formattedString.ToString();
}
}
/// <summary>
/// The DirectedEdge class represents a weighted edge in an edge-weighted directed graph.
/// </summary>
/// <seealso href="http://algs4.cs.princeton.edu/44sp/DirectedEdge.java.html">DirectedEdge class from Princeton University's Java Algorithms</seealso>
public class DirectedEdge
{
/// <summary>
/// Constructs a directed edge from one specified vertex to another with the given weight
/// </summary>
/// <param name="from">The start vertex</param>
/// <param name="to">The destination vertex</param>
/// <param name="weight">The weight of the DirectedEdge</param>
public DirectedEdge(uint from, uint to, double weight)
{
From = from;
To = to;
Weight = weight;
}
/// <summary>
/// Returns the destination vertex of the DirectedEdge
/// </summary>
public uint From { get; private set; }
/// <summary>
/// Returns the start vertex of the DirectedEdge
/// </summary>
public uint To { get; private set; }
/// <summary>
/// Returns the weight of the DirectedEdge
/// </summary>
public double Weight { get; private set; }
/// <summary>
/// Returns a string that represents the current DirectedEdge
/// </summary>
/// <returns>
/// A string that represents the current DirectedEdge
/// </returns>
public override string ToString()
{
return $"From: {From}, To: {To}, Weight: {Weight}";
}
}
}
@@ -0,0 +1,189 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Framework.Collections
{
/// <summary>
/// The IndexMinPriorityQueue class represents an indexed priority queue of generic keys.
/// </summary>
/// <seealso href="http://algs4.cs.princeton.edu/24pq/IndexMinPQ.java.html">IndexMinPQ class from Princeton University's Java Algorithms</seealso>
/// <typeparam name="T">Type must implement IComparable interface</typeparam>
public class IndexMinPriorityQueue<T> where T : IComparable<T>
{
private readonly T[] _keys;
private readonly int _maxSize;
private readonly int[] _pq;
private readonly int[] _qp;
/// <summary>
/// Constructs an empty indexed priority queue with indices between 0 and the specified maxSize - 1
/// </summary>
/// <param name="maxSize">The maximum size of the indexed priority queue</param>
public IndexMinPriorityQueue(int maxSize)
{
_maxSize = maxSize;
Size = 0;
_keys = new T[_maxSize + 1];
_pq = new int[_maxSize + 1];
_qp = new int[_maxSize + 1];
for (int i = 0; i < _maxSize; i++)
{
_qp[i] = -1;
}
}
/// <summary>
/// The number of keys on this indexed priority queue
/// </summary>
public int Size { get; private set; }
/// <summary>
/// Is the indexed priority queue empty?
/// </summary>
/// <returns>True if the indexed priority queue is empty, false otherwise</returns>
public bool IsEmpty()
{
return Size == 0;
}
/// <summary>
/// Is the specified parameter i an index on the priority queue?
/// </summary>
/// <param name="i">An index to check for on the priority queue</param>
/// <returns>True if the specified parameter i is an index on the priority queue, false otherwise</returns>
public bool Contains(int i)
{
return _qp[i] != -1;
}
/// <summary>
/// Associates the specified key with the specified index
/// </summary>
/// <param name="index">The index to associate the key with</param>
/// <param name="key">The key to associate with the index</param>
public void Insert(int index, T key)
{
Size++;
_qp[index] = Size;
_pq[Size] = index;
_keys[index] = key;
Swim(Size);
}
/// <summary>
/// Returns an index associated with a minimum key
/// </summary>
/// <returns>An index associated with a minimum key</returns>
public int MinIndex()
{
return _pq[1];
}
/// <summary>
/// Returns a minimum key
/// </summary>
/// <returns>A minimum key</returns>
public T MinKey()
{
return _keys[_pq[1]];
}
/// <summary>
/// Removes a minimum key and returns its associated index
/// </summary>
/// <returns>An index associated with a minimum key that was removed</returns>
public int DeleteMin()
{
int min = _pq[1];
Exchange(1, Size--);
Sink(1);
_qp[min] = -1;
_keys[_pq[Size + 1]] = default(T);
_pq[Size + 1] = -1;
return min;
}
/// <summary>
/// Returns the key associated with the specified index
/// </summary>
/// <param name="index">The index of the key to return</param>
/// <returns>The key associated with the specified index</returns>
public T KeyAt(int index)
{
return _keys[index];
}
/// <summary>
/// Change the key associated with the specified index to the specified value
/// </summary>
/// <param name="index">The index of the key to change</param>
/// <param name="key">Change the key associated with the specified index to this key</param>
public void ChangeKey(int index, T key)
{
_keys[index] = key;
Swim(_qp[index]);
Sink(_qp[index]);
}
/// <summary>
/// Decrease the key associated with the specified index to the specified value
/// </summary>
/// <param name="index">The index of the key to decrease</param>
/// <param name="key">Decrease the key associated with the specified index to this key</param>
public void DecreaseKey(int index, T key)
{
_keys[index] = key;
Swim(_qp[index]);
}
/// <summary>
/// Increase the key associated with the specified index to the specified value
/// </summary>
/// <param name="index">The index of the key to increase</param>
/// <param name="key">Increase the key associated with the specified index to this key</param>
public void IncreaseKey(int index, T key)
{
_keys[index] = key;
Sink(_qp[index]);
}
/// <summary>
/// Remove the key associated with the specified index
/// </summary>
/// <param name="index">The index of the key to remove</param>
public void Delete(int index)
{
int i = _qp[index];
Exchange(i, Size--);
Swim(i);
Sink(i);
_keys[index] = default(T);
_qp[index] = -1;
}
private bool Greater(int i, int j)
{
return _keys[_pq[i]].CompareTo(_keys[_pq[j]]) > 0;
}
private void Exchange(int i, int j)
{
int swap = _pq[i];
_pq[i] = _pq[j];
_pq[j] = swap;
_qp[_pq[i]] = i;
_qp[_pq[j]] = j;
}
private void Swim(int k)
{
while (k > 1 && Greater(k / 2, k))
{
Exchange(k, k / 2);
k = k / 2;
}
}
private void Sink(int k)
{
while (2 * k <= Size)
{
int j = 2 * k;
if (j < Size && Greater(j, j + 1))
{
j++;
}
if (!Greater(k, j))
{
break;
}
Exchange(k, j);
k = j;
}
}
}
}
+1 -1
View File
@@ -603,7 +603,7 @@ namespace Framework.Constants
CommandReloadSpellLootTemplate = 695,
CommandReloadSpellLinkedSpell = 696,
CommandReloadSpellPetAuras = 697,
// 698 - Reuse
CommandCharacterChangeaccount = 698,
CommandReloadSpellProc = 699,
CommandReloadSpellScripts = 700,
CommandReloadSpellTargetPosition = 701,
@@ -408,7 +408,10 @@ namespace Framework.Constants
GainParagonReputation = 206,
EarnHonorXp = 207,
RelicTalentUnlocked = 211,
TotalTypes = 213
ReachAccountHonorLevel = 213,
HeartOfAzerothArtifactPowerEarned = 214,
HeartOfAzerothLevelReached = 215,
TotalTypes
}
public enum CriteriaDataType
@@ -26,10 +26,11 @@ namespace Framework.Constants
HasFollowsTerrain = 0x010, // Nyi
Unk1 = 0x020,
HasTargetRollPitchYaw = 0x040, // Nyi
Unk2 = 0x080,
HasAnimID = 0x080,
Unk3 = 0x100,
Unk4 = 0x200,
HasCircularMovement = 0x400
HasAnimKitID = 0x200,
HasCircularMovement = 0x400,
Unk5 = 0x800
}
public enum AreaTriggerTypes
@@ -78,51 +78,51 @@ namespace Framework.Constants
CharCreateAlliedRaceAchievement = 50,
CharCreateLevelRequirementDemonHunter = 51,
CharDeleteInProgress = 52,
CharDeleteSuccess = 53,
CharDeleteFailed = 54,
CharDeleteFailedLockedForTransfer = 55,
CharDeleteFailedGuildLeader = 56,
CharDeleteFailedArenaCaptain = 57,
CharDeleteFailedHasHeirloomOrMail = 58,
CharDeleteFailedUpgradeInProgress = 59,
CharDeleteFailedHasWowToken = 60,
CharDeleteFailedVasTransactionInProgress = 61,
CharLoginInProgress = 62,
CharLoginSuccess = 63,
CharLoginNoWorld = 64,
CharLoginDuplicateCharacter = 65,
CharLoginNoInstances = 66,
CharLoginFailed = 67,
CharLoginDisabled = 68,
CharLoginNoCharacter = 69,
CharLoginLockedForTransfer = 70,
CharLoginLockedByBilling = 71,
CharLoginLockedByMobileAh = 72,
CharLoginTemporaryGmLock = 73,
CharLoginLockedByCharacterUpgrade = 74,
CharLoginLockedByRevokedCharacterUpgrade = 75,
CharLoginLockedByRevokedVasTransaction = 76,
CharLoginLockedByRestriction = 77,
CharNameSuccess = 78,
CharNameFailure = 79,
CharNameNoName = 80,
CharNameTooShort = 81,
CharNameTooLong = 82,
CharNameInvalidCharacter = 83,
CharNameMixedLanguages = 84,
CharNameProfane = 85,
CharNameReserved = 86,
CharNameInvalidApostrophe = 87,
CharNameMultipleApostrophes = 88,
CharNameThreeConsecutive = 89,
CharNameInvalidSpace = 90,
CharNameConsecutiveSpaces = 91,
CharNameRussianConsecutiveSilentCharacters = 92,
CharNameRussianSilentCharacterAtBeginningOrEnd = 93,
CharNameDeclensionDoesntMatchBaseName = 94
CharCreateCharacterInCommunity = 52,
CharDeleteInProgress = 53,
CharDeleteSuccess = 54,
CharDeleteFailed = 55,
CharDeleteFailedLockedForTransfer = 56,
CharDeleteFailedGuildLeader = 57,
CharDeleteFailedArenaCaptain = 58,
CharDeleteFailedHasHeirloomOrMail = 59,
CharDeleteFailedUpgradeInProgress = 60,
CharDeleteFailedHasWowToken = 61,
CharDeleteFailedVasTransactionInProgress = 62,
CharDeleteFailedCommunityOwner = 63,
CharLoginInProgress = 64,
CharLoginSuccess = 65,
CharLoginNoWorld = 66,
CharLoginDuplicateCharacter = 67,
CharLoginNoInstances = 68,
CharLoginFailed = 69,
CharLoginDisabled = 70,
CharLoginNoCharacter = 71,
CharLoginLockedForTransfer = 72,
CharLoginLockedByBilling = 73,
CharLoginLockedByMobileAh = 74,
CharLoginTemporaryGmLock = 75,
CharLoginLockedByCharacterUpgrade = 76,
CharLoginLockedByRevokedCharacterUpgrade = 77,
CharLoginLockedByRevokedVasTransaction = 78,
CharLoginLockedByRestriction = 79,
CharNameSuccess = 80,
CharNameFailure = 81,
CharNameNoName = 82,
CharNameTooShort = 83,
CharNameTooLong = 84,
CharNameInvalidCharacter = 85,
CharNameMixedLanguages = 86,
CharNameProfane = 87,
CharNameReserved = 88,
CharNameInvalidApostrophe = 89,
CharNameMultipleApostrophes = 90,
CharNameThreeConsecutive = 91,
CharNameInvalidSpace = 92,
CharNameConsecutiveSpaces = 93,
CharNameRussianConsecutiveSilentCharacters = 94,
CharNameRussianSilentCharacterAtBeginningOrEnd = 95,
CharNameDeclensionDoesntMatchBaseName = 96
}
public enum CharacterUndeleteResult
+63 -10
View File
@@ -17,7 +17,7 @@
namespace Framework.Constants
{
public enum AbilytyLearnType : byte
public enum AbilityLearnType : byte
{
OnSkillValue = 1, // Spell state will update depending on skill value
OnSkillLearn = 2 // Spell will be learned/removed together with entire skill
@@ -904,7 +904,7 @@ namespace Framework.Constants
public enum BattlegroundBracketId // bracketId for level ranges
{
First = 0,
Last = 11,
Last = 12,
Max
}
@@ -1241,7 +1241,7 @@ namespace Framework.Constants
Prime = 2
}
public enum ItemSetFlags : byte
public enum ItemSetFlags
{
LegacyInactive = 0x01,
}
@@ -1301,7 +1301,7 @@ namespace Framework.Constants
public enum LockType
{
Picklock = 1,
Lockpicking = 1,
Herbalism = 2,
Mining = 3,
DisarmTrap = 4,
@@ -1317,14 +1317,34 @@ namespace Framework.Constants
OpenAttacking = 14,
Gahzridian = 15,
Blasting = 16,
SlowOpen = 17,
SlowClose = 18,
PvpOpen = 17,
PvpClose = 18,
Fishing = 19,
Inscription = 20,
OpenFromVehicle = 21,
Archaelogy = 22,
Archaeology = 22,
PvpOpenFast = 23,
LumberMill = 28
LumberMill = 28,
Skinning = 29,
AncientMana = 30,
Warboard = 31,
ClassicHerbalism = 32,
OutlandHerbalism = 33,
NorthrendHerbalism = 34,
CataclysmHerbalism = 35,
PandariaHerbalism = 36,
DraenorHerbalism = 37,
LegionHerbalism = 38,
KulTiranHerbalism = 39,
ClassicMining = 40,
OutlandMining = 41,
NorthrendMining = 42,
CataclysmMining = 43,
PandariaMining = 44,
DraenorMining = 45,
LegionMining = 46,
KulTiranMining = 47,
Skinning2 = 48
}
public enum MapTypes : byte
@@ -1359,7 +1379,7 @@ namespace Framework.Constants
IgnoreRestrictions = 0x20
}
public enum MountFlags
public enum MountFlags : ushort
{
CanPitch = 0x4, // client checks MOVEMENTFLAG2_FULL_SPEED_PITCHING
CanSwim = 0x8, // client checks MOVEMENTFLAG_SWIMMING
@@ -1416,7 +1436,7 @@ namespace Framework.Constants
MonoValue = 0x400 // Skill always has value 1
}
public enum SpellCategoryFlags : byte
public enum SpellCategoryFlags : sbyte
{
CooldownScalesWithWeaponSpeed = 0x01, // unused
CooldownStartsOnEvent = 0x04,
@@ -1743,4 +1763,37 @@ namespace Framework.Constants
Read = 456,
Boot = 506
}
public enum ExpectedStatType : byte
{
CreatureHealth = 0,
PlayerHealth = 1,
CreatureAutoAttackDps = 2,
CreatureArmor = 3,
PlayerMana = 4,
PlayerPrimaryStat = 5,
PlayerSecondaryStat = 6,
ArmorConstant = 7,
None = 8,
CreatureSpellDamage = 9
}
public enum UiMapSystem : sbyte
{
World = 0,
Taxi = 1,
Adventure = 2,
Max = 3
}
public enum UiMapType
{
Cosmic = 0,
World = 1,
Continent = 2,
Zone = 3,
Dungeon = 4,
Micro = 5,
Orphan = 6
}
}
+2 -1
View File
@@ -202,6 +202,7 @@ namespace Framework.Constants
NoXpAtKill = 0x40, // Creature Kill Not Provide Xp
Trigger = 0x80, // Trigger Creature
NoTaunt = 0x100, // Creature Is Immune To Taunt Auras And Effect Attack Me
NoMoveFlagsUpdate = 0x200, // Creature won't update movement flags
Worldevent = 0x4000, // Custom Flag For World Event Creatures (Left Room For Merging)
Guard = 0x8000, // Creature Is Guard
NoCrit = 0x20000, // Creature Can'T Do Critical Strikes
@@ -214,7 +215,7 @@ namespace Framework.Constants
ImmunityKnockback = 0x40000000, // creature is immune to knockback effects
DBAllowed = (InstanceBind | Civilian | NoParry | NoParryHasten | NoBlock | NoCrush | NoXpAtKill |
Trigger | NoTaunt | Worldevent | NoCrit | NoSkillgain | TauntDiminish | AllDiminish | Guard |
Trigger | NoTaunt | NoMoveFlagsUpdate | Worldevent | NoCrit | NoSkillgain | TauntDiminish | AllDiminish | Guard |
IgnorePathfinding | NoPlayerDamageReq | ImmunityKnockback)
}
@@ -71,7 +71,11 @@ namespace Framework.Constants
KeystoneReceptacle = 49,
GatheringNode = 50,
ChallengeModeReward = 51,
Max = 52
Multi = 52,
SiegeableMulti = 53,
SiegeableMo = 54,
PvpReward = 55,
Max = 56
}
public enum GameObjectState
+139 -74
View File
@@ -259,7 +259,7 @@ namespace Framework.Constants
StrInt = 74
}
public enum ItemSpelltriggerType : byte
public enum ItemSpelltriggerType : sbyte
{
OnUse = 0, // use after equip cooldown
OnEquip = 1,
@@ -347,6 +347,68 @@ namespace Framework.Constants
OverrideRequiredLevel = 18
}
enum ItemContext : byte
{
None = 0,
DungeonNormal = 1,
DungeonHeroic = 2,
RaidNormal = 3,
RaidRaidFinder = 4,
RaidHeroic = 5,
RaidMythic = 6,
PvpUnranked1 = 7,
PvpRanked1 = 8,
ScenarioNormal = 9,
ScenarioHeroic = 10,
QuestReward = 11,
Store = 12,
TradeSkill = 13,
Vendor = 14,
BlackMarket = 15,
ChallengeMode1 = 16,
DungeonLvlUp1 = 17,
DungeonLvlUp2 = 18,
DungeonLvlUp3 = 19,
DungeonLvlUp4 = 20,
ForceToNone = 21,
Timewalker = 22,
DungeonMythic = 23,
PvpHonorReward = 24,
WorldQuest1 = 25,
WorldQuest2 = 26,
WorldQuest3 = 27,
WorldQuest4 = 28,
WorldQuest5 = 29,
WorldQuest6 = 30,
MissionReward1 = 31,
MissionReward2 = 32,
ChallengeMode2 = 33,
ChallengeMode3 = 34,
ChallengeModeJackpot = 35,
WorldQuest7 = 36,
WorldQuest8 = 37,
PvpRanked2 = 38,
PvpRanked3 = 39,
PvpRanked4 = 40,
PvpUnranked2 = 41,
WorldQuest9 = 42,
WorldQuest10 = 43,
PvpRanked5 = 44,
PvpRanked6 = 45,
PvpRanked7 = 46,
PvpUnranked3 = 47,
PvpUnranked4 = 48,
PvpUnranked5 = 49,
PvpUnranked6 = 50,
PvpUnranked7 = 51,
PvpRanked8 = 52,
WorldQuest11 = 53,
WorldQuest12 = 54,
WorldQuest13 = 55,
PvpRankedJackpot = 56,
TournamentRealm = 57
}
public enum ItemEnchantmentType : byte
{
None = 0,
@@ -905,79 +967,82 @@ namespace Framework.Constants
TooFewToSplit = 26, // Tried To Split More Than Number In Stack.
SplitFailed = 27, // Couldn'T Split Those Items.
SpellFailedReagentsGeneric = 28, // Missing Reagent
NotEnoughMoney = 29, // You Don'T Have Enough Money.
NotABag = 30, // Not A Bag.
DestroyNonemptyBag = 31, // You Can Only Do That With Empty Bags.
NotOwner = 32, // You Don'T Own That Item.
OnlyOneQuiver = 33, // You Can Only Equip One Quiver.
NoBankSlot = 34, // You Must Purchase That Bag Slot First
NoBankHere = 35, // You Are Too Far Away From A Bank.
ItemLocked = 36, // Item Is Locked.
GenericStunned = 37, // You Are Stunned
PlayerDead = 38, // You Can'T Do That When You'Re Dead.
ClientLockedOut = 39, // You Can'T Do That Right Now.
InternalBagError = 40, // Internal Bag Error
OnlyOneBolt = 41, // You Can Only Equip One Quiver.
OnlyOneAmmo = 42, // You Can Only Equip One Ammo Pouch.
CantWrapStackable = 43, // Stackable Items Can'T Be Wrapped.
CantWrapEquipped = 44, // Equipped Items Can'T Be Wrapped.
CantWrapWrapped = 45, // Wrapped Items Can'T Be Wrapped.
CantWrapBound = 46, // Bound Items Can'T Be Wrapped.
CantWrapUnique = 47, // Unique Items Can'T Be Wrapped.
CantWrapBags = 48, // Bags Can'T Be Wrapped.
LootGone = 49, // Already Looted
InvFull = 50, // Inventory Is Full.
BankFull = 51, // Your Bank Is Full
VendorSoldOut = 52, // That Item Is Currently Sold Out.
BagFull2 = 53, // That Bag Is Full.
ItemNotFound2 = 54, // The Item Was Not Found.
CantStack2 = 55, // This Item Cannot Stack.
BagFull3 = 56, // That Bag Is Full.
VendorSoldOut2 = 57, // That Item Is Currently Sold Out.
ObjectIsBusy = 58, // That Object Is Busy.
CantBeDisenchanted = 59,
NotInCombat = 60, // You Can'T Do That While In Combat
NotWhileDisarmed = 61, // You Can'T Do That While Disarmed
BagFull4 = 62, // That Bag Is Full.
CantEquipRank = 63, // You Don'T Have The Required Rank For That Item
CantEquipReputation = 64, // You Don'T Have The Required Reputation For That Item
TooManySpecialBags = 65, // You Cannot Equip Another Bag Of That Type
LootCantLootThatNow = 66, // You Can'T Loot That Item Now.
ItemUniqueEquippable = 67, // You Cannot Equip More Than One Of Those.
VendorMissingTurnins = 68, // You Do Not Have The Required Items For That Purchase
NotEnoughHonorPoints = 69, // You Don'T Have Enough Honor Points
NotEnoughArenaPoints = 70, // You Don'T Have Enough Arena Points
ItemMaxCountSocketed = 71, // You Have The Maximum Number Of Those Gems In Your Inventory Or Socketed Into Items.
MailBoundItem = 72, // You Can'T Mail Soulbound Items.
InternalBagError2 = 73, // Internal Bag Error
BagFull5 = 74, // That Bag Is Full.
ItemMaxCountEquippedSocketed = 75, // You Have The Maximum Number Of Those Gems Socketed Into Equipped Items.
ItemUniqueEquippableSocketed = 76, // You Cannot Socket More Than One Of Those Gems Into A Single Item.
TooMuchGold = 77, // At Gold Limit
NotDuringArenaMatch = 78, // You Can'T Do That While In An Arena Match
TradeBoundItem = 79, // You Can'T Trade A Soulbound Item.
CantEquipRating = 80, // You Don'T Have The Personal, Team, Or Battleground Rating Required To Buy That Item
EventAutoequipBindConfirm = 81,
NotSameAccount = 82, // Account-Bound Items Can Only Be Given To Your Own Characters.
NoOutput = 83,
ItemMaxLimitCategoryCountExceededIs = 84, // You Can Only Carry %D %S
ItemMaxLimitCategorySocketedExceededIs = 85, // You Can Only Equip %D |4item:Items In The %S Category
ScalingStatItemLevelExceeded = 86, // Your Level Is Too High To Use That Item
PurchaseLevelTooLow = 87, // You Must Reach Level %D To Purchase That Item.
CantEquipNeedTalent = 88, // You Do Not Have The Required Talent To Equip That.
ItemMaxLimitCategoryEquippedExceededIs = 89, // You Can Only Equip %D |4item:Items In The %S Category
ShapeshiftFormCannotEquip = 90, // Cannot Equip Item In This Form
ItemInventoryFullSatchel = 91, // Your Inventory Is Full. Your Satchel Has Been Delivered To Your Mailbox.
ScalingStatItemLevelTooLow = 92, // Your Level Is Too Low To Use That Item
CantBuyQuantity = 93, // You Can'T Buy The Specified Quantity Of That Item.
ItemIsBattlePayLocked = 94, // Your purchased item is still waiting to be unlocked
ReagentBankFull = 95, // Your reagent bank is full
ReagentBankLocked = 96,
WrongBagType3 = 97,
CantUseItem = 98, // You can't use that item.
CantBeObliterated = 99, // You can't obliterate that item
GuildBankConjuredItem = 100,// You cannot store conjured items in the guild bank
CantDoThatRightNow = 101,// You can't do that right now.
CantTradeGold = 29, // Gold May Only Be Offered By One Trader.
NotEnoughMoney = 30, // You Don'T Have Enough Money.
NotABag = 31, // Not A Bag.
DestroyNonemptyBag = 32, // You Can Only Do That With Empty Bags.
NotOwner = 33, // You Don'T Own That Item.
OnlyOneQuiver = 34, // You Can Only Equip One Quiver.
NoBankSlot = 35, // You Must Purchase That Bag Slot First
NoBankHere = 36, // You Are Too Far Away From A Bank.
ItemLocked = 37, // Item Is Locked.
GenericStunned = 38, // You Are Stunned
PlayerDead = 39, // You Can'T Do That When You'Re Dead.
ClientLockedOut = 40, // You Can'T Do That Right Now.
InternalBagError = 41, // Internal Bag Error
OnlyOneBolt = 42, // You Can Only Equip One Quiver.
OnlyOneAmmo = 43, // You Can Only Equip One Ammo Pouch.
CantWrapStackable = 44, // Stackable Items Can'T Be Wrapped.
CantWrapEquipped = 45, // Equipped Items Can'T Be Wrapped.
CantWrapWrapped = 46, // Wrapped Items Can'T Be Wrapped.
CantWrapBound = 47, // Bound Items Can'T Be Wrapped.
CantWrapUnique = 48, // Unique Items Can'T Be Wrapped.
CantWrapBags = 49, // Bags Can'T Be Wrapped.
LootGone = 50, // Already Looted
InvFull = 51, // Inventory Is Full.
BankFull = 52, // Your Bank Is Full
VendorSoldOut = 53, // That Item Is Currently Sold Out.
BagFull2 = 54, // That Bag Is Full.
ItemNotFound2 = 55, // The Item Was Not Found.
CantStack2 = 56, // This Item Cannot Stack.
BagFull3 = 57, // That Bag Is Full.
VendorSoldOut2 = 58, // That Item Is Currently Sold Out.
ObjectIsBusy = 59, // That Object Is Busy.
CantBeDisenchanted = 60, // Item Cannot Be Disenchanted
NotInCombat = 61, // You Can'T Do That While In Combat
NotWhileDisarmed = 62, // You Can'T Do That While Disarmed
BagFull4 = 63, // That Bag Is Full.
CantEquipRank = 64, // You Don'T Have The Required Rank For That Item
CantEquipReputation = 65, // You Don'T Have The Required Reputation For That Item
TooManySpecialBags = 66, // You Cannot Equip Another Bag Of That Type
LootCantLootThatNow = 67, // You Can'T Loot That Item Now.
ItemUniqueEquippable = 68, // You Cannot Equip More Than One Of Those.
VendorMissingTurnins = 69, // You Do Not Have The Required Items For That Purchase
NotEnoughHonorPoints = 70, // You Don'T Have Enough Honor Points
NotEnoughArenaPoints = 71, // You Don'T Have Enough Arena Points
ItemMaxCountSocketed = 72, // You Have The Maximum Number Of Those Gems In Your Inventory Or Socketed Into Items.
MailBoundItem = 73, // You Can'T Mail Soulbound Items.
InternalBagError2 = 74, // Internal Bag Error
BagFull5 = 75, // That Bag Is Full.
ItemMaxCountEquippedSocketed = 76, // You Have The Maximum Number Of Those Gems Socketed Into Equipped Items.
ItemUniqueEquippableSocketed = 77, // You Cannot Socket More Than One Of Those Gems Into A Single Item.
TooMuchGold = 78, // At Gold Limit
NotDuringArenaMatch = 79, // You Can'T Do That While In An Arena Match
TradeBoundItem = 80, // You Can'T Trade A Soulbound Item.
CantEquipRating = 81, // You Don'T Have The Personal, Team, Or Battleground Rating Required To Buy That Item
EventAutoequipBindConfirm = 82,
NotSameAccount = 83, // Account-Bound Items Can Only Be Given To Your Own Characters.
EquipNone3 = 84,
ItemMaxLimitCategoryCountExceededIs = 85, // You Can Only Carry %D %S
ItemMaxLimitCategorySocketedExceededIs = 86, // You Can Only Equip %D |4item:Items In The %S Category
ScalingStatItemLevelExceeded = 87, // Your Level Is Too High To Use That Item
PurchaseLevelTooLow = 88, // You Must Reach Level %D To Purchase That Item.
CantEquipNeedTalent = 89, // You Do Not Have The Required Talent To Equip That.
ItemMaxLimitCategoryEquippedExceededIs = 90, // You Can Only Equip %D |4item:Items In The %S Category
ShapeshiftFormCannotEquip = 91, // Cannot Equip Item In This Form
ItemInventoryFullSatchel = 92, // Your Inventory Is Full. Your Satchel Has Been Delivered To Your Mailbox.
ScalingStatItemLevelTooLow = 93, // Your Level Is Too Low To Use That Item
CantBuyQuantity = 94, // You Can'T Buy The Specified Quantity Of That Item.
ItemIsBattlePayLocked = 95, // Your Purchased Item Is Still Waiting To Be Unlocked
ReagentBankFull = 96, // Your Reagent Bank Is Full
ReagentBankLocked = 97,
WrongBagType3 = 98, // That Item Doesn'T Go In That Container.
CantUseItem = 99, // You Can'T Use That Item.
CantBeObliterated = 100,// You Can'T Obliterate That Item
GuildBankConjuredItem = 101,// You Cannot Store Conjured Items In The Guild Bank
CantDoThatRightNow = 102,// You Can'T Do That Right Now.
BagFull6 = 103,// That Bag Is Full.
CantBeScrapped = 104,// You Can'T Scrap That Item
}
public enum BuyResult
+10 -3
View File
@@ -42,8 +42,14 @@ namespace Framework.Constants
PandarenNeutral = 42,
PandarenAlliance = 43,
PandarenHorde = 44,
Rikkitun = 168,
Addon = -1 // Used By Addons, In 2.4.0 Not Exist, Replaced By Messagetype?
Sprite = 168,
ShathYar = 178,
Nerglish = 179,
Moonkin = 180,
Shalassian = 181,
Thalassian2 = 182,
Addon = 183,
AddonLogged = 184
}
public enum CypherStrings
@@ -946,7 +952,8 @@ namespace Framework.Constants
AccountBnetNotLinked = 1189,
DisallowTicketsConfig = 1190,
BanExists = 1191,
// Room For More Level 3 1192-1198 Not Used
ChangeAccountSuccess = 1192,
// Room For More Level 3 1193-1198 Not Used
// Debug Commands
DebugAreatriggerLeft = 1999,
+6
View File
@@ -182,4 +182,10 @@ namespace Framework.Constants
CannotEnterZoneInCombat, // A Boss Encounter Is Currently In Progress On The Target Map
CannotEnterUnspecifiedReason
}
public enum ModelIgnoreFlags
{
Nothing = 0x00,
M2 = 0x01
}
}
File diff suppressed because it is too large Load Diff
+26 -19
View File
@@ -22,29 +22,35 @@ namespace Framework.Constants
Object = 0,
Item = 1,
Container = 2,
Unit = 3,
Player = 4,
GameObject = 5,
DynamicObject = 6,
Corpse = 7,
AreaTrigger = 8,
SceneObject = 9,
Conversation = 10
AzeriteEmpoweredItem = 3,
AzeriteItem = 4,
Unit = 5,
Player = 6,
ActivePlayer = 7,
GameObject = 8,
DynamicObject = 9,
Corpse = 10,
AreaTrigger = 11,
SceneObject = 12,
Conversation = 13
}
public enum TypeMask
{
Object = 0x01,
Item = 0x02,
Container = Item | 0x04,
Unit = 0x08,
Player = 0x10,
GameObject = 0x20,
DynamicObject = 0x40,
Corpse = 0x80,
AreaTrigger = 0x100,
Sceneobject = 0x200,
Conversation = 0x400,
Container = 0x04,
AzeriteEmpoweredItem = 0x08,
AzeriteItem = 0x10,
Unit = 0x20,
Player = 0x40,
ActivePlayer = 0x80,
GameObject = 0x100,
DynamicObject = 0x200,
Corpse = 0x400,
AreaTrigger = 0x800,
Sceneobject = 0x1000,
Conversation = 0x2000,
Seer = Player | Unit | DynamicObject
}
@@ -97,7 +103,8 @@ namespace Framework.Constants
BattlePet = 44,
CommerceObj = 45,
ClientSession = 46,
Cast = 47
Cast = 47,
ClientConnection = 48
}
public enum NotifyFlags
@@ -131,7 +138,7 @@ namespace Framework.Constants
// uses this category
}
public enum SummonType: byte
public enum SummonType
{
None = 0,
Pet = 1,
+1 -1
View File
@@ -106,7 +106,7 @@ namespace Framework.Constants
DeclensionDoesntMatchBaseName = 16
}
public enum PetStableinfo
public enum PetStableinfo : byte
{
Active = 1,
Inactive = 2
+8 -12
View File
@@ -24,8 +24,7 @@ namespace Framework.Constants
public const int MaxTalentTiers = 7;
public const int MaxTalentColumns = 3;
public const int MaxTalentRank = 5;
public const int MaxPvpTalentTiers = 6;
public const int MaxPvpTalentColumns = 3;
public const int MaxPvpTalentSlots = 4;
public const int MinSpecializationLevel = 10;
public const int MaxSpecializations = 4;
public const int MaxMasterySpells = 2;
@@ -46,7 +45,7 @@ namespace Framework.Constants
public const uint infinityCooldownDelayCheck = Time.Month / 2;
public const int MaxPlayerSummonDelay = 2 * Time.Minute;
public const int TaxiMaskSize = 258;
public const int TaxiMaskSize = 286;
// corpse reclaim times
public const int DeathExpireStep = (5 * Time.Minute);
@@ -59,17 +58,13 @@ namespace Framework.Constants
public const int MaxRunes = 7;
public const int MaxRechargingRunes = 3;
public static uint[] DefaultTalentRowLevels = { 15, 30, 45, 60, 75, 90, 100 };
public static uint[] DKTalentRowLevels = { 57, 58, 59, 60, 75, 90, 100 };
//public static uint[] DHTalentRowLevels = { 99, 100, 102, 104, 106, 108, 110 };
public const int CustomDisplaySize = 3;
public const int ArtifactsAllWeaponsGeneralWeaponEquippedPassive = 197886;
public const int MaxArtifactTier = 1;
public const byte MaxHonorLevel = 50;
public const int MaxHonorLevel = 500;
public const byte LevelMinHonor = 110;
public const uint SpellPvpRulesEnabled = 134735;
}
@@ -418,7 +413,7 @@ namespace Framework.Constants
GM = 0x08,
Ghost = 0x10,
Resting = 0x20,
Unk6 = 0x40,
VoiceChat = 0x40,
Unk7 = 0x80,
ContestedPVP = 0x100,
InPVP = 0x200,
@@ -449,7 +444,8 @@ namespace Framework.Constants
public enum PlayerFlagsEx
{
ReagentBankUnlocked = 0x01,
MercenaryMode = 0x02
MercenaryMode = 0x02,
ArtifactForgeCheat = 0x04
}
public enum CharacterFlags : uint
@@ -724,9 +720,9 @@ namespace Framework.Constants
public enum AttackSwingErr
{
CantAttack = 0,
NotInRange = 0,
BadFacing = 1,
NotInRange = 2,
CantAttack = 2,
DeadTarget = 3
}
+5
View File
@@ -315,6 +315,11 @@ namespace Framework.Constants
ClearProgressOfCriteriaTreeObjectivesOnAccept = 0x1000000
}
public enum QuestFlagsEx2
{
NoWarModeBonus = 0x2
}
public enum QuestSpecialFlags
{
None = 0x00,
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -273,7 +273,7 @@ namespace Framework.Constants
SetOrientation = 66, //
CreateTimedEvent = 67, // Id, Initialmin, Initialmax, Repeatmin(Only If It Repeats), Repeatmax(Only If It Repeats), Chance
Playmovie = 68, // Entry
MoveToPos = 69, // PointId, transport, disablePathfinding
MoveToPos = 69, // PointId, transport, disablePathfinding, ContactDistance
RespawnTarget = 70, //
Equip = 71, // Entry, Slotmask Slot1, Slot2, Slot3 , Only Slots With Mask Set Will Be Sent To Client, Bits Are 1, 2, 4, Leaving Mask 0 Is Defaulted To Mask 7 (Send All), Slots1-3 Are Only Used If No Entry Is Set
CloseGossip = 72, // None
+146 -29
View File
@@ -19,7 +19,7 @@ namespace Framework.Constants
{
public struct SkillConst
{
public const int MaxPlayerSkills = 128;
public const int MaxPlayerSkills = 256;
public const uint MaxSkillStep = 15;
}
@@ -34,23 +34,22 @@ namespace Framework.Constants
Maces = 54,
TwoHandedSwords = 55,
Defense = 95,
LangCommon = 98,
LanguageCommon = 98,
RacialDwarf = 101,
LangOrcish = 109,
LangDwarven = 111,
LangDarnassian = 113,
LangTaurahe = 115,
LanguageOrcish = 109,
LanguageDwarven = 111,
LanguageDarnassian = 113,
LanguageTaurahe = 115,
DualWield = 118,
RacialTauren = 124,
RacialOrc = 125,
RacialNightElf = 126,
FirstAid = 129,
Staves = 136,
LangThalassian = 137,
LangDraconic = 138,
LangDemonTongue = 139,
LangTitan = 140,
LangOldTongue = 141,
LanguageThalassian = 137,
LanguageDraconic = 138,
LanguageDemonTongue = 139,
LanguageTitan = 140,
LanguageOldTongue = 141,
Survival = 142,
HorseRiding = 148,
WolfRiding = 149,
@@ -95,8 +94,8 @@ namespace Framework.Constants
PetTurtle = 251,
PetGenericHunter = 270,
PlateMail = 293,
LangGnomish = 313,
LangTroll = 315,
LanguageGnomish = 313,
LanguageTroll = 315,
Enchanting = 333,
Fishing = 356,
Skinning = 393,
@@ -112,7 +111,7 @@ namespace Framework.Constants
PetHyena = 654,
PetBirdOfPrey = 655,
PetWindSerpent = 656,
LangForsaken = 673,
LanguageForsaken = 673,
KodoRiding = 713,
RacialTroll = 733,
RacialGnome = 753,
@@ -120,7 +119,7 @@ namespace Framework.Constants
Jewelcrafting = 755,
RacialBloodElf = 756,
PetEventRemoteControl = 758,
LangDraenei = 759,
LanguageDraenei = 759,
RacialDraenei = 760,
PetFelguard = 761,
Riding = 762,
@@ -146,8 +145,8 @@ namespace Framework.Constants
PetExoticSpiritBeast = 788,
RacialWorgen = 789,
RacialGoblin = 790,
LangGilnean = 791,
LangGoblin = 792,
LanguageGilnean = 791,
LanguageGoblin = 792,
Archaeology = 794,
Hunter = 795,
DeathKnight = 796,
@@ -159,7 +158,7 @@ namespace Framework.Constants
AllGlyphs = 810,
PetDog = 811,
PetMonkey = 815,
PetShaleSpider = 817,
PetExoticShaleSpider = 817,
Beetle = 818,
AllGuildPerks = 821,
PetHydra = 824,
@@ -168,9 +167,7 @@ namespace Framework.Constants
Warlock = 849,
RacialPandaren = 899,
Mage = 904,
LangPandarenNeutral = 905,
LangPandarenAlliance = 906,
LangPandarenHorde = 907,
LanguagePandarenNeutral = 905,
Rogue = 921,
Shaman = 924,
FelImp = 927,
@@ -190,17 +187,16 @@ namespace Framework.Constants
WayOfTheBrew = 980,
ApprenticeCooking = 981,
JourneymanCookbook = 982,
Porcupine = 983,
Crane = 984,
WaterStrider = 985,
PetRodent = 983,
PetCrane = 984,
PetWaterStrider = 985,
PetExoticQuilen = 986,
PetGoat = 987,
Basilisk = 988,
PetBasilisk = 988,
NoPlayers = 999,
Direhorn = 1305,
PetDirehorn = 1305,
PetPrimalStormElemental = 1748,
PetWaterElementalMinorTalentVersion = 1777,
PetExoticRylak = 1818,
PetRiverbeast = 1819,
Unused = 1830,
DemonHunter = 1848,
@@ -212,6 +208,127 @@ namespace Framework.Constants
Warglaives = 2152,
PetMechanical = 2189,
PetAbomination = 2216,
PetOxen = 2279,
PetScalehide = 2280,
PetFeathermane = 2361,
RacialNightborne = 2419,
RacialHighmountainTauren = 2420,
RacialLightforgedDraenei = 2421,
RacialVoidElf = 2423,
KulTiranBlacksmithing = 2437,
LegionBlacksmithing = 2454,
LanguageShalassian = 2464,
LanguageThalassian2 = 2465,
DraenorBlacksmithing = 2472,
PandariaBlacksmithing = 2473,
CataclysmBlacksmithing = 2474,
NorthrendBlacksmithing = 2475,
OutlandBlacksmithing = 2476,
Blacksmithing2 = 2477,
KulTiranAlchemy = 2478,
LegionAlchemy = 2479,
DraenorAlchemy = 2480,
PandariaAlchemy = 2481,
CataclysmAlchemy = 2482,
NorthrendAlchemy = 2483,
OutlandAlchemy = 2484,
Alchemy2 = 2485,
KulTiranEnchanting = 2486,
LegionEnchanting = 2487,
DraenorEnchanting = 2488,
PandariaEnchanting = 2489,
CataclysmEnchanting = 2491,
NorthrendEnchanting = 2492,
OutlandEnchanting = 2493,
Enchanting2 = 2494,
KulTiranEngineering = 2499,
LegionEngineering = 2500,
DraenorEngineering = 2501,
PandariaEngineering = 2502,
CataclysmEngineering = 2503,
NorthrendEngineering = 2504,
OutlandEngineering = 2505,
Engineering2 = 2506,
KulTiranInscription = 2507,
LegionInscription = 2508,
DraenorInscription = 2509,
PandariaInscription = 2510,
CataclysmInscription = 2511,
NorthrendInscription = 2512,
OutlandInscription = 2513,
Inscription2 = 2514,
KulTiranJewelcrafting = 2517,
LegionJewelcrafting = 2518,
DraenorJewelcrafting = 2519,
PandariaJewelcrafting = 2520,
CataclysmJewelcrafting = 2521,
NorthrendJewelcrafting = 2522,
OutlandJewelcrafting = 2523,
Jewelcrafting2 = 2524,
KulTiranLeatherworking = 2525,
LegionLeatherworking = 2526,
DraenorLeatherworking = 2527,
PandariaLeatherworking = 2528,
CataclysmLeatherworking = 2529,
NorthrendLeatherworking = 2530,
OutlandLeatherworking = 2531,
Leatherworking2 = 2532,
KulTiranTailoring = 2533,
LegionTailoring = 2534,
DraenorTailoring = 2535,
PandariaTailoring = 2536,
CataclysmTailoring = 2537,
NorthrendTailoring = 2538,
OutlandTailoring = 2539,
Tailoring2 = 2540,
KulTiranCooking = 2541,
LegionCooking = 2542,
DraenorCooking = 2543,
PandariaCooking = 2544,
CataclysmCooking = 2545,
NorthrendCooking = 2546,
OutlandCooking = 2547,
Cooking2 = 2548,
KulTiranHerbalism = 2549,
LegionHerbalism = 2550,
DraenorHerbalism = 2551,
PandariaHerbalism = 2552,
CataclysmHerbalism = 2553,
NorthrendHerbalism = 2554,
OutlandHerbalism = 2555,
Herbalism2 = 2556,
KulTiranSkinning = 2557,
LegionSkinning = 2558,
DraenorSkinning = 2559,
PandariaSkinning = 2560,
CataclysmSkinning = 2561,
NorthrendSkinning = 2562,
OutlandSkinning = 2563,
Skinning2 = 2564,
KulTiranMining = 2565,
LegionMining = 2566,
DraenorMining = 2567,
PandariaMining = 2568,
CataclysmMining = 2569,
NorthrendMining = 2570,
OutlandMining = 2571,
Mining2 = 2572,
KulTiranFishing = 2585,
LegionFishing = 2586,
DraenorFishing = 2587,
PandariaFishing = 2588,
CataclysmFishing = 2589,
NorthrendFishing = 2590,
OutlandFishing = 2591,
Fishing2 = 2592,
RacialDarkIronDwarf = 2597,
RacialMagHarOrc = 2598,
PetLizard = 2703,
PetHorse = 2704,
PetExoticPterrordax = 2705,
PetToad = 2706,
PetExoticKrolusk = 2707,
SecondPetHunter = 2716
}
public enum SkillState
@@ -222,7 +339,7 @@ namespace Framework.Constants
Deleted = 3
}
public enum SkillCategory : byte
public enum SkillCategory : sbyte
{
Unk = 0,
Attributes = 5,
@@ -513,7 +513,9 @@ namespace Framework.Constants
Unk489 = 489,
Unk490 = 490,
Unk491 = 491,
Total = 492
Unk492 = 492,
Unk493 = 493,
Total
}
public enum AuraEffectHandleModes
+52 -19
View File
@@ -116,7 +116,7 @@ namespace Framework.Constants
Cast = 0x04, // 2 Cast Any Spells
Move = 0x08, // 3 Removed By Any Movement
Turning = 0x10, // 4 Removed By Any Turning
Jump = 0x20, // 5 Removed By Entering Combat
Jump = 0x20, // 5 Removed By Jumping
NotMounted = 0x40, // 6 Removed By Dismounting
NotAbovewater = 0x80, // 7 Removed By Entering Water
NotUnderwater = 0x100, // 8 Removed By Leaving Water
@@ -687,23 +687,29 @@ namespace Framework.Constants
NotWhileMercenary = 270,
SpecDisabled = 271,
CantBeObliterated = 272,
FollowerClassSpecCap = 273,
TransportNotReady = 274,
TransmogSetAlreadyKnown = 275,
DisabledByAuraLabel = 276,
DisabledByMaxUsableLevel = 277,
SpellAlreadyKnown = 278,
MustKnowSupercedingSpell = 279,
YouCannotUseThatInPvpInstance = 280,
NoArtifactEquipped = 281,
WrongArtifactEquipped = 282,
TargetIsUntargetableByAnyone = 283,
SpellEffectFailed = 284,
NeedAllPartyMembers = 285,
ArtifactAtFullPower = 286,
ApItemFromPreviousTier = 287,
AreaTriggerCreation = 288,
Unknown = 289,
CantBeScrapped = 273,
FollowerClassSpecCap = 274,
TransportNotReady = 275,
TransmogSetAlreadyKnown = 276,
DisabledByAuraLabel = 277,
DisabledByMaxUsableLevel = 278,
SpellAlreadyKnown = 279,
MustKnowSupercedingSpell = 280,
YouCannotUseThatInPvpInstance = 281,
NoArtifactEquipped = 282,
WrongArtifactEquipped = 283,
TargetIsUntargetableByAnyone = 284,
SpellEffectFailed = 285,
NeedAllPartyMembers = 286,
ArtifactAtFullPower = 287,
ApItemFromPreviousTier = 288,
AreaTriggerCreation = 289,
AzeriteEmpoweredOnly = 290,
AzeriteEmpoweredNoChoicesToUndo = 291,
WrongFaction = 292,
NotEnoughCurrency = 293,
BattleForAzerothRidingRequirement = 294,
Unknown = 295,
// Ok Cast Value - Here In Case A Future Version Removes Success And We Need To Use A Custom Value (Not Sent To Client Either Way)
SpellCastOk = Success
@@ -1030,6 +1036,7 @@ namespace Framework.Constants
CannotRitualOfDoomWhileSummoningSiters = 317, // You Cannot Perform The Ritual Of Doom While Attempting To Summon The Sisters.
LearnedAllThatYouCanAboutYourArtifact = 318, // You Have Learned All That You Can About Your Artifact.
CantCallPetWithLoneWolf = 319, // You Cannot Use Call Pet While Lone Wolf Is Active.
TargetCannotAlreadyHaveOrbOfPower = 320, // Target cannot already have a Orb of Power.
YouMustBeInAnInnToStrumThatGuitar = 321, // You must be in an inn to strum that guitar.
YouCannotReachTheLatch = 322, // You cannot reach the latch.
RequiresABrimmingKeystone = 323, // Requires A Brimming Keystone.
@@ -1048,22 +1055,41 @@ namespace Framework.Constants
YouDoNotKnowHowToTameFeathermanes = 336, // You Do Not Know How To Tame Feathermanes.
YouMustReachArtifactKnowledgeLevel25 = 337, // You Must Reach Artifact Knowledge Level 25 To Use The Tome.
RequiresANetherPortalDisruptor = 338, // Requires A Nether Portal Disruptor.
YouAreNotTheCorrectRankToUseThisItem = 339, // You Are Not The Correct Rank To Use This Item.
MustBeStandingNearInjuredChromieInMountHyjal = 340, // Must Be Standing Near The Injured Chromie In Mount Hyjal.
TheresNothingFurtherYouCanLearn = 341, // There'S Nothing Further You Can Learn.
RemoveCannonsHeavyIronPlatingFirst = 342, // You Should Remove The Cannon'S Heavy Iron Plating First.
RemoveCannonsElectrokineticDefenseGridFirst = 343, // You Should Remove The Cannon'S Electrokinetic Defense Grid First.
RequiresTheArmoryKeyAndDendriteClusters = 344, // You Are Missing Pieces Of The Armory Key Or Do Not Have Enough Dendrite Clusters.
ThisItemRequiresBasicObliterumToUpgrade = 345, // This Item Requires Basic Obliterum To Upgrade.
ThisItemRequiresPrimalObliterumToUpgrade = 346, // This Item Requires Primal Obliterum To Upgrade.
ThisItemRequiresFlightMastersWhistle = 347, // This Item Requires A Flight Master'S Whistle.
RequiresMorrisonsMasterKey = 348, // Requires Morrison'S Master Key.
RequiresPowerThatEchoesThatOfTheAugari = 349, // Will Only Open To One Wielding The Power That Echoes That Of The Augari.
ThatPlayerHasAPendingTotemicRevival = 350, // That Player Has A Pending Totemic Revival.
YouHaveNoFireMinesDeployed = 351, // You Have No Fire Mines Deployed.
MustBeAffectedBySpiritPowder = 352, // You Must Be Affected By The Spirit Powder To Take The Phylactery.
YouAreBlockedByAStructureAboveYou = 353, // You Are Blocked By A Structure Above You.
Requires100ImpMeat = 354, // Requires 100 Imp Meat.
YouHaveNotObtainedAnyBackgroundFilters = 355, // You Have Not Obtained Any Background Filters.
NothingInterestingPostedHereRightNow = 356, // There Is Nothing Interesting Posted Here Right Now.
ParagonReputationRequiresHigherLevel = 357, // Paragon Reputation Is Not Available Until A Higher Level.
UunaIsMissing = 358, // Uuna Is Missing.
OnlyOtherHivemindMembersMayJoin = 359, // Only Other Members Of Their Hivemind May Join With Them.
NoValidFlaskPresent = 360, // No Valid Flask Present.
NoWildImpsToSacrifice = 361, // There Are No Wild Imps To Sacrifice.
YouAreCarryingTooMuchIron = 362, // You Are Carrying Too Much Iron
YouHaveNoIronToCollect = 363, // You Have No Iron To Collect
YouHaveNoWildImps = 364, // You Have No Available Wild Imps.
NeedsRepairs = 365, // Needs Repairs.
YouAreCarryingTooMuchWood = 366, // You'Re Carrying Too Much Wood.
YouAreAlreadyCarryingRepairParts = 367, // You'Re Already Carrying Repair Parts.
YouHaveNotUnlockedFlightWhistleForZone = 368, // You Have Not Unlocked The Flight Whistle For This Zone.
ThereAreNoUnlockedFlightPointsNearby = 369, // There Are No Unlocked Flight Points Nearby To Take You To.
YouMustHaveAFelguard = 370, // You Must Have A Felguard.
TargetHasNoFesteringWounds = 371, // The Target Has No Festering Wounds.
YouDontHaveDeadlyOrWoundPoisonActive = 372, // You Do Not Have Deadly Poison Or Wound Poison Active.
CannotReadSoldierDogTagWithoutHeadlampOn = 373, // You Cannot Read The Soldier'S Dog Tag Without Your Headlamp On.
}
public enum SpellMissInfo
@@ -2058,7 +2084,13 @@ namespace Framework.Constants
GiveHonor = 253,
Unk254 = 254,
LearnTransmogSet = 255,
TotalSpellEffects = 256,
Unk256 = 256,
Unk257 = 257,
ModifyKeystone = 258,
RespecAzeriteEmpoweredItem = 259,
SummonStabledPet = 260,
ScrapItem = 261,
TotalSpellEffects,
}
public enum SpellEffectHandle
@@ -2363,6 +2395,7 @@ namespace Framework.Constants
Unk147 = 147,
Unk148 = 148,
Unk149 = 149,
UnitOwnCritter = 150, // own battle pet from UNIT_FIELD_CRITTER
TotalSpellTargets
}
public enum SpellTargetSelectionCategories
+1 -1
View File
@@ -22,7 +22,7 @@ namespace Framework.Constants
{
HasLowerAnimForEnter = 0x01,
HasLowerAnimForRide = 0x02,
Unk3 = 0x04,
DisableGravity = 0x04, // Passenger will not be affected by gravity
ShouldUseVehSeatExitAnimOnVoluntaryExit = 0x08,
Unk5 = 0x10,
Unk6 = 0x20,
File diff suppressed because it is too large Load Diff
+285 -244
View File
@@ -20,12 +20,10 @@ namespace Framework.Constants
public enum ObjectFields
{
Guid = 0x000, // Size: 4, Flags: Public
Data = 0x004, // Size: 4, Flags: Public
Type = 0x008, // Size: 1, Flags: Public
Entry = 0x009, // Size: 1, Flags: Dynamic
DynamicFlags = 0x00a, // Size: 1, Flags: Dynamic, Urgent
ScaleX = 0x00b, // Size: 1, Flags: Public
End = 0x00c,
Entry = 0x004, // Size: 1, Flags: Dynamic
DynamicFlags = 0x005, // Size: 1, Flags: Dynamic, Urgent
ScaleX = 0x006, // Size: 1, Flags: Public
End = 0x007,
}
public enum ItemFields
@@ -57,8 +55,7 @@ namespace Framework.Constants
BonusListIds = 0x001, // Flags: Owner, 0x100
ArtifactPowers = 0x002, // Flags: OWNER
Gems = 0x003, // Flags: OWNER
RelicTalentData = 0x004, // Flags: OWNER
End = 0x005
End = 0x004
}
public enum ContainerFields
@@ -68,108 +65,141 @@ namespace Framework.Constants
End = ItemFields.End + 0x091
}
public enum AzeriteEmpoweredItemFields
{
Selections = ItemFields.End + 0x000, // Size: 4, Flags: PUBLIC
End = ItemFields.End + 0x004,
}
public enum AzeriteEmpoweredItemDynamicFields
{
End = ItemDynamicFields.End + 0x000,
}
public enum AzeriteItemFields
{
Xp = ItemFields.End + 0x000, // Size: 2, Flags: PUBLIC
Level = ItemFields.End + 0x002, // Size: 1, Flags: PUBLIC
AuraLevel = ItemFields.End + 0x003, // Size: 1, Flags: PUBLIC
KnowledgeLevel = ItemFields.End + 0x004, // Size: 1, Flags: OWNER
DebugKnowledgeWeek = ItemFields.End + 0x005, // Size: 1, Flags: OWNER
End = ItemFields.End + 0x006,
}
public enum AzeriteItemDynamicFields
{
End = ItemDynamicFields.End + 0x000,
}
public enum UnitFields
{
Charm = ObjectFields.End + 0x000, // Size: 4, Flags: Public
Summon = ObjectFields.End + 0x004, // Size: 4, Flags: Public
Critter = ObjectFields.End + 0x008, // Size: 4, Flags: Private
Critter = ObjectFields.End + 0x008, // Size: 4, Flags: Privaten
CharmedBy = ObjectFields.End + 0x00c, // Size: 4, Flags: Public
SummonedBy = ObjectFields.End + 0x010, // Size: 4, Flags: Public
CreatedBy = ObjectFields.End + 0x014, // Size: 4, Flags: Public
DemonCreator = ObjectFields.End + 0x018, // Size: 4, Flags: Public
Target = ObjectFields.End + 0x01c, // Size: 4, Flags: Public
BattlePetCompanionGuid = ObjectFields.End + 0x020, // Size: 4, Flags: Public
BattlePetDbId = ObjectFields.End + 0x024, // Size: 2, Flags: Public
ChannelData = ObjectFields.End + 0x026, // Size: 2, Flags: PUBLIC, URGENT
SummonedByHomeRealm = ObjectFields.End + 0x028, // Size: 1, Flags: Public
Bytes0 = ObjectFields.End + 0x029, // Size: 1, Flags: Public
DisplayPower = ObjectFields.End + 0x02a, // Size: 1, Flags: Public
OverrideDisplayPowerId = ObjectFields.End + 0x02b, // Size: 1, Flags: Public
Health = ObjectFields.End + 0x02c, // Size: 2, Flags: Public
Power = ObjectFields.End + 0x02e, // Size: 6, Flags: Public, UrgentSelfOnly
MaxHealth = ObjectFields.End + 0x034, // Size: 2, Flags: Public
MaxPower = ObjectFields.End + 0x036, // Size: 6, Flags: Public
PowerRegenFlatModifier = ObjectFields.End + 0x03c, // Size: 6, Flags: Private, Owner, UnitAll
PowerRegenInterruptedFlatModifier = ObjectFields.End + 0x042, // Size: 6, Flags: Private, Owner, UnitAll
Level = ObjectFields.End + 0x048, // Size: 1, Flags: Public
EffectiveLevel = ObjectFields.End + 0x049, // Size: 1, Flags: Public
SandboxScalingId = ObjectFields.End + 0x04a, // Size: 1, Flags: Public
ScalingLevelMin = ObjectFields.End + 0x04b, // Size: 1, Flags: Public
ScalingLevelMax = ObjectFields.End + 0x04c, // Size: 1, Flags: Public
ScalingLevelDelta = ObjectFields.End + 0x04d, // Size: 1, Flags: Public
FactionTemplate = ObjectFields.End + 0x04e, // Size: 1, Flags: Public
VirtualItemSlotId = ObjectFields.End + 0x04f, // Size: 6, Flags: Public
Flags = ObjectFields.End + 0x055, // Size: 1, Flags: Public, Urgent
Flags2 = ObjectFields.End + 0x056, // Size: 1, Flags: Public, Urgent
Flags3 = ObjectFields.End + 0x057, // Size: 1, Flags: Public, Urgent
AuraState = ObjectFields.End + 0x058, // Size: 1, Flags: Public
BaseAttackTime = ObjectFields.End + 0x059, // Size: 2, Flags: Public
RangedAttackTime = ObjectFields.End + 0x05b, // Size: 1, Flags: Private
BoundingRadius = ObjectFields.End + 0x05c, // Size: 1, Flags: Public
CombatReach = ObjectFields.End + 0x05d, // Size: 1, Flags: Public
DisplayId = ObjectFields.End + 0x05e, // Size: 1, Flags: Dynamic, Urgent
NativeDisplayId = ObjectFields.End + 0x05f, // Size: 1, Flags: Public, Urgent
MountDisplayId = ObjectFields.End + 0x060, // Size: 1, Flags: Public, Urgent
MinDamage = ObjectFields.End + 0x061, // Size: 1, Flags: Private, Owner, SpecialInfo
MaxDamage = ObjectFields.End + 0x062, // Size: 1, Flags: Private, Owner, SpecialInfo
MinOffHandDamage = ObjectFields.End + 0x063, // Size: 1, Flags: Private, Owner, SpecialInfo
MaxOffHandDamage = ObjectFields.End + 0x064, // Size: 1, Flags: Private, Owner, SpecialInfo
Bytes1 = ObjectFields.End + 0x065, // Size: 1, Flags: Public
PetNumber = ObjectFields.End + 0x066, // Size: 1, Flags: Public
PetNameTimestamp = ObjectFields.End + 0x067, // Size: 1, Flags: Public
PetExperience = ObjectFields.End + 0x068, // Size: 1, Flags: Owner
PetNextLevelExp = ObjectFields.End + 0x069, // Size: 1, Flags: Owner
ModCastSpeed = ObjectFields.End + 0x06a, // Size: 1, Flags: Public
ModCastHaste = ObjectFields.End + 0x06b, // Size: 1, Flags: Public
ModHaste = ObjectFields.End + 0x06c, // Size: 1, Flags: Public
ModRangedHaste = ObjectFields.End + 0x06d, // Size: 1, Flags: Public
ModHasteRegen = ObjectFields.End + 0x06e, // Size: 1, Flags: Public
ModTimeRate = ObjectFields.End + 0x06f, // Size: 1, Flags: Public
CreatedBySpell = ObjectFields.End + 0x070, // Size: 1, Flags: Public
NpcFlags = ObjectFields.End + 0x071, // Size: 2, Flags: Public, Dynamic
NpcEmotestate = ObjectFields.End + 0x073, // Size: 1, Flags: Public
Stat = ObjectFields.End + 0x074, // Size: 4, Flags: Private, Owner
PosStat = ObjectFields.End + 0x078, // Size: 4, Flags: Private, Owner
NegStat = ObjectFields.End + 0x07c, // Size: 4, Flags: Private, Owner
Resistances = ObjectFields.End + 0x080, // Size: 7, Flags: Private, Owner, SpecialInfo
ResistanceBuffModsPositive = ObjectFields.End + 0x087, // Size: 7, Flags: Private, Owner
ResistanceBuffModsNegative = ObjectFields.End + 0x08e, // Size: 7, Flags: Private, Owner
ModBonusArmor = ObjectFields.End + 0x095, // Size: 1, Flags: Private, Owner
BaseMana = ObjectFields.End + 0x096, // Size: 1, Flags: Public
BaseHealth = ObjectFields.End + 0x097, // Size: 1, Flags: Private, Owner
Bytes2 = ObjectFields.End + 0x098, // Size: 1, Flags: Public
AttackPower = ObjectFields.End + 0x099, // Size: 1, Flags: Private, Owner
AttackPowerModPos = ObjectFields.End + 0x09a, // Size: 1, Flags: Private, Owner
AttackPowerModNeg = ObjectFields.End + 0x09b, // Size: 1, Flags: Private, Owner
AttackPowerMultiplier = ObjectFields.End + 0x09c, // Size: 1, Flags: Private, Owner
RangedAttackPower = ObjectFields.End + 0x09d, // Size: 1, Flags: Private, Owner
RangedAttackPowerModPos = ObjectFields.End + 0x09e, // Size: 1, Flags: Private, Owner
RangedAttackPowerModNeg = ObjectFields.End + 0x09f, // Size: 1, Flags: Private, Owner
RangedAttackPowerMultiplier = ObjectFields.End + 0x0a0, // Size: 1, Flags: Private, Owner
AttackSpeedAura = ObjectFields.End + 0x0a1, // Size: 1, Flags: Private, Owner
MinRangedDamage = ObjectFields.End + 0x0a2, // Size: 1, Flags: Private, Owner
MaxRangedDamage = ObjectFields.End + 0x0a3, // Size: 1, Flags: Private, Owner
PowerCostModifier = ObjectFields.End + 0x0a4, // Size: 7, Flags: Private, Owner
PowerCostMultiplier = ObjectFields.End + 0x0ab, // Size: 7, Flags: Private, Owner
MaxHealthModifier = ObjectFields.End + 0x0b2, // Size: 1, Flags: Private, Owner
HoverHeight = ObjectFields.End + 0x0b3, // Size: 1, Flags: Public
MinItemLevelCutoff = ObjectFields.End + 0x0b4, // Size: 1, Flags: Public
MinItemLevel = ObjectFields.End + 0x0b5, // Size: 1, Flags: Public
MaxItemlevel = ObjectFields.End + 0x0b6, // Size: 1, Flags: Public
WildBattlepetLevel = ObjectFields.End + 0x0b7, // Size: 1, Flags: Public
BattlepetCompanionNameTimestamp = ObjectFields.End + 0x0b8, // Size: 1, Flags: Public
InteractSpellid = ObjectFields.End + 0x0b9, // Size: 1, Flags: Public
StateSpellVisualId = ObjectFields.End + 0x0ba, // Size: 1, Flags: Dynamic, Urgent
StateAnimId = ObjectFields.End + 0x0bb, // Size: 1, Flags: Dynamic, Urgent
StateAnimKitId = ObjectFields.End + 0x0bc, // Size: 1, Flags: Dynamic, Urgent
StateWorldEffectId = ObjectFields.End + 0x0bd, // Size: 4, Flags: Dynamic, Urgent
ScaleDuration = ObjectFields.End + 0x0c1, // Size: 1, Flags: Public
LooksLikeMountId = ObjectFields.End + 0x0c2, // Size: 1, Flags: Public
LooksLikeCreatureId = ObjectFields.End + 0x0c3, // Size: 1, Flags: Public
LookAtControllerId = ObjectFields.End + 0x0c4, // Size: 1, Flags: Public
LookAtControllerTarget = ObjectFields.End + 0x0c5, // Size: 4, Flags: Public
End = ObjectFields.End + 0x0c9
LookAtControllerTarget = ObjectFields.End + 0x01c, // Size: 4, Flags: Public
Target = ObjectFields.End + 0x020, // Size: 4, Flags: Public
BattlePetCompanionGuid = ObjectFields.End + 0x024, // Size: 4, Flags: Public
BattlePetDbId = ObjectFields.End + 0x028, // Size: 2, Flags: Public
ChannelData = ObjectFields.End + 0x02a, // Size: 2, Flags: Public, Urgent
SummonedByHomeRealm = ObjectFields.End + 0x02c, // Size: 1, Flags: Public
Bytes0 = ObjectFields.End + 0x02d, // Size: 1, Flags: Public
DisplayPower = ObjectFields.End + 0x02e, // Size: 1, Flags: Public
OverrideDisplayPowerId = ObjectFields.End + 0x02f, // Size: 1, Flags: Public
Health = ObjectFields.End + 0x030, // Size: 2, Flags: Public
Power = ObjectFields.End + 0x032, // Size: 6, Flags: Public, UrgentSelfOnly
MaxHealth = ObjectFields.End + 0x038, // Size: 2, Flags: Public
MaxPower = ObjectFields.End + 0x03a, // Size: 6, Flags: Public
PowerRegenFlatModifier = ObjectFields.End + 0x040, // Size: 6, Flags: Private, Owner, UnitAll
PowerRegenInterruptedFlatModifier = ObjectFields.End + 0x046, // Size: 6, Flags: Private, Owner, UnitAll
Level = ObjectFields.End + 0x04c, // Size: 1, Flags: Public
EffectiveLevel = ObjectFields.End + 0x04d, // Size: 1, Flags: Public
ContentTuningId = ObjectFields.End + 0x04e, // Size: 1, Flags: Public
ScalingLevelMin = ObjectFields.End + 0x04f, // Size: 1, Flags: Public
ScalingLevelMax = ObjectFields.End + 0x050, // Size: 1, Flags: Public
ScalingLevelDelta = ObjectFields.End + 0x051, // Size: 1, Flags: Public
ScalingFactionGroup = ObjectFields.End + 0x052, // Size: 1, Flags: Public
ScalingHealthItemLevelCurveId = ObjectFields.End + 0x053, // Size: 1, Flags: Public
ScalingDamageItemLevelCurveId = ObjectFields.End + 0x054, // Size: 1, Flags: Public
FactionTemplate = ObjectFields.End + 0x055, // Size: 1, Flags: Public
VirtualItemSlotId = ObjectFields.End + 0x056, // Size: 6, Flags: Public
Flags = ObjectFields.End + 0x05c, // Size: 1, Flags: Public, Urgent
Flags2 = ObjectFields.End + 0x05d, // Size: 1, Flags: Public, Urgent
Flags3 = ObjectFields.End + 0x05e, // Size: 1, Flags: Public, UrgentScalingLevelDelta
AuraState = ObjectFields.End + 0x05f, // Size: 1, Flags: Public
BaseAttackTime = ObjectFields.End + 0x060, // Size: 2, Flags: Public
RangedAttackTime = ObjectFields.End + 0x062, // Size: 1, Flags: Private
BoundingRadius = ObjectFields.End + 0x063, // Size: 1, Flags: Public
CombatReach = ObjectFields.End + 0x064, // Size: 1, Flags: Public
DisplayId = ObjectFields.End + 0x065, // Size: 1, Flags: Dynamic, Urgent
DisplayScale = ObjectFields.End + 0x066, // Size: 1, Flags: Dynamic, Urgent
NativeDisplayId = ObjectFields.End + 0x067, // Size: 1, Flags: Public, Urgent
NativeXDisplayScale = ObjectFields.End + 0x068, // Size: 1, Flags: Public, Urgent
MountDisplayId = ObjectFields.End + 0x069, // Size: 1, Flags: Public, Urgent
MinDamage = ObjectFields.End + 0x06a, // Size: 1, Flags: Private, Owner, SpecialInfo
MaxDamage = ObjectFields.End + 0x06b, // Size: 1, Flags: Private, Owner, SpecialInfo
MinOffHandDamage = ObjectFields.End + 0x06c, // Size: 1, Flags: Private, Owner, SpecialInfo
MaxOffHandDamage = ObjectFields.End + 0x06d, // Size: 1, Flags: Private, Owner, SpecialInfo
Bytes1 = ObjectFields.End + 0x06e, // Size: 1, Flags: Public
PetNumber = ObjectFields.End + 0x06f, // Size: 1, Flags: Public
PetNameTimestamp = ObjectFields.End + 0x070, // Size: 1, Flags: Public
PetExperience = ObjectFields.End + 0x071, // Size: 1, Flags: Owner
PetNextLevelExp = ObjectFields.End + 0x072, // Size: 1, Flags: Owner
ModCastSpeed = ObjectFields.End + 0x073, // Size: 1, Flags: Public
ModCastHaste = ObjectFields.End + 0x074, // Size: 1, Flags: Public
ModHaste = ObjectFields.End + 0x075, // Size: 1, Flags: Public
ModRangedHaste = ObjectFields.End + 0x076, // Size: 1, Flags: Public
ModHasteRegen = ObjectFields.End + 0x077, // Size: 1, Flags: Public
ModTimeRate = ObjectFields.End + 0x078, // Size: 1, Flags: Public
CreatedBySpell = ObjectFields.End + 0x079, // Size: 1, Flags: Public
NpcFlags = ObjectFields.End + 0x07a, // Size: 2, Flags: Public, Dynamic
NpcEmotestate = ObjectFields.End + 0x07c, // Size: 1, Flags: Public
Stat = ObjectFields.End + 0x07d, // Size: 4, Flags: Private, Owner
PosStat = ObjectFields.End + 0x081, // Size: 4, Flags: Private, Owner
NegStat = ObjectFields.End + 0x085, // Size: 4, Flags: Private, Owner
Resistances = ObjectFields.End + 0x089, // Size: 7, Flags: Private, Owner, SpecialInfo
BonusResistanceMods = ObjectFields.End + 0x090, // Size: 7, Flags: Private, Owner
BaseMana = ObjectFields.End + 0x097, // Size: 1, Flags: Public
BaseHealth = ObjectFields.End + 0x098, // Size: 1, Flags: Private, Owner
Bytes2 = ObjectFields.End + 0x099, // Size: 1, Flags: Public
AttackPower = ObjectFields.End + 0x09a, // Size: 1, Flags: Private, Owner
AttackPowerModPos = ObjectFields.End + 0x09b, // Size: 1, Flags: Private, Owner
AttackPowerModNeg = ObjectFields.End + 0x09c, // Size: 1, Flags: Private, Owner
AttackPowerMultiplier = ObjectFields.End + 0x09d, // Size: 1, Flags: Private, Owner
RangedAttackPower = ObjectFields.End + 0x09e, // Size: 1, Flags: Private, Owner
RangedAttackPowerModPos = ObjectFields.End + 0x09f, // Size: 1, Flags: Private, Owner
RangedAttackPowerModNeg = ObjectFields.End + 0x0a0, // Size: 1, Flags: Private, Owner
RangedAttackPowerMultiplier = ObjectFields.End + 0x0a1, // Size: 1, Flags: Private, Owner
MainHandWeaponAttackPower = ObjectFields.End + 0x0a2, // Size: 1, Flags: Private, Owner
OffHandWeaponAttackPower = ObjectFields.End + 0x0a3, // Size: 1, Flags: Private, Owner
RangedHandWeaponAttackPower = ObjectFields.End + 0x0a4, // Size: 1, Flags: Private, Owner
AttackSpeedAura = ObjectFields.End + 0x0a5, // Size: 1, Flags: Private, Owner
Lifesteal = ObjectFields.End + 0x0a6, // Size: 1, Flags: Private, Owner
MinRangedDamage = ObjectFields.End + 0x0a7, // Size: 1, Flags: Private, Owner
MaxRangedDamage = ObjectFields.End + 0x0a8, // Size: 1, Flags: Private, Owner
PowerCostModifier = ObjectFields.End + 0x0a9, // Size: 7, Flags: Private, Owner
PowerCostMultiplier = ObjectFields.End + 0x0b0, // Size: 7, Flags: Private, Owner
MaxHealthModifier = ObjectFields.End + 0x0b7, // Size: 1, Flags: Private, Owner
HoverHeight = ObjectFields.End + 0x0b8, // Size: 1, Flags: Public
MinItemLevelCutoff = ObjectFields.End + 0x0b9, // Size: 1, Flags: Public
MinItemLevel = ObjectFields.End + 0x0ba, // Size: 1, Flags: Public
MaxItemlevel = ObjectFields.End + 0x0bb, // Size: 1, Flags: Public
WildBattlepetLevel = ObjectFields.End + 0x0bc, // Size: 1, Flags: Public
BattlepetCompanionNameTimestamp = ObjectFields.End + 0x0bd, // Size: 1, Flags: Public
InteractSpellid = ObjectFields.End + 0x0be, // Size: 1, Flags: Public
StateSpellVisualId = ObjectFields.End + 0x0bf, // Size: 1, Flags: Dynamic, Urgent
StateAnimId = ObjectFields.End + 0x0c0, // Size: 1, Flags: Dynamic, Urgent
StateAnimKitId = ObjectFields.End + 0x0c1, // Size: 1, Flags: Dynamic, Urgent
StateWorldEffectId = ObjectFields.End + 0x0c2, // Size: 4, Flags: Dynamic, Urgent
ScaleDuration = ObjectFields.End + 0x0c6, // Size: 1, Flags: Public
LooksLikeMountId = ObjectFields.End + 0x0c7, // Size: 1, Flags: Public
LooksLikeCreatureId = ObjectFields.End + 0x0c8, // Size: 1, Flags: Public
LookAtControllerId = ObjectFields.End + 0x0c9, // Size: 1, Flags: Public
GuildGuid = ObjectFields.End + 0x0ca, // Size: 4, Flags: Public
End = ObjectFields.End + 0x0ce
}
public enum UnitDynamicFields
@@ -196,148 +226,158 @@ namespace Framework.Constants
Bytes4 = UnitFields.End + 0x014, // Size: 1, Flags: Public
DuelTeam = UnitFields.End + 0x015, // Size: 1, Flags: Public
GuildTimestamp = UnitFields.End + 0x016, // Size: 1, Flags: Public
QuestLog = UnitFields.End + 0x017, // Size: 800, Flags: PartyMember
VisibleItem = UnitFields.End + 0x337, // Size: 38, Flags: Public
ChosenTitle = UnitFields.End + 0x35d, // Size: 1, Flags: Public
FakeInebriation = UnitFields.End + 0x35e, // Size: 1, Flags: Public
VirtualRealm = UnitFields.End + 0x35f, // Size: 1, Flags: Public
CurrentSpecId = UnitFields.End + 0x360, // Size: 1, Flags: Public
TaxiMountAnimKitId = UnitFields.End + 0x361, // Size: 1, Flags: Public
AvgItemLevel = UnitFields.End + 0x362, // Size: 4, Flags: Public
CurrentBattlePetBreedQuality = UnitFields.End + 0x366, // Size: 1, Flags: Public
Prestige = UnitFields.End + 0x367, // Size: 1, Flags: Public
HonorLevel = UnitFields.End + 0x368, // Size: 1, Flags: Public
InvSlotHead = UnitFields.End + 0x369, // Size: 780, Flags: Private
EndNotSelf = UnitFields.End + 0x369,
Farsight = UnitFields.End + 0x675, // Size: 4, Flags: Private
SummonedBattlePetId = UnitFields.End + 0x679, // Size: 4, Flags: Private
KnownTitles = UnitFields.End + 0x67d, // Size: 12, Flags: Private
Coinage = UnitFields.End + 0x689, // Size: 2, Flags: Private
Xp = UnitFields.End + 0x68b, // Size: 1, Flags: Private
NextLevelXp = UnitFields.End + 0x68c, // Size: 1, Flags: Private
TrialXp = UnitFields.End + 0x68d, // Size: 1, Flags: Private
SkillLineId = UnitFields.End + 0x68e, // Size: 448, Flags: Private
SkillLineStep = UnitFields.End + 0x6ce,
SkillLineRank = UnitFields.End + 0x70e,
SkillLineSubRank = UnitFields.End + 0x74e,
SkillLineMaxRank = UnitFields.End + 0x78e,
SkillLineTempBonus = UnitFields.End + 0x7ce,
SkillLinePermBonus = UnitFields.End + 0x80e,
CharacterPoints = UnitFields.End + 0x84e, // Size: 1, Flags: Private
MaxTalentTiers = UnitFields.End + 0x84f, // Size: 1, Flags: Private
TrackCreatures = UnitFields.End + 0x850, // Size: 1, Flags: Private
TrackResources = UnitFields.End + 0x851, // Size: 1, Flags: Private
Expertise = UnitFields.End + 0x852, // Size: 1, Flags: Private
OffhandExpertise = UnitFields.End + 0x853, // Size: 1, Flags: Private
RangedExpertise = UnitFields.End + 0x854, // Size: 1, Flags: Private
CombatRatingExpertise = UnitFields.End + 0x855, // Size: 1, Flags: Private
BlockPercentage = UnitFields.End + 0x856, // Size: 1, Flags: Private
DodgePercentage = UnitFields.End + 0x857, // Size: 1, Flags: Private
DodgePercentageFromAttribute = UnitFields.End + 0x858, // Size: 1, Flags: Private
ParryPercentage = UnitFields.End + 0x859, // Size: 1, Flags: Private
ParryPercentageFromAttribute = UnitFields.End + 0x85a, // Size: 1, Flags: Private
CritPercentage = UnitFields.End + 0x85b, // Size: 1, Flags: Private
RangedCritPercentage = UnitFields.End + 0x85c, // Size: 1, Flags: Private
OffhandCritPercentage = UnitFields.End + 0x85d, // Size: 1, Flags: Private
SpellCritPercentage1 = UnitFields.End + 0x85e, // Size: 1, Flags: Private
ShieldBlock = UnitFields.End + 0x85f, // Size: 1, Flags: Private
ShieldBlockCritPercentage = UnitFields.End + 0x860, // Size: 1, Flags: Private
Mastery = UnitFields.End + 0x861, // Size: 1, Flags: Private
Speed = UnitFields.End + 0x862, // Size: 1, Flags: Private
Lifesteal = UnitFields.End + 0x863, // Size: 1, Flags: Private
Avoidance = UnitFields.End + 0x864, // Size: 1, Flags: Private
Sturdiness = UnitFields.End + 0x865, // Size: 1, Flags: Private
Versatility = UnitFields.End + 0x866, // Size: 1, Flags: Private
VersatilityBonus = UnitFields.End + 0x867, // Size: 1, Flags: Private
PvpPowerDamage = UnitFields.End + 0x868, // Size: 1, Flags: Private
PvpPowerHealing = UnitFields.End + 0x869, // Size: 1, Flags: Private
ExploredZones1 = UnitFields.End + 0x86a, // Size: 320, Flags: Private
RestInfo = UnitFields.End + 0x9aa, // Size: 4, Flags: Private
ModDamageDonePos = UnitFields.End + 0x9ae, // Size: 7, Flags: Private
ModDamageDoneNeg = UnitFields.End + 0x9b5, // Size: 7, Flags: Private
ModDamageDonePct = UnitFields.End + 0x9bc, // Size: 7, Flags: Private
ModHealingDonePos = UnitFields.End + 0x9c3, // Size: 1, Flags: Private
ModHealingPct = UnitFields.End + 0x9c4, // Size: 1, Flags: Private
ModHealingDonePct = UnitFields.End + 0x9c5, // Size: 1, Flags: Private
ModPeriodicHealingDonePercent = UnitFields.End + 0x9c6, // Size: 1, Flags: Private
WeaponDmgMultipliers = UnitFields.End + 0x9c7, // Size: 3, Flags: Private
WeaponAtkSpeedMultipliers = UnitFields.End + 0x9ca, // Size: 3, Flags: Private
ModSpellPowerPct = UnitFields.End + 0x9cd, // Size: 1, Flags: Private
ModResiliencePercent = UnitFields.End + 0x9ce, // Size: 1, Flags: Private
OverrideSpellPowerByApPct = UnitFields.End + 0x9cf, // Size: 1, Flags: Private
OverrideApBySpellPowerPercent = UnitFields.End + 0x9d0, // Size: 1, Flags: Private
ModTargetResistance = UnitFields.End + 0x9d1, // Size: 1, Flags: Private
ModTargetPhysicalResistance = UnitFields.End + 0x9d2, // Size: 1, Flags: Private
LocalFlags = UnitFields.End + 0x9d3, // Size: 1, Flags: Private
FieldBytes = UnitFields.End + 0x9d4, // Size: 1, Flags: Private
PvpMedals = UnitFields.End + 0x9d5, // Size: 1, Flags: Private
BuyBackPrice1 = UnitFields.End + 0x9d6, // Size: 12, Flags: Private
BuyBackTimestamp1 = UnitFields.End + 0x9e2, // Size: 12, Flags: Private
Kills = UnitFields.End + 0x9ee, // Size: 1, Flags: Private
LifetimeHonorableKills = UnitFields.End + 0x9ef, // Size: 1, Flags: Private
WatchedFactionIndex = UnitFields.End + 0x9f0, // Size: 1, Flags: Private
CombatRating1 = UnitFields.End + 0x9f1, // Size: 32, Flags: Private
ArenaTeamInfo11 = UnitFields.End + 0xa11, // Size: 42, Flags: Private
MaxLevel = UnitFields.End + 0xa3b, // Size: 1, Flags: Private
ScalingLevelDelta = UnitFields.End + 0xa3c, // Size: 1, Flags: Private
MaxCreatureScalingLevel = UnitFields.End + 0xa3d, // Size: 1, Flags: Private
NoReagentCost1 = UnitFields.End + 0xa3e, // Size: 4, Flags: Private
PetSpellPower = UnitFields.End + 0xa42, // Size: 1, Flags: Private
Researching1 = UnitFields.End + 0xa43, // Size: 10, Flags: Private
ProfessionSkillLine1 = UnitFields.End + 0xa4d, // Size: 2, Flags: Private
UiHitModifier = UnitFields.End + 0xa4f, // Size: 1, Flags: Private
UiSpellHitModifier = UnitFields.End + 0xa50, // Size: 1, Flags: Private
HomeRealmTimeOffset = UnitFields.End + 0xa51, // Size: 1, Flags: Private
ModPetHaste = UnitFields.End + 0xa52, // Size: 1, Flags: Private
FieldBytes2 = UnitFields.End + 0xa53, // Size: 1, Flags: Private
FieldBytes3 = UnitFields.End + 0xa54, // Size: 1, Flags: Private, UrgentSelfOnly
LfgBonusFactionId = UnitFields.End + 0xa55, // Size: 1, Flags: Private
LootSpecId = UnitFields.End + 0xa56, // Size: 1, Flags: Private
OverrideZonePvpType = UnitFields.End + 0xa57, // Size: 1, Flags: Private, UrgentSelfOnly
BagSlotFlags = UnitFields.End + 0xa58, // Size: 4, Flags: Private
BankBagSlotFlags = UnitFields.End + 0xa5c, // Size: 7, Flags: Private
InsertItemsLeftToRight = UnitFields.End + 0xa63, // Size: 1, Flags: Private
QuestCompleted = UnitFields.End + 0xa64, // Size: 1750, Flags: Private
Honor = UnitFields.End + 0x113a, // Size: 1, Flags: Private
HonorNextLevel = UnitFields.End + 0x113b, // Size: 1, Flags: Private
End = UnitFields.End + 0x113c,
QuestLog = UnitFields.End + 0x017, // Size: 1600, Flags: PartyMember
VisibleItem = UnitFields.End + 0x657, // Size: 38, Flags: Public
ChosenTitle = UnitFields.End + 0x67d, // Size: 1, Flags: Public
FakeInebriation = UnitFields.End + 0x67e, // Size: 1, Flags: Public
VirtualRealm = UnitFields.End + 0x67f, // Size: 1, Flags: Public
CurrentSpecId = UnitFields.End + 0x680, // Size: 1, Flags: Public
TaxiMountAnimKitId = UnitFields.End + 0x681, // Size: 1, Flags: Public
AvgItemLevel = UnitFields.End + 0x682, // Size: 4, Flags: Public
CurrentBattlePetBreedQuality = UnitFields.End + 0x686, // Size: 1, Flags: Public
HonorLevel = UnitFields.End + 0x687, // Size: 1, Flags: Public
End = UnitFields.End + 0x688
}
public enum PlayerDynamicFields
{
ReserachSite = UnitDynamicFields.End + 0x000, // Flags: Private
ResearchSiteProgress = UnitDynamicFields.End + 0x001, // Flags: Private
DailyQuests = UnitDynamicFields.End + 0x002, // Flags: Private
AvailableQuestLineXQuestId = UnitDynamicFields.End + 0x003, // Flags: Private
Heirlooms = UnitDynamicFields.End + 0x004, // Flags: Private
HeirloomsFlags = UnitDynamicFields.End + 0x005, // Flags: PRIVATE
Toys = UnitDynamicFields.End + 0x006, // Flags: Private
Transmog = UnitDynamicFields.End + 0x007, // Flags: PRIVATE
ConditionalTransmog = UnitDynamicFields.End + 0x008, // Flags: PRIVATE
SelfResSpells = UnitDynamicFields.End + 0x009, // Flags: Private
CharacterRestrictions = UnitDynamicFields.End + 0x00a, // Flags: Private
SpellPctModByLabel = UnitDynamicFields.End + 0x00b, // Flags: Private
SpellFlatModByLabel = UnitDynamicFields.End + 0x00c, // Flags: Private
ArenaCooldowns = UnitDynamicFields.End + 0x00d, // Flags: Public
End = UnitDynamicFields.End + 0x00e,
ArenaCooldowns = UnitDynamicFields.End + 0x000, // Flags: Public
End = UnitDynamicFields.End + 0x001,
}
public enum ActivePlayerFields
{
InvSlotHead = PlayerFields.End + 0x000, // Size: 780, Flags: Public
Farsight = PlayerFields.End + 0x30c, // Size: 4, Flags: Public
SummonedBattlePetId = PlayerFields.End + 0x310, // Size: 4, Flags: Public
KnownTitles = PlayerFields.End + 0x314, // Size: 12, Flags: Public
Coinage = PlayerFields.End + 0x320, // Size: 2, Flags: Public
Xp = PlayerFields.End + 0x322, // Size: 1, Flags: Public
NextLevelXp = PlayerFields.End + 0x323, // Size: 1, Flags: Public
TrialXp = PlayerFields.End + 0x324, // Size: 1, Flags: Public
SkillLineId = PlayerFields.End + 0x325, // Size: 128, Flags: Public
SkillLineStep = PlayerFields.End + 0x3a5, // Size: 128, Flags: Public
SkillLineRank = PlayerFields.End + 0x425, // Size: 128, Flags: Public
SkillLineStartRank = PlayerFields.End + 0x4a5, // Size: 128, Flags: Public
SkillLineMaxRank = PlayerFields.End + 0x525, // Size: 128, Flags: Public
SkillLineTempBonus = PlayerFields.End + 0x5a5, // Size: 128, Flags: Public
SkillLinePermBonus = PlayerFields.End + 0x625, // Size: 128, Flags: Public
CharacterPoints = PlayerFields.End + 0x6a5, // Size: 1, Flags: Public
MaxTalentTiers = PlayerFields.End + 0x6a6, // Size: 1, Flags: Public
TrackCreatures = PlayerFields.End + 0x6a7, // Size: 1, Flags: Public
TrackResources = PlayerFields.End + 0x6a8, // Size: 2, Flags: Public
Expertise = PlayerFields.End + 0x6aa, // Size: 1, Flags: Public
OffhandExpertise = PlayerFields.End + 0x6ab, // Size: 1, Flags: Public
RangedExpertise = PlayerFields.End + 0x6ac, // Size: 1, Flags: Public
CombatRatingExpertise = PlayerFields.End + 0x6ad, // Size: 1, Flags: Public
BlockPercentage = PlayerFields.End + 0x6ae, // Size: 1, Flags: Public
DodgePercentage = PlayerFields.End + 0x6af, // Size: 1, Flags: Public
DodgePercentageFromAttribute = PlayerFields.End + 0x6b0, // Size: 1, Flags: Public
ParryPercentage = PlayerFields.End + 0x6b1, // Size: 1, Flags: Public
ParryPercentageFromAttribute = PlayerFields.End + 0x6b2, // Size: 1, Flags: Public
CritPercentage = PlayerFields.End + 0x6b3, // Size: 1, Flags: Public
RangedCritPercentage = PlayerFields.End + 0x6b4, // Size: 1, Flags: Public
OffhandCritPercentage = PlayerFields.End + 0x6b5, // Size: 1, Flags: Public
SpellCritPercentage1 = PlayerFields.End + 0x6b6, // Size: 1, Flags: Public
ShieldBlock = PlayerFields.End + 0x6b7, // Size: 1, Flags: Public
ShieldBlockCritPercentage = PlayerFields.End + 0x6b8, // Size: 1, Flags: Public
Mastery = PlayerFields.End + 0x6b9, // Size: 1, Flags: Public
Speed = PlayerFields.End + 0x6ba, // Size: 1, Flags: Public
Avoidance = PlayerFields.End + 0x6bb, // Size: 1, Flags: Public
Sturdiness = PlayerFields.End + 0x6bc, // Size: 1, Flags: Public
Versatility = PlayerFields.End + 0x6bd, // Size: 1, Flags: Public
VersatilityBonus = PlayerFields.End + 0x6be, // Size: 1, Flags: Public
PvpPowerDamage = PlayerFields.End + 0x6bf, // Size: 1, Flags: Public
PvpPowerHealing = PlayerFields.End + 0x6c0, // Size: 1, Flags: Public
ExploredZones = PlayerFields.End + 0x6c1, // Size: 320, Flags: Public
RestInfo = PlayerFields.End + 0x801, // Size: 4, Flags: Public
ModDamageDonePos = PlayerFields.End + 0x805, // Size: 7, Flags: Public
ModDamageDoneNeg = PlayerFields.End + 0x80c, // Size: 7, Flags: Public
ModDamageDonePct = PlayerFields.End + 0x813, // Size: 7, Flags: Public
ModHealingDonePos = PlayerFields.End + 0x81a, // Size: 1, Flags: Public
ModHealingPct = PlayerFields.End + 0x81b, // Size: 1, Flags: Public
ModHealingDonePct = PlayerFields.End + 0x81c, // Size: 1, Flags: Public
ModPeriodicHealingDonePercent = PlayerFields.End + 0x81d, // Size: 1, Flags: Public
WeaponDmgMultipliers = PlayerFields.End + 0x81e, // Size: 3, Flags: Public
WeaponAtkSpeedMultipliers = PlayerFields.End + 0x821, // Size: 3, Flags: Public
ModSpellPowerPct = PlayerFields.End + 0x824, // Size: 1, Flags: Public
ModResiliencePercent = PlayerFields.End + 0x825, // Size: 1, Flags: Public
OverrideSpellPowerByApPct = PlayerFields.End + 0x826, // Size: 1, Flags: Public
OverrideApBySpellPowerPercent = PlayerFields.End + 0x827, // Size: 1, Flags: Public
ModTargetResistance = PlayerFields.End + 0x828, // Size: 1, Flags: Public
ModTargetPhysicalResistance = PlayerFields.End + 0x829, // Size: 1, Flags: Public
LocalFlags = PlayerFields.End + 0x82a, // Size: 1, Flags: Public
Bytes = PlayerFields.End + 0x82b, // Size: 1, Flags: Public
PvpMedals = PlayerFields.End + 0x82c, // Size: 1, Flags: Public
BuyBackPrice = PlayerFields.End + 0x82d, // Size: 12, Flags: Public
BuyBackTimestamp = PlayerFields.End + 0x839, // Size: 12, Flags: Public
Kills = PlayerFields.End + 0x845, // Size: 1, Flags: Public
LifetimeHonorableKills = PlayerFields.End + 0x846, // Size: 1, Flags: Public
WatchedFactionIndex = PlayerFields.End + 0x847, // Size: 1, Flags: Public
CombatRating = PlayerFields.End + 0x848, // Size: 32, Flags: Public
ArenaTeamInfo = PlayerFields.End + 0x868, // Size: 54, Flags: Public
MaxLevel = PlayerFields.End + 0x89e, // Size: 1, Flags: Public
ScalingPlayerLevelDelta = PlayerFields.End + 0x89f, // Size: 1, Flags: Public
MaxCreatureScalingLevel = PlayerFields.End + 0x8a0, // Size: 1, Flags: Public
NoReagentCost = PlayerFields.End + 0x8a1, // Size: 4, Flags: Public
PetSpellPower = PlayerFields.End + 0x8a5, // Size: 1, Flags: Public
ProfessionSkillLine = PlayerFields.End + 0x8a6, // Size: 2, Flags: Public
UiHitModifier = PlayerFields.End + 0x8a8, // Size: 1, Flags: Public
UiSpellHitModifier = PlayerFields.End + 0x8a9, // Size: 1, Flags: Public
HomeRealmTimeOffset = PlayerFields.End + 0x8aa, // Size: 1, Flags: Public
ModPetHaste = PlayerFields.End + 0x8ab, // Size: 1, Flags: Public
Bytes2 = PlayerFields.End + 0x8ac, // Size: 1, Flags: Public
Bytes3 = PlayerFields.End + 0x8ad, // Size: 1, Flags: Public, UrgentSelfOnly
LfgBonusFactionId = PlayerFields.End + 0x8ae, // Size: 1, Flags: Public
LootSpecId = PlayerFields.End + 0x8af, // Size: 1, Flags: Public
OverrideZonePvpType = PlayerFields.End + 0x8b0, // Size: 1, Flags: Public, UrgentSelfOnly
BagSlotFlags = PlayerFields.End + 0x8b1, // Size: 4, Flags: Public
BankBagSlotFlags = PlayerFields.End + 0x8b5, // Size: 7, Flags: Public
InsertItemsLeftToRight = PlayerFields.End + 0x8bc, // Size: 1, Flags: Public
QuestCompleted = PlayerFields.End + 0x8bd, // Size: 1750, Flags: Public
Honor = PlayerFields.End + 0xf93, // Size: 1, Flags: Public
HonorNextLevel = PlayerFields.End + 0xf94, // Size: 1, Flags: Public
PvpTierMaxFromWins = PlayerFields.End + 0xf95, // Size: 1, Flags: Public
PvpLastWeeksTierMaxFromWins = PlayerFields.End + 0xf96, // Size: 1, Flags: Public
End = PlayerFields.End + 0xf97,
}
public enum ActivePlayerDynamicFields
{
ReserachSite = PlayerDynamicFields.End + 0x000, // Flags: Public
ResearchSiteProgress = PlayerDynamicFields.End + 0x001, // Flags: Public
DailyQuests = PlayerDynamicFields.End + 0x002, // Flags: Public
AvailableQuestLineXQuestId = PlayerDynamicFields.End + 0x003, // Flags: Public
Heirlooms = PlayerDynamicFields.End + 0x005, // Flags: Public
HeirloomFlags = PlayerDynamicFields.End + 0x006, // Flags: Public
Toys = PlayerDynamicFields.End + 0x007, // Flags: Public
Transmog = PlayerDynamicFields.End + 0x008, // Flags: Public
ConditionalTransmog = PlayerDynamicFields.End + 0x009, // Flags: Public
SelfResSpells = PlayerDynamicFields.End + 0x00a, // Flags: Public
CharacterRestrictions = PlayerDynamicFields.End + 0x00b, // Flags: Public
SpellPctModByLabel = PlayerDynamicFields.End + 0x00c, // Flags: Public
SpellFlatModByLabel = PlayerDynamicFields.End + 0x00d, // Flags: Public
Reserach = PlayerDynamicFields.End + 0x00e, // Flags: Public
End = PlayerDynamicFields.End + 0x00f,
}
public enum GameObjectFields
{
CreatedBy = ObjectFields.End + 0x000, // Size: 4, Flags: Public
DisplayId = ObjectFields.End + 0x004, // Size: 1, Flags: Dynamic, Urgent
Flags = ObjectFields.End + 0x005, // Size: 1, Flags: Public, Urgent
ParentRotation = ObjectFields.End + 0x006, // Size: 4, Flags: Public
Faction = ObjectFields.End + 0x00a, // Size: 1, Flags: Public
Level = ObjectFields.End + 0x00b, // Size: 1, Flags: Public
Bytes1 = ObjectFields.End + 0x00c, // Size: 1, Flags: Public, Urgent
SpellVisualId = ObjectFields.End + 0x00d, // Size: 1, Flags: Public, Dynamic, Urgent
StateSpellVisualId = ObjectFields.End + 0x00e, // Size: 1, Flags: Dynamic, Urgent
StateAnumId = ObjectFields.End + 0x00f, // Size: 1, Flags: Dynamic, Urgent
StateAnimKitId = ObjectFields.End + 0x010, // Size: 1, Flags: Dynamic, Urgent
StateWorldEffectId = ObjectFields.End + 0x011, // Size: 4, Flags: Dynamic, Urgent
End = ObjectFields.End + 0x015
GuildGuid = ObjectFields.End + 0x004, // Size: 4, Flags: Public
DisplayId = ObjectFields.End + 0x008, // Size: 1, Flags: Dynamic, Urgent
Flags = ObjectFields.End + 0x009, // Size: 1, Flags: Public, Urgent
ParentRotation = ObjectFields.End + 0x00a, // Size: 4, Flags: Public
Faction = ObjectFields.End + 0x00e, // Size: 1, Flags: Public
Level = ObjectFields.End + 0x00f, // Size: 1, Flags: Public
Bytes1 = ObjectFields.End + 0x010, // Size: 1, Flags: Public, Urgent
SpellVisualId = ObjectFields.End + 0x011, // Size: 1, Flags: Public, Dynamic, Urgent
StateSpellVisualId = ObjectFields.End + 0x012, // Size: 1, Flags: Dynamic, Urgent
StateAnimId = ObjectFields.End + 0x013, // Size: 1, Flags: Dynamic, Urgent
StateAnimKitId = ObjectFields.End + 0x014, // Size: 1, Flags: Dynamic, Urgent
StateWorldEffectId = ObjectFields.End + 0x015, // Size: 4, Flags: Dynamic, Urgent
CustomParam = ObjectFields.End + 0x019, // Size: 1, Flags: Public, Urgent
End = ObjectFields.End + 0x01a,
}
public enum GameObjectDynamicFields
@@ -361,15 +401,16 @@ namespace Framework.Constants
{
Owner = ObjectFields.End + 0x000, // Size: 4, Flags: Public
Party = ObjectFields.End + 0x004, // Size: 4, Flags: Public
DisplayId = ObjectFields.End + 0x008, // Size: 1, Flags: Public
Item = ObjectFields.End + 0x009, // Size: 19, Flags: Public
Bytes1 = ObjectFields.End + 0x01c, // Size: 1, Flags: Public
Bytes2 = ObjectFields.End + 0x01d, // Size: 1, Flags: Public
Flags = ObjectFields.End + 0x01e, // Size: 1, Flags: Public
DynamicFlags = ObjectFields.End + 0x01f, // Size: 1, Flags: Dynamic
FactionTemplate = ObjectFields.End + 0x020, // Size: 1, Flags: Public
CustomDisplayOption = ObjectFields.End + 0x021, // Size: 1, Flags: PUBLIC
End = ObjectFields.End + 0x022
GuildGuid = ObjectFields.End + 0x008, // Size: 4, Flags: PUBLIC
DisplayId = ObjectFields.End + 0x00C, // Size: 1, Flags: Public
Item = ObjectFields.End + 0x00D, // Size: 19, Flags: Public
Bytes1 = ObjectFields.End + 0x020, // Size: 1, Flags: Public
Bytes2 = ObjectFields.End + 0x021, // Size: 1, Flags: Public
Flags = ObjectFields.End + 0x022, // Size: 1, Flags: Public
DynamicFlags = ObjectFields.End + 0x023, // Size: 1, Flags: Dynamic
FactionTemplate = ObjectFields.End + 0x024, // Size: 1, Flags: Public
CustomDisplayOption = ObjectFields.End + 0x025, // Size: 1, Flags: PUBLIC
End = ObjectFields.End + 0x026
}
public enum AreaTriggerFields
@@ -82,7 +82,7 @@ namespace Framework.Database
"resettalents_time, primarySpecialization, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeonDifficulty, " +
"totalKills, todayKills, yesterdayKills, chosenTitle, watchedFaction, drunk, " +
"health, power1, power2, power3, power4, power5, power6, instance_id, activeTalentGroup, lootSpecId, exploredZones, knownTitles, actionBars, grantableLevels, raidDifficulty, legacyRaidDifficulty, fishingSteps, " +
"honor, honorLevel, prestigeLevel, honorRestState, honorRestBonus " +
"honor, honorLevel, honorRestState, honorRestBonus " +
"FROM characters c LEFT JOIN character_fishingsteps cfs ON c.guid = cfs.guid WHERE c.guid = ?");
PrepareStatement(CharStatements.SEL_GROUP_MEMBER, "SELECT guid FROM group_member WHERE memberGuid = ?");
@@ -137,7 +137,7 @@ namespace Framework.Database
PrepareStatement(CharStatements.SEL_CHARACTER_BGDATA, "SELECT instanceId, team, joinX, joinY, joinZ, joinO, joinMapId, taxiStart, taxiEnd, mountSpell FROM character_battleground_data WHERE guid = ?");
PrepareStatement(CharStatements.SEL_CHARACTER_GLYPHS, "SELECT talentGroup, glyphId FROM character_glyphs WHERE guid = ?");
PrepareStatement(CharStatements.SEL_CHARACTER_TALENTS, "SELECT talentId, talentGroup FROM character_talent WHERE guid = ?");
PrepareStatement(CharStatements.SEL_CHARACTER_PVP_TALENTS, "SELECT talentId, talentGroup FROM character_pvp_talent WHERE guid = ?");
PrepareStatement(CharStatements.SEL_CHARACTER_PVP_TALENTS, "SELECT talentId0, talentId1, talentId2, talentId3, talentGroup FROM character_pvp_talent WHERE guid = ?");
PrepareStatement(CharStatements.SEL_CHARACTER_SKILLS, "SELECT skill, value, max FROM character_skills WHERE guid = ?");
PrepareStatement(CharStatements.SEL_CHARACTER_RANDOMBG, "SELECT guid FROM character_battleground_random WHERE guid = ?");
PrepareStatement(CharStatements.SEL_CHARACTER_BANNED, "SELECT guid FROM character_banned WHERE guid = ? AND active = 1");
@@ -194,6 +194,7 @@ namespace Framework.Database
PrepareStatement(CharStatements.DEL_GIFT, "DELETE FROM character_gifts WHERE item_guid = ?");
PrepareStatement(CharStatements.SEL_CHARACTER_GIFT_BY_ITEM, "SELECT entry, flags FROM character_gifts WHERE item_guid = ?");
PrepareStatement(CharStatements.SEL_ACCOUNT_BY_NAME, "SELECT account FROM characters WHERE name = ?");
PrepareStatement(CharStatements.UPD_ACCOUNT_BY_GUID, "UPDATE characters SET account = ? WHERE guid = ?");
PrepareStatement(CharStatements.DEL_ACCOUNT_INSTANCE_LOCK_TIMES, "DELETE FROM account_instance_times WHERE accountId = ?");
PrepareStatement(CharStatements.INS_ACCOUNT_INSTANCE_LOCK_TIMES, "INSERT INTO account_instance_times (accountId, instanceId, releaseTime) VALUES (?, ?, ?)");
PrepareStatement(CharStatements.SEL_MATCH_MAKER_RATING, "SELECT matchMakerRating FROM character_arena_stats WHERE guid = ? AND slot = ?");
@@ -430,7 +431,7 @@ namespace Framework.Database
"logout_time=?,is_logout_resting=?,resettalents_cost=?,resettalents_time=?,primarySpecialization=?,extra_flags=?,stable_slots=?,at_login=?,zone=?,death_expire_time=?,taxi_path=?," +
"totalKills=?,todayKills=?,yesterdayKills=?,chosenTitle=?," +
"watchedFaction=?,drunk=?,health=?,power1=?,power2=?,power3=?,power4=?,power5=?,power6=?,latency=?,activeTalentGroup=?,lootSpecId=?,exploredZones=?," +
"equipmentCache=?,knownTitles=?,actionBars=?,grantableLevels=?,online=?,honor=?,honorLevel=?,prestigeLevel=?,honorRestState=?,honorRestBonus=?,lastLoginBuild=? WHERE guid=?");
"equipmentCache=?,knownTitles=?,actionBars=?,grantableLevels=?,online=?,honor=?,honorLevel=?,honorRestState=?,honorRestBonus=?,lastLoginBuild=? WHERE guid=?");
PrepareStatement(CharStatements.UPD_ADD_AT_LOGIN_FLAG, "UPDATE characters SET at_login = at_login | ? WHERE guid = ?");
PrepareStatement(CharStatements.UPD_REM_AT_LOGIN_FLAG, "UPDATE characters set at_login = at_login & ~ ? WHERE guid = ?");
@@ -618,7 +619,7 @@ namespace Framework.Database
PrepareStatement(CharStatements.DEL_PETITION_SIGNATURE_BY_OWNER, "DELETE FROM petition_sign WHERE ownerguid = ?");
PrepareStatement(CharStatements.INS_CHAR_GLYPHS, "INSERT INTO character_glyphs VALUES(?, ?, ?)");
PrepareStatement(CharStatements.INS_CHAR_TALENT, "INSERT INTO character_talent (guid, talentId, talentGroup) VALUES (?, ?, ?)");
PrepareStatement(CharStatements.INS_CHAR_PVP_TALENT, "INSERT INTO character_pvp_talent (guid, talentId, talentGroup) VALUES (?, ?, ?)");
PrepareStatement(CharStatements.INS_CHAR_PVP_TALENT, "INSERT INTO character_pvp_talent (guid, talentId0, talentId1, talentId2, talentId3, talentGroup) VALUES (?, ?, ?, ?, ?, ?)");
PrepareStatement(CharStatements.UPD_CHAR_LIST_SLOT, "UPDATE characters SET slot = ? WHERE guid = ? AND account = ?");
PrepareStatement(CharStatements.INS_CHAR_FISHINGSTEPS, "INSERT INTO character_fishingsteps (guid, fishingSteps) VALUES (?, ?)");
PrepareStatement(CharStatements.DEL_CHAR_FISHINGSTEPS, "DELETE FROM character_fishingsteps WHERE guid = ?");
@@ -884,6 +885,7 @@ namespace Framework.Database
DEL_GIFT,
SEL_CHARACTER_GIFT_BY_ITEM,
SEL_ACCOUNT_BY_NAME,
UPD_ACCOUNT_BY_GUID,
DEL_ACCOUNT_INSTANCE_LOCK_TIMES,
INS_ACCOUNT_INSTANCE_LOCK_TIMES,
SEL_MATCH_MAKER_RATING,
File diff suppressed because it is too large Load Diff
@@ -75,7 +75,7 @@ namespace Framework.Database
PrepareStatement(WorldStatements.SEL_WAYPOINT_SCRIPT_ID_BY_GUID, "SELECT id FROM waypoint_scripts WHERE guid = ?");
PrepareStatement(WorldStatements.DEL_CREATURE, "DELETE FROM creature WHERE guid = ?");
PrepareStatement(WorldStatements.SEL_COMMANDS, "SELECT name, permission, help FROM command");
PrepareStatement(WorldStatements.SEL_CREATURE_TEMPLATE, "SELECT entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, femaleName, subname, TitleAlt, IconName, gossip_menu_id, minlevel, maxlevel, HealthScalingExpansion, RequiredExpansion, VignetteID, faction, npcflag, speed_walk, speed_run, scale, rank, dmgschool, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, unit_flags3, dynamicflags, family, trainer_class, type, type_flags, type_flags2, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, HoverHeight, HealthModifier, HealthModifierExtra, ManaModifier, ManaModifierExtra, ArmorModifier, DamageModifier, ExperienceModifier, RacialLeader, movementId, RegenHealth, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = ?");
PrepareStatement(WorldStatements.SEL_CREATURE_TEMPLATE, "SELECT entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, name, femaleName, subname, TitleAlt, IconName, gossip_menu_id, minlevel, maxlevel, HealthScalingExpansion, RequiredExpansion, VignetteID, faction, npcflag, speed_walk, speed_run, scale, rank, dmgschool, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, unit_flags3, dynamicflags, family, trainer_class, type, type_flags, type_flags2, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, HoverHeight, HealthModifier, HealthModifierExtra, ManaModifier, ManaModifierExtra, ArmorModifier, DamageModifier, ExperienceModifier, RacialLeader, movementId, RegenHealth, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = ?");
PrepareStatement(WorldStatements.SEL_WAYPOINT_SCRIPT_BY_ID, "SELECT guid, delay, command, datalong, datalong2, dataint, x, y, z, o FROM waypoint_scripts WHERE id = ?");
PrepareStatement(WorldStatements.SEL_CREATURE_BY_ID, "SELECT guid FROM creature WHERE id = ?");
PrepareStatement(WorldStatements.SEL_GAMEOBJECT_NEAREST, "SELECT guid, id, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM gameobject WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? ORDER BY order_");
+2 -2
View File
@@ -11,8 +11,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.4.1" />
<PackageReference Include="MySqlConnector" Version="0.40.4" />
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
<PackageReference Include="MySqlConnector" Version="0.46.2" />
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.3.0" />
</ItemGroup>
+4 -4
View File
@@ -5325,7 +5325,7 @@ namespace Bgs.Protocol.Account.V1
public PrivacyInfo(PrivacyInfo other) : this()
{
isUsingRid_ = other.isUsingRid_;
isRealIdVisibleForViewFriends_ = other.isRealIdVisibleForViewFriends_;
isVisibleForViewFriends = other.isVisibleForViewFriends;
isHiddenFromFriendFinder_ = other.isHiddenFromFriendFinder_;
gameInfoPrivacy_ = other.gameInfoPrivacy_;
}
@@ -5350,14 +5350,14 @@ namespace Bgs.Protocol.Account.V1
/// <summary>Field number for the "is_real_id_visible_for_view_friends" field.</summary>
public const int IsRealIdVisibleForViewFriendsFieldNumber = 4;
private bool isRealIdVisibleForViewFriends_;
private bool isVisibleForViewFriends;
public bool IsRealIdVisibleForViewFriends
{
get { return isRealIdVisibleForViewFriends_; }
get { return isVisibleForViewFriends; }
set
{
bitArray.Set(IsRealIdVisibleForViewFriendsFieldNumber, true);
isRealIdVisibleForViewFriends_ = value;
isVisibleForViewFriends = value;
}
}
@@ -47,7 +47,7 @@ using System.Linq;
public static partial class Detour
{
const float H_SCALE = 2.0f; // Search heuristic scale.
const float H_SCALE = 0.999f; // Search heuristic scale.
/// Defines polygon filtering and traversal costs for navigation mesh query operations.
// @ingroup detour
+1
View File
@@ -261,6 +261,7 @@ namespace Game.AI
me.ResetPlayerDamageReq();
me.SetLastDamagedTime(0);
me.SetCannotReachTarget(false);
me.DoNotReacquireTarget();
if (me.IsInEvadeMode())
return false;
+6
View File
@@ -39,6 +39,12 @@ namespace Game.AI
if (me.IsCharmed() && me.GetVictim() == me.GetCharmer())
return true;
// dont allow pets to follow targets far away from owner
Unit owner = me.GetCharmerOrOwner();
if (owner)
if (owner.GetExactDist(me) >= (owner.GetVisibilityRange() - 10.0f))
return true;
return !me.IsValidAttackTarget(me.GetVictim());
}
@@ -2565,6 +2565,7 @@ namespace Game.AI
public uint pointId;
public uint transport;
public uint disablePathfinding;
public uint contactDistance;
}
public struct SendGossipMenu
{
+11 -5
View File
@@ -255,10 +255,10 @@ namespace Game.AI
CreatureTemplate ci = Global.ObjectMgr.GetCreatureTemplate(e.Action.morphOrMount.creature);
if (ci != null)
{
uint displayId = ObjectManager.ChooseDisplayId(ci);
obj.ToCreature().SetDisplayId(displayId);
CreatureModel model = ObjectManager.ChooseDisplayId(ci);
obj.ToCreature().SetDisplayId(model.CreatureDisplayID, model.DisplayScale);
Log.outDebug(LogFilter.ScriptsAi, "SmartScript.ProcessAction. SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry {0}, GuidLow {1} set displayid to {2}",
obj.GetEntry(), obj.GetGUID().ToString(), displayId);
obj.GetEntry(), obj.GetGUID().ToString(), model.CreatureDisplayID);
}
}
//if no param1, then use value from param2 (modelId)
@@ -1133,7 +1133,7 @@ namespace Game.AI
{
CreatureTemplate cInfo = Global.ObjectMgr.GetCreatureTemplate(e.Action.morphOrMount.creature);
if (cInfo != null)
obj.ToUnit().Mount(ObjectManager.ChooseDisplayId(cInfo));
obj.ToUnit().Mount(ObjectManager.ChooseDisplayId(cInfo).CreatureDisplayID);
}
else
obj.ToUnit().Mount(e.Action.morphOrMount.model);
@@ -1541,7 +1541,13 @@ namespace Game.AI
me.GetMotionMaster().MovePoint(e.Action.moveToPos.pointId, x, y, z, e.Action.moveToPos.disablePathfinding == 0);
}
else
me.GetMotionMaster().MovePoint(e.Action.moveToPos.pointId, target.GetPositionX(), target.GetPositionY(), target.GetPositionZ(), e.Action.moveToPos.disablePathfinding == 0);
{
float x, y, z;
target.GetPosition(out x, out y, out z);
if (e.Action.moveToPos.contactDistance > 0)
target.GetContactPoint(me, out x, out y, out z, e.Action.moveToPos.contactDistance);
me.GetMotionMaster().MovePoint(e.Action.moveToPos.pointId, x, y, z, e.Action.moveToPos.disablePathfinding == 0);
}
break;
}
case SmartActions.RespawnTarget:
+33 -35
View File
@@ -615,7 +615,7 @@ namespace Game.Achievements
if (achievement.Flags.HasAnyFlag(AchievementFlags.RealmFirstReach | AchievementFlags.RealmFirstKill))
{
// broadcast realm first reached
ServerFirstAchievement serverFirstAchievement = new ServerFirstAchievement();
BroadcastAchievement serverFirstAchievement = new BroadcastAchievement();
serverFirstAchievement.Name = _owner.GetName();
serverFirstAchievement.PlayerGUID = _owner.GetGUID();
serverFirstAchievement.AchievementID = achievement.Id;
@@ -993,7 +993,7 @@ namespace Game.Achievements
if (achievement.Flags.HasAnyFlag(AchievementFlags.RealmFirstReach | AchievementFlags.RealmFirstKill))
{
// broadcast realm first reached
ServerFirstAchievement serverFirstAchievement = new ServerFirstAchievement();
BroadcastAchievement serverFirstAchievement = new BroadcastAchievement();
serverFirstAchievement.Name = _owner.GetName();
serverFirstAchievement.PlayerGUID = _owner.GetGUID();
serverFirstAchievement.AchievementID = achievement.Id;
@@ -1148,21 +1148,20 @@ namespace Game.Achievements
_achievementRewards.Clear(); // need for reload case
// 0 1 2 3 4 5 6 7
SQLResult result = DB.World.Query("SELECT entry, title_A, title_H, item, sender, subject, text, mailTemplate FROM achievement_reward");
SQLResult result = DB.World.Query("SELECT ID, TitleA, TitleH, ItemID, Sender, Subject, Body, MailTemplateID FROM achievement_reward");
if (result.IsEmpty())
{
Log.outError(LogFilter.ServerLoading, ">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty.");
return;
}
uint count = 0;
do
{
uint entry = result.Read<uint>(0);
AchievementRecord achievement = CliDB.AchievementStorage.LookupByKey(entry);
uint id = result.Read<uint>(0);
AchievementRecord achievement = CliDB.AchievementStorage.LookupByKey(id);
if (achievement == null)
{
Log.outError(LogFilter.Sql, "Table `achievement_reward` contains a wrong achievement entry (Entry: {0}), ignored.", entry);
Log.outError(LogFilter.Sql, $"Table `achievement_reward` contains a wrong achievement ID ({id}), ignored.");
continue;
}
@@ -1178,19 +1177,19 @@ namespace Game.Achievements
// must be title or mail at least
if (reward.TitleId[0] == 0 && reward.TitleId[1] == 0 && reward.SenderCreatureId == 0)
{
Log.outError(LogFilter.Sql, "Table `achievement_reward` (Entry: {0}) does not contain title or item reward data. Ignored.", entry);
Log.outError(LogFilter.Sql, $"Table `achievement_reward` (ID: {id}) does not contain title or item reward data. Ignored.");
continue;
}
if (achievement.Faction == AchievementFaction.Any && (reward.TitleId[0] == 0 ^ reward.TitleId[1] == 0))
Log.outError(LogFilter.Sql, "Table `achievement_reward` (Entry: {0}) contains the title (A: {1} H: {2}) for only one team.", entry, reward.TitleId[0], reward.TitleId[1]);
Log.outError(LogFilter.Sql, $"Table `achievement_reward` (ID: {id}) contains the title (A: {reward.TitleId[0]} H: {reward.TitleId[1]}) for only one team.");
if (reward.TitleId[0] != 0)
{
CharTitlesRecord titleEntry = CliDB.CharTitlesStorage.LookupByKey(reward.TitleId[0]);
if (titleEntry == null)
{
Log.outError(LogFilter.Sql, "Table `achievement_reward` (Entry: {0}) contains an invalid title id ({1}) in `title_A`, set to 0", entry, reward.TitleId[0]);
Log.outError(LogFilter.Sql, $"Table `achievement_reward` (ID: {id}) contains an invalid title ID ({reward.TitleId[0]}) in `title_A`, set to 0");
reward.TitleId[0] = 0;
}
}
@@ -1200,7 +1199,7 @@ namespace Game.Achievements
CharTitlesRecord titleEntry = CliDB.CharTitlesStorage.LookupByKey(reward.TitleId[1]);
if (titleEntry == null)
{
Log.outError(LogFilter.Sql, "Table `achievement_reward` (Entry: {0}) contains an invalid title id ({1}) in `title_H`, set to 0", entry, reward.TitleId[1]);
Log.outError(LogFilter.Sql, $"Table `achievement_reward` (ID: {id}) contains an invalid title ID ({reward.TitleId[1]}) in `title_H`, set to 0");
reward.TitleId[1] = 0;
}
}
@@ -1210,51 +1209,50 @@ namespace Game.Achievements
{
if (Global.ObjectMgr.GetCreatureTemplate(reward.SenderCreatureId) == null)
{
Log.outError(LogFilter.Sql, "Table `achievement_reward` (Entry: {0}) contains an invalid creature entry {1} as sender, mail reward skipped.", entry, reward.SenderCreatureId);
Log.outError(LogFilter.Sql, $"Table `achievement_reward` (ID: {id}) contains an invalid creature ID {reward.SenderCreatureId} as sender, mail reward skipped.");
reward.SenderCreatureId = 0;
}
}
else
{
if (reward.ItemId != 0)
Log.outError(LogFilter.Sql, "Table `achievement_reward` (Entry: {0}) does not have sender data, but contains an item reward. Item will not be rewarded.", entry);
Log.outError(LogFilter.Sql, $"Table `achievement_reward` (ID: {id}) does not have sender data, but contains an item reward. Item will not be rewarded.");
if (!reward.Subject.IsEmpty())
Log.outError(LogFilter.Sql, "Table `achievement_reward` (Entry: {0}) does not have sender data, but contains a mail subject.", entry);
Log.outError(LogFilter.Sql, $"Table `achievement_reward` (ID: {id}) does not have sender data, but contains a mail subject.");
if (!reward.Body.IsEmpty())
Log.outError(LogFilter.Sql, "Table `achievement_reward` (Entry: {0}) does not have sender data, but contains mail text.", entry);
Log.outError(LogFilter.Sql, $"Table `achievement_reward` (ID: {id}) does not have sender data, but contains mail text.");
if (reward.MailTemplateId != 0)
Log.outError(LogFilter.Sql, "Table `achievement_reward` (Entry: {0}) does not have sender data, but has a MailTemplateId.", entry);
Log.outError(LogFilter.Sql, $"Table `achievement_reward` (ID: {id}) does not have sender data, but has a MailTemplateId.");
}
if (reward.MailTemplateId != 0)
{
if (!CliDB.MailTemplateStorage.ContainsKey(reward.MailTemplateId))
{
Log.outError(LogFilter.Sql, "Table `achievement_reward` (Entry: {0}) is using an invalid MailTemplateId ({1}).", entry, reward.MailTemplateId);
Log.outError(LogFilter.Sql, $"Table `achievement_reward` (ID: {id}) is using an invalid MailTemplateId ({reward.MailTemplateId}).");
reward.MailTemplateId = 0;
}
else if (!reward.Subject.IsEmpty() || !reward.Body.IsEmpty())
Log.outError(LogFilter.Sql, "Table `achievement_reward` (Entry: {0}) is using MailTemplateId ({1}) and mail subject/text.", entry, reward.MailTemplateId);
Log.outError(LogFilter.Sql, $"Table `achievement_reward` (ID: {id}) is using MailTemplateId ({reward.MailTemplateId}) and mail subject/text.");
}
if (reward.ItemId != 0)
{
if (Global.ObjectMgr.GetItemTemplate(reward.ItemId) == null)
{
Log.outError(LogFilter.Sql, "Table `achievement_reward` (Entry: {0}) contains an invalid item id {1}, reward mail will not contain the rewarded item.", entry, reward.ItemId);
Log.outError(LogFilter.Sql, $"Table `achievement_reward` (ID: {id}) contains an invalid item id {reward.ItemId}, reward mail will not contain the rewarded item.");
reward.ItemId = 0;
}
}
_achievementRewards[entry] = reward;
++count;
_achievementRewards[id] = reward;
}
while (result.NextRow());
Log.outInfo(LogFilter.ServerLoading, "Loaded {0} achievement rewards in {1} ms.", count, Time.GetMSTimeDiffToNow(oldMSTime));
Log.outInfo(LogFilter.ServerLoading, "Loaded {0} achievement rewards in {1} ms.", _achievementRewards.Count, Time.GetMSTimeDiffToNow(oldMSTime));
}
public void LoadRewardLocales()
@@ -1263,34 +1261,34 @@ namespace Game.Achievements
_achievementRewardLocales.Clear(); // need for reload case
SQLResult result = DB.World.Query("SELECT entry, subject_loc1, text_loc1, subject_loc2, text_loc2, subject_loc3, text_loc3, subject_loc4, text_loc4, " +
"subject_loc5, text_loc5, subject_loc6, text_loc6, subject_loc7, text_loc7, subject_loc8, text_loc8 FROM locales_achievement_reward");
// 0 1 2 3
SQLResult result = DB.World.Query("SELECT ID, Locale, Subject, Body FROM achievement_reward_locale");
if (result.IsEmpty())
{
Log.outInfo(LogFilter.ServerLoading, "Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty.");
Log.outInfo(LogFilter.ServerLoading, "Loaded 0 achievement reward locale strings. DB table `achievement_reward_locale` is empty.");
return;
}
do
{
uint entry = result.Read<uint>(0);
uint id = result.Read<uint>(0);
string localeName = result.Read<string>(1);
if (!_achievementRewards.ContainsKey(entry))
if (!_achievementRewards.ContainsKey(id))
{
Log.outError(LogFilter.Sql, "Table `locales_achievement_reward` (Entry: {0}) contains locale strings for a non-existing achievement reward.", entry);
Log.outError(LogFilter.Sql, "Table `achievement_reward_locale` (ID: {id}) contains locale strings for a non-existing achievement reward.");
continue;
}
AchievementRewardLocale data = new AchievementRewardLocale();
LocaleConstant locale = localeName.ToEnum<LocaleConstant>();
if (locale == LocaleConstant.enUS)
continue;
for (int i = (int)LocaleConstant.OldTotal - 1; i > 0; --i)
{
LocaleConstant locale = (LocaleConstant)i;
ObjectManager.AddLocaleString(result.Read<string>(1 + 2 * (i - 1)), locale, data.Subject);
ObjectManager.AddLocaleString(result.Read<string>(1 + 2 * (i - 1) + 1), locale, data.Body);
}
ObjectManager.AddLocaleString(result.Read<string>(2), locale, data.Subject);
ObjectManager.AddLocaleString(result.Read<string>(3), locale, data.Body);
_achievementRewardLocales[entry] = data;
_achievementRewardLocales[id] = data;
}
while (result.NextRow());
+10 -6
View File
@@ -284,7 +284,7 @@ namespace Game.Achievements
SetCriteriaProgress(criteria, referencePlayer.GetReputationMgr().GetVisibleFactionCount(), referencePlayer);
break;
case CriteriaTypes.EarnHonorableKill:
SetCriteriaProgress(criteria, referencePlayer.GetUInt32Value(PlayerFields.LifetimeHonorableKills), referencePlayer);
SetCriteriaProgress(criteria, referencePlayer.GetUInt32Value(ActivePlayerFields.LifetimeHonorableKills), referencePlayer);
break;
case CriteriaTypes.HighestGoldValueOwned:
SetCriteriaProgress(criteria, referencePlayer.GetMoney(), referencePlayer, ProgressType.Highest);
@@ -420,6 +420,9 @@ namespace Game.Achievements
case CriteriaTypes.GainParagonReputation:
case CriteriaTypes.EarnHonorXp:
case CriteriaTypes.RelicTalentUnlocked:
case CriteriaTypes.ReachAccountHonorLevel:
case CriteriaTypes.HeartOfAzerothArtifactPowerEarned:
case CriteriaTypes.HeartOfAzerothLevelReached:
break; // Not implemented yet :(
}
@@ -792,6 +795,9 @@ namespace Game.Achievements
case CriteriaTypes.GainParagonReputation:
case CriteriaTypes.EarnHonorXp:
case CriteriaTypes.RelicTalentUnlocked:
case CriteriaTypes.ReachAccountHonorLevel:
case CriteriaTypes.HeartOfAzerothArtifactPowerEarned:
case CriteriaTypes.HeartOfAzerothLevelReached:
return progress.Counter >= requiredAmount;
case CriteriaTypes.CompleteAchievement:
case CriteriaTypes.CompleteQuest:
@@ -1062,7 +1068,7 @@ namespace Game.Achievements
continue;
uint mask = 1u << (int)((uint)area.AreaBit % 32);
if (Convert.ToBoolean(referencePlayer.GetUInt32Value(PlayerFields.ExploredZones1 + playerIndexOffset) & mask))
if (Convert.ToBoolean(referencePlayer.GetUInt32Value(ActivePlayerFields.ExploredZones + playerIndexOffset) & mask))
{
matchFound = true;
break;
@@ -1390,9 +1396,7 @@ namespace Game.Achievements
return false;
break;
case CriteriaAdditionalCondition.PrestigeLevel: // 194
if (!referencePlayer || referencePlayer.GetPrestigeLevel() != reqValue)
return false;
break;
default:
break;
}
@@ -1907,7 +1911,7 @@ namespace Game.Achievements
criteria.ID, criteria.Entry.Type, DataType, ClassRace.ClassId);
return false;
}
if (ClassRace.RaceId != 0 && ((1 << (int)(ClassRace.RaceId - 1)) & (int)Race.RaceMaskAllPlayable) == 0)
if (ClassRace.RaceId != 0 && ((1ul << (int)(ClassRace.RaceId - 1)) & (ulong)Race.RaceMaskAllPlayable) == 0)
{
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE ({2}) has non-existing race in value2 ({3}), ignored.",
criteria.ID, criteria.Entry.Type, DataType, ClassRace.RaceId);
@@ -2052,7 +2056,7 @@ namespace Game.Achievements
criteria.ID, criteria.Entry.Type, DataType, ClassRace.ClassId);
return false;
}
if (ClassRace.RaceId != 0 && ((1 << (int)(ClassRace.RaceId - 1)) & (int)Race.RaceMaskAllPlayable) == 0)
if (ClassRace.RaceId != 0 && ((1ul << (int)(ClassRace.RaceId - 1)) & (ulong)Race.RaceMaskAllPlayable) == 0)
{
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE ({2}) has non-existing race in value2 ({3}), ignored.",
criteria.ID, criteria.Entry.Type, DataType, ClassRace.RaceId);
+3 -2
View File
@@ -1235,9 +1235,10 @@ namespace Game.BattleGrounds
{
playerData.IsInWorld = true;
playerData.PrimaryTalentTree = (int)player.GetUInt32Value(PlayerFields.CurrentSpecId);
playerData.PrimaryTalentTreeNameIndex = 0;
playerData.Sex = (int)player.GetGender();
playerData.PlayerRace = player.GetRace();
playerData.Prestige = player.GetPrestigeLevel();
playerData.PlayerClass = (int)player.GetClass();
playerData.HonorLevel = (int)player.GetHonorLevel();
}
pvpLogData.Players.Add(playerData);
@@ -1019,7 +1019,7 @@ namespace Game.BattleGrounds.Zones
public const int Berserkbuff2 = 17;
public const int Max = 18;
}
struct WSGObjectEntry
public sealed class WSGObjectEntry
{
public const uint DoorA1 = 179918;
public const uint DoorA2 = 179919;
+3 -3
View File
@@ -406,7 +406,7 @@ namespace Game.BattlePets
return;
// TODO: set proper CreatureID for spell DEFAULT_SUMMON_BATTLE_PET_SPELL (default EffectMiscValueA is 40721 - Murkimus the Gladiator)
_owner.GetPlayer().SetGuidValue(PlayerFields.SummonedBattlePetId, guid);
_owner.GetPlayer().SetGuidValue(ActivePlayerFields.SummonedBattlePetId, guid);
_owner.GetPlayer().CastSpell(_owner.GetPlayer(), speciesEntry.SummonSpellID != 0 ? speciesEntry.SummonSpellID : SharedConst.DefaultSummonBattlePetSpell);
// TODO: set pet level, quality... update fields
@@ -416,10 +416,10 @@ namespace Game.BattlePets
{
Player ownerPlayer = _owner.GetPlayer();
Creature pet = ObjectAccessor.GetCreatureOrPetOrVehicle(ownerPlayer, ownerPlayer.GetCritterGUID());
if (pet && ownerPlayer.GetGuidValue(PlayerFields.SummonedBattlePetId) == pet.GetGuidValue(UnitFields.BattlePetCompanionGuid))
if (pet && ownerPlayer.GetGuidValue(ActivePlayerFields.SummonedBattlePetId) == pet.GetGuidValue(UnitFields.BattlePetCompanionGuid))
{
pet.DespawnOrUnsummon();
ownerPlayer.SetGuidValue(PlayerFields.SummonedBattlePetId, ObjectGuid.Empty);
ownerPlayer.SetGuidValue(ActivePlayerFields.SummonedBattlePetId, ObjectGuid.Empty);
}
}
+76 -1
View File
@@ -265,6 +265,81 @@ namespace Game.Chat
return true;
}
[Command("changeaccount", RBACPermissions.CommandCharacterChangeaccount, true)]
static bool HandleCharacterChangeAccountCommand(StringArguments args, CommandHandler handler)
{
string playerNameStr;
string accountName;
handler.extractOptFirstArg(args, out playerNameStr, out accountName);
if (accountName.IsEmpty())
return false;
ObjectGuid targetGuid;
string targetName;
Player playerNotUsed;
if (!handler.extractPlayerTarget(new StringArguments(playerNameStr), out playerNotUsed, out targetGuid, out targetName))
return false;
CharacterInfo characterInfo = Global.WorldMgr.GetCharacterInfo(targetGuid);
if (characterInfo == null)
{
handler.SendSysMessage(CypherStrings.PlayerNotFound);
return false;
}
uint oldAccountId = characterInfo.AccountId;
uint newAccountId = oldAccountId;
PreparedStatement stmt = DB.Login.GetPreparedStatement(LoginStatements.SEL_ACCOUNT_ID_BY_NAME);
stmt.AddValue(0, accountName);
SQLResult result = DB.Login.Query(stmt);
if (!result.IsEmpty())
newAccountId = result.Read<uint>(0);
else
{
handler.SendSysMessage(CypherStrings.AccountNotExist, accountName);
return false;
}
// nothing to do :)
if (newAccountId == oldAccountId)
return true;
uint charCount = Global.AccountMgr.GetCharactersCount(newAccountId);
if (charCount != 0)
{
if (charCount >= WorldConfig.GetIntValue(WorldCfg.CharactersPerRealm))
{
handler.SendSysMessage(CypherStrings.AccountCharacterListFull, accountName, newAccountId);
return false;
}
}
stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_ACCOUNT_BY_GUID);
stmt.AddValue(0, newAccountId);
stmt.AddValue(1, targetGuid.GetCounter());
DB.Characters.DirectExecute(stmt);
Global.WorldMgr.UpdateRealmCharCount(oldAccountId);
Global.WorldMgr.UpdateRealmCharCount(newAccountId);
Global.WorldMgr.UpdateCharacterInfoAccount(targetGuid, newAccountId);
handler.SendSysMessage(CypherStrings.ChangeAccountSuccess, targetName, accountName);
string logString = $"changed ownership of player {targetName} ({targetGuid.ToString()}) from account {oldAccountId} to account {newAccountId}";
WorldSession session = handler.GetSession();
if (session != null)
{
Player player = session.GetPlayer();
if (player != null)
Log.outCommand(session.GetAccountId(), $"GM {player.GetName()} (Account: {session.GetAccountId()}) {logString}");
}
else
Log.outCommand(0, $"{handler.GetCypherString(CypherStrings.Console)} {logString}");
return true;
}
[Command("changefaction", RBACPermissions.CommandCharacterChangefaction, true)]
static bool HandleCharacterChangeFactionCommand(StringArguments args, CommandHandler handler)
{
@@ -702,7 +777,7 @@ namespace Game.Chat
{
player.GiveLevel((uint)newLevel);
player.InitTalentForLevel();
player.SetUInt32Value(PlayerFields.Xp, 0);
player.SetUInt32Value(ActivePlayerFields.Xp, 0);
if (handler.needReportToTarget(player))
{
+2 -2
View File
@@ -245,9 +245,9 @@ namespace Game.Chat.Commands
for (ushort i = 0; i < PlayerConst.ExploredZonesSize; ++i)
{
if (flag != 0)
handler.GetSession().GetPlayer().SetFlag(PlayerFields.ExploredZones1 + i, 0xFFFFFFFF);
handler.GetSession().GetPlayer().SetFlag(ActivePlayerFields.ExploredZones + i, 0xFFFFFFFF);
else
handler.GetSession().GetPlayer().SetFlag(PlayerFields.ExploredZones1 + i, 0);
handler.GetSession().GetPlayer().SetFlag(ActivePlayerFields.ExploredZones + i, 0);
}
return true;
+1 -1
View File
@@ -1173,7 +1173,7 @@ namespace Game.Chat
phaseShift.AddPhase(phase, PhaseFlags.None, null);
if (uint.TryParse(args.NextString(), out uint map))
phaseShift.AddUiWorldMapAreaIdSwap(map);
phaseShift.AddUiMapPhaseId(map);
PhasingHandler.SendToPlayer(handler.GetSession().GetPlayer(), phaseShift);
return true;
+10 -2
View File
@@ -542,7 +542,11 @@ namespace Game.Chat
}
if (handler.GetSession() != null)
handler.SendSysMessage(CypherStrings.QuestListChat, qInfo.Id, qInfo.Id, qInfo.Level, title, statusStr);
handler.SendSysMessage(CypherStrings.QuestListChat, qInfo.Id, qInfo.Id,
handler.GetSession().GetPlayer().GetQuestLevel(qInfo),
handler.GetSession().GetPlayer().GetQuestMinLevel(qInfo),
qInfo.MaxScalingLevel, qInfo.ScalingFactionGroup,
title, statusStr);
else
handler.SendSysMessage(CypherStrings.QuestListConsole, qInfo.Id, title, statusStr);
@@ -590,7 +594,11 @@ namespace Game.Chat
}
if (handler.GetSession() != null)
handler.SendSysMessage(CypherStrings.QuestListChat, qInfo.Id, qInfo.Id, qInfo.Level, _title, statusStr);
handler.SendSysMessage(CypherStrings.QuestListChat, qInfo.Id, qInfo.Id,
handler.GetSession().GetPlayer().GetQuestLevel(qInfo),
handler.GetSession().GetPlayer().GetQuestMinLevel(qInfo),
qInfo.MaxScalingLevel, qInfo.ScalingFactionGroup,
_title, statusStr);
else
handler.SendSysMessage(CypherStrings.QuestListConsole, qInfo.Id, _title, statusStr);
+5 -5
View File
@@ -192,7 +192,7 @@ namespace Game.Chat
float zoneX = obj.GetPositionX();
float zoneY = obj.GetPositionY();
Global.DB2Mgr.Map2ZoneCoordinates(zoneId, ref zoneX, ref zoneY);
Global.DB2Mgr.Map2ZoneCoordinates((int)zoneId, ref zoneX, ref zoneY);
Map map = obj.GetMap();
float groundZ = map.GetHeight(obj.GetPhaseShift(), obj.GetPositionX(), obj.GetPositionY(), MapConst.MaxHeight);
@@ -1189,8 +1189,8 @@ namespace Game.Chat
}
uint val = (1u << (area.AreaBit % 32));
uint currFields = playerTarget.GetUInt32Value(PlayerFields.ExploredZones1 + offset);
playerTarget.SetUInt32Value(PlayerFields.ExploredZones1 + offset, (currFields | val));
uint currFields = playerTarget.GetUInt32Value(ActivePlayerFields.ExploredZones + offset);
playerTarget.SetUInt32Value(ActivePlayerFields.ExploredZones + offset, (currFields | val));
handler.SendSysMessage(CypherStrings.ExploreArea);
return true;
@@ -1230,8 +1230,8 @@ namespace Game.Chat
}
uint val = (1u << (area.AreaBit % 32));
uint currFields = playerTarget.GetUInt32Value(PlayerFields.ExploredZones1 + offset);
playerTarget.SetUInt32Value(PlayerFields.ExploredZones1 + offset, (currFields ^ val));
uint currFields = playerTarget.GetUInt32Value(ActivePlayerFields.ExploredZones + offset);
playerTarget.SetUInt32Value(ActivePlayerFields.ExploredZones + offset, (currFields ^ val));
handler.SendSysMessage(CypherStrings.UnexploreArea);
return true;
@@ -215,6 +215,10 @@ namespace Game.Chat
if (CheckModifySpeed(args, handler, target, out Scale, 0.1f, 10.0f, false))
{
NotifyModification(handler, target, CypherStrings.YouChangeSize, CypherStrings.YoursSizeChanged, Scale);
Creature creatureTarget = target.ToCreature();
if (creatureTarget)
creatureTarget.SetFloatValue(UnitFields.DisplayScale, Scale);
else
target.SetObjectScale(Scale);
return true;
}
+4 -4
View File
@@ -38,7 +38,7 @@ namespace Game.Chat
}
// .addquest #entry'
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level|h[name]|h|r
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level:min_level:max_level:scaling_faction|h[name]|h|r
string cId = handler.extractKeyFromLink(args, "Hquest");
if (!uint.TryParse(cId, out uint entry))
return false;
@@ -78,7 +78,7 @@ namespace Game.Chat
}
// .quest complete #entry
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level|h[name]|h|r
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level:min_level:max_level:scaling_faction|h[name]|h|r
string cId = handler.extractKeyFromLink(args, "Hquest");
if (!uint.TryParse(cId, out uint entry))
return false;
@@ -170,7 +170,7 @@ namespace Game.Chat
}
// .removequest #entry'
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level|h[name]|h|r
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level:min_level:max_level:scaling_faction|h[name]|h|r
string cId = handler.extractKeyFromLink(args, "Hquest");
if (!uint.TryParse(cId, out uint entry))
return false;
@@ -224,7 +224,7 @@ namespace Game.Chat
}
// .quest reward #entry
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level|h[name]|h|r
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level:min_level:max_level:scaling_faction|h[name]|h|r
string cId = handler.extractKeyFromLink(args, "Hquest");
if (!uint.TryParse(cId, out uint entry))
return false;
+4 -4
View File
@@ -51,8 +51,8 @@ namespace Game.Chat
if (!handler.extractPlayerTarget(args, out target))
return false;
target.SetUInt32Value(PlayerFields.Kills, 0);
target.SetUInt32Value(PlayerFields.LifetimeHonorableKills, 0);
target.SetUInt32Value(ActivePlayerFields.Kills, 0);
target.SetUInt32Value(ActivePlayerFields.LifetimeHonorableKills, 0);
target.UpdateCriteria(CriteriaTypes.EarnHonorableKill);
return true;
@@ -85,7 +85,7 @@ namespace Game.Chat
player.SetUInt32Value(UnitFields.Flags, (uint)UnitFlags.PvpAttackable);
//-1 is default value
player.SetUInt32Value(PlayerFields.WatchedFactionIndex, 0xFFFFFFFF);
player.SetUInt32Value(ActivePlayerFields.WatchedFactionIndex, 0xFFFFFFFF);
return true;
}
@@ -110,7 +110,7 @@ namespace Game.Chat
target.InitStatsForLevel(true);
target.InitTaxiNodesForLevel();
target.InitTalentForLevel();
target.SetUInt32Value(PlayerFields.Xp, 0);
target.SetUInt32Value(ActivePlayerFields.Xp, 0);
target._ApplyAllLevelScaleItemMods(true);
+1 -1
View File
@@ -189,7 +189,7 @@ namespace Game.Chat.Commands
titles &= ~titles2; // remove not existed titles
target.SetUInt64Value(PlayerFields.KnownTitles, titles);
target.SetUInt64Value(ActivePlayerFields.KnownTitles, titles);
handler.SendSysMessage(CypherStrings.Done);
if (!target.HasTitle(target.GetUInt32Value(PlayerFields.ChosenTitle)))
+5 -3
View File
@@ -18,6 +18,7 @@
using Framework.GameMath;
using System;
using System.Collections.Generic;
using Framework.Constants;
namespace Game.Collision
{
@@ -168,7 +169,7 @@ namespace Game.Collision
public class MapRayCallback : WorkerCallback
{
public MapRayCallback(ModelInstance[] val)
public MapRayCallback(ModelInstance[] val, ModelIgnoreFlags ignoreFlags)
{
prims = val;
hit = false;
@@ -177,7 +178,7 @@ namespace Game.Collision
{
if (prims[entry] == null)
return false;
bool result = prims[entry].intersectRay(ray, ref distance, pStopAtFirstHit);
bool result = prims[entry].intersectRay(ray, ref distance, pStopAtFirstHit, flags);
if (result)
hit = true;
return result;
@@ -186,6 +187,7 @@ namespace Game.Collision
ModelInstance[] prims;
bool hit;
ModelIgnoreFlags flags;
}
public class AreaInfoCallback : WorkerCallback
@@ -236,7 +238,7 @@ namespace Game.Collision
public override bool Invoke(Ray r, IModel obj, ref float distance)
{
_didHit = obj.IntersectRay(r, ref distance, true, _phaseShift);
_didHit = obj.IntersectRay(r, ref distance, true, _phaseShift, ModelIgnoreFlags.Nothing);
return _didHit;
}
@@ -29,6 +29,13 @@ namespace Game.Collision
Ignored
}
public enum LoadResult
{
Success,
FileNotFound,
VersionMismatch
}
public class VMapManager : Singleton<VMapManager>
{
VMapManager() { }
@@ -124,7 +131,7 @@ namespace Game.Collision
}
}
public bool isInLineOfSight(uint mapId, float x1, float y1, float z1, float x2, float y2, float z2)
public bool isInLineOfSight(uint mapId, float x1, float y1, float z1, float x2, float y2, float z2, ModelIgnoreFlags ignoreFlags)
{
if (!isLineOfSightCalcEnabled() || Global.DisableMgr.IsDisabledFor(DisableType.VMAP, mapId, null, DisableFlags.VmapLOS))
return true;
@@ -135,7 +142,7 @@ namespace Game.Collision
Vector3 pos1 = convertPositionToInternalRep(x1, y1, z1);
Vector3 pos2 = convertPositionToInternalRep(x2, y2, z2);
if (pos1 != pos2)
return instanceTree.isInLineOfSight(pos1, pos2);
return instanceTree.isInLineOfSight(pos1, pos2, ignoreFlags);
}
return true;
@@ -232,7 +239,7 @@ namespace Game.Collision
return false;
}
public WorldModel acquireModelInstance(string filename)
public WorldModel acquireModelInstance(string filename, uint flags = 0)
{
lock (LoadedModelFilesLock)
{
@@ -248,6 +255,9 @@ namespace Game.Collision
}
Log.outDebug(LogFilter.Maps, "VMapManager: loading file '{0}'", filename);
worldmodel.Flags = flags;
model = new ManagedModel();
model.setModel(worldmodel);
@@ -277,7 +287,7 @@ namespace Game.Collision
}
}
public bool existsMap(uint mapId, uint x, uint y)
public LoadResult existsMap(uint mapId, uint x, uint y)
{
return StaticMapTree.CanLoadMap(VMapPath, mapId, x, y, this);
}
+13 -13
View File
@@ -137,7 +137,7 @@ namespace Game.Collision
if (result)
{
// acquire model instance
WorldModel model = vm.acquireModelInstance(spawn.name);
WorldModel model = vm.acquireModelInstance(spawn.name, spawn.flags);
if (model == null)
Log.outError(LogFilter.Server, "StaticMapTree.LoadMapTile() : could not acquire WorldModel [{0}, {1}]", tileX, tileY);
@@ -243,29 +243,29 @@ namespace Game.Collision
return new FileStream(tilefile, FileMode.Open, FileAccess.Read);
}
public static bool CanLoadMap(string vmapPath, uint mapID, uint tileX, uint tileY, VMapManager vm)
public static LoadResult CanLoadMap(string vmapPath, uint mapID, uint tileX, uint tileY, VMapManager vm)
{
string fullname = vmapPath + VMapManager.getMapFileName(mapID);
if (!File.Exists(fullname))
return false;
return LoadResult.FileNotFound;
using (BinaryReader reader = new BinaryReader(new FileStream(fullname, FileMode.Open, FileAccess.Read)))
{
if (reader.ReadStringFromChars(8) != MapConst.VMapMagic)
return false;
return LoadResult.VersionMismatch;
}
FileStream stream = OpenMapTileFile(vmapPath, mapID, tileX, tileY, vm);
if (stream == null)
return false;
return LoadResult.FileNotFound;
using (BinaryReader reader = new BinaryReader(stream))
{
if (reader.ReadStringFromChars(8) != MapConst.VMapMagic)
return false;
return LoadResult.VersionMismatch;
}
return true;
return LoadResult.Success;
}
public static string getTileFileName(uint mapID, uint tileX, uint tileY)
@@ -307,15 +307,15 @@ namespace Game.Collision
Vector3 dir = new Vector3(0, 0, -1);
Ray ray = new Ray(pPos, dir); // direction with length of 1
float maxDist = maxSearchDist;
if (getIntersectionTime(ray, ref maxDist, false))
if (getIntersectionTime(ray, ref maxDist, false, ModelIgnoreFlags.Nothing))
height = pPos.Z - maxDist;
return height;
}
bool getIntersectionTime(Ray pRay, ref float pMaxDist, bool pStopAtFirstHit)
bool getIntersectionTime(Ray pRay, ref float pMaxDist, bool pStopAtFirstHit, ModelIgnoreFlags ignoreFlags)
{
float distance = pMaxDist;
MapRayCallback intersectionCallBack = new MapRayCallback(iTreeValues);
MapRayCallback intersectionCallBack = new MapRayCallback(iTreeValues, ignoreFlags);
iTree.intersectRay(pRay, intersectionCallBack, ref distance, pStopAtFirstHit);
if (intersectionCallBack.didHit())
pMaxDist = distance;
@@ -337,7 +337,7 @@ namespace Game.Collision
Vector3 dir = (pPos2 - pPos1) / maxDist; // direction with length of 1
Ray ray = new Ray(pPos1, dir);
float dist = maxDist;
if (getIntersectionTime(ray, ref dist, false))
if (getIntersectionTime(ray, ref dist, false, ModelIgnoreFlags.Nothing))
{
pResultHitPos = pPos1 + dir * dist;
if (pModifyDist < 0)
@@ -365,7 +365,7 @@ namespace Game.Collision
return result;
}
public bool isInLineOfSight(Vector3 pos1, Vector3 pos2)
public bool isInLineOfSight(Vector3 pos1, Vector3 pos2, ModelIgnoreFlags ignoreFlags)
{
float maxDist = (pos2 - pos1).magnitude();
// return false if distance is over max float, in case of cheater teleporting to the end of the universe
@@ -380,7 +380,7 @@ namespace Game.Collision
return true;
// direction with length of 1
Ray ray = new Ray(pos1, (pos2 - pos1) / maxDist);
if (getIntersectionTime(ray, ref maxDist, true))
if (getIntersectionTime(ray, ref maxDist, true, ignoreFlags))
return false;
return true;
@@ -88,7 +88,7 @@ namespace Game.Collision
return mdl;
}
public override bool IntersectRay(Ray ray, ref float maxDist, bool stopAtFirstHit, PhaseShift phaseShift)
public override bool IntersectRay(Ray ray, ref float maxDist, bool stopAtFirstHit, PhaseShift phaseShift, ModelIgnoreFlags ignoreFlags)
{
if (!isCollisionEnabled() || !owner.IsSpawned())
return false;
@@ -104,7 +104,7 @@ namespace Game.Collision
Vector3 p = iInvRot * (ray.Origin - iPos) * iInvScale;
Ray modRay = new Ray(p, iInvRot * ray.Direction);
float distance = maxDist * iInvScale;
bool hit = iModel.IntersectRay(modRay, ref distance, stopAtFirstHit);
bool hit = iModel.IntersectRay(modRay, ref distance, stopAtFirstHit, ignoreFlags);
if (hit)
{
distance *= iScale;
+3 -1
View File
@@ -17,6 +17,7 @@
using Framework.GameMath;
using System.Collections.Generic;
using Framework.Constants;
namespace Game.Collision
{
@@ -25,7 +26,8 @@ namespace Game.Collision
public virtual Vector3 getPosition() { return default(Vector3); }
public virtual AxisAlignedBox getBounds() { return default(AxisAlignedBox); }
public virtual bool IntersectRay(Ray ray, ref float maxDist, bool stopAtFirstHit, PhaseShift phaseShift) { return false; }
public virtual bool IntersectRay(Ray ray, ref float maxDist, bool stopAtFirstHit, PhaseShift phaseShift, ModelIgnoreFlags ignoreFlags) { return false; }
public virtual bool IntersectRay(Ray ray, ref float distance, bool stopAtFirstHit, ModelIgnoreFlags ignoreFlags) { return false; }
public virtual bool IntersectRay(Ray ray, ref float distance, bool stopAtFirstHit) { return false; }
public virtual void IntersectPoint(Vector3 point, AreaInfo info, PhaseShift phaseShift) { }
}
@@ -15,6 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Framework.Constants;
using Framework.GameMath;
using System;
using System.IO;
@@ -93,7 +94,7 @@ namespace Game.Collision
iInvScale = 1.0f / iScale;
}
public bool intersectRay(Ray pRay, ref float pMaxDist, bool pStopAtFirstHit)
public bool intersectRay(Ray pRay, ref float pMaxDist, bool pStopAtFirstHit, ModelIgnoreFlags ignoreFlags)
{
if (iModel == null)
return false;
@@ -106,7 +107,7 @@ namespace Game.Collision
Vector3 p = iInvRot * (pRay.Origin - iPos) * iInvScale;
Ray modRay = new Ray(p, iInvRot * pRay.Direction);
float distance = pMaxDist * iInvScale;
bool hit = iModel.IntersectRay(modRay, ref distance, pStopAtFirstHit);
bool hit = iModel.IntersectRay(modRay, ref distance, pStopAtFirstHit, ignoreFlags);
if (hit)
{
distance *= iScale;
+10 -1
View File
@@ -312,8 +312,16 @@ namespace Game.Collision
RootWMOID = 0;
}
public override bool IntersectRay(Ray ray, ref float distance, bool stopAtFirstHit)
public override bool IntersectRay(Ray ray, ref float distance, bool stopAtFirstHit, ModelIgnoreFlags ignoreFlags)
{
// If the caller asked us to ignore certain objects we should check flags
if ((ignoreFlags & ModelIgnoreFlags.M2) != ModelIgnoreFlags.Nothing)
{
// M2 models are not taken into account for LoS calculation if caller requested their ignoring.
if ((Flags & (uint)ModelFlags.M2) != 0)
return false;
}
// small M2 workaround, maybe better make separate class with virtual intersection funcs
// in any case, there's no need to use a bound tree if we only have one submodel
if (groupModels.Count == 1)
@@ -404,5 +412,6 @@ namespace Game.Collision
List<GroupModel> groupModels = new List<GroupModel>();
BIH groupTree = new BIH();
uint RootWMOID;
public uint Flags;
}
}
+17
View File
@@ -106,6 +106,23 @@ namespace Game.Combat
}
}
// delete all references out of specified range
public void deleteReferencesOutOfRange(float range)
{
HostileReference refe = getFirst();
range = range * range;
while (refe != null)
{
HostileReference nextRef = refe.next();
Unit owner = refe.GetSource().GetOwner();
if (!owner.isActiveObject() && owner.GetExactDist2dSq(getOwner()) > range)
{
refe.removeReference();
}
refe = nextRef;
}
}
public new HostileReference getFirst() { return ((HostileReference)base.getFirst()); }
public void updateThreatTables()
+6 -6
View File
@@ -1229,7 +1229,7 @@ namespace Game
}
case ConditionTypes.Class:
{
if (!Convert.ToBoolean(cond.ConditionValue1 & (uint)Class.ClassMaskAllPlayable))
if (Convert.ToBoolean(cond.ConditionValue1 & ~(uint)Class.ClassMaskAllPlayable))
{
Log.outError(LogFilter.Sql, "{0} has non existing classmask ({1}), skipped.", cond.ToString(true), cond.ConditionValue1 & ~(uint)Class.ClassMaskAllPlayable);
return false;
@@ -1238,7 +1238,7 @@ namespace Game
}
case ConditionTypes.Race:
{
if (!Convert.ToBoolean(cond.ConditionValue1 & (uint)Race.RaceMaskAllPlayable))
if (Convert.ToBoolean(cond.ConditionValue1 & ~(uint)Race.RaceMaskAllPlayable))
{
Log.outError(LogFilter.Sql, "{0} has non existing racemask ({1}), skipped.", cond.ToString(true), cond.ConditionValue1 & ~(uint)Race.RaceMaskAllPlayable);
return false;
@@ -1785,10 +1785,10 @@ namespace Game
}
}
if (condition.PvpMedal != 0 && !Convert.ToBoolean((1 << (condition.PvpMedal - 1)) & player.GetUInt32Value(PlayerFields.PvpMedals)))
if (condition.PvpMedal != 0 && !Convert.ToBoolean((1 << (condition.PvpMedal - 1)) & player.GetUInt32Value(ActivePlayerFields.PvpMedals)))
return false;
if (condition.LifetimeMaxPVPRank != 0 && player.GetByteValue(PlayerFields.FieldBytes, PlayerFieldOffsets.FieldBytesOffsetLifetimeMaxPvpRank) != condition.LifetimeMaxPVPRank)
if (condition.LifetimeMaxPVPRank != 0 && player.GetByteValue(ActivePlayerFields.Bytes, PlayerFieldOffsets.FieldBytesOffsetLifetimeMaxPvpRank) != condition.LifetimeMaxPVPRank)
return false;
if (condition.MovementFlags[0] != 0 && !Convert.ToBoolean((uint)player.GetUnitMovementFlags() & condition.MovementFlags[0]))
@@ -1841,7 +1841,7 @@ namespace Game
{
uint questBit = Global.DB2Mgr.GetQuestUniqueBitFlag(condition.PrevQuestID[i]);
if (questBit != 0)
results[i] = (player.GetUInt32Value(PlayerFields.QuestCompleted + (int)((questBit - 1) >> 5)) & (1 << (int)((questBit - 1) & 31))) != 0;
results[i] = (player.GetUInt32Value(ActivePlayerFields.QuestCompleted + (int)((questBit - 1) >> 5)) & (1 << (int)((questBit - 1) & 31))) != 0;
}
if (!PlayerConditionLogic(condition.PrevQuestLogic, results))
@@ -1920,7 +1920,7 @@ namespace Game
{
AreaTableRecord area = CliDB.AreaTableStorage.LookupByKey(condition.Explored[i]);
if (area != null)
if (area.AreaBit != -1 && !Convert.ToBoolean(player.GetUInt32Value(PlayerFields.ExploredZones1 + area.AreaBit / 32) & (1 << (area.AreaBit % 32))))
if (area.AreaBit != -1 && !Convert.ToBoolean(player.GetUInt32Value(ActivePlayerFields.ExploredZones + area.AreaBit / 32) & (1 << (area.AreaBit % 32))))
return false;
}
}
@@ -150,8 +150,8 @@ namespace Game.DataStorage
while (templates.NextRow());
}
// 0 1 2 3 4 5 6 7 8
SQLResult areatriggerSpellMiscs = DB.World.Query("SELECT SpellMiscId, AreaTriggerId, MoveCurveId, ScaleCurveId, MorphCurveId, FacingCurveId, DecalPropertiesId, TimeToTarget, TimeToTargetScale FROM `spell_areatrigger`");
// 0 1 2 3 4 5 6 7 8 9 10
SQLResult areatriggerSpellMiscs = DB.World.Query("SELECT SpellMiscId, AreaTriggerId, MoveCurveId, ScaleCurveId, MorphCurveId, FacingCurveId, AnimId, AnimKitId, DecalPropertiesId, TimeToTarget, TimeToTargetScale FROM `spell_areatrigger`");
if (!areatriggerSpellMiscs.IsEmpty())
{
do
@@ -184,10 +184,12 @@ namespace Game.DataStorage
miscTemplate.MorphCurveId = ValidateAndSetCurve(areatriggerSpellMiscs.Read<uint>(4));
miscTemplate.FacingCurveId = ValidateAndSetCurve(areatriggerSpellMiscs.Read<uint>(5));
miscTemplate.DecalPropertiesId = areatriggerSpellMiscs.Read<uint>(6);
miscTemplate.AnimId = areatriggerSpellMiscs.Read<uint>(6);
miscTemplate.AnimKitId = areatriggerSpellMiscs.Read<uint>(7);
miscTemplate.DecalPropertiesId = areatriggerSpellMiscs.Read<uint>(8);
miscTemplate.TimeToTarget = areatriggerSpellMiscs.Read<uint>(7);
miscTemplate.TimeToTargetScale = areatriggerSpellMiscs.Read<uint>(8);
miscTemplate.TimeToTarget = areatriggerSpellMiscs.Read<uint>(9);
miscTemplate.TimeToTargetScale = areatriggerSpellMiscs.Read<uint>(10);
miscTemplate.SplinePoints = splinesBySpellMisc[miscTemplate.MiscId];
+43 -26
View File
@@ -36,6 +36,7 @@ namespace Game.DataStorage
DataPath = dataPath + "/dbc/" + defaultLocale + "/";
AchievementStorage = DBReader.Read<AchievementRecord>("Achievement.db2", HotfixStatements.SEL_ACHIEVEMENT, HotfixStatements.SEL_ACHIEVEMENT_LOCALE);
AnimationDataStorage = DBReader.Read<AnimationDataRecord>("AnimationData.db2", HotfixStatements.SEL_ANIMATION_DATA);
AnimKitStorage = DBReader.Read<AnimKitRecord>("AnimKit.db2", HotfixStatements.SEL_ANIM_KIT);
AreaGroupMemberStorage = DBReader.Read<AreaGroupMemberRecord>("AreaGroupMember.db2", HotfixStatements.SEL_AREA_GROUP_MEMBER);
AreaTableStorage = DBReader.Read<AreaTableRecord>("AreaTable.db2", HotfixStatements.SEL_AREA_TABLE, HotfixStatements.SEL_AREA_TABLE_LOCALE);
@@ -74,6 +75,7 @@ namespace Game.DataStorage
ChrSpecializationStorage = DBReader.Read<ChrSpecializationRecord>("ChrSpecialization.db2", HotfixStatements.SEL_CHR_SPECIALIZATION, HotfixStatements.SEL_CHR_SPECIALIZATION_LOCALE);
CinematicCameraStorage = DBReader.Read<CinematicCameraRecord>("CinematicCamera.db2", HotfixStatements.SEL_CINEMATIC_CAMERA);
CinematicSequencesStorage = DBReader.Read<CinematicSequencesRecord>("CinematicSequences.db2", HotfixStatements.SEL_CINEMATIC_SEQUENCES);
ContentTuningStorage = DBReader.Read<ContentTuningRecord>("ContentTuning.db2", HotfixStatements.SEL_CONTENT_TUNING);
ConversationLineStorage = DBReader.Read<ConversationLineRecord>("ConversationLine.db2", HotfixStatements.SEL_CONVERSATION_LINE);
CreatureDisplayInfoStorage = DBReader.Read<CreatureDisplayInfoRecord>("CreatureDisplayInfo.db2", HotfixStatements.SEL_CREATURE_DISPLAY_INFO);
CreatureDisplayInfoExtraStorage = DBReader.Read<CreatureDisplayInfoExtraRecord>("CreatureDisplayInfoExtra.db2", HotfixStatements.SEL_CREATURE_DISPLAY_INFO_EXTRA);
@@ -93,6 +95,8 @@ namespace Game.DataStorage
EmotesStorage = DBReader.Read<EmotesRecord>("Emotes.db2", HotfixStatements.SEL_EMOTES);
EmotesTextStorage = DBReader.Read<EmotesTextRecord>("EmotesText.db2", HotfixStatements.SEL_EMOTES_TEXT);
EmotesTextSoundStorage = DBReader.Read<EmotesTextSoundRecord>("EmotesTextSound.db2", HotfixStatements.SEL_EMOTES_TEXT_SOUND);
ExpectedStatStorage = DBReader.Read <ExpectedStatRecord>("ExpectedStat.db2", HotfixStatements.SEL_EXPECTED_STAT);
ExpectedStatModStorage = DBReader.Read <ExpectedStatModRecord>("ExpectedStatMod.db2", HotfixStatements.SEL_EXPECTED_STAT_MOD);
FactionStorage = DBReader.Read<FactionRecord>("Faction.db2", HotfixStatements.SEL_FACTION, HotfixStatements.SEL_FACTION_LOCALE);
FactionTemplateStorage = DBReader.Read<FactionTemplateRecord>("FactionTemplate.db2", HotfixStatements.SEL_FACTION_TEMPLATE);
GameObjectDisplayInfoStorage = DBReader.Read<GameObjectDisplayInfoRecord>("GameObjectDisplayInfo.db2", HotfixStatements.SEL_GAMEOBJECT_DISPLAY_INFO);
@@ -103,7 +107,7 @@ namespace Game.DataStorage
GarrClassSpecStorage = DBReader.Read<GarrClassSpecRecord>("GarrClassSpec.db2", HotfixStatements.SEL_GARR_CLASS_SPEC, HotfixStatements.SEL_GARR_CLASS_SPEC_LOCALE);
GarrFollowerStorage = DBReader.Read<GarrFollowerRecord>("GarrFollower.db2", HotfixStatements.SEL_GARR_FOLLOWER, HotfixStatements.SEL_GARR_FOLLOWER_LOCALE);
GarrFollowerXAbilityStorage = DBReader.Read<GarrFollowerXAbilityRecord>("GarrFollowerXAbility.db2", HotfixStatements.SEL_GARR_FOLLOWER_X_ABILITY);
GarrPlotStorage = DBReader.Read<GarrPlotRecord>("GarrPlot.db2", HotfixStatements.SEL_GARR_PLOT, HotfixStatements.SEL_GARR_PLOT_LOCALE);
GarrPlotStorage = DBReader.Read<GarrPlotRecord>("GarrPlot.db2", HotfixStatements.SEL_GARR_PLOT);
GarrPlotBuildingStorage = DBReader.Read<GarrPlotBuildingRecord>("GarrPlotBuilding.db2", HotfixStatements.SEL_GARR_PLOT_BUILDING);
GarrPlotInstanceStorage = DBReader.Read<GarrPlotInstanceRecord>("GarrPlotInstance.db2", HotfixStatements.SEL_GARR_PLOT_INSTANCE);
GarrSiteLevelStorage = DBReader.Read<GarrSiteLevelRecord>("GarrSiteLevel.db2", HotfixStatements.SEL_GARR_SITE_LEVEL);
@@ -177,6 +181,7 @@ namespace Game.DataStorage
NamesProfanityStorage = DBReader.Read<NamesProfanityRecord>("NamesProfanity.db2", HotfixStatements.SEL_NAMES_PROFANITY);
NamesReservedStorage = DBReader.Read<NamesReservedRecord>("NamesReserved.db2", HotfixStatements.SEL_NAMES_RESERVED, HotfixStatements.SEL_NAMES_RESERVED_LOCALE);
NamesReservedLocaleStorage = DBReader.Read<NamesReservedLocaleRecord>("NamesReservedLocale.db2", HotfixStatements.SEL_NAMES_RESERVED_LOCALE);
NumTalentsAtLevelStorage = DBReader.Read<NumTalentsAtLevelRecord>("NumTalentsAtLevel.db2", HotfixStatements.SEL_NUM_TALENTS_AT_LEVEL);
OverrideSpellDataStorage = DBReader.Read<OverrideSpellDataRecord>("OverrideSpellData.db2", HotfixStatements.SEL_OVERRIDE_SPELL_DATA);
PhaseStorage = DBReader.Read<PhaseRecord>("Phase.db2", HotfixStatements.SEL_PHASE);
PhaseXPhaseGroupStorage = DBReader.Read<PhaseXPhaseGroupRecord>("PhaseXPhaseGroup.db2", HotfixStatements.SEL_PHASE_X_PHASE_GROUP);
@@ -186,9 +191,9 @@ namespace Game.DataStorage
PrestigeLevelInfoStorage = DBReader.Read<PrestigeLevelInfoRecord>("PrestigeLevelInfo.db2", HotfixStatements.SEL_PRESTIGE_LEVEL_INFO, HotfixStatements.SEL_PRESTIGE_LEVEL_INFO_LOCALE);
PvpDifficultyStorage = DBReader.Read<PvpDifficultyRecord>("PVPDifficulty.db2", HotfixStatements.SEL_PVP_DIFFICULTY);
PvpItemStorage = DBReader.Read<PvpItemRecord>("PVPItem.db2", HotfixStatements.SEL_PVP_ITEM);
PvpRewardStorage = DBReader.Read<PvpRewardRecord>("PvpReward.db2", HotfixStatements.SEL_PVP_REWARD);
PvpTalentStorage = DBReader.Read<PvpTalentRecord>("PvpTalent.db2", HotfixStatements.SEL_PVP_TALENT, HotfixStatements.SEL_PVP_TALENT_LOCALE);
PvpTalentUnlockStorage = DBReader.Read<PvpTalentUnlockRecord>("PvpTalentUnlock.db2", HotfixStatements.SEL_PVP_TALENT_UNLOCK);
PvpTalentCategoryStorage = DBReader.Read<PvpTalentCategoryRecord>("PvpTalentCategory.db2", HotfixStatements.SEL_PVP_TALENT_CATEGORY);
PvpTalentSlotUnlockStorage = DBReader.Read<PvpTalentSlotUnlockRecord>("PvpTalentSlotUnlock.db2", HotfixStatements.SEL_PVP_TALENT_SLOT_UNLOCK);
QuestFactionRewardStorage = DBReader.Read<QuestFactionRewardRecord>("QuestFactionReward.db2", HotfixStatements.SEL_QUEST_FACTION_REWARD);
QuestMoneyRewardStorage = DBReader.Read<QuestMoneyRewardRecord>("QuestMoneyReward.db2", HotfixStatements.SEL_QUEST_MONEY_REWARD);
QuestPackageItemStorage = DBReader.Read<QuestPackageItemRecord>("QuestPackageItem.db2", HotfixStatements.SEL_QUEST_PACKAGE_ITEM);
@@ -200,7 +205,6 @@ namespace Game.DataStorage
RewardPackXCurrencyTypeStorage = DBReader.Read<RewardPackXCurrencyTypeRecord>("RewardPackXCurrencyType.db2", HotfixStatements.SEL_REWARD_PACK_X_CURRENCY_TYPE);
RewardPackXItemStorage = DBReader.Read<RewardPackXItemRecord>("RewardPackXItem.db2", HotfixStatements.SEL_REWARD_PACK_X_ITEM);
RulesetItemUpgradeStorage = DBReader.Read<RulesetItemUpgradeRecord>("RulesetItemUpgrade.db2", HotfixStatements.SEL_RULESET_ITEM_UPGRADE);
SandboxScalingStorage = DBReader.Read<SandboxScalingRecord>("SandboxScaling.db2", HotfixStatements.SEL_SANDBOX_SCALING);
ScalingStatDistributionStorage = DBReader.Read<ScalingStatDistributionRecord>("ScalingStatDistribution.db2", HotfixStatements.SEL_SCALING_STAT_DISTRIBUTION);
ScenarioStorage = DBReader.Read<ScenarioRecord>("Scenario.db2", HotfixStatements.SEL_SCENARIO, HotfixStatements.SEL_SCENARIO_LOCALE);
ScenarioStepStorage = DBReader.Read<ScenarioStepRecord>("ScenarioStep.db2", HotfixStatements.SEL_SCENARIO_STEP, HotfixStatements.SEL_SCENARIO_STEP_LOCALE);
@@ -213,7 +217,7 @@ namespace Game.DataStorage
SkillRaceClassInfoStorage = DBReader.Read<SkillRaceClassInfoRecord>("SkillRaceClassInfo.db2", HotfixStatements.SEL_SKILL_RACE_CLASS_INFO);
SoundKitStorage = DBReader.Read<SoundKitRecord>("SoundKit.db2", HotfixStatements.SEL_SOUND_KIT);
SpecializationSpellsStorage = DBReader.Read<SpecializationSpellsRecord>("SpecializationSpells.db2", HotfixStatements.SEL_SPECIALIZATION_SPELLS, HotfixStatements.SEL_SPECIALIZATION_SPELLS_LOCALE);
SpellStorage = DBReader.Read<SpellRecord>("Spell.db2", HotfixStatements.SEL_SPELL, HotfixStatements.SEL_SPELL_LOCALE);
SpellNameStorage = DBReader.Read<SpellNameRecord>("SpellName.db2", HotfixStatements.SEL_SPELL_NAME, HotfixStatements.SEL_SPELL_NAME_LOCALE);
SpellAuraOptionsStorage = DBReader.Read<SpellAuraOptionsRecord>("SpellAuraOptions.db2", HotfixStatements.SEL_SPELL_AURA_OPTIONS);
SpellAuraRestrictionsStorage = DBReader.Read<SpellAuraRestrictionsRecord>("SpellAuraRestrictions.db2", HotfixStatements.SEL_SPELL_AURA_RESTRICTIONS);
SpellCastTimesStorage = DBReader.Read<SpellCastTimesRecord>("SpellCastTimes.db2", HotfixStatements.SEL_SPELL_CAST_TIMES);
@@ -259,14 +263,16 @@ namespace Game.DataStorage
TransmogSetItemStorage = DBReader.Read<TransmogSetItemRecord>("TransmogSetItem.db2", HotfixStatements.SEL_TRANSMOG_SET_ITEM);
TransportAnimationStorage = DBReader.Read<TransportAnimationRecord>("TransportAnimation.db2", HotfixStatements.SEL_TRANSPORT_ANIMATION);
TransportRotationStorage = DBReader.Read<TransportRotationRecord>("TransportRotation.db2", HotfixStatements.SEL_TRANSPORT_ROTATION);
UiMapStorage = DBReader.Read<UiMapRecord>("UiMap.db2", HotfixStatements.SEL_UI_MAP, HotfixStatements.SEL_UI_MAP_LOCALE);
UiMapAssignmentStorage = DBReader.Read<UiMapAssignmentRecord>("UiMapAssignment.db2", HotfixStatements.SEL_UI_MAP_ASSIGNMENT);
UiMapLinkStorage = DBReader.Read<UiMapLinkRecord>("UiMapLink.db2", HotfixStatements.SEL_UI_MAP_LINK);
UiMapXMapArtStorage = DBReader.Read<UiMapXMapArtRecord>("UiMapXMapArt.db2", HotfixStatements.SEL_UI_MAP_X_MAP_ART);
UnitPowerBarStorage = DBReader.Read<UnitPowerBarRecord>("UnitPowerBar.db2", HotfixStatements.SEL_UNIT_POWER_BAR, HotfixStatements.SEL_UNIT_POWER_BAR_LOCALE);
VehicleStorage = DBReader.Read<VehicleRecord>("Vehicle.db2", HotfixStatements.SEL_VEHICLE);
VehicleSeatStorage = DBReader.Read<VehicleSeatRecord>("VehicleSeat.db2", HotfixStatements.SEL_VEHICLE_SEAT);
WMOAreaTableStorage = DBReader.Read<WMOAreaTableRecord>("WMOAreaTable.db2", HotfixStatements.SEL_WMO_AREA_TABLE, HotfixStatements.SEL_WMO_AREA_TABLE_LOCALE);
WorldEffectStorage = DBReader.Read<WorldEffectRecord>("WorldEffect.db2", HotfixStatements.SEL_WORLD_EFFECT);
WorldMapAreaStorage = DBReader.Read<WorldMapAreaRecord>("WorldMapArea.db2", HotfixStatements.SEL_WORLD_MAP_AREA);
WorldMapOverlayStorage = DBReader.Read<WorldMapOverlayRecord>("WorldMapOverlay.db2", HotfixStatements.SEL_WORLD_MAP_OVERLAY);
WorldMapTransformsStorage = DBReader.Read<WorldMapTransformsRecord>("WorldMapTransforms.db2", HotfixStatements.SEL_WORLD_MAP_TRANSFORMS);
WorldSafeLocsStorage = DBReader.Read<WorldSafeLocsRecord>("WorldSafeLocs.db2", HotfixStatements.SEL_WORLD_SAFE_LOCS, HotfixStatements.SEL_WORLD_SAFE_LOCS_LOCALE);
foreach (var entry in TaxiPathStorage.Values)
@@ -298,7 +304,7 @@ namespace Game.DataStorage
continue;
// valid taxi network node
byte field = (byte)((node.Id - 1) / 8);
uint field = (node.Id - 1) / 8;
byte submask = (byte)(1 << (int)((node.Id - 1) % 8));
TaxiNodesMask[field] |= submask;
@@ -307,22 +313,24 @@ namespace Game.DataStorage
if (node.Flags.HasAnyFlag(TaxiNodeFlags.Alliance))
AllianceTaxiNodesMask[field] |= submask;
uint nodeMap;
Global.DB2Mgr.DeterminaAlternateMapPosition(node.ContinentID, node.Pos.X, node.Pos.Y, node.Pos.Z, out nodeMap);
if (nodeMap < 2)
int uiMapId;
if (!Global.DB2Mgr.GetUiMapPosition(node.Pos.X, node.Pos.Y, node.Pos.Z, node.ContinentID, 0, 0, 0, UiMapSystem.Adventure, false, out uiMapId))
Global.DB2Mgr.GetUiMapPosition(node.Pos.X, node.Pos.Y, node.Pos.Z, node.ContinentID, 0, 0, 0, UiMapSystem.Taxi, false, out uiMapId);
if (uiMapId == 985 || uiMapId == 986)
OldContinentsNodesMask[field] |= submask;
}
Global.DB2Mgr.LoadStores();
// Check loaded DB2 files proper version
if (!AreaTableStorage.ContainsKey(9531) || // last area (areaflag) added in 7.0.3 (22594)
!CharTitlesStorage.ContainsKey(522) || // last char title added in 7.0.3 (22594)
!GemPropertiesStorage.ContainsKey(3632) || // last gem property added in 7.0.3 (22594)
!ItemStorage.ContainsKey(157831) || // last item added in 7.0.3 (22594)
!ItemExtendedCostStorage.ContainsKey(6300) || // last item extended cost added in 7.0.3 (22594)
!MapStorage.ContainsKey(1903) || // last map added in 7.0.3 (22594)
!SpellStorage.ContainsKey(263166)) // last spell added in 7.0.3 (22594)
if (!AreaTableStorage.ContainsKey(10048) || // last area added in 8.0.1 (28153)
!CharTitlesStorage.ContainsKey(633) || // last char title added in 8.0.1 (28153)
!GemPropertiesStorage.ContainsKey(3745) || // last gem property added in 8.0.1 (28153)
!ItemStorage.ContainsKey(164760) || // last item added in 8.0.1 (28153)
!ItemExtendedCostStorage.ContainsKey(6448) || // last item extended cost added in 8.0.1 (28153)
!MapStorage.ContainsKey(2103) || // last map added in 8.0.1 (28153)
!SpellNameStorage.ContainsKey(281872)) // last spell added in 8.0.1 (28153)
{
Log.outError(LogFilter.Misc, "You have _outdated_ DB2 files. Please extract correct versions from current using client.");
Global.WorldMgr.ShutdownServ(10, ShutdownMask.Force, ShutdownExitCode.Error);
@@ -346,7 +354,6 @@ namespace Game.DataStorage
CombatRatingsGameTable = GameTableReader.Read<GtCombatRatingsRecord>("CombatRatings.txt");
CombatRatingsMultByILvlGameTable = GameTableReader.Read<GtCombatRatingsMultByILvlRecord>("CombatRatingsMultByILvl.txt");
ItemSocketCostPerLevelGameTable = GameTableReader.Read<GtItemSocketCostPerLevelRecord>("ItemSocketCostPerLevel.txt");
HonorLevelGameTable = GameTableReader.Read<GtHonorLevelRecord>("HonorLevel.txt");
HpPerStaGameTable = GameTableReader.Read<GtHpPerStaRecord>("HpPerSta.txt");
NpcDamageByClassGameTable[0] = GameTableReader.Read<GtNpcDamageByClassRecord>("NpcDamageByClass.txt");
NpcDamageByClassGameTable[1] = GameTableReader.Read<GtNpcDamageByClassRecord>("NpcDamageByClassExp1.txt");
@@ -355,6 +362,7 @@ namespace Game.DataStorage
NpcDamageByClassGameTable[4] = GameTableReader.Read<GtNpcDamageByClassRecord>("NpcDamageByClassExp4.txt");
NpcDamageByClassGameTable[5] = GameTableReader.Read<GtNpcDamageByClassRecord>("NpcDamageByClassExp5.txt");
NpcDamageByClassGameTable[6] = GameTableReader.Read<GtNpcDamageByClassRecord>("NpcDamageByClassExp6.txt");
NpcDamageByClassGameTable[7] = GameTableReader.Read<GtNpcDamageByClassRecord>("NpcDamageByClassExp7.txt");
NpcManaCostScalerGameTable = GameTableReader.Read<GtNpcManaCostScalerRecord>("NPCManaCostScaler.txt");
NpcTotalHpGameTable[0] = GameTableReader.Read<GtNpcTotalHpRecord>("NpcTotalHp.txt");
NpcTotalHpGameTable[1] = GameTableReader.Read<GtNpcTotalHpRecord>("NpcTotalHpExp1.txt");
@@ -363,6 +371,7 @@ namespace Game.DataStorage
NpcTotalHpGameTable[4] = GameTableReader.Read<GtNpcTotalHpRecord>("NpcTotalHpExp4.txt");
NpcTotalHpGameTable[5] = GameTableReader.Read<GtNpcTotalHpRecord>("NpcTotalHpExp5.txt");
NpcTotalHpGameTable[6] = GameTableReader.Read<GtNpcTotalHpRecord>("NpcTotalHpExp6.txt");
NpcTotalHpGameTable[7] = GameTableReader.Read<GtNpcTotalHpRecord>("NpcTotalHpExp7.txt");
SpellScalingGameTable = GameTableReader.Read<GtSpellScalingRecord>("SpellScaling.txt");
XpGameTable = GameTableReader.Read<GtXpRecord>("xp.txt");
@@ -371,6 +380,7 @@ namespace Game.DataStorage
#region Main Collections
public static DB6Storage<AchievementRecord> AchievementStorage;
public static DB6Storage<AnimationDataRecord> AnimationDataStorage;
public static DB6Storage<AnimKitRecord> AnimKitStorage;
public static DB6Storage<AreaGroupMemberRecord> AreaGroupMemberStorage;
public static DB6Storage<AreaTableRecord> AreaTableStorage;
@@ -409,6 +419,7 @@ namespace Game.DataStorage
public static DB6Storage<ChrSpecializationRecord> ChrSpecializationStorage;
public static DB6Storage<CinematicCameraRecord> CinematicCameraStorage;
public static DB6Storage<CinematicSequencesRecord> CinematicSequencesStorage;
public static DB6Storage<ContentTuningRecord> ContentTuningStorage;
public static DB6Storage<ConversationLineRecord> ConversationLineStorage;
public static DB6Storage<CreatureDisplayInfoRecord> CreatureDisplayInfoStorage;
public static DB6Storage<CreatureDisplayInfoExtraRecord> CreatureDisplayInfoExtraStorage;
@@ -428,6 +439,8 @@ namespace Game.DataStorage
public static DB6Storage<EmotesRecord> EmotesStorage;
public static DB6Storage<EmotesTextRecord> EmotesTextStorage;
public static DB6Storage<EmotesTextSoundRecord> EmotesTextSoundStorage;
public static DB6Storage<ExpectedStatRecord> ExpectedStatStorage;
public static DB6Storage<ExpectedStatModRecord> ExpectedStatModStorage;
public static DB6Storage<FactionRecord> FactionStorage;
public static DB6Storage<FactionTemplateRecord> FactionTemplateStorage;
public static DB6Storage<GameObjectsRecord> GameObjectsStorage;
@@ -512,6 +525,7 @@ namespace Game.DataStorage
public static DB6Storage<NamesProfanityRecord> NamesProfanityStorage;
public static DB6Storage<NamesReservedRecord> NamesReservedStorage;
public static DB6Storage<NamesReservedLocaleRecord> NamesReservedLocaleStorage;
public static DB6Storage<NumTalentsAtLevelRecord> NumTalentsAtLevelStorage;
public static DB6Storage<OverrideSpellDataRecord> OverrideSpellDataStorage;
public static DB6Storage<PhaseRecord> PhaseStorage;
public static DB6Storage<PhaseXPhaseGroupRecord> PhaseXPhaseGroupStorage;
@@ -521,9 +535,9 @@ namespace Game.DataStorage
public static DB6Storage<PrestigeLevelInfoRecord> PrestigeLevelInfoStorage;
public static DB6Storage<PvpDifficultyRecord> PvpDifficultyStorage;
public static DB6Storage<PvpItemRecord> PvpItemStorage;
public static DB6Storage<PvpRewardRecord> PvpRewardStorage;
public static DB6Storage<PvpTalentRecord> PvpTalentStorage;
public static DB6Storage<PvpTalentUnlockRecord> PvpTalentUnlockStorage;
public static DB6Storage<PvpTalentCategoryRecord> PvpTalentCategoryStorage;
public static DB6Storage<PvpTalentSlotUnlockRecord> PvpTalentSlotUnlockStorage;
public static DB6Storage<QuestFactionRewardRecord> QuestFactionRewardStorage;
public static DB6Storage<QuestMoneyRewardRecord> QuestMoneyRewardStorage;
public static DB6Storage<QuestPackageItemRecord> QuestPackageItemStorage;
@@ -535,7 +549,6 @@ namespace Game.DataStorage
public static DB6Storage<RewardPackXCurrencyTypeRecord> RewardPackXCurrencyTypeStorage;
public static DB6Storage<RewardPackXItemRecord> RewardPackXItemStorage;
public static DB6Storage<RulesetItemUpgradeRecord> RulesetItemUpgradeStorage;
public static DB6Storage<SandboxScalingRecord> SandboxScalingStorage;
public static DB6Storage<ScalingStatDistributionRecord> ScalingStatDistributionStorage;
public static DB6Storage<ScenarioRecord> ScenarioStorage;
public static DB6Storage<ScenarioStepRecord> ScenarioStepStorage;
@@ -548,7 +561,6 @@ namespace Game.DataStorage
public static DB6Storage<SkillRaceClassInfoRecord> SkillRaceClassInfoStorage;
public static DB6Storage<SoundKitRecord> SoundKitStorage;
public static DB6Storage<SpecializationSpellsRecord> SpecializationSpellsStorage;
public static DB6Storage<SpellRecord> SpellStorage;
public static DB6Storage<SpellAuraOptionsRecord> SpellAuraOptionsStorage;
public static DB6Storage<SpellAuraRestrictionsRecord> SpellAuraRestrictionsStorage;
public static DB6Storage<SpellCastTimesRecord> SpellCastTimesStorage;
@@ -567,6 +579,7 @@ namespace Game.DataStorage
public static DB6Storage<SpellLearnSpellRecord> SpellLearnSpellStorage;
public static DB6Storage<SpellLevelsRecord> SpellLevelsStorage;
public static DB6Storage<SpellMiscRecord> SpellMiscStorage;
public static DB6Storage<SpellNameRecord> SpellNameStorage;
public static DB6Storage<SpellPowerRecord> SpellPowerStorage;
public static DB6Storage<SpellPowerDifficultyRecord> SpellPowerDifficultyStorage;
public static DB6Storage<SpellProcsPerMinuteRecord> SpellProcsPerMinuteStorage;
@@ -594,14 +607,16 @@ namespace Game.DataStorage
public static DB6Storage<TransmogSetItemRecord> TransmogSetItemStorage;
public static DB6Storage<TransportAnimationRecord> TransportAnimationStorage;
public static DB6Storage<TransportRotationRecord> TransportRotationStorage;
public static DB6Storage<UiMapRecord> UiMapStorage;
public static DB6Storage<UiMapAssignmentRecord> UiMapAssignmentStorage;
public static DB6Storage<UiMapLinkRecord> UiMapLinkStorage;
public static DB6Storage<UiMapXMapArtRecord> UiMapXMapArtStorage;
public static DB6Storage<UnitPowerBarRecord> UnitPowerBarStorage;
public static DB6Storage<VehicleRecord> VehicleStorage;
public static DB6Storage<VehicleSeatRecord> VehicleSeatStorage;
public static DB6Storage<WMOAreaTableRecord> WMOAreaTableStorage;
public static DB6Storage<WorldEffectRecord> WorldEffectStorage;
public static DB6Storage<WorldMapAreaRecord> WorldMapAreaStorage;
public static DB6Storage<WorldMapOverlayRecord> WorldMapOverlayStorage;
public static DB6Storage<WorldMapTransformsRecord> WorldMapTransformsStorage;
public static DB6Storage<WorldSafeLocsRecord> WorldSafeLocsStorage;
#endregion
@@ -613,7 +628,6 @@ namespace Game.DataStorage
public static GameTable<GtBaseMPRecord> BaseMPGameTable;
public static GameTable<GtCombatRatingsRecord> CombatRatingsGameTable;
public static GameTable<GtCombatRatingsMultByILvlRecord> CombatRatingsMultByILvlGameTable;
public static GameTable<GtHonorLevelRecord> HonorLevelGameTable;
public static GameTable<GtHpPerStaRecord> HpPerStaGameTable;
public static GameTable<GtItemSocketCostPerLevelRecord> ItemSocketCostPerLevelGameTable;
public static GameTable<GtNpcDamageByClassRecord>[] NpcDamageByClassGameTable = new GameTable<GtNpcDamageByClassRecord>[(int)Expansion.Max];
@@ -697,6 +711,7 @@ namespace Game.DataStorage
case (int)Class.DemonHunter:
return row.DemonHunter;
case -1:
case -7:
return row.Item;
case -2:
return row.Consumable;
@@ -708,6 +723,8 @@ namespace Game.DataStorage
return row.Gem3;
case -6:
return row.Health;
case -8:
return row.DamageReplaceStat;
default:
break;
}
+112 -146
View File
@@ -69,7 +69,7 @@ namespace Game.DataStorage
int arrayLength = ColumnMeta[dataFieldIndex].ArraySize;
if (arrayLength > 1)
{
for (var arrayIndex = 0; arrayIndex < arrayLength; ++arrayIndex)
while (arrayLength > 0)
{
var fieldInfo = fieldsInfo[objectFieldIndex++];
if (fieldInfo.IsArray)
@@ -155,7 +155,6 @@ namespace Game.DataStorage
StringTable = null;
FieldStructure = null;
ColumnMeta = null;
RelationShipData = null;
}
static void ReadHeader(BinaryReader reader)
@@ -172,116 +171,29 @@ namespace Game.DataStorage
Header.MinId = reader.ReadInt32();
Header.MaxId = reader.ReadInt32();
Header.Locale = reader.ReadInt32();
Header.CopyTableSize = reader.ReadInt32();
Header.Flags = (HeaderFlags)reader.ReadUInt16();
Header.IdIndex = reader.ReadUInt16();
Header.TotalFieldCount = reader.ReadUInt32();
Header.BitpackedDataOffset = reader.ReadUInt32();
Header.LookupColumnCount = reader.ReadUInt32();
Header.OffsetTableOffset = reader.ReadUInt32();
Header.IdListSize = reader.ReadUInt32();
Header.ColumnMetaSize = reader.ReadUInt32();
Header.CommonDataSize = reader.ReadUInt32();
Header.PalletDataSize = reader.ReadUInt32();
Header.RelationshipDataSize = reader.ReadUInt32();
//Gather field structures
FieldStructure = new List<FieldStructureEntry>();
for (int i = 0; i < Header.FieldCount; i++)
{
var field = new FieldStructureEntry(reader.ReadInt16(), reader.ReadUInt16());
FieldStructure.Add(field);
}
Header.SectionsCount = reader.ReadUInt32();
}
static Dictionary<int, byte[]> ReadData(BinaryReader reader)
{
Dictionary<int, byte[]> CopyTable = new Dictionary<int, byte[]>();
List<Tuple<int, short>> offsetmap = new List<Tuple<int, short>>();
Dictionary<int, OffsetDuplicate> firstindex = new Dictionary<int, OffsetDuplicate>();
Dictionary<int, int> OffsetDuplicates = new Dictionary<int, int>();
Dictionary<int, List<int>> Copies = new Dictionary<int, List<int>>();
Dictionary<int, byte[]> records = new Dictionary<int, byte[]>();
bool hasOffsetTable = Header.HasOffsetTable();
bool hasIndexTable = Header.HasIndexTable();
var sections = reader.ReadArray<SectionHeader>(Header.SectionsCount);
byte[] recordData;
if (hasOffsetTable)
recordData = reader.ReadBytes((int)(Header.OffsetTableOffset - 84 - 4 * Header.FieldCount));
else
{
recordData = reader.ReadBytes((int)(Header.RecordCount * Header.RecordSize));
Array.Resize(ref recordData, recordData.Length + 8);
}
//Gather field structures
FieldStructure = reader.ReadArray<FieldMetaData>(Header.FieldCount);
if (Header.StringTableSize != 0)
{
// string data
StringTable = new Dictionary<int, string>();
for (int i = 0; i < Header.StringTableSize;)
{
long oldPos = reader.BaseStream.Position;
StringTable[i] = reader.ReadCString();
i += (int)(reader.BaseStream.Position - oldPos);
}
}
int[] m_indexes = null;
// OffsetTable
if (hasOffsetTable && Header.OffsetTableOffset > 0)
{
reader.BaseStream.Position = Header.OffsetTableOffset;
for (int i = 0; i < (Header.MaxId - Header.MinId + 1); i++)
{
int offset = reader.ReadInt32();
short length = reader.ReadInt16();
if (offset == 0 || length == 0)
continue;
// special case, may contain duplicates in the offset map that we don't want
if (Header.CopyTableSize == 0)
{
if (!firstindex.ContainsKey(offset))
firstindex.Add(offset, new OffsetDuplicate(offsetmap.Count, firstindex.Count));
else
OffsetDuplicates.Add(Header.MinId + i, firstindex[offset].VisibleIndex);
}
offsetmap.Add(new Tuple<int, short>(offset, length));
}
}
// IndexTable
if (hasIndexTable)
m_indexes = reader.ReadArray<int>(Header.RecordCount);
// Copytable
if (Header.CopyTableSize > 0)
{
long end = reader.BaseStream.Position + Header.CopyTableSize;
while (reader.BaseStream.Position < end)
{
int id = reader.ReadInt32();
int idcopy = reader.ReadInt32();
if (!Copies.ContainsKey(idcopy))
Copies.Add(idcopy, new List<int>());
Copies[idcopy].Add(id);
}
}
// ColumnMeta
// column meta data
ColumnMeta = new List<ColumnStructureEntry>();
if (Header.ColumnMetaSize != 0)
{
for (int i = 0; i < Header.FieldCount; i++)
{
var column = new ColumnStructureEntry()
@@ -303,7 +215,6 @@ namespace Game.DataStorage
ColumnMeta.Add(column);
}
}
// Pallet values
for (int i = 0; i < ColumnMeta.Count; i++)
@@ -330,10 +241,63 @@ namespace Game.DataStorage
}
}
// Relationships
if (Header.RelationshipDataSize > 0)
List<Tuple<int, int>> offsetmap = new List<Tuple<int, int>>();
bool hasIndexTable = Header.HasIndexTable();
byte[] recordData;
for (int sectionIndex = 0; sectionIndex < Header.SectionsCount; sectionIndex++)
{
RelationShipData = new RelationShipData()
reader.BaseStream.Position = sections[sectionIndex].FileOffset;
if (Header.HasOffsetTable())
{
// sparse data with inlined strings
recordData = reader.ReadBytes(sections[sectionIndex].SparseTableOffset - sections[sectionIndex].FileOffset);
// OffsetTable
for (int i = 0; i < (Header.MaxId - Header.MinId + 1); i++)
{
int offset = reader.ReadInt32();
int length = reader.ReadInt32();
offsetmap.Add(new Tuple<int, int>(offset, length));
}
}
else
{
// records data
recordData = reader.ReadBytes((int)(sections[sectionIndex].NumRecords * Header.RecordSize));
Array.Resize(ref recordData, recordData.Length + 8); // pad with extra zeros so we don't crash when reading
// string data
StringTable = new Dictionary<int, string>();
for (int i = 0; i < sections[sectionIndex].StringTableSize;)
{
int oldPos = (int)reader.BaseStream.Position;
StringTable[i] = reader.ReadCString();
i += (int)(reader.BaseStream.Position - oldPos);
}
}
// IndexTable
int[] m_indexes = reader.ReadArray<int>((uint)(sections[sectionIndex].IndexDataSize / 4));
// duplicate rows data
Dictionary<int, int> copyData = new Dictionary<int, int>();
for (int i = 0; i < sections[sectionIndex].CopyTableSize / 8; i++)
copyData[reader.ReadInt32()] = reader.ReadInt32();
// Relationships
RelationShipData relationShipData = null;
if (sections[sectionIndex].ParentLookupDataSize > 0)
{
relationShipData = new RelationShipData()
{
Records = reader.ReadUInt32(),
MinId = reader.ReadUInt32(),
@@ -341,29 +305,24 @@ namespace Game.DataStorage
Entries = new Dictionary<uint, byte[]>()
};
for (int i = 0; i < RelationShipData.Records; i++)
for (int i = 0; i < relationShipData.Records; i++)
{
byte[] foreignKey = reader.ReadBytes(4);
uint index = reader.ReadUInt32();
// has duplicates just like the copy table does... why?
if (!RelationShipData.Entries.ContainsKey(index))
RelationShipData.Entries.Add(index, foreignKey);
if (!relationShipData.Entries.ContainsKey(index))
relationShipData.Entries.Add(index, foreignKey);
}
}
// Record Data
for (int i = 0; i < Header.RecordCount; i++)
if (Header.HasOffsetTable() && hasIndexTable)
{
int id = 0;
if (hasOffsetTable && hasIndexTable)
for (int i = 0; i < Header.RecordCount; ++i)
{
id = m_indexes[CopyTable.Count];
int id = m_indexes[records.Count];
var map = offsetmap[i];
if (Header.CopyTableSize == 0 && firstindex[map.Item1].HiddenIndex != i) // ignore duplicates
continue;
reader.BaseStream.Position = map.Item1;
byte[] data = reader.ReadBytes(map.Item2);
@@ -371,32 +330,31 @@ namespace Game.DataStorage
IEnumerable<byte> recordbytes = data;
// append relationship id
if (RelationShipData != null)
if (relationShipData != null)
{
// seen cases of missing indicies
if (RelationShipData.Entries.TryGetValue((uint)i, out byte[] foreignData))
if (relationShipData.Entries.TryGetValue((uint)i, out byte[] foreignData))
recordbytes = recordbytes.Concat(foreignData);
else
recordbytes = recordbytes.Concat(new byte[4]);
}
CopyTable.Add(id, recordbytes.ToArray());
if (Copies.ContainsKey(id))
{
foreach (int copy in Copies[id])
CopyTable.Add(copy, data.ToArray());
records.Add(id, recordbytes.ToArray());
}
}
else
{
BitReader bitReader = new BitReader(recordData);
for (int i = 0; i < Header.RecordCount; ++i)
{
bitReader.Position = 0;
bitReader.Offset = i * (int)Header.RecordSize;
MemoryStream stream = new MemoryStream();
BinaryWriter binaryWriter = new BinaryWriter(stream);
if (hasIndexTable)
int id = 0;
if (sections[sectionIndex].IndexDataSize != 0)
id = m_indexes[i];
for (int f = 0; f < Header.FieldCount; f++)
@@ -420,6 +378,7 @@ namespace Game.DataStorage
break;
case DB2ColumnCompression.Immediate:
case DB2ColumnCompression.SignedImmediate:
if (!hasIndexTable && f == Header.IdIndex)
{
id = (int)bitReader.ReadUInt32(bitWidth);// always read Ids as ints
@@ -427,7 +386,7 @@ namespace Game.DataStorage
continue;
}
else
binaryWriter.Write(bitReader.ReadValue(bitWidth, ColumnMeta[f].BitOffset, ColumnMeta[f].Cardinality == 1));
binaryWriter.Write(bitReader.ReadValue(bitWidth, ColumnMeta[f].BitOffset, ColumnMeta[f].CompressionType == DB2ColumnCompression.SignedImmediate));
break;
case DB2ColumnCompression.CommonData:
@@ -449,29 +408,27 @@ namespace Game.DataStorage
}
// append relationship id
if (RelationShipData != null)
if (relationShipData != null)
{
// seen cases of missing indicies
if (RelationShipData.Entries.TryGetValue((uint)i, out byte[] foreignData))
if (relationShipData.Entries.TryGetValue((uint)i, out byte[] foreignData))
binaryWriter.Write(foreignData);
else
binaryWriter.Write(0);
}
CopyTable.Add(id, stream.ToArray());
if (Copies.ContainsKey(id))
{
foreach (int copy in Copies[id])
{
byte[] newrecord = CopyTable[id].ToArray();
CopyTable.Add(copy, newrecord);
}
}
records.Add(id, stream.ToArray());
}
}
return CopyTable;
foreach (var copyRow in copyData)
{
byte[] newrecord = records[copyRow.Value].ToArray();
records.Add(copyRow.Key, newrecord);
}
}
return records;
}
static Dictionary<Type, int> bytecounts = new Dictionary<Type, int>()
@@ -493,13 +450,13 @@ namespace Game.DataStorage
return 4 - bytecounts[type];
}
static FieldStructureEntry[] GetBits()
static FieldMetaData[] GetBits()
{
List<FieldStructureEntry> bits = new List<FieldStructureEntry>();
List<FieldMetaData> bits = new List<FieldMetaData>();
for (int i = 0; i < ColumnMeta.Count; i++)
{
short bitcount = (short)(FieldStructure[i].BitCount == 64 ? FieldStructure[i].BitCount : 0); // force bitcounts
bits.Add(new FieldStructureEntry(bitcount, 0));
bits.Add(new FieldMetaData(bitcount, 0));
}
return bits.ToArray();
@@ -619,9 +576,8 @@ namespace Game.DataStorage
static DB6Header Header;
static Dictionary<int, string> StringTable;
static List<FieldStructureEntry> FieldStructure;
static FieldMetaData[] FieldStructure;
static List<ColumnStructureEntry> ColumnMeta;
static RelationShipData RelationShipData;
}
public struct DB6FieldInfo
@@ -680,25 +636,21 @@ namespace Game.DataStorage
public int MinId;
public int MaxId;
public int Locale;
public int CopyTableSize;
public HeaderFlags Flags;
public int IdIndex;
public uint TotalFieldCount;
public uint BitpackedDataOffset;
public uint LookupColumnCount;
public uint OffsetTableOffset;
public uint IdListSize;
public uint ColumnMetaSize;
public uint CommonDataSize;
public uint PalletDataSize;
public uint RelationshipDataSize;
public uint SectionsCount;
}
public class FieldStructureEntry
public struct FieldMetaData
{
public short Bits;
public ushort Offset;
public int Length = 1;
public int ByteCount
{
@@ -720,7 +672,7 @@ namespace Game.DataStorage
}
}
public FieldStructureEntry(short bits, ushort offset)
public FieldMetaData(short bits, ushort offset)
{
Bits = bits;
Offset = offset;
@@ -742,6 +694,19 @@ namespace Game.DataStorage
public int ArraySize { get; set; } = 1;
}
public struct SectionHeader
{
public int unk1;
public int unk2;
public int FileOffset;
public int NumRecords;
public int StringTableSize;
public int CopyTableSize;
public int SparseTableOffset; // CatalogDataOffset, absolute value, {uint offset, ushort size}[MaxId - MinId + 1]
public int IndexDataSize; // int indexData[IndexDataSize / 4]
public int ParentLookupDataSize; // uint NumRecords, uint minId, uint maxId, {uint id, uint index}[NumRecords], questionable usefulness...
}
public class RelationShipData
{
public uint Records;
@@ -790,7 +755,8 @@ namespace Game.DataStorage
Immediate,
CommonData,
Pallet,
PalletArray
PalletArray,
SignedImmediate
}
[Flags]
@@ -158,7 +158,7 @@ namespace Game.DataStorage
Log.outInfo(LogFilter.ServerLoading, "Loaded 0 Conversation actors. DB table `conversation_actors` is empty.");
}
SQLResult templateResult = DB.World.Query("SELECT Id, FirstLineId, LastLineEndTime, ScriptName FROM conversation_template");
SQLResult templateResult = DB.World.Query("SELECT Id, FirstLineId, LastLineEndTime, TextureKitId, ScriptName FROM conversation_template");
if (!templateResult.IsEmpty())
{
uint oldMSTime = Time.GetMSTime();
@@ -169,6 +169,7 @@ namespace Game.DataStorage
conversationTemplate.Id = templateResult.Read<uint>(0);
conversationTemplate.FirstLineId = templateResult.Read<uint>(1);
conversationTemplate.LastLineEndTime = templateResult.Read<uint>(2);
conversationTemplate.TextureKitId = templateResult.Read<uint>(3);
conversationTemplate.ScriptId = Global.ObjectMgr.GetScriptId(templateResult.Read<string>(3));
conversationTemplate.Actors = actorsByConversation[conversationTemplate.Id].ToList();
@@ -236,6 +237,7 @@ namespace Game.DataStorage
public uint Id;
public uint FirstLineId; // Link to ConversationLine.db2
public uint LastLineEndTime; // Time in ms after conversation creation the last line fades out
public uint TextureKitId; // Background texture
public uint ScriptId;
public List<ConversationActorTemplate> Actors = new List<ConversationActorTemplate>();
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -156,7 +156,7 @@ namespace Game.DataStorage
}
}
FlyByCameraStorage[dbcentry.ID] = cameras;
FlyByCameraStorage[dbcentry.Id] = cameras;
}
public static void LoadM2Cameras(string dataPath)
+84 -75
View File
@@ -23,21 +23,30 @@ namespace Game.DataStorage
{
public class AchievementRecord
{
public string Title;
public string Description;
public string Title;
public string Reward;
public AchievementFlags Flags;
public uint Id;
public short InstanceID;
public AchievementFaction Faction;
public ushort Supercedes;
public ushort Category;
public ushort UiOrder;
public ushort SharesCriteria;
public AchievementFaction Faction;
public byte Points;
public byte MinimumCriteria;
public uint Id;
public byte Points;
public AchievementFlags Flags;
public ushort UiOrder;
public uint IconFileID;
public ushort CriteriaTree;
public uint CriteriaTree;
public ushort SharesCriteria;
}
public sealed class AnimationDataRecord
{
public uint Id;
public ushort Fallback;
public byte BehaviorTier;
public int BehaviorID;
public int[] Flags = new int[2];
}
public sealed class AnimKitRecord
@@ -60,27 +69,27 @@ namespace Game.DataStorage
public uint Id;
public string ZoneName;
public LocalizedString AreaName;
public AreaFlags[] Flags = new AreaFlags[2];
public float AmbientMultiplier;
public ushort ContinentID;
public ushort ParentAreaID;
public short AreaBit;
public ushort AmbienceID;
public ushort ZoneMusic;
public ushort IntroSound;
public ushort[] LiquidTypeID = new ushort[4];
public ushort UwZoneMusic;
public ushort UwAmbience;
public ushort PvpCombastWorldStateID;
public byte SoundProviderPref;
public byte SoundProviderPrefUnderwater;
public ushort AmbienceID;
public ushort UwAmbience;
public ushort ZoneMusic;
public ushort UwZoneMusic;
public byte ExplorationLevel;
public ushort IntroSound;
public byte UwIntroSound;
public byte FactionGroupMask;
public float AmbientMultiplier;
public byte MountFlags;
public ushort PvpCombastWorldStateID;
public byte WildBattlePetLevelMin;
public byte WildBattlePetLevelMax;
public byte WindSettingsID;
public byte UwIntroSound;
public AreaFlags[] Flags = new AreaFlags[2];
public ushort[] LiquidTypeID = new ushort[4];
public bool IsSanctuary()
{
@@ -94,20 +103,20 @@ namespace Game.DataStorage
public sealed class AreaTriggerRecord
{
public Vector3 Pos;
public uint Id;
public ushort ContinentID;
public sbyte PhaseUseFlags;
public ushort PhaseID;
public ushort PhaseGroupID;
public float Radius;
public float BoxLength;
public float BoxWidth;
public float BoxHeight;
public float BoxYaw;
public ushort ContinentID;
public ushort PhaseID;
public ushort PhaseGroupID;
public ushort ShapeID;
public ushort AreaTriggerActionSetID;
public byte PhaseUseFlags;
public byte ShapeType;
public byte Flags;
public uint Id;
public sbyte ShapeType;
public short ShapeID;
public short AreaTriggerActionSetID;
public sbyte Flags;
}
public sealed class ArmorLocationRecord
@@ -122,67 +131,67 @@ namespace Game.DataStorage
public sealed class ArtifactRecord
{
public uint Id;
public string Name;
public uint UiBarOverlayColor;
public uint UiBarBackgroundColor;
public uint UiNameColor;
public uint Id;
public ushort UiTextureKitID;
public int UiNameColor;
public int UiBarOverlayColor;
public int UiBarBackgroundColor;
public ushort ChrSpecializationID;
public byte ArtifactCategoryID;
public byte Flags;
public byte UiModelSceneID;
public byte ArtifactCategoryID;
public uint UiModelSceneID;
public uint SpellVisualKitID;
}
public sealed class ArtifactAppearanceRecord
{
public string Name;
public uint UiSwatchColor;
public uint Id;
public ushort ArtifactAppearanceSetID;
public byte DisplayIndex;
public uint UnlockPlayerConditionID;
public byte ItemAppearanceModifierID;
public int UiSwatchColor;
public float UiModelSaturation;
public float UiModelOpacity;
public uint OverrideShapeshiftDisplayID;
public ushort ArtifactAppearanceSetID;
public ushort UiCameraID;
public byte DisplayIndex;
public byte ItemAppearanceModifierID;
public byte Flags;
public byte OverrideShapeshiftFormID;
public uint Id;
public ushort UnlockPlayerConditionID;
public byte UiItemAppearanceID;
public byte UiAltItemAppearanceID;
public uint OverrideShapeshiftDisplayID;
public uint UiItemAppearanceID;
public uint UiAltItemAppearanceID;
public byte Flags;
public ushort UiCameraID;
}
public sealed class ArtifactAppearanceSetRecord
{
public string Name;
public string Description;
public uint Id;
public byte DisplayIndex;
public ushort UiCameraID;
public ushort AltHandUICameraID;
public byte DisplayIndex;
public byte ForgeAttachmentOverride;
public sbyte ForgeAttachmentOverride;
public byte Flags;
public uint Id;
public uint ArtifactID;
public byte ArtifactID;
}
public sealed class ArtifactCategoryRecord
{
public uint Id;
public ushort XpMultCurrencyID;
public ushort XpMultCurveID;
public short XpMultCurrencyID;
public short XpMultCurveID;
}
public sealed class ArtifactPowerRecord
{
public Vector2 Pos;
public byte ArtifactID;
public ArtifactPowerFlag Flags;
public byte MaxPurchasableRank;
public byte Tier;
public Vector2 DisplayPos;
public uint Id;
public byte Label;
public byte ArtifactID;
public byte MaxPurchasableRank;
public int Label;
public ArtifactPowerFlag Flags;
public byte Tier;
}
public sealed class ArtifactPowerLinkRecord
@@ -195,17 +204,17 @@ namespace Game.DataStorage
public sealed class ArtifactPowerPickerRecord
{
public uint Id;
public ushort PlayerConditionID;
public uint PlayerConditionID;
}
public sealed class ArtifactPowerRankRecord
{
public uint Id;
public uint SpellID;
public float AuraPointsOverride;
public ushort ItemBonusListID;
public byte RankIndex;
public uint ArtifactPowerID;
public uint SpellID;
public ushort ItemBonusListID;
public float AuraPointsOverride;
public ushort ArtifactPowerID;
}
public sealed class ArtifactQuestXPRecord
@@ -214,31 +223,31 @@ namespace Game.DataStorage
public uint[] Difficulty = new uint[10];
}
public class ArtifactTierRecord
public sealed class ArtifactTierRecord
{
public uint ID;
public byte ArtifactTier;
public byte MaxNumTraits;
public byte MaxArtifactKnowledge;
public byte KnowledgePlayerCondition;
public byte MinimumEmpowerKnowledge;
public uint Id;
public uint ArtifactTier;
public uint MaxNumTraits;
public uint MaxArtifactKnowledge;
public uint KnowledgePlayerCondition;
public uint MinimumEmpowerKnowledge;
}
public class ArtifactUnlockRecord
public sealed class ArtifactUnlockRecord
{
public uint ID;
public ushort ItemBonusListID;
public byte PowerRank;
public uint Id;
public uint PowerID;
public ushort PlayerConditionID;
public uint ArtifactID;
public byte PowerRank;
public ushort ItemBonusListID;
public uint PlayerConditionID;
public byte ArtifactID;
}
public sealed class AuctionHouseRecord
{
public uint Id;
public string Name;
public ushort FactionID;
public ushort FactionID; // id of faction.dbc for player factions associated with city
public byte DepositRate;
public byte ConsignmentRate;
}
+37 -36
View File
@@ -23,24 +23,24 @@ namespace Game.DataStorage
public uint Cost;
}
public sealed class BannedAddOnsRecord
public sealed class BannedAddonsRecord
{
public uint Id;
public string Name;
public string Version;
public byte[] Flags = new byte[4];
public byte Flags;
}
public sealed class BarberShopStyleRecord
{
public string DisplayName;
public string Description;
public uint Id;
public byte Type; // value 0 -> hair, value 2 -> facialhair
public float CostModifier;
public byte Type;
public byte Race;
public byte Sex;
public byte Data;
public uint Id;
public byte Data; // real ID to hair/facial hair
}
public sealed class BattlePetBreedQualityRecord
@@ -53,32 +53,32 @@ namespace Game.DataStorage
public sealed class BattlePetBreedStateRecord
{
public uint Id;
public ushort Value;
public byte BattlePetStateID;
public uint BattlePetBreedID;
public ushort Value;
public byte BattlePetBreedID;
}
public sealed class BattlePetSpeciesRecord
{
public string SourceText;
public string Description;
public uint CreatureID;
public uint IconFileDataID;
public uint SummonSpellID;
public ushort Flags;
public byte PetTypeEnum;
public sbyte SourceTypeEnum;
public string SourceText;
public uint Id;
public byte CardUIModelSceneID;
public byte LoadoutUIModelSceneID;
public uint CreatureID;
public uint SummonSpellID;
public int IconFileDataID;
public byte PetTypeEnum;
public ushort Flags;
public sbyte SourceTypeEnum;
public int CardUIModelSceneID;
public int LoadoutUIModelSceneID;
}
public sealed class BattlePetSpeciesStateRecord
{
public uint Id;
public int Value;
public byte BattlePetStateID;
public uint BattlePetSpeciesID;
public int Value;
public ushort BattlePetSpeciesID;
}
public sealed class BattlemasterListRecord
@@ -88,32 +88,33 @@ namespace Game.DataStorage
public string GameType;
public string ShortDescription;
public string LongDescription;
public int IconFileDataID;
public short[] MapId = new short[16];
public sbyte InstanceType;
public sbyte MinLevel;
public sbyte MaxLevel;
public sbyte RatedPlayers;
public sbyte MinPlayers;
public sbyte MaxPlayers;
public sbyte GroupsAllowed;
public sbyte MaxGroupSize;
public ushort HolidayWorldState;
public ushort RequiredPlayerConditionID;
public byte InstanceType;
public byte GroupsAllowed;
public byte MaxGroupSize;
public byte MinLevel;
public byte MaxLevel;
public byte RatedPlayers;
public byte MinPlayers;
public byte MaxPlayers;
public byte Flags;
public sbyte Flags;
public int IconFileDataID;
public short RequiredPlayerConditionID;
public short[] MapId = new short[16];
}
public sealed class BroadcastTextRecord
{
public uint Id;
public LocalizedString Text;
public LocalizedString Text1;
public uint Id;
public byte LanguageID;
public int ConditionID;
public ushort EmotesID;
public byte Flags;
public uint ChatBubbleDurationMs;
public uint[] SoundEntriesID = new uint[2];
public ushort[] EmoteID = new ushort[3];
public ushort[] EmoteDelay = new ushort[3];
public ushort EmotesID;
public byte LanguageID;
public byte Flags;
public uint ConditionID;
public uint[] SoundEntriesID = new uint[2];
}
}
+139 -108
View File
@@ -20,9 +20,19 @@ using Framework.GameMath;
namespace Game.DataStorage
{
public sealed class Cfg_RegionsRecord
{
public uint Id;
public string Tag;
public ushort RegionID;
public uint Raidorigin; // Date of first raid reset, all other resets are calculated as this date plus interval
public byte RegionGroupMask;
public uint ChallengeOrigin;
}
public sealed class CharacterFacialHairStylesRecord
{
public uint ID;
public uint Id;
public int[] Geoset = new int[5];
public byte RaceID;
public byte SexID;
@@ -31,34 +41,34 @@ namespace Game.DataStorage
public sealed class CharBaseSectionRecord
{
public uint ID;
public uint Id;
public byte LayoutResType;
public CharBaseSectionVariation VariationEnum;
public byte ResolutionVariationEnum;
public byte LayoutResType;
}
public sealed class CharSectionsRecord
{
public uint Id;
public uint[] MaterialResourcesID = new uint[3];
public short Flags;
public byte RaceID;
public byte SexID;
public byte BaseSection;
public sbyte BaseSection;
public byte VariationIndex;
public byte ColorIndex;
public short Flags;
public int[] MaterialResourcesID = new int[3];
}
public sealed class CharStartOutfitRecord
{
public uint Id;
public int[] ItemID = new int[24];
public uint PetDisplayID;
public byte ClassID;
public byte SexID;
public byte OutfitID;
public byte PetFamilyID;
public uint RaceID;
public uint PetDisplayID; // Pet Model ID for starting pet
public byte PetFamilyID; // Pet Family Entry for starting pet
public int[] ItemID = new int[24];
public byte RaceID;
}
public sealed class CharTitlesRecord
@@ -81,75 +91,83 @@ namespace Game.DataStorage
public sealed class ChrClassesRecord
{
public string PetNameToken;
public LocalizedString Name;
public string NameFemale;
public string Filename;
public string NameMale;
public uint FileName;
public string NameFemale;
public string PetNameToken;
public uint Id;
public uint CreateScreenFileDataID;
public uint SelectScreenFileDataID;
public uint LowResScreenFileDataID;
public uint IconFileDataID;
public uint LowResScreenFileDataID;
public int StartingLevel;
public ushort Flags;
public ushort CinematicSequenceID;
public ushort DefaultSpec;
public PowerType DisplayPower;
public byte SpellClassSet;
public byte AttackPowerPerStrength;
public byte AttackPowerPerAgility;
public byte RangedAttackPowerPerAgility;
public byte PrimaryStatPriority;
public uint Id;
public PowerType DisplayPower;
public byte RangedAttackPowerPerAgility;
public byte AttackPowerPerAgility;
public byte AttackPowerPerStrength;
public byte SpellClassSet;
}
public sealed class ChrClassesXPowerTypesRecord
{
public uint Id;
public byte PowerType;
public uint ClassID;
public sbyte PowerType;
public byte ClassID;
}
public sealed class ChrRacesRecord
{
public uint ClientPrefix;
public uint ClientFileString;
public string ClientPrefix;
public string ClientFileString;
public LocalizedString Name;
public string NameFemale;
public string NameLowercase;
public string NameFemaleLowercase;
public uint Id;
public int Flags;
public uint MaleDisplayId;
public uint FemaleDisplayId;
public uint HighResMaleDisplayId;
public uint HighResFemaleDisplayId;
public int CreateScreenFileDataID;
public int SelectScreenFileDataID;
public float[] MaleCustomizeOffset = new float[3];
public float[] FemaleCustomizeOffset = new float[3];
public int LowResScreenFileDataID;
public uint[] AlteredFormStartVisualKitID = new uint[3];
public uint[] AlteredFormFinishVisualKitID = new uint[3];
public int HeritageArmorAchievementID;
public int StartingLevel;
public int UiDisplayOrder;
public int FemaleSkeletonFileDataID;
public int MaleSkeletonFileDataID;
public int HelmVisFallbackRaceID;
public ushort FactionID;
public ushort CinematicSequenceID;
public short ResSicknessSpellID;
public short SplashSoundID;
public ushort CinematicSequenceID;
public sbyte BaseLanguage;
public sbyte CreatureType;
public sbyte Alliance;
public sbyte RaceRelated;
public sbyte UnalteredVisualRaceID;
public sbyte CharComponentTextureLayoutID;
public sbyte CharComponentTexLayoutHiResID;
public sbyte DefaultClassID;
public sbyte NeutralRaceID;
public sbyte DisplayRaceID;
public sbyte CharComponentTexLayoutHiResID;
public uint Id;
public uint HighResMaleDisplayId;
public uint HighResFemaleDisplayId;
public int HeritageArmorAchievementID;
public int MaleSkeletonFileDataID;
public int FemaleSkeletonFileDataID;
public uint[] AlteredFormStartVisualKitID = new uint[3];
public uint[] AlteredFormFinishVisualKitID = new uint[3];
public sbyte MaleModelFallbackRaceID;
public sbyte MaleModelFallbackSex;
public sbyte FemaleModelFallbackRaceID;
public sbyte FemaleModelFallbackSex;
public sbyte MaleTextureFallbackRaceID;
public sbyte MaleTextureFallbackSex;
public sbyte FemaleTextureFallbackRaceID;
public sbyte FemaleTextureFallbackSex;
}
public sealed class ChrSpecializationRecord
@@ -157,16 +175,16 @@ namespace Game.DataStorage
public string Name;
public string FemaleName;
public string Description;
public uint[] MasterySpellID = new uint[PlayerConst.MaxMasterySpells];
public uint Id;
public byte ClassID;
public byte OrderIndex;
public byte PetTalentType;
public byte Role;
public byte PrimaryStatPriority;
public uint Id;
public int SpellIconFileID;
public sbyte PetTalentType;
public sbyte Role;
public ChrSpecializationFlag Flags;
public int SpellIconFileID;
public sbyte PrimaryStatPriority;
public int AnimReplacements;
public uint[] MasterySpellID = new uint[PlayerConst.MaxMasterySpells];
public bool IsPetSpecialization()
{
@@ -176,11 +194,11 @@ namespace Game.DataStorage
public sealed class CinematicCameraRecord
{
public uint ID;
public uint SoundID;
public Vector3 Origin;
public float OriginFacing;
public uint FileDataID;
public uint Id;
public Vector3 Origin; // Position in map used for basis for M2 co-ordinates
public uint SoundID; // Sound ID (voiceover for cinematic)
public float OriginFacing; // Orientation in map used for basis for M2 co
public uint FileDataID; // Model
}
public sealed class CinematicSequencesRecord
@@ -190,6 +208,16 @@ namespace Game.DataStorage
public ushort[] Camera = new ushort[8];
}
public sealed class ContentTuningRecord
{
public uint Id;
public int MinLevel;
public int MaxLevel;
public int Flags;
public int ExpectedStatModID;
public int DifficultyESMID;
}
public sealed class ConversationLineRecord
{
public uint Id;
@@ -206,45 +234,47 @@ namespace Game.DataStorage
public sealed class CreatureDisplayInfoRecord
{
public uint Id;
public float CreatureModelScale;
public ushort ModelID;
public ushort NPCSoundID;
public byte SizeClass;
public byte Flags;
public sbyte Gender;
public uint ExtendedDisplayInfoID;
public uint PortraitTextureFileDataID;
public byte CreatureModelAlpha;
public ushort SoundID;
public float PlayerOverrideScale;
public uint PortraitCreatureDisplayInfoID;
public sbyte SizeClass;
public float CreatureModelScale;
public byte CreatureModelAlpha;
public byte BloodID;
public int ExtendedDisplayInfoID;
public ushort NPCSoundID;
public ushort ParticleColorID;
public uint CreatureGeosetData;
public int PortraitCreatureDisplayInfoID;
public int PortraitTextureFileDataID;
public ushort ObjectEffectPackageID;
public ushort AnimReplacementSetID;
public sbyte UnarmedWeaponType;
public uint StateSpellVisualKitID;
public byte Flags;
public int StateSpellVisualKitID;
public float PlayerOverrideScale;
public float PetInstanceScale; // scale of not own player pets inside dungeons/raids/scenarios
public uint MountPoofSpellVisualKitID;
public uint[] TextureVariationFileDataID = new uint[3];
public sbyte UnarmedWeaponType;
public int MountPoofSpellVisualKitID;
public int DissolveEffectID;
public sbyte Gender;
public int DissolveOutEffectID;
public sbyte CreatureModelMinLod;
public int[] TextureVariationFileDataID = new int[3];
}
public sealed class CreatureDisplayInfoExtraRecord
{
public uint Id;
public uint BakeMaterialResourcesID;
public uint HDBakeMaterialResourcesID;
public byte DisplayRaceID;
public byte DisplaySexID;
public byte DisplayClassID;
public byte SkinID;
public byte FaceID;
public byte HairStyleID;
public byte HairColorID;
public byte FacialHairID;
public sbyte DisplayRaceID;
public sbyte DisplaySexID;
public sbyte DisplayClassID;
public sbyte SkinID;
public sbyte FaceID;
public sbyte HairStyleID;
public sbyte HairColorID;
public sbyte FacialHairID;
public sbyte Flags;
public int BakeMaterialResourcesID;
public int HDBakeMaterialResourcesID;
public byte[] CustomDisplayOption = new byte[3];
public byte Flags;
}
public sealed class CreatureFamilyRecord
@@ -252,46 +282,46 @@ namespace Game.DataStorage
public uint Id;
public LocalizedString Name;
public float MinScale;
public sbyte MinScaleLevel;
public float MaxScale;
public uint IconFileID;
public ushort[] SkillLine = new ushort[2];
public sbyte MaxScaleLevel;
public ushort PetFoodMask;
public byte MinScaleLevel;
public byte MaxScaleLevel;
public byte PetTalentType;
public sbyte PetTalentType;
public int IconFileID;
public short[] SkillLine = new short[2];
}
public sealed class CreatureModelDataRecord
{
public uint Id;
public float ModelScale;
public float[] GeoBox = new float[6];
public uint Flags;
public uint FileDataID;
public uint BloodID;
public uint FootprintTextureID;
public float FootprintTextureLength;
public float FootprintTextureWidth;
public float FootprintParticleScale;
public uint FoleyMaterialID;
public uint FootstepCameraEffectID;
public uint DeathThudCameraEffectID;
public uint SoundID;
public uint SizeClass;
public float CollisionWidth;
public float CollisionHeight;
public float MountHeight;
public float[] GeoBox = new float[6];
public float WorldEffectScale;
public uint CreatureGeosetDataID;
public float HoverHeight;
public float AttachedEffectScale;
public float ModelScale;
public float MissileCollisionRadius;
public float MissileCollisionPush;
public float MissileCollisionRaise;
public float MountHeight;
public float OverrideLootEffectScale;
public float OverrideNameScale;
public float OverrideSelectionRadius;
public float TamedPetBaseScale;
public float HoverHeight;
public uint Flags;
public uint FileDataID;
public byte SizeClass;
public uint BloodID;
public byte FootprintTextureID;
public byte FoleyMaterialID;
public byte FootstepCameraEffectID;
public byte DeathThudCameraEffectID;
public uint SoundID;
public uint CreatureGeosetDataID;
}
public sealed class CreatureTypeRecord
@@ -304,16 +334,16 @@ namespace Game.DataStorage
public sealed class CriteriaRecord
{
public uint Id;
public uint Asset;
public uint StartAsset;
public uint FailAsset;
public uint ModifierTreeId;
public ushort StartTimer;
public ushort EligibilityWorldStateID;
public CriteriaTypes Type;
public uint Asset;
public uint ModifierTreeId;
public CriteriaTimedTypes StartEvent;
public uint StartAsset;
public ushort StartTimer;
public byte FailEvent;
public uint FailAsset;
public byte Flags;
public ushort EligibilityWorldStateID;
public byte EligibilityWorldStateValue;
}
@@ -321,12 +351,12 @@ namespace Game.DataStorage
{
public uint Id;
public string Description;
public uint Parent;
public uint Amount;
public CriteriaTreeFlags Flags;
public byte Operator;
public ushort CriteriaID;
public ushort Parent;
public sbyte Operator;
public uint CriteriaID;
public int OrderIndex;
public CriteriaTreeFlags Flags;
}
public sealed class CurrencyTypesRecord
@@ -334,19 +364,20 @@ namespace Game.DataStorage
public uint Id;
public string Name;
public string Description;
public byte CategoryID;
public int InventoryIconFileID;
public uint SpellWeight;
public byte SpellCategory;
public uint MaxQty;
public uint MaxEarnablePerWeek;
public CurrencyFlags Flags;
public byte CategoryID;
public byte SpellCategory;
public byte Quality;
public uint InventoryIconFileID;
public uint SpellWeight;
public uint Flags;
public sbyte Quality;
public int FactionID;
}
public sealed class CurveRecord
{
public uint ID;
public uint Id;
public byte Type;
public byte Flags;
}
+30 -30
View File
@@ -22,59 +22,59 @@ namespace Game.DataStorage
public sealed class DestructibleModelDataRecord
{
public uint Id;
public ushort State0Wmo;
public ushort State1Wmo;
public ushort State2Wmo;
public ushort State3Wmo;
public ushort HealEffectSpeed;
public byte State0ImpactEffectDoodadSet;
public sbyte State0ImpactEffectDoodadSet;
public byte State0AmbientDoodadSet;
public byte State0NameSet;
public byte State1DestructionDoodadSet;
public byte State1ImpactEffectDoodadSet;
public ushort State1Wmo;
public sbyte State1DestructionDoodadSet;
public sbyte State1ImpactEffectDoodadSet;
public byte State1AmbientDoodadSet;
public byte State1NameSet;
public byte State2DestructionDoodadSet;
public byte State2ImpactEffectDoodadSet;
public ushort State2Wmo;
public sbyte State2DestructionDoodadSet;
public sbyte State2ImpactEffectDoodadSet;
public byte State2AmbientDoodadSet;
public byte State2NameSet;
public ushort State3Wmo;
public byte State3InitDoodadSet;
public byte State3AmbientDoodadSet;
public byte State3NameSet;
public byte EjectDirection;
public byte DoNotHighlight;
public ushort State0Wmo;
public byte HealEffect;
public ushort HealEffectSpeed;
public byte State0NameSet;
public byte State1NameSet;
public byte State2NameSet;
public byte State3NameSet;
}
public sealed class DifficultyRecord
{
public uint Id;
public string Name;
public MapTypes InstanceType;
public byte OrderIndex;
public sbyte OldEnumValue;
public byte FallbackDifficultyID;
public byte MinPlayers;
public byte MaxPlayers;
public DifficultyFlags Flags;
public byte ItemContext;
public byte ToggleDifficultyID;
public ushort GroupSizeHealthCurveID;
public ushort GroupSizeDmgCurveID;
public ushort GroupSizeSpellPointsCurveID;
public byte FallbackDifficultyID;
public MapTypes InstanceType;
public byte MinPlayers;
public byte MaxPlayers;
public sbyte OldEnumValue;
public DifficultyFlags Flags;
public byte ToggleDifficultyID;
public byte ItemContext;
public byte OrderIndex;
}
public sealed class DungeonEncounterRecord
{
public LocalizedString Name;
public uint CreatureDisplayID;
public ushort MapID;
public byte DifficultyID;
public byte Bit;
public byte Flags;
public uint Id;
public uint OrderIndex;
public uint SpellIconFileID;
public short MapID;
public sbyte DifficultyID;
public int OrderIndex;
public sbyte Bit;
public int CreatureDisplayID;
public byte Flags;
public int SpellIconFileID;
}
public sealed class DurabilityCostsRecord
+38 -8
View File
@@ -21,30 +21,60 @@ namespace Game.DataStorage
{
public uint Id;
public long RaceMask;
public uint EmoteSlashCommand;
public string EmoteSlashCommand;
public int AnimId;
public uint EmoteFlags;
public uint SpellVisualKitID;
public ushort AnimID;
public byte EmoteSpecProc;
public uint EmoteSpecProcParam;
public uint EventSoundID;
public uint SpellVisualKitId;
public int ClassMask;
public byte EmoteSpecProcParam;
public ushort EmoteSoundID;
}
public sealed class EmotesTextRecord
{
public uint Id;
public string Name;
public ushort EmoteID;
public ushort EmoteId;
}
public sealed class EmotesTextSoundRecord
{
public uint Id;
public byte RaceId;
public byte SexId;
public byte ClassId;
public byte SexId;
public uint SoundId;
public uint EmotesTextId;
public ushort EmotesTextId;
}
public sealed class ExpectedStatRecord
{
public uint Id;
public int ExpansionID;
public float CreatureHealth;
public float PlayerHealth;
public float CreatureAutoAttackDps;
public float CreatureArmor;
public float PlayerMana;
public float PlayerPrimaryStat;
public float PlayerSecondaryStat;
public float ArmorConstant;
public float CreatureSpellDamage;
public uint Lvl;
}
public sealed class ExpectedStatModRecord
{
public uint Id;
public float CreatureHealthMod;
public float PlayerHealthMod;
public float CreatureAutoAttackDPSMod;
public float CreatureArmorMod;
public float PlayerManaMod;
public float PlayerPrimaryStatMod;
public float PlayerSecondaryStatMod;
public float ArmorConstantMod;
public float CreatureSpellDamageMod;
}
}
+21 -18
View File
@@ -22,23 +22,24 @@ namespace Game.DataStorage
{
public sealed class FactionRecord
{
public long[] ReputationRaceMask = new long[4];
public ulong[] ReputationRaceMask = new ulong[4];
public LocalizedString Name;
public string Description;
public uint Id;
public int[] ReputationBase = new int[4];
public float[] ParentFactionMod = new float[2]; // Faction outputs rep * ParentFactionModOut as spillover reputation
public uint[] ReputationMax = new uint[4];
public short ReputationIndex;
public ushort[] ReputationClassMask = new ushort[4];
public ushort[] ReputationFlags = new ushort[4];
public ushort ParentFactionID;
public ushort ParagonFactionID;
public byte[] ParentFactionCap = new byte[2]; // The highest rank the faction will profit from incoming spillover
public byte Expansion;
public byte Flags;
public byte FriendshipRepID;
public byte Flags;
public ushort ParagonFactionID;
public short[] ReputationClassMask = new short[4];
public ushort[] ReputationFlags = new ushort[4];
public int[] ReputationBase = new int[4];
public int[] ReputationMax = new int[4];
public float[] ParentFactionMod = new float[2]; // Faction outputs rep * ParentFactionModOut as spillover reputation
public byte[] ParentFactionCap = new byte[2]; // The highest rank the faction will profit from incoming spillover
// helpers
public bool CanHaveReputation()
{
return ReputationIndex >= 0;
@@ -50,16 +51,18 @@ namespace Game.DataStorage
public uint Id;
public ushort Faction;
public ushort Flags;
public ushort[] Enemies = new ushort[4];
public ushort[] Friend = new ushort[4];
public byte FactionGroup;
public byte FriendGroup;
public byte EnemyGroup;
public ushort[] Enemies = new ushort[4];
public ushort[] Friend = new ushort[4];
// helpers
public bool IsFriendlyTo(FactionTemplateRecord entry)
{
if (Id == entry.Id)
if (this == entry)
return true;
if (entry.Faction != 0)
{
for (int i = 0; i < 4; ++i)
@@ -69,12 +72,13 @@ namespace Game.DataStorage
if (Friend[i] == entry.Faction)
return true;
}
return Convert.ToBoolean(FriendGroup & entry.FactionGroup) || Convert.ToBoolean(FactionGroup & entry.FriendGroup);
return (FriendGroup & entry.FactionGroup) != 0 || (FactionGroup & entry.FriendGroup) != 0;
}
public bool IsHostileTo(FactionTemplateRecord entry)
{
if (Id == entry.Id)
if (this == entry)
return false;
if (entry.Faction != 0)
{
for (int i = 0; i < 4; ++i)
@@ -86,16 +90,15 @@ namespace Game.DataStorage
}
return (EnemyGroup & entry.FactionGroup) != 0;
}
public bool IsHostileToPlayers() { return (EnemyGroup & (uint)FactionMasks.Player) != 0; }
public bool IsHostileToPlayers() { return (EnemyGroup & (byte)FactionMasks.Player) != 0; }
public bool IsNeutralToAll()
{
for (int i = 0; i < 4; ++i)
if (Enemies[i] != 0)
return false;
return EnemyGroup == 0 && FriendGroup == 0;
}
public bool IsContestedGuardFaction() { return Flags.HasAnyFlag((ushort)FactionTemplateFlags.ContestedGuard); }
public bool ShouldSparAttack() { return Flags.HasAnyFlag((ushort)FactionTemplateFlags.EnemySpar); }
public bool IsContestedGuardFaction() { return (Flags & (ushort)FactionTemplateFlags.ContestedGuard) != 0; }
public bool ShouldSparAttack() { return (Flags & (ushort)FactionTemplateFlags.EnemySpar) != 0; }
}
}
+62 -61
View File
@@ -23,12 +23,12 @@ namespace Game.DataStorage
public sealed class GameObjectDisplayInfoRecord
{
public uint Id;
public uint FileDataID;
public Vector3 GeoBoxMin;
public Vector3 GeoBoxMax;
public int FileDataID;
public short ObjectEffectPackageID;
public float OverrideLootEffectScale;
public float OverrideNameScale;
public ushort ObjectEffectPackageID;
}
public sealed class GameObjectsRecord
@@ -36,65 +36,65 @@ namespace Game.DataStorage
public LocalizedString Name;
public Vector3 Pos;
public float[] Rot = new float[4];
public float Scale;
public int[] PropValue = new int[8];
public uint Id;
public ushort OwnerID;
public ushort DisplayID;
public float Scale;
public GameObjectTypes TypeID;
public byte PhaseUseFlags;
public ushort PhaseID;
public ushort PhaseGroupID;
public byte PhaseUseFlags;
public GameObjectTypes TypeID;
public uint Id;
public int[] PropValue = new int[8];
}
public sealed class GarrAbilityRecord
{
public string Name;
public string Description;
public uint IconFileDataID;
public GarrisonAbilityFlags Flags;
public ushort FactionChangeGarrAbilityID;
public uint Id;
public byte GarrAbilityCategoryID;
public byte GarrFollowerTypeID;
public uint Id;
public int IconFileDataID;
public ushort FactionChangeGarrAbilityID;
public GarrisonAbilityFlags Flags;
}
public sealed class GarrBuildingRecord
{
public uint Id;
public string AllianceName;
public string HordeName;
public string AllianceName;
public string Description;
public string Tooltip;
public byte GarrTypeID;
public byte BuildingType;
public uint HordeGameObjectID;
public uint AllianceGameObjectID;
public uint IconFileDataID;
public byte GarrSiteID;
public byte UpgradeLevel;
public int BuildSeconds;
public ushort CurrencyTypeID;
public int CurrencyQty;
public ushort HordeUiTextureKitID;
public ushort AllianceUiTextureKitID;
public int IconFileDataID;
public ushort AllianceSceneScriptPackageID;
public ushort HordeSceneScriptPackageID;
public int MaxAssignments;
public byte ShipmentCapacity;
public ushort GarrAbilityID;
public ushort BonusGarrAbilityID;
public short GoldCost;
public byte GarrSiteID;
public byte BuildingType;
public byte UpgradeLevel;
public ushort GoldCost;
public GarrisonBuildingFlags Flags;
public byte ShipmentCapacity;
public byte GarrTypeID;
public ushort BuildSeconds;
public int CurrencyQty;
public byte MaxAssignments;
}
public sealed class GarrBuildingPlotInstRecord
{
public Vector2 MapOffset;
public ushort UiTextureAtlasMemberID;
public ushort GarrSiteLevelPlotInstID;
public byte GarrBuildingID;
public uint Id;
public byte GarrBuildingID;
public ushort GarrSiteLevelPlotInstID;
public ushort UiTextureAtlasMemberID;
}
public sealed class GarrClassSpecRecord
@@ -102,11 +102,11 @@ namespace Game.DataStorage
public string ClassSpec;
public string ClassSpecMale;
public string ClassSpecFemale;
public ushort UiTextureAtlasMemberID; // UiTextureAtlasMember.db2 ref
public uint Id;
public ushort UiTextureAtlasMemberID;
public ushort GarrFollItemSetID;
public byte FollowerClassLimit;
public byte Flags;
public uint Id;
}
public sealed class GarrFollowerRecord
@@ -114,54 +114,55 @@ namespace Game.DataStorage
public string HordeSourceText;
public string AllianceSourceText;
public string TitleName;
public uint HordeCreatureID;
public uint AllianceCreatureID;
public uint HordeIconFileDataID;
public uint AllianceIconFileDataID;
public uint HordeSlottingBroadcastTextID;
public uint AllySlottingBroadcastTextID;
public ushort HordeGarrFollItemSetID;
public ushort AllianceGarrFollItemSetID;
public ushort ItemLevelWeapon;
public ushort ItemLevelArmor;
public ushort HordeUITextureKitID;
public ushort AllianceUITextureKitID;
public uint Id;
public byte GarrTypeID;
public byte GarrFollowerTypeID;
public int HordeCreatureID;
public int AllianceCreatureID;
public byte HordeGarrFollRaceID;
public byte AllianceGarrFollRaceID;
public byte Quality;
public byte HordeGarrClassSpecID;
public byte AllianceGarrClassSpecID;
public byte Quality;
public byte FollowerLevel;
public byte Gender;
public byte Flags;
public ushort ItemLevelWeapon;
public ushort ItemLevelArmor;
public sbyte HordeSourceTypeEnum;
public sbyte AllianceSourceTypeEnum;
public byte GarrTypeID;
public int HordeIconFileDataID;
public int AllianceIconFileDataID;
public ushort HordeGarrFollItemSetID;
public ushort AllianceGarrFollItemSetID;
public ushort HordeUITextureKitID;
public ushort AllianceUITextureKitID;
public byte Vitality;
public byte ChrClassID;
public byte HordeFlavorGarrStringID;
public byte AllianceFlavorGarrStringID;
public uint Id;
public uint HordeSlottingBroadcastTextID;
public uint AllySlottingBroadcastTextID;
public byte ChrClassID;
public byte Flags;
public byte Gender;
}
public sealed class GarrFollowerXAbilityRecord
{
public uint Id;
public ushort GarrAbilityID;
public byte OrderIndex;
public byte FactionIndex;
public uint GarrFollowerID;
public ushort GarrAbilityID;
public ushort GarrFollowerID;
}
public sealed class GarrPlotRecord
{
public uint Id;
public string Name;
public uint AllianceConstructObjID;
public uint HordeConstructObjID;
public byte UiCategoryID;
public byte PlotType;
public uint HordeConstructObjID;
public uint AllianceConstructObjID;
public byte Flags;
public byte UiCategoryID;
public uint[] UpgradeRequirement = new uint[2];
}
@@ -183,14 +184,14 @@ namespace Game.DataStorage
{
public uint Id;
public Vector2 TownHallUiPos;
public uint GarrSiteID;
public byte GarrLevel;
public ushort MapID;
public ushort UiTextureKitID;
public ushort UpgradeMovieID;
public ushort UiTextureKitID;
public byte MaxBuildingLevel;
public ushort UpgradeCost;
public ushort UpgradeGoldCost;
public byte GarrLevel;
public byte GarrSiteID;
public byte MaxBuildingLevel;
}
public sealed class GarrSiteLevelPlotInstRecord
@@ -205,16 +206,16 @@ namespace Game.DataStorage
public sealed class GemPropertiesRecord
{
public uint Id;
public SocketColor Type;
public ushort EnchantId;
public SocketColor Type;
public ushort MinItemLevel;
}
public sealed class GlyphBindableSpellRecord
{
public uint Id;
public uint SpellID;
public uint GlyphPropertiesID;
public int SpellID;
public short GlyphPropertiesID;
}
public sealed class GlyphPropertiesRecord
@@ -230,31 +231,31 @@ namespace Game.DataStorage
{
public uint Id;
public ushort ChrSpecializationID;
public uint GlyphPropertiesID;
public ushort GlyphPropertiesID;
}
public sealed class GuildColorBackgroundRecord
{
public uint Id;
public byte Red;
public byte Green;
public byte Blue;
public byte Green;
}
public sealed class GuildColorBorderRecord
{
public uint Id;
public byte Red;
public byte Green;
public byte Blue;
public byte Green;
}
public sealed class GuildColorEmblemRecord
{
public uint Id;
public byte Red;
public byte Green;
public byte Blue;
public byte Green;
}
public sealed class GuildPerkSpellsRecord
@@ -98,11 +98,6 @@ namespace Game.DataStorage
public float JewelryMultiplier;
}
public sealed class GtHonorLevelRecord
{
public float[] Prestige = new float[33];
}
public sealed class GtHpPerStaRecord
{
public float Health;
@@ -170,6 +165,7 @@ namespace Game.DataStorage
public float Gem2;
public float Gem3;
public float Health;
public float DamageReplaceStat;
}
public sealed class GtXpRecord
+13 -13
View File
@@ -22,30 +22,30 @@ namespace Game.DataStorage
public sealed class HeirloomRecord
{
public string SourceText;
public uint ItemID;
public uint LegacyItemID;
public uint LegacyUpgradedItemID;
public uint StaticUpgradedItemID;
public uint[] UpgradeItemID = new uint[3];
public ushort[] UpgradeItemBonusListID = new ushort[3];
public byte Flags;
public byte SourceTypeEnum;
public uint Id;
public uint ItemID;
public int LegacyUpgradedItemID;
public uint StaticUpgradedItemID;
public sbyte SourceTypeEnum;
public byte Flags;
public int LegacyItemID;
public int[] UpgradeItemID = new int[3];
public ushort[] UpgradeItemBonusListID = new ushort[3];
}
public sealed class HolidaysRecord
{
public uint Id;
public uint[] Date = new uint[SharedConst.MaxHolidayDates]; // dates in unix time starting at January, 1, 2000
public ushort[] Duration = new ushort[SharedConst.MaxHolidayDurations];
public ushort Region;
public byte Looping;
public byte[] CalendarFlags = new byte[SharedConst.MaxHolidayFlags];
public uint HolidayNameID;
public uint HolidayDescriptionID;
public byte Priority;
public sbyte CalendarFilterType;
public byte Flags;
public ushort HolidayNameID;
public ushort HolidayDescriptionID;
public ushort[] Duration = new ushort[SharedConst.MaxHolidayDurations];
public uint[] Date = new uint[SharedConst.MaxHolidayDates]; // dates in unix time starting at January, 1, 2000
public byte[] CalendarFlags = new byte[SharedConst.MaxHolidayFlags];
public int[] TextureFileDataID = new int[3];
}
}
+112 -114
View File
@@ -49,30 +49,29 @@ namespace Game.DataStorage
public sealed class ItemRecord
{
public uint Id;
public uint IconFileDataID;
public ItemClass ClassID;
public byte SubclassID;
public sbyte SoundOverrideSubclassID;
public byte Material;
public InventoryType inventoryType;
public byte SheatheType;
public sbyte SoundOverrideSubclassID;
public int IconFileDataID;
public byte ItemGroupSoundsID;
}
public sealed class ItemAppearanceRecord
{
public uint Id;
public uint ItemDisplayInfoID;
public uint DefaultIconFileDataID;
public uint UIOrder;
public byte DisplayType;
public uint ItemDisplayInfoID;
public int DefaultIconFileDataID;
public int UiOrder;
}
public sealed class ItemArmorQualityRecord
{
public uint Id;
public float[] QualityMod = new float[7];
public ushort ItemLevel;
}
public sealed class ItemArmorShieldRecord
@@ -85,17 +84,17 @@ namespace Game.DataStorage
public sealed class ItemArmorTotalRecord
{
public uint Id;
public short ItemLevel;
public float Cloth;
public float Leather;
public float Mail;
public float Plate;
public ushort ItemLevel;
}
public sealed class ItemBagFamilyRecord
{
public uint Id;
public uint Name;
public string Name;
}
public sealed class ItemBonusRecord
@@ -116,11 +115,11 @@ namespace Game.DataStorage
public sealed class ItemBonusTreeNodeRecord
{
public uint Id;
public byte ItemContext;
public ushort ChildItemBonusTreeID;
public ushort ChildItemBonusListID;
public ushort ChildItemLevelSelectorID;
public byte ItemContext;
public uint ParentItemBonusTreeID;
public ushort ParentItemBonusTreeID;
}
public sealed class ItemChildEquipmentRecord
@@ -135,8 +134,8 @@ namespace Game.DataStorage
{
public uint Id;
public string ClassName;
public sbyte ClassID;
public float PriceModifier;
public byte ClassID;
public byte Flags;
}
@@ -145,7 +144,6 @@ namespace Game.DataStorage
public uint Id;
public uint ItemID;
}
// common struct for:
// ItemDamageAmmo.dbc
// ItemDamageOneHand.dbc
@@ -158,71 +156,71 @@ namespace Game.DataStorage
public sealed class ItemDamageRecord
{
public uint Id;
public float[] Quality = new float[7];
public ushort ItemLevel;
public float[] Quality = new float[7];
}
public sealed class ItemDisenchantLootRecord
{
public uint Id;
public sbyte Subclass;
public byte Quality;
public ushort MinLevel;
public ushort MaxLevel;
public ushort SkillRequired;
public sbyte Subclass;
public byte Quality;
public sbyte ExpansionID;
public uint ClassID;
public byte Class;
}
public sealed class ItemEffectRecord
{
public uint Id;
public int SpellID;
public int CoolDownMSec;
public int CategoryCoolDownMSec;
public short Charges;
public ushort SpellCategoryID;
public ushort ChrSpecializationID;
public byte LegacySlotIndex;
public ItemSpelltriggerType TriggerType;
public uint ParentItemID;
public short Charges;
public int CoolDownMSec;
public int CategoryCoolDownMSec;
public ushort SpellCategoryID;
public int SpellID;
public ushort ChrSpecializationID;
public int ParentItemID;
}
public sealed class ItemExtendedCostRecord
{
public uint Id;
public uint[] ItemID = new uint[ItemConst.MaxItemExtCostItems]; // required item id
public uint[] CurrencyCount = new uint[ItemConst.MaxItemExtCostCurrencies]; // required curency count
public ushort[] ItemCount = new ushort[ItemConst.MaxItemExtCostItems]; // required count of 1st item
public ushort RequiredArenaRating; // required personal arena rating
public ushort[] CurrencyID = new ushort[ItemConst.MaxItemExtCostCurrencies]; // required curency id
public ushort RequiredArenaRating;
public byte ArenaBracket; // arena slot restrictions (min slot value)
public byte Flags;
public byte MinFactionID;
public byte MinReputation;
public byte Flags;
public byte RequiredAchievement;
public byte RequiredAchievement; // required personal arena rating
public uint[] ItemID = new uint[ItemConst.MaxItemExtCostItems]; // required item id
public ushort[] ItemCount = new ushort[ItemConst.MaxItemExtCostItems]; // required count of 1st item
public ushort[] CurrencyID = new ushort[ItemConst.MaxItemExtCostCurrencies]; // required curency id
public uint[] CurrencyCount = new uint[ItemConst.MaxItemExtCostCurrencies]; // required curency count
}
public sealed class ItemLevelSelectorRecord
{
public uint ID;
public uint Id;
public ushort MinItemLevel;
public ushort ItemLevelSelectorQualitySetID;
}
public sealed class ItemLevelSelectorQualityRecord
{
public uint ID;
public uint Id;
public uint QualityItemBonusListID;
public byte Quality;
public uint ParentILSQualitySetID;
public sbyte Quality;
public short ParentILSQualitySetID;
}
public sealed class ItemLevelSelectorQualitySetRecord
{
public uint ID;
public ushort IlvlRare;
public ushort IlvlEpic;
public uint Id;
public short IlvlRare;
public short IlvlEpic;
}
public sealed class ItemLimitCategoryRecord
@@ -237,26 +235,26 @@ namespace Game.DataStorage
{
public uint Id;
public sbyte AddQuantity;
public ushort PlayerConditionID;
public uint PlayerConditionID;
public uint ParentItemLimitCategoryID;
}
public sealed class ItemModifiedAppearanceRecord
{
public uint ItemID;
public uint Id;
public uint ItemID;
public byte ItemAppearanceModifierID;
public ushort ItemAppearanceID;
public byte OrderIndex;
public byte TransmogSourceTypeEnum;
public sbyte TransmogSourceTypeEnum;
}
public sealed class ItemPriceBaseRecord
{
public uint Id;
public ushort ItemLevel;
public float Armor;
public float Weapon;
public ushort ItemLevel;
}
public sealed class ItemRandomPropertiesRecord
@@ -276,119 +274,119 @@ namespace Game.DataStorage
public sealed class ItemSearchNameRecord
{
public ulong AllowableRace;
public long AllowableRace;
public string Display;
public uint Id;
public uint[] Flags = new uint[3];
public ushort ItemLevel;
public byte OverallQualityID;
public byte ExpansionID;
public byte RequiredLevel;
public ushort MinFactionID;
public byte MinReputation;
public short AllowableClass;
public int AllowableClass;
public sbyte RequiredLevel;
public ushort RequiredSkill;
public ushort RequiredSkillRank;
public uint RequiredAbility;
public ushort ItemLevel;
public int[] Flags = new int[4];
}
public sealed class ItemSetRecord
{
public uint Id;
public LocalizedString Name;
public uint[] ItemID = new uint[17];
public ushort RequiredSkillRank;
public byte RequiredSkill;
public ItemSetFlags SetFlags;
public uint RequiredSkill;
public ushort RequiredSkillRank;
public uint[] ItemID = new uint[ItemConst.MaxItemSetItems];
}
public sealed class ItemSetSpellRecord
{
public uint Id;
public uint SpellID;
public ushort ChrSpecID;
public uint SpellID;
public byte Threshold;
public uint ItemSetID;
public ushort ItemSetID;
}
public sealed class ItemSparseRecord
{
public uint Id;
public long AllowableRace;
public LocalizedString Display;
public string Display2;
public string Display3;
public string Display4;
public string Description;
public uint[] Flags = new uint[4];
public float PriceRandomValue;
public float PriceVariance;
public uint VendorStackCount;
public uint BuyPrice;
public uint SellPrice;
public uint RequiredAbility;
public uint MaxCount;
public uint Stackable;
public int[] StatPercentEditor = new int[ItemConst.MaxStats];
public float[] StatPercentageOfSocket = new float[ItemConst.MaxStats];
public float ItemRange;
public uint BagFamily;
public float QualityModifier;
public uint DurationInInventory;
public string Display3;
public string Display2;
public string Display1;
public LocalizedString Display;
public float DmgVariance;
public short AllowableClass;
public ushort ItemLevel;
public ushort RequiredSkill;
public ushort RequiredSkillRank;
public ushort MinFactionID;
public short[] ItemStatValue = new short[ItemConst.MaxStats];
public ushort ScalingStatDistributionID;
public ushort ItemDelay;
public ushort PageID;
public ushort StartQuestID;
public ushort LockID;
public ushort RandomSelect;
public ushort ItemRandomSuffixGroupID;
public ushort ItemSet;
public ushort ZoneBound;
public ushort InstanceBound;
public ushort TotemCategoryID;
public ushort SocketMatchEnchantmentId;
public ushort GemProperties;
public ushort LimitCategory;
public ushort RequiredHoliday;
public ushort RequiredTransmogHoliday;
public uint DurationInInventory;
public float QualityModifier;
public uint BagFamily;
public float ItemRange;
public float[] StatPercentageOfSocket = new float[ItemConst.MaxStats];
public int[] StatPercentEditor = new int[ItemConst.MaxStats];
public uint Stackable;
public uint MaxCount;
public uint RequiredAbility;
public uint SellPrice;
public uint BuyPrice;
public uint VendorStackCount;
public float PriceVariance;
public float PriceRandomValue;
public uint[] Flags = new uint[4];
public int FactionRelated;
public ushort ItemNameDescriptionID;
public byte OverallQualityID;
public InventoryType inventoryType;
public sbyte RequiredLevel;
public byte RequiredPVPRank;
public byte RequiredPVPMedal;
public byte MinReputation;
public byte ContainerSlots;
public sbyte[] StatModifierBonusStat = new sbyte[ItemConst.MaxStats];
public byte DamageType;
public byte Bonding;
public byte LanguageID;
public byte PageMaterialID;
public sbyte Material;
public byte SheatheType;
public byte[] SocketType = new byte[ItemConst.MaxGemSockets];
public byte SpellWeightCategory;
public byte SpellWeight;
public byte ArtifactID;
public ushort RequiredTransmogHoliday;
public ushort RequiredHoliday;
public ushort LimitCategory;
public ushort GemProperties;
public ushort SocketMatchEnchantmentId;
public ushort TotemCategoryID;
public ushort InstanceBound;
public ushort ZoneBound;
public ushort ItemSet;
public ushort ItemRandomSuffixGroupID;
public ushort RandomSelect;
public ushort LockID;
public ushort StartQuestID;
public ushort PageID;
public ushort ItemDelay;
public ushort ScalingStatDistributionID;
public ushort MinFactionID;
public ushort RequiredSkillRank;
public ushort RequiredSkill;
public ushort ItemLevel;
public short AllowableClass;
public byte ExpansionID;
public byte ArtifactID;
public byte SpellWeight;
public byte SpellWeightCategory;
public byte[] SocketType = new byte[ItemConst.MaxGemSockets];
public byte SheatheType;
public byte Material;
public byte PageMaterialID;
public byte LanguageID;
public byte Bonding;
public byte DamageType;
public sbyte[] StatModifierBonusStat = new sbyte[ItemConst.MaxStats];
public byte ContainerSlots;
public byte MinReputation;
public byte RequiredPVPMedal;
public byte RequiredPVPRank;
public sbyte RequiredLevel;
public InventoryType inventoryType;
public byte OverallQualityID;
}
public sealed class ItemSpecRecord
{
public uint Id;
public ushort SpecializationID;
public byte MinLevel;
public byte MaxLevel;
public byte ItemType;
public ItemSpecStat PrimaryStat;
public ItemSpecStat SecondaryStat;
public ushort SpecializationID;
}
public sealed class ItemSpecOverrideRecord
@@ -401,11 +399,11 @@ namespace Game.DataStorage
public sealed class ItemUpgradeRecord
{
public uint Id;
public uint CurrencyAmount;
public ushort PrerequisiteID;
public ushort CurrencyType;
public byte ItemUpgradePathID;
public byte ItemLevelIncrement;
public ushort PrerequisiteID;
public ushort CurrencyType;
public uint CurrencyAmount;
}
public sealed class ItemXBonusTreeRecord
+30 -28
View File
@@ -25,37 +25,37 @@ namespace Game.DataStorage
public uint Id;
public LocalizedString Name;
public string Description;
public LfgFlags Flags;
public float MinGear;
public byte MinLevel;
public ushort MaxLevel;
public ushort TargetLevelMax;
public LfgType TypeID;
public byte Subtype;
public sbyte Faction;
public int IconTextureFileID;
public int RewardsBgTextureFileID;
public int PopupBgTextureFileID;
public byte ExpansionLevel;
public short MapID;
public Difficulty DifficultyID;
public float MinGear;
public byte GroupID;
public byte OrderIndex;
public uint RequiredPlayerConditionId;
public byte TargetLevel;
public byte TargetLevelMin;
public ushort TargetLevelMax;
public ushort RandomID;
public ushort ScenarioID;
public ushort FinalEncounterID;
public ushort BonusReputationAmount;
public ushort MentorItemLevel;
public ushort RequiredPlayerConditionId;
public byte MinLevel;
public byte TargetLevel;
public byte TargetLevelMin;
public Difficulty DifficultyID;
public LfgType TypeID;
public byte Faction;
public byte ExpansionLevel;
public byte OrderIndex;
public byte GroupID;
public byte CountTank;
public byte CountHealer;
public byte CountDamage;
public byte MinCountTank;
public byte MinCountHealer;
public byte MinCountDamage;
public byte Subtype;
public ushort BonusReputationAmount;
public ushort MentorItemLevel;
public byte MentorCharLevel;
public int IconTextureFileID;
public int RewardsBgTextureFileID;
public int PopupBgTextureFileID;
public LfgFlags[] Flags = new LfgFlags[2];
// Helpers
public uint Entry() { return (uint)(Id + ((int)TypeID << 24)); }
@@ -67,7 +67,7 @@ namespace Game.DataStorage
public Vector3 GameCoords;
public float GameFalloffStart;
public float GameFalloffEnd;
public ushort ContinentID;
public short ContinentID;
public ushort[] LightParamsID = new ushort[8];
}
@@ -76,29 +76,31 @@ namespace Game.DataStorage
public uint Id;
public string Name;
public string[] Texture = new string[6];
public ushort Flags;
public byte SoundBank; // used to be "type", maybe needs fixing (works well for now)
public uint SoundID;
public uint SpellID;
public float MaxDarkenDepth;
public float FogDarkenIntensity;
public float AmbDarkenIntensity;
public float DirDarkenIntensity;
public float ParticleScale;
public uint[] Color = new uint[2];
public float[] Float = new float[18];
public uint[] Int = new uint[4];
public ushort Flags;
public ushort LightID;
public byte SoundBank;
public float ParticleScale;
public byte ParticleMovement;
public byte ParticleTexSlots;
public byte MaterialID;
public int MinimapStaticCol;
public byte[] FrameCountTexture = new byte[6];
public ushort SoundID;
public int[] Color = new int[2];
public float[] Float = new float[18];
public uint[] Int = new uint[4];
public float[] Coefficient = new float[4];
}
public sealed class LockRecord
{
public uint Id;
public uint[] Index = new uint[SharedConst.MaxLockCase];
public int[] Index = new int[SharedConst.MaxLockCase];
public ushort[] Skill = new ushort[SharedConst.MaxLockCase];
public byte[] LockType = new byte[SharedConst.MaxLockCase];
public byte[] Action = new byte[SharedConst.MaxLockCase];
+46 -44
View File
@@ -35,32 +35,32 @@ namespace Game.DataStorage
public string MapDescription1; // Alliance
public string PvpShortDescription;
public string PvpLongDescription;
public MapFlags[] Flags = new MapFlags[2];
public float MinimapIconScale;
public Vector2 Corpse; // entrance coordinates in ghost mode (in most cases = normal entrance)
public byte MapType;
public MapTypes InstanceType;
public byte ExpansionID;
public ushort AreaTableID;
public ushort LoadingScreenID;
public short CorpseMapID; // map_id of entrance map in ghost mode (continent always and in most cases = normal entrance)
public ushort TimeOfDayOverride;
public short LoadingScreenID;
public short TimeOfDayOverride;
public short ParentMapID;
public short CosmeticParentMapID;
public ushort WindSettingsID;
public MapTypes InstanceType;
public byte MapType;
public byte ExpansionID;
public byte MaxPlayers;
public byte TimeOffset;
public float MinimapIconScale;
public short CorpseMapID; // map_id of entrance map in ghost mode (continent always and in most cases = normal entrance)
public byte MaxPlayers;
public short WindSettingsID;
public int ZmpFileDataID;
public MapFlags[] Flags = new MapFlags[2];
// Helpers
public Expansion Expansion() { return (Expansion)ExpansionID; }
public bool IsDungeon() { return (InstanceType == MapTypes.Instance || InstanceType == MapTypes.Raid || InstanceType == MapTypes.Scenario) && !IsGarrison(); }
public bool IsNonRaidDungeon() { return InstanceType == MapTypes.Instance; }
public bool Instanceable()
public bool IsDungeon()
{
return InstanceType == MapTypes.Instance || InstanceType == MapTypes.Raid
|| InstanceType == MapTypes.Battleground || InstanceType == MapTypes.Arena || InstanceType == MapTypes.Scenario;
return (InstanceType == MapTypes.Instance || InstanceType == MapTypes.Raid || InstanceType == MapTypes.Scenario) && !IsGarrison();
}
public bool IsNonRaidDungeon() { return InstanceType == MapTypes.Instance; }
public bool Instanceable() { return InstanceType == MapTypes.Instance || InstanceType == MapTypes.Raid || InstanceType == MapTypes.Battleground || InstanceType == MapTypes.Arena || InstanceType == MapTypes.Scenario; }
public bool IsRaid() { return InstanceType == MapTypes.Raid; }
public bool IsBattleground() { return InstanceType == MapTypes.Battleground; }
public bool IsBattleArena() { return InstanceType == MapTypes.Arena; }
@@ -75,6 +75,7 @@ namespace Game.DataStorage
if (CorpseMapID < 0)
return false;
mapid = (uint)CorpseMapID;
x = Corpse.X;
y = Corpse.Y;
@@ -86,22 +87,23 @@ namespace Game.DataStorage
return Id == 0 || Id == 1 || Id == 530 || Id == 571 || Id == 870 || Id == 1116 || Id == 1220;
}
public bool IsDynamicDifficultyMap() { return Flags[0].HasAnyFlag(MapFlags.CanToggleDifficulty); }
public bool IsGarrison() { return Flags[0].HasAnyFlag(MapFlags.Garrison); }
public bool IsDynamicDifficultyMap() { return (Flags[0] & MapFlags.CanToggleDifficulty) != 0; }
public bool IsGarrison() { return (Flags[0] & MapFlags.Garrison) != 0; }
}
public sealed class MapDifficultyRecord
{
public uint Id;
public LocalizedString Message; // m_message_lang (text showed when transfer to map failed)
public byte DifficultyID;
public byte ResetInterval; // 1 means daily reset, 2 means weekly
public byte MaxPlayers; // m_maxPlayers some heroic versions have 0 when expected same amount as in normal version
public byte LockID;
public byte Flags;
public byte ItemContext;
public uint ItemContextPickerID;
public uint MapID;
public int ContentTuningID;
public byte DifficultyID;
public byte LockID;
public byte ResetInterval;
public byte MaxPlayers;
public byte ItemContext;
public byte Flags;
public ushort MapID;
public uint GetRaidDuration()
{
@@ -116,42 +118,42 @@ namespace Game.DataStorage
public sealed class ModifierTreeRecord
{
public uint Id;
public uint Asset;
public uint SecondaryAsset;
public uint Parent;
public sbyte Operator;
public sbyte Amount;
public byte Type;
public byte TertiaryAsset;
public byte Operator;
public byte Amount;
public uint Asset;
public int SecondaryAsset;
public sbyte TertiaryAsset;
}
public sealed class MountRecord
{
public string Name;
public string Description;
public string SourceText;
public uint SourceSpellID;
public float MountFlyRideHeight;
public ushort MountTypeID;
public ushort Flags;
public byte SourceTypeEnum;
public string Description;
public uint Id;
public ushort MountTypeID;
public MountFlags Flags;
public sbyte SourceTypeEnum;
public uint SourceSpellID;
public uint PlayerConditionID;
public byte UiModelSceneID;
public float MountFlyRideHeight;
public int UiModelSceneID;
public bool IsSelfMount() { return (Flags & (ushort)MountFlags.SelfMount) != 0; }
public bool IsSelfMount() { return (Flags & MountFlags.SelfMount) != 0; }
}
public sealed class MountCapabilityRecord
{
public uint ReqSpellKnownID;
public uint ModSpellAuraID;
public uint Id;
public MountCapabilityFlags Flags;
public ushort ReqRidingSkill;
public ushort ReqAreaID;
public uint ReqSpellAuraID;
public uint ReqSpellKnownID;
public uint ModSpellAuraID;
public short ReqMapID;
public MountCapabilityFlags Flags;
public uint Id;
public byte ReqSpellAuraID;
}
public sealed class MountTypeXCapabilityRecord
@@ -173,9 +175,9 @@ namespace Game.DataStorage
public sealed class MovieRecord
{
public uint Id;
public uint AudioFileDataID;
public uint SubtitleFileDataID;
public byte Volume;
public byte KeyID;
public uint AudioFileDataID;
public uint SubtitleFileDataID;
}
}
@@ -44,4 +44,12 @@ namespace Game.DataStorage
public string Name;
public byte LocaleMask;
}
public sealed class NumTalentsAtLevelRecord
{
public uint Id;
public uint NumTalents;
public uint NumTalentsDeathKnight;
public uint NumTalentsDemonHunter;
}
}
+52 -51
View File
@@ -30,20 +30,17 @@ namespace Game.DataStorage
{
public uint Id;
public ushort PhaseId;
public uint PhaseGroupID;
public ushort PhaseGroupID;
}
public sealed class PlayerConditionRecord
{
public long RaceMask;
public ulong RaceMask;
public string FailureDescription;
public uint Id;
public byte Flags;
public ushort MinLevel;
public ushort MaxLevel;
public int ClassMask;
public sbyte Gender;
public sbyte NativeGender;
public uint SkillLogic;
public byte LanguageID;
public byte MinLanguage;
@@ -51,9 +48,7 @@ namespace Game.DataStorage
public ushort MaxFactionID;
public byte MaxReputation;
public uint ReputationLogic;
public byte CurrentPvpFaction;
public byte MinPVPRank;
public byte MaxPVPRank;
public sbyte CurrentPvpFaction;
public byte PvpMedal;
public uint PrevQuestLogic;
public uint CurrQuestLogic;
@@ -67,34 +62,39 @@ namespace Game.DataStorage
public byte PartyStatus;
public byte LifetimeMaxPVPRank;
public uint AchievementLogic;
public uint LfgLogic;
public sbyte Gender;
public sbyte NativeGender;
public uint AreaLogic;
public uint LfgLogic;
public uint CurrencyLogic;
public ushort QuestKillID;
public uint QuestKillLogic;
public sbyte MinExpansionLevel;
public sbyte MaxExpansionLevel;
public sbyte MinExpansionTier;
public sbyte MaxExpansionTier;
public byte MinGuildLevel;
public byte MaxGuildLevel;
public byte PhaseUseFlags;
public ushort PhaseID;
public uint PhaseGroupID;
public int MinAvgItemLevel;
public int MaxAvgItemLevel;
public ushort MinAvgEquippedItemLevel;
public ushort MaxAvgEquippedItemLevel;
public byte PhaseUseFlags;
public ushort PhaseID;
public uint PhaseGroupID;
public byte Flags;
public sbyte ChrSpecializationIndex;
public sbyte ChrSpecializationRole;
public uint ModifierTreeID;
public sbyte PowerType;
public byte PowerTypeComp;
public byte PowerTypeValue;
public uint ModifierTreeID;
public int WeaponSubclassMask;
public byte MaxGuildLevel;
public byte MinGuildLevel;
public sbyte MaxExpansionTier;
public sbyte MinExpansionTier;
public byte MinPVPRank;
public byte MaxPVPRank;
public ushort[] SkillID = new ushort[4];
public short[] MinSkill = new short[4];
public short[] MaxSkill = new short[4];
public ushort[] MinSkill = new ushort[4];
public ushort[] MaxSkill = new ushort[4];
public uint[] MinFactionID = new uint[3];
public byte[] MinReputation = new byte[3];
public ushort[] PrevQuestID = new ushort[4];
@@ -108,12 +108,12 @@ namespace Game.DataStorage
public uint[] AuraSpellID = new uint[4];
public byte[] AuraStacks = new byte[4];
public ushort[] Achievement = new ushort[4];
public ushort[] AreaID = new ushort[4];
public byte[] LfgStatus = new byte[4];
public byte[] LfgCompare = new byte[4];
public uint[] LfgValue = new uint[4];
public ushort[] AreaID = new ushort[4];
public uint[] CurrencyID = new uint[4];
public byte[] CurrencyCount = new byte[4];
public uint[] CurrencyCount = new uint[4];
public uint[] QuestKillMonster = new uint[6];
public int[] MovementFlags = new int[2];
}
@@ -121,7 +121,7 @@ namespace Game.DataStorage
public sealed class PowerDisplayRecord
{
public uint Id;
public uint GlobalStringBaseTag;
public string GlobalStringBaseTag;
public byte ActualType;
public byte Red;
public byte Green;
@@ -133,27 +133,28 @@ namespace Game.DataStorage
public uint Id;
public string NameGlobalStringTag;
public string CostGlobalStringTag;
public float RegenPeace;
public float RegenCombat;
public short MaxBasePower;
public ushort RegenInterruptTimeMS;
public ushort Flags;
public PowerType PowerTypeEnum;
public sbyte MinPower;
public short MaxBasePower;
public sbyte CenterPower;
public sbyte DefaultPower;
public sbyte DisplayModifier;
public short RegenInterruptTimeMS;
public float RegenPeace;
public float RegenCombat;
public short Flags;
}
public sealed class PrestigeLevelInfoRecord
{
public uint Id;
public string Name;
public uint BadgeTextureFileDataID;
public byte PrestigeLevel;
public int PrestigeLevel;
public int BadgeTextureFileDataID;
public PrestigeLevelInfoFlags Flags;
public int AwardedAchievementID;
public bool IsDisabled() { return Flags.HasAnyFlag(PrestigeLevelInfoFlags.Disabled); }
public bool IsDisabled() { return (Flags & PrestigeLevelInfoFlags.Disabled) != 0; }
}
public sealed class PvpDifficultyRecord
@@ -162,10 +163,13 @@ namespace Game.DataStorage
public byte RangeIndex;
public byte MinLevel;
public byte MaxLevel;
public uint MapID;
public ushort MapID;
// helpers
public BattlegroundBracketId GetBracketId() { return (BattlegroundBracketId)RangeIndex; }
public BattlegroundBracketId GetBracketId()
{
return (BattlegroundBracketId)RangeIndex;
}
}
public sealed class PvpItemRecord
@@ -175,34 +179,31 @@ namespace Game.DataStorage
public byte ItemLevelDelta;
}
public sealed class PvpRewardRecord
{
public uint Id;
public byte HonorLevel;
public byte PrestigeLevel;
public ushort RewardPackID;
}
public sealed class PvpTalentRecord
{
public uint Id;
public string Description;
public uint Id;
public int SpecID;
public uint SpellID;
public uint OverridesSpellID;
public int Flags;
public int ActionBarSpellID;
public int TierID;
public byte ColumnIndex;
public byte Flags;
public byte ClassID;
public ushort SpecID;
public byte Role;
public int PvpTalentCategoryID;
public int LevelRequired;
}
public sealed class PvpTalentUnlockRecord
public sealed class PvpTalentCategoryRecord
{
public uint Id;
public byte TierID;
public byte ColumnIndex;
public byte HonorLevel;
public byte TalentSlotMask;
}
public sealed class PvpTalentSlotUnlockRecord
{
public uint Id;
public sbyte Slot;
public uint LevelRequired;
public uint DeathKnightLevelRequired;
public uint DemonHunterLevelRequired;
}
}
+2 -2
View File
@@ -34,10 +34,10 @@ namespace Game.DataStorage
public sealed class QuestPackageItemRecord
{
public uint Id;
public uint ItemID;
public ushort PackageID;
public QuestPackageFilter DisplayType;
public uint ItemID;
public byte ItemQuantity;
public QuestPackageFilter DisplayType;
}
public sealed class QuestSortRecord
+8 -7
View File
@@ -20,6 +20,7 @@ namespace Game.DataStorage
public sealed class RandPropPointsRecord
{
public uint Id;
public int DamageReplaceStat;
public uint[] Epic = new uint[5];
public uint[] Superior = new uint[5];
public uint[] Good = new uint[5];
@@ -28,19 +29,19 @@ namespace Game.DataStorage
public sealed class RewardPackRecord
{
public uint Id;
public uint Money;
public float ArtifactXPMultiplier;
public byte ArtifactXPDifficulty;
public byte ArtifactXPCategoryID;
public ushort CharTitleID;
public ushort TreasurePickerID;
public uint Money;
public byte ArtifactXPDifficulty;
public float ArtifactXPMultiplier;
public byte ArtifactXPCategoryID;
public uint TreasurePickerID;
}
public sealed class RewardPackXCurrencyTypeRecord
{
public uint Id;
public ushort CurrencyTypeID;
public short Quantity;
public uint CurrencyTypeID;
public int Quantity;
public uint RewardPackID;
}
+138 -140
View File
@@ -21,20 +21,12 @@ using System;
namespace Game.DataStorage
{
public sealed class SandboxScalingRecord
{
public uint Id;
public uint MinLevel;
public uint MaxLevel;
public uint Flags;
}
public sealed class ScalingStatDistributionRecord
{
public uint Id;
public ushort PlayerLevelToItemLevelCurveID;
public byte MinLevel;
public uint MaxLevel;
public int MinLevel;
public int MaxLevel;
}
public sealed class ScenarioRecord
@@ -42,8 +34,9 @@ namespace Game.DataStorage
public uint Id;
public string Name;
public ushort AreaTableID;
public byte Flags;
public byte Type;
public byte Flags;
public uint UiTextureKitID;
}
public sealed class ScenarioStepRecord
@@ -52,12 +45,14 @@ namespace Game.DataStorage
public string Description;
public string Title;
public ushort ScenarioID;
public ushort Supersedes; // Used in conjunction with Proving Grounds scenarios, when sequencing steps (Not using step order?)
public uint CriteriaTreeId;
public ushort RewardQuestID;
public int RelatedStep; // Bonus step can only be completed if scenario is in the step specified in this field
public ushort Supersedes; // Used in conjunction with Proving Grounds scenarios, when sequencing steps (Not using step order?)
public byte OrderIndex;
public ScenarioStepFlags Flags;
public ushort CriteriaTreeId;
public byte RelatedStep; // Bonus step can only be completed if scenario is in the step specified in this field
public uint VisibilityPlayerConditionID;
public ushort WidgetSetID;
// helpers
public bool IsBonusObjective()
@@ -95,33 +90,38 @@ namespace Game.DataStorage
public sealed class SkillLineRecord
{
public uint Id;
public LocalizedString DisplayName;
public string Description;
public string AlternateVerb;
public ushort Flags;
public string Description;
public string HordeDisplayName;
public string OverrideSourceInfoDisplayName;
public uint Id;
public SkillCategory CategoryID;
public byte CanLink;
public uint SpellIconFileID;
public byte ParentSkillLineID;
public int SpellIconFileID;
public sbyte CanLink;
public uint ParentSkillLineID;
public int ParentTierIndex;
public ushort Flags;
public int SpellBookSpellID;
}
public sealed class SkillLineAbilityRecord
{
public long RaceMask;
public ulong RaceMask;
public uint Id;
public uint Spell;
public uint SupercedesSpell;
public ushort SkillLine;
public uint Spell;
public short MinSkillLineRank;
public int ClassMask;
public uint SupercedesSpell;
public AbilityLearnType AcquireMethod;
public ushort TrivialSkillLineRankHigh;
public ushort TrivialSkillLineRankLow;
public ushort UniqueBit;
public ushort TradeSkillCategoryID;
public sbyte Flags;
public byte NumSkillUps;
public int ClassMask;
public ushort MinSkillLineRank;
public AbilytyLearnType AcquireMethod;
public byte Flags;
public short UniqueBit;
public short TradeSkillCategoryID;
public ushort SkillupSkillLineID;
}
public sealed class SkillRaceClassInfoRecord
@@ -129,28 +129,28 @@ namespace Game.DataStorage
public uint Id;
public long RaceMask;
public ushort SkillID;
public SkillRaceClassInfoFlags Flags;
public ushort SkillTierID;
public byte Availability;
public byte MinLevel;
public int ClassMask;
public SkillRaceClassInfoFlags Flags;
public sbyte Availability;
public sbyte MinLevel;
public ushort SkillTierID;
}
public sealed class SoundKitRecord
{
public uint Id;
public byte SoundType;
public float VolumeFloat;
public ushort Flags;
public float MinDistance;
public float DistanceCutoff;
public ushort Flags;
public ushort SoundEntriesAdvancedID;
public byte SoundType;
public byte DialogType;
public byte EAXDef;
public uint SoundKitAdvancedID;
public float VolumeVariationPlus;
public float VolumeVariationMinus;
public float PitchVariationPlus;
public float PitchVariationMinus;
public sbyte DialogType;
public float PitchAdjust;
public ushort BusOverwriteID;
public byte MaxInstances;
@@ -159,47 +159,38 @@ namespace Game.DataStorage
public sealed class SpecializationSpellsRecord
{
public string Description;
public uint Id;
public ushort SpecID;
public uint SpellID;
public uint OverridesSpellID;
public ushort SpecID;
public byte DisplayOrder;
public uint Id;
}
public sealed class SpellRecord
{
public uint Id;
public LocalizedString Name;
public string NameSubtext;
public string Description;
public string AuraDescription;
}
public sealed class SpellAuraOptionsRecord
{
public uint Id;
public uint ProcCharges;
public uint ProcTypeMask;
public uint ProcCategoryRecovery;
public ushort CumulativeAura;
public ushort SpellProcsPerMinuteID;
public byte DifficultyID;
public ushort CumulativeAura;
public uint ProcCategoryRecovery;
public byte ProcChance;
public uint ProcCharges;
public ushort SpellProcsPerMinuteID;
public int[] ProcTypeMask = new int[2];
public uint SpellID;
}
public sealed class SpellAuraRestrictionsRecord
{
public uint Id;
public uint CasterAuraSpell;
public uint TargetAuraSpell;
public uint ExcludeCasterAuraSpell;
public uint ExcludeTargetAuraSpell;
public byte DifficultyID;
public byte CasterAuraState;
public byte TargetAuraState;
public byte ExcludeCasterAuraState;
public byte ExcludeTargetAuraState;
public uint CasterAuraSpell;
public uint TargetAuraSpell;
public uint ExcludeCasterAuraSpell;
public uint ExcludeTargetAuraSpell;
public uint SpellID;
}
@@ -207,33 +198,33 @@ namespace Game.DataStorage
{
public uint Id;
public int Base;
public int Minimum;
public short PerLevel;
public int Minimum;
}
public sealed class SpellCastingRequirementsRecord
{
public uint Id;
public uint SpellID;
public ushort MinFactionID;
public ushort RequiredAreasID;
public ushort RequiresSpellFocus;
public byte FacingCasterFlags;
public byte MinReputation;
public ushort MinFactionID;
public sbyte MinReputation;
public ushort RequiredAreasID;
public byte RequiredAuraVision;
public ushort RequiresSpellFocus;
}
public sealed class SpellCategoriesRecord
{
public uint Id;
public byte DifficultyID;
public ushort Category;
public sbyte DefenseType;
public sbyte DispelType;
public sbyte Mechanic;
public sbyte PreventionType;
public ushort StartRecoveryCategory;
public ushort ChargeCategory;
public byte DifficultyID;
public byte DefenseType;
public byte DispelType;
public byte Mechanic;
public byte PreventionType;
public uint SpellID;
}
@@ -241,29 +232,29 @@ namespace Game.DataStorage
{
public uint Id;
public string Name;
public int ChargeRecoveryTime;
public SpellCategoryFlags Flags;
public byte UsesPerWeek;
public byte MaxCharges;
public byte TypeMask;
public int ChargeRecoveryTime;
public int TypeMask;
}
public sealed class SpellClassOptionsRecord
{
public uint Id;
public uint SpellID;
public FlagArray128 SpellClassMask;
public uint ModalNextSpell;
public byte SpellClassSet;
public ushort ModalNextSpell;
public FlagArray128 SpellClassMask;
}
public sealed class SpellCooldownsRecord
{
public uint Id;
public byte DifficultyID;
public uint CategoryRecoveryTime;
public uint RecoveryTime;
public uint StartRecoveryTime;
public byte DifficultyID;
public uint SpellID;
}
@@ -271,41 +262,40 @@ namespace Game.DataStorage
{
public uint Id;
public int Duration;
public uint DurationPerLevel;
public int MaxDuration;
public int DurationPerLevel;
}
public sealed class SpellEffectRecord
{
public uint Id;
public uint Effect;
public int EffectBasePoints;
public byte EffectIndex;
public uint EffectAura;
public uint DifficultyID;
public uint EffectIndex;
public uint Effect;
public float EffectAmplitude;
public int EffectAttributes;
public short EffectAura;
public uint EffectAuraPeriod;
public float EffectBonusCoefficient;
public float EffectChainAmplitude;
public int EffectChainTargets;
public int EffectDieSides;
public uint EffectItemType;
public uint EffectMechanic;
public int EffectMechanic;
public float EffectPointsPerResource;
public float EffectPosFacing;
public float EffectRealPointsPerLevel;
public uint EffectTriggerSpell;
public float EffectPosFacing;
public uint EffectAttributes;
public float BonusCoefficientFromAP;
public float PvpMultiplier;
public float Coefficient;
public float Variance;
public float ResourceCoefficient;
public float GroupSizeBasePointsCoefficient;
public FlagArray128 EffectSpellClassMask;
public float EffectBasePoints;
public int[] EffectMiscValue = new int[2];
public uint[] EffectRadiusIndex = new uint[2];
public uint[] ImplicitTarget = new uint[2];
public FlagArray128 EffectSpellClassMask;
public short[] ImplicitTarget = new short[2];
public uint SpellID;
}
@@ -313,9 +303,9 @@ namespace Game.DataStorage
{
public uint Id;
public uint SpellID;
public sbyte EquippedItemClass;
public int EquippedItemInvTypes;
public int EquippedItemSubclass;
public sbyte EquippedItemClass;
}
public sealed class SpellFocusObjectRecord
@@ -328,7 +318,7 @@ namespace Game.DataStorage
{
public uint Id;
public byte DifficultyID;
public ushort InterruptFlags;
public short InterruptFlags;
public uint[] AuraInterruptFlags = new uint[2];
public uint[] ChannelInterruptFlags = new uint[2];
public uint SpellID;
@@ -338,10 +328,12 @@ namespace Game.DataStorage
{
public uint Id;
public string Name;
public string HordeName;
public uint[] EffectArg = new uint[ItemConst.MaxItemEnchantmentEffects];
public float[] EffectScalingPoints = new float[ItemConst.MaxItemEnchantmentEffects];
public uint TransmogCost;
public uint IconFileDataID;
public uint TransmogPlayerConditionID;
public ushort[] EffectPointsMin = new ushort[ItemConst.MaxItemEnchantmentEffects];
public ushort ItemVisual;
public EnchantmentSlotMask Flags;
@@ -350,19 +342,18 @@ namespace Game.DataStorage
public ushort ItemLevel;
public byte Charges;
public ItemEnchantmentType[] Effect = new ItemEnchantmentType[ItemConst.MaxItemEnchantmentEffects];
public sbyte ScalingClass;
public sbyte ScalingClassRestricted;
public byte ConditionID;
public byte MinLevel;
public byte MaxLevel;
public sbyte ScalingClass;
public sbyte ScalingClassRestricted;
public ushort TransmogPlayerConditionID;
}
public sealed class SpellItemEnchantmentConditionRecord
{
public uint Id;
public uint[] LtOperand = new uint[5];
public byte[] LtOperandType = new byte[5];
public uint[] LtOperand = new uint[5];
public byte[] Operator = new byte[5];
public byte[] RtOperandType = new byte[5];
public byte[] RtOperand = new byte[5];
@@ -380,10 +371,10 @@ namespace Game.DataStorage
public sealed class SpellLevelsRecord
{
public uint Id;
public byte DifficultyID;
public ushort BaseLevel;
public ushort MaxLevel;
public ushort SpellLevel;
public byte DifficultyID;
public byte MaxPassiveAuraLevel;
public uint SpellID;
}
@@ -391,43 +382,50 @@ namespace Game.DataStorage
public sealed class SpellMiscRecord
{
public uint Id;
public byte DifficultyID;
public ushort CastingTimeIndex;
public ushort DurationIndex;
public ushort RangeIndex;
public byte SchoolMask;
public uint SpellIconFileDataID;
public float Speed;
public uint ActiveIconFileDataID;
public float LaunchDelay;
public byte DifficultyID;
public uint[] Attributes = new uint[14];
public float MinDuration;
public uint SpellIconFileDataID;
public uint ActiveIconFileDataID;
public int[] Attributes = new int[14];
public uint SpellID;
}
public sealed class SpellNameRecord
{
public uint Id; // SpellID
public LocalizedString Name;
}
public sealed class SpellPowerRecord
{
public int ManaCost;
public float PowerCostPct;
public float PowerPctPerSecond;
public uint RequiredAuraSpellID;
public float PowerCostMaxPct;
public byte OrderIndex;
public PowerType PowerType;
public uint Id;
public byte ManaCostPerLevel;
public ushort ManaPerSecond;
public int OptionalCost; // Spell uses [ManaCost, ManaCost+ManaCostAdditional] power - affects tooltip parsing as multiplier on SpellEffectEntry::EffectPointsPerResource
// only SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL, SPELL_EFFECT_WEAPON_PERCENT_DAMAGE, SPELL_EFFECT_WEAPON_DAMAGE, SPELL_EFFECT_NORMALIZED_WEAPON_DMG
public byte OrderIndex;
public int ManaCost;
public int ManaCostPerLevel;
public int ManaPerSecond;
public uint PowerDisplayID;
public uint AltPowerBarID;
public int AltPowerBarID;
public float PowerCostPct;
public float PowerCostMaxPct;
public float PowerPctPerSecond;
public PowerType PowerType;
public uint RequiredAuraSpellID;
public uint OptionalCost; // Spell uses [ManaCost, ManaCost+ManaCostAdditional] power - affects tooltip parsing as multiplier on SpellEffectEntry::EffectPointsPerResource
// only SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL, SPELL_EFFECT_WEAPON_PERCENT_DAMAGE, SPELL_EFFECT_WEAPON_DAMAGE, SPELL_EFFECT_NORMALIZED_WEAPON_DMG
public uint SpellID;
}
public sealed class SpellPowerDifficultyRecord
{
public uint Id;
public byte DifficultyID;
public byte OrderIndex;
public uint Id;
}
public sealed class SpellProcsPerMinuteRecord
@@ -440,10 +438,10 @@ namespace Game.DataStorage
public sealed class SpellProcsPerMinuteModRecord
{
public uint Id;
public float Coeff;
public ushort Param;
public SpellProcsPerMinuteModType Type;
public uint SpellProcsPerMinuteID;
public ushort Param;
public float Coeff;
public ushort SpellProcsPerMinuteID;
}
public sealed class SpellRadiusRecord
@@ -460,9 +458,9 @@ namespace Game.DataStorage
public uint Id;
public string DisplayName;
public string DisplayNameShort;
public SpellRangeFlag Flags;
public float[] RangeMin = new float[2];
public float[] RangeMax = new float[2];
public SpellRangeFlag Flags;
}
public sealed class SpellReagentsRecord
@@ -477,46 +475,46 @@ namespace Game.DataStorage
{
public uint Id;
public uint SpellID;
public ushort ScalesFromItemLevel;
public sbyte Class;
public byte MinScalingLevel;
public int Class;
public uint MinScalingLevel;
public uint MaxScalingLevel;
public ushort ScalesFromItemLevel;
}
public sealed class SpellShapeshiftRecord
{
public uint Id;
public uint SpellID;
public sbyte StanceBarOrder;
public uint[] ShapeshiftExclude = new uint[2];
public uint[] ShapeshiftMask = new uint[2];
public byte StanceBarOrder;
}
public sealed class SpellShapeshiftFormRecord
{
public uint Id;
public string Name;
public float DamageVariance;
public SpellShapeshiftFormFlags Flags;
public ushort CombatRoundTime;
public ushort MountTypeID;
public sbyte CreatureType;
public byte BonusActionBar;
public uint AttackIconFileID;
public ushort[] CreatureDisplayID = new ushort[4];
public ushort[] PresetSpellID = new ushort[SpellConst.MaxShapeshift];
public SpellShapeshiftFormFlags Flags;
public int AttackIconFileID;
public sbyte BonusActionBar;
public ushort CombatRoundTime;
public float DamageVariance;
public ushort MountTypeID;
public uint[] CreatureDisplayID = new uint[4];
public uint[] PresetSpellID = new uint[SpellConst.MaxShapeshift];
}
public sealed class SpellTargetRestrictionsRecord
{
public uint Id;
public float ConeDegrees;
public float Width;
public uint Targets;
public ushort TargetCreatureType;
public byte DifficultyID;
public float ConeDegrees;
public byte MaxTargets;
public uint MaxTargetLevel;
public ushort TargetCreatureType;
public int Targets;
public float Width;
public uint SpellID;
}
@@ -524,34 +522,34 @@ namespace Game.DataStorage
{
public uint Id;
public uint SpellID;
public uint[] Totem = new uint[SpellConst.MaxTotems];
public ushort[] RequiredTotemCategoryID = new ushort[SpellConst.MaxTotems];
public uint[] Totem = new uint[SpellConst.MaxTotems];
}
public sealed class SpellXSpellVisualRecord
{
public uint SpellVisualID;
public uint Id;
public float Probability;
public ushort CasterPlayerConditionID;
public ushort CasterUnitConditionID;
public ushort ViewerPlayerConditionID;
public ushort ViewerUnitConditionID;
public uint SpellIconFileID;
public uint ActiveIconFileID;
public byte Flags;
public byte DifficultyID;
public uint SpellVisualID;
public float Probability;
public byte Flags;
public byte Priority;
public int SpellIconFileID;
public int ActiveIconFileID;
public ushort ViewerUnitConditionID;
public uint ViewerPlayerConditionID;
public ushort CasterUnitConditionID;
public uint CasterPlayerConditionID;
public uint SpellID;
}
public sealed class SummonPropertiesRecord
{
public uint Id;
public SummonPropFlags Flags;
public SummonCategory Control;
public ushort Faction;
public uint Faction;
public SummonType Title;
public sbyte Slot;
public int Slot;
public SummonPropFlags Flags;
}
}
+25 -23
View File
@@ -30,48 +30,49 @@ namespace Game.DataStorage
{
public uint Id;
public string Description;
public byte TierID;
public byte Flags;
public byte ColumnIndex;
public byte ClassID;
public ushort SpecID;
public uint SpellID;
public uint OverridesSpellID;
public ushort SpecID;
public byte TierID;
public byte ColumnIndex;
public byte Flags;
public byte[] CategoryMask = new byte[2];
public byte ClassID;
}
public sealed class TaxiNodesRecord
{
public uint Id;
public LocalizedString Name;
public Vector3 Pos;
public uint[] MountCreatureID = new uint[2];
public Vector2 MapOffset;
public float Facing;
public Vector2 FlightMapOffset;
public uint Id;
public ushort ContinentID;
public ushort ConditionID;
public ushort CharacterBitNumber;
public TaxiNodeFlags Flags;
public int UiTextureKitID;
public float Facing;
public uint SpecialIconConditionID;
public uint VisibilityConditionID;
public uint[] MountCreatureID = new uint[2];
}
public sealed class TaxiPathRecord
{
public uint Id;
public ushort FromTaxiNode;
public ushort ToTaxiNode;
public uint Id;
public uint Cost;
}
public sealed class TaxiPathNodeRecord
{
public Vector3 Loc;
public ushort PathID;
public ushort ContinentID;
public byte NodeIndex;
public uint Id;
public ushort PathID;
public uint NodeIndex;
public ushort ContinentID;
public TaxiPathNodeFlags Flags;
public uint Delay;
public ushort ArrivalEventID;
@@ -82,17 +83,17 @@ namespace Game.DataStorage
{
public uint Id;
public string Name;
public uint TotemCategoryMask;
public byte TotemCategoryType;
public int TotemCategoryMask;
}
public sealed class ToyRecord
{
public string SourceText;
public uint Id;
public uint ItemID;
public byte Flags;
public byte SourceTypeEnum;
public uint Id;
public sbyte SourceTypeEnum;
}
public sealed class TransmogHolidayRecord
@@ -104,15 +105,15 @@ namespace Game.DataStorage
public sealed class TransmogSetRecord
{
public string Name;
public ushort ParentTransmogSetID;
public ushort UIOrder;
public byte ExpansionID;
public uint Id;
public byte Flags;
public int TrackingQuestID;
public int ClassMask;
public uint TrackingQuestID;
public int Flags;
public uint TransmogSetGroupID;
public int ItemNameDescriptionID;
public byte TransmogSetGroupID;
public ushort ParentTransmogSetID;
public byte ExpansionID;
public short UiOrder;
}
public sealed class TransmogSetGroupRecord
@@ -132,17 +133,18 @@ namespace Game.DataStorage
public sealed class TransportAnimationRecord
{
public uint Id;
public uint TimeIndex;
public Vector3 Pos;
public byte SequenceID;
public uint TimeIndex;
public uint TransportID;
}
public sealed class TransportRotationRecord
{
public uint Id;
public uint TimeIndex;
public float[] Rot = new float[4];
public uint TimeIndex;
public uint GameObjectsID;
}
}
+59 -8
View File
@@ -14,9 +14,60 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Framework.GameMath;
using Framework.Constants;
namespace Game.DataStorage
{
public sealed class UiMapRecord
{
public LocalizedString Name;
public uint Id;
public int ParentUiMapID;
public int Flags;
public int System;
public UiMapType Type;
public uint LevelRangeMin;
public uint LevelRangeMax;
public int BountySetID;
public uint BountyDisplayLocation;
public int VisibilityPlayerConditionID;
public sbyte HelpTextPosition;
public int BkgAtlasID;
}
public sealed class UiMapAssignmentRecord
{
public Vector2 UiMin;
public Vector2 UiMax;
public Vector3[] Region = new Vector3[2];
public uint Id;
public int UiMapID;
public int OrderIndex;
public int MapID;
public int AreaID;
public int WmoDoodadPlacementID;
public int WmoGroupID;
}
public sealed class UiMapLinkRecord
{
public Vector2 UiMin;
public Vector2 UiMax;
public uint Id;
public int ParentUiMapID;
public int OrderIndex;
public int ChildUiMapID;
}
public sealed class UiMapXMapArtRecord
{
public uint Id;
public int PhaseID;
public int UiMapArtID;
public int UiMapID;
}
public sealed class UnitPowerBarRecord
{
public uint Id;
@@ -24,17 +75,17 @@ namespace Game.DataStorage
public string Cost;
public string OutOfError;
public string ToolTip;
public uint MinPower;
public uint MaxPower;
public ushort StartPower;
public byte CenterPower;
public float RegenerationPeace;
public float RegenerationCombat;
public uint[] FileDataID = new uint[6];
public uint[] Color = new uint[6];
public byte BarType;
public ushort Flags;
public float StartInset;
public float EndInset;
public ushort StartPower;
public ushort Flags;
public byte CenterPower;
public byte BarType;
public byte MinPower;
public uint MaxPower;
public uint[] FileDataID = new uint[6];
public uint[] Color = new uint[6];
}
}
+37 -37
View File
@@ -25,6 +25,7 @@ namespace Game.DataStorage
{
public uint Id;
public VehicleFlags Flags;
public byte FlagsB;
public float TurnSpeed;
public float PitchSpeed;
public float PitchMin;
@@ -36,21 +37,22 @@ namespace Game.DataStorage
public float FacingLimitRight;
public float FacingLimitLeft;
public float CameraYawOffset;
public ushort[] SeatID = new ushort[SharedConst.MaxVehicleSeats];
public ushort VehicleUIIndicatorID;
public ushort[] PowerDisplayID = new ushort[3];
public byte FlagsB;
public byte UiLocomotionType;
public ushort MissileTargetingID;
public ushort VehicleUIIndicatorID;
public int MissileTargetingID;
public ushort[] SeatID = new ushort[8];
public ushort[] PowerDisplayID = new ushort[3];
}
public sealed class VehicleSeatRecord
{
public uint Id;
public Vector3 AttachmentOffset;
public Vector3 CameraOffset;
public VehicleSeatFlags Flags;
public VehicleSeatFlagsB FlagsB;
public uint FlagsC;
public Vector3 AttachmentOffset;
public int FlagsC;
public sbyte AttachmentID;
public float EnterPreDelay;
public float EnterSpeed;
public float EnterGravity;
@@ -58,6 +60,12 @@ namespace Game.DataStorage
public float EnterMaxDuration;
public float EnterMinArcHeight;
public float EnterMaxArcHeight;
public int EnterAnimStart;
public int EnterAnimLoop;
public int RideAnimStart;
public int RideAnimLoop;
public int RideUpperAnimStart;
public int RideUpperAnimLoop;
public float ExitPreDelay;
public float ExitSpeed;
public float ExitGravity;
@@ -65,49 +73,41 @@ namespace Game.DataStorage
public float ExitMaxDuration;
public float ExitMinArcHeight;
public float ExitMaxArcHeight;
public int ExitAnimStart;
public int ExitAnimLoop;
public int ExitAnimEnd;
public short VehicleEnterAnim;
public sbyte VehicleEnterAnimBone;
public short VehicleExitAnim;
public sbyte VehicleExitAnimBone;
public short VehicleRideAnimLoop;
public sbyte VehicleRideAnimLoopBone;
public sbyte PassengerAttachmentID;
public float PassengerYaw;
public float PassengerPitch;
public float PassengerRoll;
public float VehicleEnterAnimDelay;
public float VehicleExitAnimDelay;
public sbyte VehicleAbilityDisplay;
public uint EnterUISoundID;
public uint ExitUISoundID;
public int UiSkinFileDataID;
public float CameraEnteringDelay;
public float CameraEnteringDuration;
public float CameraExitingDelay;
public float CameraExitingDuration;
public Vector3 CameraOffset;
public float CameraPosChaseRate;
public float CameraFacingChaseRate;
public float CameraEnteringZoom;
public float CameraSeatZoomMin;
public float CameraSeatZoomMax;
public uint UiSkinFileDataID;
public short EnterAnimStart;
public short EnterAnimLoop;
public short RideAnimStart;
public short RideAnimLoop;
public short RideUpperAnimStart;
public short RideUpperAnimLoop;
public short ExitAnimStart;
public short ExitAnimLoop;
public short ExitAnimEnd;
public short VehicleEnterAnim;
public short VehicleExitAnim;
public short VehicleRideAnimLoop;
public ushort EnterAnimKitID;
public ushort RideAnimKitID;
public ushort ExitAnimKitID;
public ushort VehicleEnterAnimKitID;
public ushort VehicleRideAnimKitID;
public ushort VehicleExitAnimKitID;
public ushort CameraModeID;
public sbyte AttachmentID;
public sbyte PassengerAttachmentID;
public sbyte VehicleEnterAnimBone;
public sbyte VehicleExitAnimBone;
public sbyte VehicleRideAnimLoopBone;
public byte VehicleAbilityDisplay;
public uint EnterUISoundID;
public ushort ExitUISoundID;
public short EnterAnimKitID;
public short RideAnimKitID;
public short ExitAnimKitID;
public short VehicleEnterAnimKitID;
public short VehicleRideAnimKitID;
public short VehicleExitAnimKitID;
public short CameraModeID;
public bool CanEnterOrExit()
{
@@ -115,7 +115,7 @@ namespace Game.DataStorage
//If it has anmation for enter/ride, means it can be entered/exited by logic
Flags.HasAnyFlag(VehicleSeatFlags.HasLowerAnimForEnter | VehicleSeatFlags.HasLowerAnimForRide));
}
public bool CanSwitchFromSeat() { return Flags.HasAnyFlag(VehicleSeatFlags.CanSwitch); }
public bool CanSwitchFromSeat() { return (Flags & VehicleSeatFlags.CanSwitch) != 0; }
public bool IsUsableByOverride()
{
return Flags.HasAnyFlag(VehicleSeatFlags.Uncontrolled | VehicleSeatFlags.Unk18)
+27 -66
View File
@@ -23,87 +23,48 @@ namespace Game.DataStorage
public sealed class WMOAreaTableRecord
{
public string AreaName;
public uint Id;
public ushort WmoID; // used in root WMO
public byte NameSetID; // used in adt file
public int WmoGroupID; // used in group WMO
public ushort AmbienceID;
public ushort ZoneMusic;
public ushort IntroSound;
public ushort AreaTableID;
public ushort UwIntroSound;
public ushort UwAmbience;
public sbyte NameSetID; // used in adt file
public byte SoundProviderPref;
public byte SoundProviderPrefUnderwater;
public ushort AmbienceID;
public ushort UwAmbience;
public ushort ZoneMusic;
public uint UwZoneMusic;
public ushort IntroSound;
public ushort UwIntroSound;
public ushort AreaTableID;
public byte Flags;
public uint Id;
public byte UwZoneMusic;
public uint WmoID; // used in root WMO
}
public sealed class WorldEffectRecord
{
public uint ID;
public uint TargetAsset;
public ushort CombatConditionID;
public byte TargetType;
public byte WhenToDisplay;
public uint QuestFeedbackEffectID;
public ushort PlayerConditionID;
}
public sealed class WorldMapAreaRecord
{
public string AreaName;
public float LocLeft;
public float LocRight;
public float LocTop;
public float LocBottom;
public uint Flags;
public ushort MapID;
public ushort AreaID;
public short DisplayMapID;
public short DefaultDungeonFloor;
public ushort ParentWorldMapID;
public byte LevelRangeMin;
public byte LevelRangeMax;
public byte BountySetID;
public byte BountyDisplayLocation;
public uint Id;
public uint VisibilityPlayerConditionID;
public uint QuestFeedbackEffectID;
public byte WhenToDisplay;
public byte TargetType;
public int TargetAsset;
public uint PlayerConditionID;
public ushort CombatConditionID;
}
public sealed class WorldMapOverlayRecord
{
public string TextureName;
public uint Id;
public uint UiMapArtID;
public ushort TextureWidth;
public ushort TextureHeight;
public ushort MapAreaID; // idx in WorldMapArea.dbc
public ushort OffsetX;
public uint OffsetY;
public ushort HitRectTop;
public ushort HitRectLeft;
public ushort HitRectBottom;
public ushort HitRectRight;
public ushort PlayerConditionID;
public byte Flags;
public uint[] AreaID = new uint[SharedConst.MaxWorldMapOverlayArea]; // needs checked
}
public sealed class WorldMapTransformsRecord
{
public uint Id;
public Vector3 RegionMin;
public Vector3 RegionMax;
public Vector2 RegionOffset;
public float RegionScale;
public ushort MapID;
public ushort AreaID;
public ushort NewMapID;
public ushort NewDungeonMapID;
public ushort NewAreaID;
public byte Flags;
public int Priority;
public int OffsetX;
public int OffsetY;
public int HitRectTop;
public int HitRectBottom;
public int HitRectLeft;
public int HitRectRight;
public uint PlayerConditionID;
public uint Flags;
public uint[] AreaID = new uint[SharedConst.MaxWorldMapOverlayArea];
}
public sealed class WorldSafeLocsRecord
@@ -111,7 +72,7 @@ namespace Game.DataStorage
public uint Id;
public string AreaName;
public Vector3 Loc;
public float Facing;
public ushort MapID;
public float Facing;
}
}
+1 -1
View File
@@ -2156,7 +2156,7 @@ namespace Game.DungeonFinding
minlevel = dbc.MinLevel;
maxlevel = dbc.MaxLevel;
difficulty = dbc.DifficultyID;
seasonal = dbc.Flags.HasAnyFlag(LfgFlags.Seasonal);
seasonal = dbc.Flags[0].HasAnyFlag(LfgFlags.Seasonal);
}
public uint id;
@@ -39,7 +39,8 @@ namespace Game.Entities
objectTypeMask |= TypeMask.AreaTrigger;
objectTypeId = TypeId.AreaTrigger;
m_updateFlag = UpdateFlag.StationaryPosition | UpdateFlag.Areatrigger;
m_updateFlag.Stationary = true;
m_updateFlag.AreaTrigger = true;
valuesCount = (int)AreaTriggerFields.End;
@@ -142,7 +143,7 @@ namespace Game.Entities
{
AreaTriggerCircularMovementInfo cmi = GetMiscTemplate().CircularMovementInfo;
if (target && GetTemplate().HasFlag(AreaTriggerFlags.HasAttached))
cmi.TargetGUID.Set(target.GetGUID());
cmi.PathTarget.Set(target.GetGUID());
else
cmi.Center.Set(new Vector3(pos.posX, pos.posY, pos.posZ));
@@ -624,12 +625,12 @@ namespace Game.Entities
{
if (_reachedDestination)
{
AreaTriggerReShape reshapeDest = new AreaTriggerReShape();
AreaTriggerRePath reshapeDest = new AreaTriggerRePath();
reshapeDest.TriggerGUID = GetGUID();
SendMessageToSet(reshapeDest, true);
}
AreaTriggerReShape reshape = new AreaTriggerReShape();
AreaTriggerRePath reshape = new AreaTriggerRePath();
reshape.TriggerGUID = GetGUID();
reshape.AreaTriggerSpline.HasValue = true;
reshape.AreaTriggerSpline.Value.ElapsedTimeForMovement = GetElapsedTimeForMovement();
@@ -644,7 +645,7 @@ namespace Game.Entities
void InitCircularMovement(AreaTriggerCircularMovementInfo cmi, uint timeToTarget)
{
// Circular movement requires either a center position or an attached unit
Cypher.Assert(cmi.Center.HasValue || cmi.TargetGUID.HasValue);
Cypher.Assert(cmi.Center.HasValue || cmi.PathTarget.HasValue);
// should be sent in object create packets only
updateValues[(int)AreaTriggerFields.TimeToTarget].UnsignedValue = timeToTarget;
@@ -656,7 +657,7 @@ namespace Game.Entities
if (IsInWorld)
{
AreaTriggerReShape reshape = new AreaTriggerReShape();
AreaTriggerRePath reshape = new AreaTriggerRePath();
reshape.TriggerGUID = GetGUID();
reshape.AreaTriggerCircularMovement = _circularMovementInfo;
@@ -671,12 +672,12 @@ namespace Game.Entities
Position GetCircularMovementCenterPosition()
{
if (_circularMovementInfo.HasValue)
if (!_circularMovementInfo.HasValue)
return null;
if (_circularMovementInfo.Value.TargetGUID.HasValue)
if (_circularMovementInfo.Value.PathTarget.HasValue)
{
WorldObject center = Global.ObjAccessor.GetWorldObject(this, _circularMovementInfo.Value.TargetGUID.Value);
WorldObject center = Global.ObjAccessor.GetWorldObject(this, _circularMovementInfo.Value.PathTarget.Value);
if (center)
return center;
}
@@ -120,7 +120,7 @@ namespace Game.Entities
{
public void Write(WorldPacket data)
{
data.WriteBit(TargetGUID.HasValue);
data.WriteBit(PathTarget.HasValue);
data.WriteBit(Center.HasValue);
data.WriteBit(CounterClockwise);
data.WriteBit(CanLoop);
@@ -133,14 +133,14 @@ namespace Game.Entities
data.WriteFloat(InitialAngle);
data.WriteFloat(ZOffset);
if (TargetGUID.HasValue)
data.WritePackedGuid(TargetGUID.Value);
if (PathTarget.HasValue)
data.WritePackedGuid(PathTarget.Value);
if (Center.HasValue)
data.WriteVector3(Center.Value);
}
public Optional<ObjectGuid> TargetGUID;
public Optional<ObjectGuid> PathTarget;
public Optional<Vector3> Center;
public bool CounterClockwise;
public bool CanLoop;
@@ -228,6 +228,9 @@ namespace Game.Entities
public uint MorphCurveId;
public uint FacingCurveId;
public uint AnimId;
public uint AnimKitId;
public uint DecalPropertiesId;
public uint TimeToTarget;
+14 -3
View File
@@ -32,7 +32,8 @@ namespace Game.Entities
objectTypeMask |= TypeMask.Conversation;
objectTypeId = TypeId.Conversation;
m_updateFlag = UpdateFlag.StationaryPosition;
m_updateFlag.Stationary = true;
m_updateFlag.Conversation = true;
valuesCount = (int)ConversationFields.End;
_dynamicValuesCount = (int)ConversationDynamicFields.End;
@@ -118,6 +119,7 @@ namespace Game.Entities
SetUInt32Value(ConversationFields.LastLineEndTime, conversationTemplate.LastLineEndTime);
_duration = conversationTemplate.LastLineEndTime;
_textureKitId = conversationTemplate.TextureKitId;
for (ushort actorIndex = 0; actorIndex < conversationTemplate.Actors.Count; ++actorIndex)
{
@@ -125,7 +127,8 @@ namespace Game.Entities
if (actor != null)
{
ConversationDynamicFieldActor actorField = new ConversationDynamicFieldActor();
actorField.ActorTemplate = actor;
actorField.ActorTemplate.CreatureId = actor.CreatureId;
actorField.ActorTemplate.CreatureModelId = actor.CreatureModelId;
actorField.Type = ConversationDynamicFieldActor.ActorType.CreatureActor;
SetDynamicStructuredValue(ConversationDynamicFields.Actors, actorIndex, actorField);
}
@@ -189,6 +192,7 @@ namespace Game.Entities
}
uint GetDuration() { return _duration; }
public uint GetTextureKitId() { return _textureKitId; }
public ObjectGuid GetCreatorGuid() { return _creatorGuid; }
@@ -201,6 +205,7 @@ namespace Game.Entities
Position _stationaryPosition = new Position();
ObjectGuid _creatorGuid;
uint _duration;
uint _textureKitId;
List<ObjectGuid> _participants = new List<ObjectGuid>();
}
@@ -218,7 +223,13 @@ namespace Game.Entities
}
public ObjectGuid ActorGuid;
public ConversationActorTemplate ActorTemplate;
public ActorTemplateStruct ActorTemplate;
public struct ActorTemplateStruct
{
public uint CreatureId;
public uint CreatureModelId;
}
public ActorType Type;
}
+1 -1
View File
@@ -32,7 +32,7 @@ namespace Game.Entities
objectTypeId = TypeId.Corpse;
objectTypeMask |= TypeMask.Corpse;
m_updateFlag = UpdateFlag.StationaryPosition;
m_updateFlag.Stationary = true;
valuesCount = (int)CorpseFields.End;
+44 -26
View File
@@ -141,6 +141,10 @@ namespace Game.Entities
if (setSpawnTime)
m_respawnTime = Time.UnixTime + respawnDelay;
// if corpse was removed during falling, the falling will continue and override relocation to respawn position
if (IsFalling())
StopMoving();
float x, y, z, o;
GetRespawnPosition(out x, out y, out z, out o);
SetHomePosition(x, y, z, o);
@@ -193,22 +197,22 @@ namespace Game.Entities
SetByteValue(UnitFields.Bytes0, 1, (byte)cinfo.UnitClass);
// Cancel load if no model defined
if (cinfo.GetFirstValidModelId() == 0)
if (cinfo.GetFirstValidModel() == null)
{
Log.outError(LogFilter.Sql, "Creature (Entry: {0}) has no model defined in table `creature_template`, can't load. ", entry);
return false;
}
uint displayID = ObjectManager.ChooseDisplayId(GetCreatureTemplate(), data);
CreatureModelInfo minfo = Global.ObjectMgr.GetCreatureModelRandomGender(ref displayID);
CreatureModel model = ObjectManager.ChooseDisplayId(cinfo, data);
CreatureModelInfo minfo = Global.ObjectMgr.GetCreatureModelRandomGender(ref model, cinfo);
if (minfo == null) // Cancel load if no model defined
{
Log.outError(LogFilter.Sql, "Creature (Entry: {0}) has no model defined in table `creature_template`, can't load. ", entry);
Log.outError(LogFilter.Sql, "Creature (Entry: {0}) has invalid model {1} defined in table `creature_template`, can't load.", entry, model.CreatureDisplayID);
return false;
}
SetDisplayId(displayID);
SetNativeDisplayId(displayID);
SetDisplayId(model.CreatureDisplayID, model.DisplayScale);
SetNativeDisplayId(model.CreatureDisplayID, model.DisplayScale);
SetByteValue(UnitFields.Bytes0, 3, (byte)minfo.gender);
// Load creature equipment
@@ -279,6 +283,8 @@ namespace Game.Entities
SetUInt32Value(ObjectFields.DynamicFlags, dynamicFlags);
SetUInt32Value(UnitFields.StateAnimId, (uint)CliDB.AnimationDataStorage.Count);
RemoveFlag(UnitFields.Flags, UnitFlags.InCombat);
SetBaseAttackTime(WeaponAttackType.BaseAttack, cInfo.BaseAttackTime);
@@ -768,7 +774,8 @@ namespace Game.Entities
if (!CreateFromProto(guidlow, entry, data, vehId))
return false;
switch (GetCreatureTemplate().Rank)
cinfo = GetCreatureTemplate(); // might be different than initially requested
switch (cinfo.Rank)
{
case CreatureEliteType.Rare:
m_corpseDelay = WorldConfig.GetUIntValue(WorldCfg.CorpseDecayRare);
@@ -797,12 +804,12 @@ namespace Game.Entities
Relocate(x, y, z, ang);
}
uint displayID = GetNativeDisplayId();
CreatureModelInfo minfo = Global.ObjectMgr.GetCreatureModelRandomGender(ref displayID);
CreatureModel display = new CreatureModel(GetNativeDisplayId(), GetNativeDisplayScale(), 1.0f);
CreatureModelInfo minfo = Global.ObjectMgr.GetCreatureModelRandomGender(ref display, cinfo);
if (minfo != null && !IsTotem()) // Cancel load if no model defined or if totem
{
SetDisplayId(displayID);
SetNativeDisplayId(displayID);
SetDisplayId(display.CreatureDisplayID, display.DisplayScale);
SetNativeDisplayId(display.CreatureDisplayID, display.DisplayScale);
SetByteValue(UnitFields.Bytes0, 3, (byte)minfo.gender);
}
@@ -815,10 +822,10 @@ namespace Game.Entities
m_serverSideVisibilityDetect.SetValue(ServerSideVisibilityType.Ghost, GhostVisibilityType.Ghost);
}
if (GetCreatureTemplate().FlagsExtra.HasAnyFlag(CreatureFlagsExtra.IgnorePathfinding))
if (cinfo.FlagsExtra.HasAnyFlag(CreatureFlagsExtra.IgnorePathfinding))
AddUnitState(UnitState.IgnorePathfinding);
if (GetCreatureTemplate().FlagsExtra.HasAnyFlag(CreatureFlagsExtra.ImmunityKnockback))
if (cinfo.FlagsExtra.HasAnyFlag(CreatureFlagsExtra.ImmunityKnockback))
{
ApplySpellImmune(0, SpellImmunity.Effect, SpellEffectName.KnockBack, true);
ApplySpellImmune(0, SpellImmunity.Effect, SpellEffectName.KnockBackDest, true);
@@ -1014,8 +1021,8 @@ namespace Game.Entities
CreatureTemplate cinfo = GetCreatureTemplate();
if (cinfo != null)
{
if (displayId == cinfo.ModelId1 || displayId == cinfo.ModelId2 ||
displayId == cinfo.ModelId3 || displayId == cinfo.ModelId4)
foreach (CreatureModel model in cinfo.Models)
if (displayId != 0 && displayId == model.CreatureDisplayID)
displayId = 0;
if (npcflag == (uint)cinfo.Npcflag)
@@ -1620,12 +1627,12 @@ namespace Game.Entities
setDeathState(DeathState.JustRespawned);
uint displayID = GetNativeDisplayId();
CreatureModelInfo minfo = Global.ObjectMgr.GetCreatureModelRandomGender(ref displayID);
CreatureModel display = new CreatureModel(GetNativeDisplayId(), GetNativeDisplayScale(), 1.0f);
CreatureModelInfo minfo = Global.ObjectMgr.GetCreatureModelRandomGender(ref display, GetCreatureTemplate());
if (minfo != null) // Cancel load if no model defined
{
SetDisplayId(displayID);
SetNativeDisplayId(displayID);
SetDisplayId(display.CreatureDisplayID, display.DisplayScale);
SetNativeDisplayId(display.CreatureDisplayID, display.DisplayScale);
SetByteValue(UnitFields.Bytes0, 3, (byte)minfo.gender);
}
@@ -2372,7 +2379,7 @@ namespace Game.Entities
int targetLevelWithDelta = ((int)unitTarget.getLevel() + GetInt32Value(UnitFields.ScalingLevelDelta));
if (target.IsPlayer())
targetLevelWithDelta += target.GetInt32Value(PlayerFields.ScalingLevelDelta);
targetLevelWithDelta += target.GetInt32Value(ActivePlayerFields.ScalingPlayerLevelDelta);
return (uint)MathFunctions.RoundToInterval(ref targetLevelWithDelta, GetInt32Value(UnitFields.ScalingLevelMin), GetInt32Value(UnitFields.ScalingLevelMax));
}
@@ -2622,6 +2629,10 @@ namespace Game.Entities
if (m_playerMovingMe != null)
return;
// Creatures with CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE should control MovementFlags in your own scripts
if (GetCreatureTemplate().FlagsExtra.HasAnyFlag(CreatureFlagsExtra.NoMoveFlagsUpdate))
return;
// Set the movement flags if the creature is in that mode. (Only fly if actually in air, only swim if in water, etc)
float ground = GetMap().GetHeight(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZMinusOffset());
@@ -2653,23 +2664,30 @@ namespace Game.Entities
CreatureModelInfo minfo = Global.ObjectMgr.GetCreatureModelInfo(GetDisplayId());
if (minfo != null)
{
SetFloatValue(UnitFields.BoundingRadius, minfo.BoundingRadius * scale);
SetFloatValue(UnitFields.CombatReach, minfo.CombatReach * scale);
SetFloatValue(UnitFields.BoundingRadius, (IsPet() ? 1.0f : minfo.BoundingRadius) * scale);
SetFloatValue(UnitFields.CombatReach, (IsPet() ? SharedConst.DefaultCombatReach : minfo.CombatReach) * scale);
}
}
public override void SetDisplayId(uint modelId)
public override void SetDisplayId(uint modelId, float displayScale = 1f)
{
base.SetDisplayId(modelId);
base.SetDisplayId(modelId, displayScale);
CreatureModelInfo minfo = Global.ObjectMgr.GetCreatureModelInfo(modelId);
if (minfo != null)
{
SetFloatValue(UnitFields.BoundingRadius, minfo.BoundingRadius * GetObjectScale());
SetFloatValue(UnitFields.CombatReach, minfo.CombatReach * GetObjectScale());
SetFloatValue(UnitFields.BoundingRadius, (IsPet() ? 1.0f : minfo.BoundingRadius) * GetObjectScale());
SetFloatValue(UnitFields.CombatReach, (IsPet() ? SharedConst.DefaultCombatReach : minfo.CombatReach) * GetObjectScale());
}
}
public void SetDisplayFromModel(int modelIdx)
{
CreatureModel model = GetCreatureTemplate().GetModelByIdx(modelIdx);
if (model != null)
SetDisplayId(model.CreatureDisplayID, model.DisplayScale);
}
public override void SetTarget(ObjectGuid guid)
{
if (IsFocusing(null, true))
+65 -58
View File
@@ -28,10 +28,7 @@ namespace Game.Entities
public uint Entry;
public uint[] DifficultyEntry = new uint[SharedConst.MaxCreatureDifficulties];
public uint[] KillCredit = new uint[SharedConst.MaxCreatureKillCredit];
public uint ModelId1;
public uint ModelId2;
public uint ModelId3;
public uint ModelId4;
public List<CreatureModel> Models = new List<CreatureModel>();
public string Name;
public string FemaleName;
public string SubName;
@@ -91,75 +88,67 @@ namespace Game.Entities
public CreatureFlagsExtra FlagsExtra;
public uint ScriptID;
public uint GetRandomValidModelId()
public CreatureModel GetModelByIdx(int idx)
{
byte c = 0;
uint[] modelIDs = new uint[4];
if (ModelId1 != 0)
modelIDs[c++] = ModelId1;
if (ModelId2 != 0)
modelIDs[c++] = ModelId2;
if (ModelId3 != 0)
modelIDs[c++] = ModelId3;
if (ModelId4 != 0)
modelIDs[c++] = ModelId4;
return c > 0 ? modelIDs[RandomHelper.IRand(0, c - 1)] : 0;
}
public uint GetFirstValidModelId()
{
if (ModelId1 != 0)
return ModelId1;
if (ModelId2 != 0)
return ModelId2;
if (ModelId3 != 0)
return ModelId3;
if (ModelId4 != 0)
return ModelId4;
return 0;
return idx < Models.Count ? Models[idx] : null;
}
public uint GetFirstInvisibleModel()
public CreatureModel GetRandomValidModel()
{
CreatureModelInfo modelInfo = Global.ObjectMgr.GetCreatureModelInfo(ModelId1);
if (modelInfo != null && modelInfo.IsTrigger)
return ModelId1;
if (Models.Empty())
return null;
modelInfo = Global.ObjectMgr.GetCreatureModelInfo(ModelId2);
if (modelInfo != null && modelInfo.IsTrigger)
return ModelId2;
// If only one element, ignore the Probability (even if 0)
if (Models.Count == 1)
return Models[0];
modelInfo = Global.ObjectMgr.GetCreatureModelInfo(ModelId3);
if (modelInfo != null && modelInfo.IsTrigger)
return ModelId3;
var selectedItr = Models.SelectRandomElementByWeight(model =>
{
return model.Probability;
});
modelInfo = Global.ObjectMgr.GetCreatureModelInfo(ModelId4);
if (modelInfo != null && modelInfo.IsTrigger)
return ModelId4;
return selectedItr;
}
public CreatureModel GetFirstValidModel()
{
foreach (CreatureModel model in Models)
if (model.CreatureDisplayID != 0)
return model;
return 11686;
return null;
}
public uint GetFirstVisibleModel()
public CreatureModel GetModelWithDisplayId(uint displayId)
{
CreatureModelInfo modelInfo = Global.ObjectMgr.GetCreatureModelInfo(ModelId1);
if (modelInfo != null && !modelInfo.IsTrigger)
return ModelId1;
foreach (CreatureModel model in Models)
if (displayId == model.CreatureDisplayID)
return model;
modelInfo = Global.ObjectMgr.GetCreatureModelInfo(ModelId2);
if (modelInfo != null && !modelInfo.IsTrigger)
return ModelId2;
return null;
}
modelInfo = Global.ObjectMgr.GetCreatureModelInfo(ModelId3);
if (modelInfo != null && !modelInfo.IsTrigger)
return ModelId3;
public CreatureModel GetFirstInvisibleModel()
{
foreach (CreatureModel model in Models)
{
CreatureModelInfo modelInfo = Global.ObjectMgr.GetCreatureModelInfo(model.CreatureDisplayID);
if (modelInfo != null && modelInfo.IsTrigger)
return model;
}
modelInfo = Global.ObjectMgr.GetCreatureModelInfo(ModelId4);
if (modelInfo != null && !modelInfo.IsTrigger)
return ModelId4;
return CreatureModel.DefaultInvisibleModel;
}
return 17519;
public CreatureModel GetFirstVisibleModel()
{
foreach (CreatureModel model in Models)
{
CreatureModelInfo modelInfo = Global.ObjectMgr.GetCreatureModelInfo(model.CreatureDisplayID);
if (modelInfo != null && !modelInfo.IsTrigger)
return model;
}
return CreatureModel.DefaultVisibleModel;
}
public SkillType GetRequiredLootSkill()
@@ -314,6 +303,24 @@ namespace Game.Entities
public bool IsTrigger;
}
public class CreatureModel
{
public static CreatureModel DefaultInvisibleModel = new CreatureModel(11686, 1.0f, 1.0f);
public static CreatureModel DefaultVisibleModel = new CreatureModel(17519, 1.0f, 1.0f);
public uint CreatureDisplayID;
public float DisplayScale;
public float Probability;
public CreatureModel() { }
public CreatureModel(uint creatureDisplayID, float displayScale, float probability)
{
CreatureDisplayID = creatureDisplayID;
DisplayScale = displayScale;
Probability = probability;
}
}
public class CreatureAddon
{
public uint path_id;
+8 -2
View File
@@ -316,6 +316,7 @@ namespace Game.Misc
}
GossipPOI packet = new GossipPOI();
packet.ID = pointOfInterest.ID;
packet.Name = pointOfInterest.Name;
LocaleConstant locale = _session.GetSessionDbLocaleIndex();
@@ -431,10 +432,11 @@ namespace Game.Misc
packet.InformUnit = _session.GetPlayer().GetDivider();
packet.QuestID = quest.Id;
packet.PortraitGiver = quest.QuestGiverPortrait;
packet.PortraitGiverMount = quest.QuestGiverPortraitMount;
packet.PortraitTurnIn = quest.QuestTurnInPortrait;
packet.AutoLaunched = autoLaunched;
packet.DisplayPopup = displayPopup;
packet.QuestFlags[0] = (uint)quest.Flags;
packet.QuestFlags[0] = (uint)(quest.Flags & (WorldConfig.GetBoolValue(WorldCfg.QuestIgnoreAutoAccept) ? ~QuestFlags.AutoAccept : ~QuestFlags.None));
packet.QuestFlags[1] = (uint)quest.FlagsEx;
packet.SuggestedPartyMembers = quest.SuggestedPlayers;
@@ -501,6 +503,7 @@ namespace Game.Misc
packet.Info.QuestID = quest.Id;
packet.Info.QuestType = (int)quest.Type;
packet.Info.QuestLevel = quest.Level;
packet.Info.QuestScalingFactionGroup = quest.ScalingFactionGroup;
packet.Info.QuestMaxScalingLevel = quest.MaxScalingLevel;
packet.Info.QuestPackageID = quest.PackageID;
packet.Info.QuestMinLevel = quest.MinLevel;
@@ -532,12 +535,14 @@ namespace Game.Misc
packet.Info.StartItem = quest.SourceItemId;
packet.Info.Flags = (uint)quest.Flags;
packet.Info.FlagsEx = (uint)quest.FlagsEx;
packet.Info.FlagsEx2 = (uint)quest.FlagsEx2;
packet.Info.RewardTitle = quest.RewardTitleId;
packet.Info.RewardArenaPoints = quest.RewardArenaPoints;
packet.Info.RewardSkillLineID = quest.RewardSkillId;
packet.Info.RewardNumSkillUps = quest.RewardSkillPoints;
packet.Info.RewardFactionFlags = quest.RewardReputationMask;
packet.Info.PortraitGiver = quest.QuestGiverPortrait;
packet.Info.PortraitGiverMount = quest.QuestGiverPortraitMount;
packet.Info.PortraitTurnIn = quest.QuestTurnInPortrait;
for (byte i = 0; i < SharedConst.QuestItemDropCount; ++i)
@@ -574,7 +579,7 @@ namespace Game.Misc
packet.Info.POIPriority = quest.POIPriority;
packet.Info.AllowableRaces = quest.AllowableRaces;
packet.Info.QuestRewardID = (int)quest.QuestRewardID;
packet.Info.TreasurePickerID = (int)quest.TreasurePickerID;
packet.Info.Expansion = quest.Expansion;
foreach (QuestObjective questObjective in quest.Objectives)
@@ -654,6 +659,7 @@ namespace Game.Misc
packet.PortraitTurnIn = quest.QuestTurnInPortrait;
packet.PortraitGiver = quest.QuestGiverPortrait;
packet.PortraitGiverMount = quest.QuestGiverPortraitMount;
packet.QuestPackageID = quest.PackageID;
packet.QuestData = offer;
+25 -4
View File
@@ -15,8 +15,7 @@ namespace Game.Entities
public Array<uint> ReqAbility = new Array<uint>(3);
public byte ReqLevel;
public uint LearnedSpellId;
public bool IsCastable() { return LearnedSpellId != SpellId; }
public bool IsCastable() { return Global.SpellMgr.GetSpellInfo(SpellId).HasEffect(SpellEffectName.LearnSpell); }
}
public class Trainer
@@ -108,7 +107,7 @@ namespace Game.Entities
TrainerSpellState GetSpellState(Player player, TrainerSpell trainerSpell)
{
if (player.HasSpell(trainerSpell.IsCastable() ? trainerSpell.LearnedSpellId : trainerSpell.SpellId))
if (player.HasSpell(trainerSpell.SpellId))
return TrainerSpellState.Known;
// check race/class requirement
@@ -128,10 +127,32 @@ namespace Game.Entities
return TrainerSpellState.Unavailable;
// check ranks
uint previousRankSpellId = Global.SpellMgr.GetPrevSpellInChain(trainerSpell.LearnedSpellId);
bool hasLearnSpellEffect = false;
bool knowsAllLearnedSpells = true;
foreach (SpellEffectInfo spellEffect in Global.SpellMgr.GetSpellInfo(trainerSpell.SpellId).GetEffectsForDifficulty(Difficulty.None))
{
if (spellEffect == null || !spellEffect.IsEffect(SpellEffectName.LearnSpell))
continue;
hasLearnSpellEffect = true;
if (!player.HasSpell(spellEffect.TriggerSpell))
knowsAllLearnedSpells = false;
uint previousRankSpellId = Global.SpellMgr.GetPrevSpellInChain(spellEffect.TriggerSpell);
if (previousRankSpellId != 0)
if (!player.HasSpell(previousRankSpellId))
return TrainerSpellState.Unavailable;
}
if (!hasLearnSpellEffect)
{
uint previousRankSpellId = Global.SpellMgr.GetPrevSpellInChain(trainerSpell.SpellId);
if (previousRankSpellId != 0)
if (!player.HasSpell(previousRankSpellId))
return TrainerSpellState.Unavailable;
}
else if (knowsAllLearnedSpells)
return TrainerSpellState.Known;
// check additional spell requirement
foreach (var spellId in Global.SpellMgr.GetSpellsRequiredForSpellBounds(trainerSpell.SpellId))
+1 -1
View File
@@ -27,7 +27,7 @@ namespace Game.Entities
objectTypeMask |= TypeMask.DynamicObject;
objectTypeId = TypeId.DynamicObject;
m_updateFlag = UpdateFlag.StationaryPosition;
m_updateFlag.Stationary = true;
valuesCount = (int)DynamicObjectFields.End;
}
@@ -41,7 +41,8 @@ namespace Game.Entities
objectTypeMask |= TypeMask.GameObject;
objectTypeId = TypeId.GameObject;
m_updateFlag = UpdateFlag.StationaryPosition | UpdateFlag.Rotation;
m_updateFlag.Stationary = true;
m_updateFlag.Rotation = true;
valuesCount = (int)GameObjectFields.End;
m_respawnDelayTime = 300;
@@ -219,7 +220,7 @@ namespace Game.Entities
else
{
guid = ObjectGuid.Create(HighGuid.Transport, map.GenerateLowGuid(HighGuid.Transport));
m_updateFlag |= UpdateFlag.Transport;
m_updateFlag.ServerTime = true;
}
_Create(guid);
@@ -252,7 +253,7 @@ namespace Game.Entities
if (m_goTemplateAddon.WorldEffectID != 0)
{
m_updateFlag |= UpdateFlag.Gameobject;
m_updateFlag.GameObject = true;
SetWorldEffectID(m_goTemplateAddon.WorldEffectID);
}
}
@@ -274,6 +275,8 @@ namespace Game.Entities
SetGoState(goState);
SetGoArtKit((byte)artKit);
SetUInt32Value(GameObjectFields.StateAnimId, (uint)CliDB.AnimationDataStorage.Count);
switch (goInfo.type)
{
case GameObjectTypes.FishingHole:
@@ -356,7 +359,7 @@ namespace Game.Entities
if (gameObjectAddon != null && gameObjectAddon.WorldEffectID != 0)
{
m_updateFlag |= UpdateFlag.Gameobject;
m_updateFlag.GameObject = true;
SetWorldEffectID(gameObjectAddon.WorldEffectID);
}
@@ -194,6 +194,18 @@ namespace Game.Entities
[FieldOffset(68)]
public challengemodereward ChallengeModeReward;
[FieldOffset(68)]
public multi Multi;
[FieldOffset(68)]
public siegeableMulti SiegeableMulti;
[FieldOffset(68)]
public siegeableMO SiegeableMO;
[FieldOffset(68)]
public pvpReward PvpReward;
[FieldOffset(68)]
public raw Raw;
@@ -264,6 +276,10 @@ namespace Game.Entities
return CapturePoint.open;
case GameObjectTypes.GatheringNode:
return GatheringNode.open;
case GameObjectTypes.ChallengeModeReward:
return ChallengeModeReward.open;
case GameObjectTypes.PvpReward:
return PvpReward.open;
default:
return 0;
}
@@ -490,7 +506,7 @@ namespace Game.Entities
public uint usegrouplootrules; // 15 use group loot rules, enum { false, true, }; Default: false
public uint floatingTooltip; // 16 floatingTooltip, enum { false, true, }; Default: false
public uint conditionID1; // 17 conditionID1, References: PlayerCondition, NoValue = 0
public int xpLevel; // 18 xpLevel, int, Min value: -1, Max value: 123, Default value: 0
public uint xpLevel; // 18 XP Level Range, References: ContentTuning, NoValue = 0
public uint xpDifficulty; // 19 xpDifficulty, enum { No Exp, Trivial, Very Small, Small, Substandard, Standard, High, Epic, Dungeon, 5, }; Default: No Exp
public uint lootLevel; // 20 lootLevel, int, Min value: 0, Max value: 123, Default value: 0
public uint GroupXP; // 21 Group XP, enum { false, true, }; Default: false
@@ -505,6 +521,7 @@ namespace Game.Entities
public uint chestPersonalLoot; // 30 chest Personal Loot, References: Treasure, NoValue = 0
public uint turnpersonallootsecurityoff; // 31 turn personal loot security off, enum { false, true, }; Default: false
public uint ChestProperties; // 32 Chest Properties, References: ChestProperties, NoValue = 0
public uint chestPushLoot; // 33 chest Push Loot, References: Treasure, NoValue = 0
}
@@ -710,6 +727,7 @@ namespace Game.Entities
{
public uint creatureID; // 0 creatureID, References: Creature, NoValue = 0
public uint charges; // 1 charges, int, Min value: 0, Max value: 65535, Default value: 1
public uint Preferonlyifinlineofsight; // 2 Prefer only if in line of sight (expensive), enum { false, true, }; Default: false
}
@@ -885,7 +903,10 @@ namespace Game.Entities
public uint startOpen; // 1 startOpen, enum { false, true, }; Default: false
public uint autoClose; // 2 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
public uint BlocksPathsDown; // 3 Blocks Paths Down, enum { false, true, }; Default: false
public uint PathBlockerBump; // 4 Path Blocker Bump (ft), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
public int PathBlockerBump; // 4 Path Blocker Bump (ft), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
public uint GiganticAOI; // 5 Gigantic AOI, enum { false, true, }; Default: false
public uint InfiniteAOI; // 6 Infinite AOI, enum { false, true, }; Default: false
public uint DoorisOpaque; // 7 Door is Opaque (Disable portal on close), enum { false, true, }; Default: false
}
@@ -971,7 +992,7 @@ namespace Game.Entities
public struct phaseablemo
{
public int SpawnMap; // 0 Spawn Map, References: Map, NoValue = -1
public uint AreaNameSet; // 1 Area Name Set (Index), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
public int AreaNameSet; // 1 Area Name Set (Index), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
public uint DoodadSetA; // 2 Doodad Set A, int, Min value: 0, Max value: 2147483647, Default value: 0
public uint DoodadSetB; // 3 Doodad Set B, int, Min value: 0, Max value: 2147483647, Default value: 0
}
@@ -1009,7 +1030,7 @@ namespace Game.Entities
public struct uilink
{
public uint UILinkType; // 0 UI Link Type, enum { Adventure Journal, Obliterum Forge, }; Default: Adventure Journal
public uint UILinkType; // 0 UI Link Type, enum { Adventure Journal, Obliterum Forge, Scrapping Machine}; Default: Adventure Journal
public uint allowMounted; // 1 allowMounted, enum { false, true, }; Default: false
public uint GiganticAOI; // 2 Gigantic AOI, enum { false, true, }; Default: false
public uint spellFocusType; // 3 spellFocusType, References: SpellFocusObject, NoValue = 0
@@ -1032,7 +1053,7 @@ namespace Game.Entities
public uint openTextID; // 9 openTextID, References: BroadcastText, NoValue = 0
public uint floatingTooltip; // 10 floatingTooltip, enum { false, true, }; Default: false
public uint conditionID1; // 11 conditionID1, References: PlayerCondition, NoValue = 0
public uint xpLevel; // 12 xpLevel, int, Min value: -1, Max value: 123, Default value: 0
public uint XPLevelRange; // 12 XP Level Range, References: ContentTuning, NoValue = 0
public uint xpDifficulty; // 13 xpDifficulty, enum { No Exp, Trivial, Very Small, Small, Substandard, Standard, High, Epic, Dungeon, 5, }; Default: No Exp
public uint spell; // 14 spell, References: Spell, NoValue = 0
public uint GiganticAOI; // 15 Gigantic AOI, enum { false, true, }; Default: false
@@ -1041,12 +1062,44 @@ namespace Game.Entities
public uint MaxNumberofLoots; // 18 Max Number of Loots, int, Min value: 1, Max value: 40, Default value: 10
public uint logloot; // 19 log loot, enum { false, true, }; Default: false
public uint linkedTrap; // 20 linkedTrap, References: GameObjects, NoValue = 0
public uint PlayOpenAnimationonOpening; // 21 Play Open Animation on Opening, enum { false, true, }; Default: false
}
public struct challengemodereward
{
public uint chestLoot; // 0 chestLoot, References: Treasure, NoValue = 0
public uint WhenAvailable; // 1 When Available, References: GameObjectDisplayInfo, NoValue = 0
public uint open; // 2 open, References: Lock_, NoValue = 0
public uint openTextID; // 3 openTextID, References: BroadcastText, NoValue = 0
}
public struct multi
{
public uint MultiProperties; // 0 Multi Properties, References: MultiProperties, NoValue = 0
}
public struct siegeableMulti
{
public uint MultiProperties; // 0 Multi Properties, References: MultiProperties, NoValue = 0
public uint InitialDamage; // 1 Initial Damage, enum { None, Raw, Ratio, }; Default: None
}
public struct siegeableMO
{
public uint SiegeableProperties; // 0 Siegeable Properties, References: SiegeableProperties, NoValue = 0
public uint DoodadSetA; // 1 Doodad Set A, int, Min value: 0, Max value: 2147483647, Default value: 0
public uint DoodadSetB; // 2 Doodad Set B, int, Min value: 0, Max value: 2147483647, Default value: 0
public uint DoodadSetC; // 3 Doodad Set C, int, Min value: 0, Max value: 2147483647, Default value: 0
public int SpawnMap; // 4 Spawn Map, References: Map, NoValue = -1
public int AreaNameSet; // 5 Area Name Set (Index), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
}
public struct pvpReward
{
public uint chestLoot; // 0 chestLoot, References: Treasure, NoValue = 0
public uint WhenAvailable; // 1 When Available, References: GameObjectDisplayInfo, NoValue = 0
public uint open; // 2 open, References: Lock_, NoValue = 0
public uint openTextID; // 3 openTextID, References: BroadcastText, NoValue = 0
}
#endregion
}

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