Core/Player: Added PlayerCreateMode field to playercreateinfo_cast_spell to only cast spells based on related mode

Port From (https://github.com/TrinityCore/TrinityCore/commit/8a61024cfad05279791badf33fcdb5a608ad6e94)
This commit is contained in:
hondacrx
2022-02-25 19:43:04 -05:00
parent fcc371968a
commit 5720b89b7e
4 changed files with 23 additions and 8 deletions
+7 -1
View File
@@ -269,7 +269,7 @@ namespace Game.Entities
public List<PlayerCreateInfoItem> item = new();
public List<uint> customSpells = new();
public List<uint> castSpells = new();
public List<uint>[] castSpells = new List<uint>[(int)PlayerCreateMode.Max];
public List<PlayerCreateInfoAction> action = new();
public List<SkillRaceClassInfoRecord> skills = new();
@@ -279,6 +279,12 @@ namespace Game.Entities
public PlayerLevelInfo[] levelInfo = new PlayerLevelInfo[WorldConfig.GetIntValue(WorldCfg.MaxPlayerLevel)];
public PlayerInfo()
{
for (var i = 0; i < castSpells.Length; ++i)
castSpells[i] = new List<uint>();
}
public struct CreatePosition
{
public WorldLocation Loc;