Core/Creatures: Reworked setting move types in database

Port From (https://github.com/TrinityCore/TrinityCore/commit/f8c03a90661610e289029c78d2055d7b73a5ad98)
This commit is contained in:
hondacrx
2021-08-24 12:23:39 -04:00
parent 89058fec83
commit e4240fcd94
13 changed files with 669 additions and 492 deletions
+29 -1
View File
@@ -74,7 +74,7 @@ namespace Game.Entities
public uint MaxGold;
public string AIName;
public uint MovementType;
public InhabitType InhabitType;
public CreatureMovementData Movement;
public float HoverHeight;
public float ModHealth;
public float ModHealthExtra;
@@ -347,6 +347,34 @@ namespace Game.Entities
public CreatureData() : base(SpawnObjectType.Creature) { }
}
public class CreatureMovementData
{
public CreatureGroundMovementType Ground;
public CreatureFlightMovementType Flight;
public bool Swim;
public bool Rooted;
public CreatureMovementData()
{
Ground = CreatureGroundMovementType.Run;
Flight = CreatureFlightMovementType.None;
Swim = true;
Rooted = false;
}
bool IsGroundAllowed() { return Ground != CreatureGroundMovementType.None; }
bool IsSwimAllowed() { return Swim; }
bool IsFlightAllowed() { return Flight != CreatureFlightMovementType.None; }
bool IsRooted() { return Rooted; }
public override string ToString()
{
return $"Ground: {Ground}, Swim: {Swim}, Flight: {Flight} {(Rooted ? ", Rooted" : "")}";
}
}
public class CreatureModelInfo
{
public float BoundingRadius;