feat(Core\Player): Added createplayerinfo_cast_spell support cast spell for some class spells (#9448)

This commit is contained in:
acidmanifesto
2021-12-03 22:33:21 +01:00
committed by GitHub
parent 2789d5b877
commit 1500453f59
6 changed files with 81 additions and 69 deletions

View File

@@ -982,13 +982,22 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder)
bool firstLogin = pCurrChar->HasAtLoginFlag(AT_LOGIN_FIRST);
if (firstLogin)
{
pCurrChar->RemoveAtLoginFlag(AT_LOGIN_FIRST);
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(pCurrChar->getRace(), pCurrChar->getClass());
for (uint32 spellId : info->castSpells)
{
pCurrChar->CastSpell(pCurrChar, spellId, true);
}
// start with every map explored
if (sWorld->getBoolConfig(CONFIG_START_ALL_EXPLORED))
{
for (uint8 i = 0; i < PLAYER_EXPLORED_ZONES_SIZE; i++)
{
pCurrChar->SetFlag(PLAYER_EXPLORED_ZONES_1 + i, 0xFFFFFFFF);
}
}
// Reputations if "StartAllReputation" is enabled, -- TODO: Fix this in a better way