*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:
QAston
2009-04-19 20:45:55 +02:00
parent 580089ed1a
commit dcc7b99982
6 changed files with 13 additions and 16 deletions
@@ -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');
+4 -2
View File
@@ -334,10 +334,12 @@ void LoadDBCStores(const std::string& dataPath)
if(skillLine->skillId != cFamily->skillLine[0] && skillLine->skillId != cFamily->skillLine[1])
continue;
if(spellInfo->spellLevel)
continue;
// Passive spell has to have spellfamilyflags if name present (need to not apply 20782)
if (spellInfo->Attributes & SPELL_ATTR_UNK18 && spellInfo->SpellFamilyName && !spellInfo->SpellFamilyFlags)
continue;
//if (spellInfo->Attributes & SPELL_ATTR_UNK18 && spellInfo->SpellFamilyName && !spellInfo->SpellFamilyFlags)
// continue;
sPetFamilySpellsStore[i].insert(spellInfo->Id);
}
-2
View File
@@ -1089,8 +1089,6 @@ void Pet::_SaveSpells()
void Pet::_LoadAuras(uint32 timediff)
{
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());
-2
View File
@@ -14633,8 +14633,6 @@ void Player::_LoadActions(QueryResult *result)
void Player::_LoadAuras(QueryResult *result, uint32 timediff)
{
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());
+3 -4
View File
@@ -2533,11 +2533,10 @@ void SpellMgr::LoadPetLevelupSpellMap()
if (creatureFamily->skillLine[j]!=skillLine->skillId)
continue;
SpellEntry const *spell = sSpellStore.LookupEntry(skillLine->spellId);
// not exist or passive (passives are handled elsewhere)
if(!spell || IsPassiveSpell(spell->Id))
// not exist or triggered or talent
if(!spell || !spell->spellLevel || GetTalentSpellPos(spell->Id))
continue;
// Make sure that triggered spells aren't learned
if (!spell->SpellFamilyName && !spell->StartRecoveryCategory)
if (!spell->SpellFamilyFlags && spell->SpellIconID!=2310 && (!spell->RecoveryTime || !spell->StartRecoveryCategory))
continue;
mPetLevelupSpellMap.insert(PetLevelupSpellMap::value_type(creatureFamily->ID, std::make_pair(spell->spellLevel , spell->Id )));
count++;