Core/Player: Added support cast spell for some class spells (Warlock / Hunter pet, "Battle Stance" and "Frost Presence") on first login...

This commit is contained in:
Vincent-Michael committed 2014-07-09 20:34:39 +02:00
1 parent 6a6403a54e
commit c8eb69df10
5 files changed
+88 -20

No files matched your search

+3 -20
View File
@@ -1110,26 +1110,9 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
{
pCurrChar->RemoveAtLoginFlag(AT_LOGIN_FIRST);
if (pCurrChar->getClass() == CLASS_HUNTER)
{
static uint32 const HunterCreatePetSpells[MAX_RACES] =
{
0, /* None */ 79597, /* Human - Young Wolf */
79598, /* Orc - Young Boar */ 79593, /* Dwarf - Young Bear */
79602, /* Night Elf - Young Cat */ 79600, /* Undead - Young Widow */
79603, /* Tauren - Young Tallstrider */ 0, /* Gnome */
79599, /* Troll - Young Raptor */ 79595, /* Goblin - Young Crab */
79594, /* Blood Elf - Young Dragonhawk */ 79601, /* Draenei - Young Moth */
0, /* Fel Orc */ 0, /* Naga */
0, /* Broken */ 0, /* Skeleton */
0, /* Vrykul */ 0, /* Tuskarr */
0, /* Forest Troll */ 0, /* Taunka */
0, /* Northrend Skeleton */ 0, /* Ice Troll */
79596, /* Worgen - Young Mastiff */
};
pCurrChar->CastSpell(pCurrChar, HunterCreatePetSpells[pCurrChar->getRace()], true);
}
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(pCurrChar->getRace(), pCurrChar->getClass());
for (uint32 spellId : info->castSpells)
pCurrChar->CastSpell(pCurrChar, spellId, true);
}
// show time before shutdown if shutdown planned.