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
+1 -1
View File
@@ -963,7 +963,7 @@ namespace Game
pCurrChar.RemoveAtLoginFlag(AtLoginFlags.FirstLogin);
PlayerInfo info = Global.ObjectMgr.GetPlayerInfo(pCurrChar.GetRace(), pCurrChar.GetClass());
foreach (var spellId in info.castSpells)
foreach (var spellId in info.castSpells[(int)pCurrChar.GetCreateMode()])
pCurrChar.CastSpell(pCurrChar, spellId, new CastSpellExtraArgs(true));
// start with every map explored