*Update petLevelupSpellLearn code
*Remove triggered aura of shadow embrace when main aura expires. --HG-- branch : trunk rename : sql/updates/2773_world_spell_linked_spell.sql => sql/updates/2814_world_spell_linked_spell.sql
This commit is contained in:
@@ -1,6 +0,0 @@
|
|||||||
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (32386, 32388, 32389, 32390, 32391);
|
|
||||||
INSERT INTO `spell_linked_spell` VALUES (32386, 60448, 1, 'Shadow Embrace Rank1');
|
|
||||||
INSERT INTO `spell_linked_spell` VALUES (32388, 60465, 1, 'Shadow Embrace Rank2');
|
|
||||||
INSERT INTO `spell_linked_spell` VALUES (32389, 60466, 1, 'Shadow Embrace Rank3');
|
|
||||||
INSERT INTO `spell_linked_spell` VALUES (32390, 60467, 1, 'Shadow Embrace Rank4');
|
|
||||||
INSERT INTO `spell_linked_spell` VALUES (32391, 60468, 1, 'Shadow Embrace Rank5');
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (32386, 32388, 32389, 32390, 32391);
|
||||||
|
INSERT INTO `spell_linked_spell` VALUES (32386, 60448, 2, 'Shadow Embrace Rank1');
|
||||||
|
INSERT INTO `spell_linked_spell` VALUES (32388, 60465, 2, 'Shadow Embrace Rank2');
|
||||||
|
INSERT INTO `spell_linked_spell` VALUES (32389, 60466, 2, 'Shadow Embrace Rank3');
|
||||||
|
INSERT INTO `spell_linked_spell` VALUES (32390, 60467, 2, 'Shadow Embrace Rank4');
|
||||||
|
INSERT INTO `spell_linked_spell` VALUES (32391, 60468, 2, 'Shadow Embrace Rank5');
|
||||||
@@ -334,10 +334,12 @@ void LoadDBCStores(const std::string& dataPath)
|
|||||||
|
|
||||||
if(skillLine->skillId != cFamily->skillLine[0] && skillLine->skillId != cFamily->skillLine[1])
|
if(skillLine->skillId != cFamily->skillLine[0] && skillLine->skillId != cFamily->skillLine[1])
|
||||||
continue;
|
continue;
|
||||||
|
if(spellInfo->spellLevel)
|
||||||
|
continue;
|
||||||
|
|
||||||
// Passive spell has to have spellfamilyflags if name present (need to not apply 20782)
|
// Passive spell has to have spellfamilyflags if name present (need to not apply 20782)
|
||||||
if (spellInfo->Attributes & SPELL_ATTR_UNK18 && spellInfo->SpellFamilyName && !spellInfo->SpellFamilyFlags)
|
//if (spellInfo->Attributes & SPELL_ATTR_UNK18 && spellInfo->SpellFamilyName && !spellInfo->SpellFamilyFlags)
|
||||||
continue;
|
// continue;
|
||||||
|
|
||||||
sPetFamilySpellsStore[i].insert(spellInfo->Id);
|
sPetFamilySpellsStore[i].insert(spellInfo->Id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1089,8 +1089,6 @@ void Pet::_SaveSpells()
|
|||||||
void Pet::_LoadAuras(uint32 timediff)
|
void Pet::_LoadAuras(uint32 timediff)
|
||||||
{
|
{
|
||||||
sLog.outDebug("Loading auras for pet %u",GetGUIDLow());
|
sLog.outDebug("Loading auras for pet %u",GetGUIDLow());
|
||||||
for (int i = 0; i < TOTAL_AURAS; i++)
|
|
||||||
m_modAuras[i].clear();
|
|
||||||
|
|
||||||
QueryResult *result = CharacterDatabase.PQuery("SELECT caster_guid,spell,effect_mask,stackcount,amount0, amount1, amount2 ,maxduration,remaintime,remaincharges FROM pet_aura WHERE guid = '%u'",m_charmInfo->GetPetNumber());
|
QueryResult *result = CharacterDatabase.PQuery("SELECT caster_guid,spell,effect_mask,stackcount,amount0, amount1, amount2 ,maxduration,remaintime,remaincharges FROM pet_aura WHERE guid = '%u'",m_charmInfo->GetPetNumber());
|
||||||
|
|
||||||
|
|||||||
@@ -14633,8 +14633,6 @@ void Player::_LoadActions(QueryResult *result)
|
|||||||
void Player::_LoadAuras(QueryResult *result, uint32 timediff)
|
void Player::_LoadAuras(QueryResult *result, uint32 timediff)
|
||||||
{
|
{
|
||||||
sLog.outDebug("Loading auras for player %u",GetGUIDLow());
|
sLog.outDebug("Loading auras for player %u",GetGUIDLow());
|
||||||
for (int i = 0; i < TOTAL_AURAS; i++)
|
|
||||||
m_modAuras[i].clear();
|
|
||||||
|
|
||||||
//QueryResult *result = CharacterDatabase.PQuery("SELECT caster_guid,spell,effect_mask,stackcount,amount0,amount1,amount2,maxduration,remaintime,remaincharges FROM character_aura WHERE guid = '%u'",GetGUIDLow());
|
//QueryResult *result = CharacterDatabase.PQuery("SELECT caster_guid,spell,effect_mask,stackcount,amount0,amount1,amount2,maxduration,remaintime,remaincharges FROM character_aura WHERE guid = '%u'",GetGUIDLow());
|
||||||
|
|
||||||
|
|||||||
@@ -2533,11 +2533,10 @@ void SpellMgr::LoadPetLevelupSpellMap()
|
|||||||
if (creatureFamily->skillLine[j]!=skillLine->skillId)
|
if (creatureFamily->skillLine[j]!=skillLine->skillId)
|
||||||
continue;
|
continue;
|
||||||
SpellEntry const *spell = sSpellStore.LookupEntry(skillLine->spellId);
|
SpellEntry const *spell = sSpellStore.LookupEntry(skillLine->spellId);
|
||||||
// not exist or passive (passives are handled elsewhere)
|
// not exist or triggered or talent
|
||||||
if(!spell || IsPassiveSpell(spell->Id))
|
if(!spell || !spell->spellLevel || GetTalentSpellPos(spell->Id))
|
||||||
continue;
|
continue;
|
||||||
// Make sure that triggered spells aren't learned
|
if (!spell->SpellFamilyFlags && spell->SpellIconID!=2310 && (!spell->RecoveryTime || !spell->StartRecoveryCategory))
|
||||||
if (!spell->SpellFamilyName && !spell->StartRecoveryCategory)
|
|
||||||
continue;
|
continue;
|
||||||
mPetLevelupSpellMap.insert(PetLevelupSpellMap::value_type(creatureFamily->ID, std::make_pair(spell->spellLevel , spell->Id )));
|
mPetLevelupSpellMap.insert(PetLevelupSpellMap::value_type(creatureFamily->ID, std::make_pair(spell->spellLevel , spell->Id )));
|
||||||
count++;
|
count++;
|
||||||
|
|||||||
Reference in New Issue
Block a user