diff options
author | Brian <runningnak3d@gmail.com> | 2010-02-14 19:13:14 -0700 |
---|---|---|
committer | Brian <runningnak3d@gmail.com> | 2010-02-14 19:13:14 -0700 |
commit | 486c00891ba34884e5b2cdd8d44b4d8496f11283 (patch) | |
tree | 7df304b9020ed21b87bd66978d2dc6e6683edce7 /src/game/SpellMgr.cpp | |
parent | 7799ade4da0da17034039439d692122e976c0138 (diff) |
* Core switch to client 3.3.2 (11403)
* Credits (in no particular order) to:
* n0n4m3, raczman, manuel, Spp, Malcrom, Teacher, QAston, Tartalo,
* thenecromancer, Xanadu, Trazom, Zor, kiper
* Additional credits to:
* TOM_RUS and NoFantasy from MaNGOS
* Thanks for testing Aokromes and XTElite1
* SoTA still needs some work, but is very playable (huge thanks to raczman and
* kiper)
* To upgrade, you need to apply all SQL from sql/updates/3.2.2a_old from the
* last rev you are on
* and then apply all SQL from sql/updates/3.3.2_old to char / realmd / world
* DBs
* Known problem with guild banks.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellMgr.cpp')
-rw-r--r-- | src/game/SpellMgr.cpp | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 48d1d325ad2..4c1d2816df4 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2382,7 +2382,24 @@ bool SpellMgr::IsSpellValid(SpellEntry const *spellInfo, Player *pl, bool msg) case SPELL_EFFECT_CREATE_ITEM: case SPELL_EFFECT_CREATE_ITEM_2: { - if(!ObjectMgr::GetItemPrototype(spellInfo->EffectItemType[i])) + if (spellInfo->EffectItemType[i] == 0) + { + // skip auto-loot crafting spells, its not need explicit item info (but have special fake items sometime) + if (!IsLootCraftingSpell(spellInfo)) + { + if(msg) + { + if(pl) + ChatHandler(pl).PSendSysMessage("Craft spell %u not have create item entry.",spellInfo->Id); + else + sLog.outErrorDb("Craft spell %u not have create item entry.",spellInfo->Id); + } + return false; + } + + } + // also possible IsLootCraftingSpell case but fake item must exist anyway + else if (!ObjectMgr::GetItemPrototype(spellInfo->EffectItemType[i])) { if (msg) { @@ -2814,6 +2831,9 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto // Frostbite if (spellproto->SpellFamilyFlags[1] & 0x80000000) return DIMINISHING_TRIGGER_ROOT; + // Frost Nova, Shatterd Barrier + if (spellproto->SpellFamilyFlags[0] & 0x00080040) + return DIMINISHING_CONTROL_ROOT; break; } case SPELLFAMILY_ROGUE: @@ -2998,6 +3018,18 @@ bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group) return false; } +DiminishingLevels GetDiminishingReturnsMaxLevel(DiminishingGroup group) +{ + switch(group) + { + case DIMINISHING_TAUNT: + return DIMINISHING_LEVEL_TAUNT_IMMUNE; + default: + return DIMINISHING_LEVEL_IMMUNE; + } + return DIMINISHING_LEVEL_IMMUNE; +} + DiminishingReturnsType GetDiminishingReturnsGroupType(DiminishingGroup group) { switch(group) @@ -3052,7 +3084,7 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32 if (auraSpell) // not have expected aura if (!player || auraSpell > 0 && !player->HasAura(auraSpell) || auraSpell < 0 && player->HasAura(-auraSpell)) return false; - + // Extra conditions -- leaving the possibility add extra conditions... switch(spellId) { @@ -3253,7 +3285,7 @@ void SpellMgr::LoadSpellRequired() uint32 spell_id = fields[0].GetUInt32(); uint32 spell_req = fields[1].GetUInt32(); - // validate table + // check if chain is made with valid first spell SpellEntry const * spell = sSpellStore.LookupEntry(spell_id); if (!spell) { @@ -3314,7 +3346,7 @@ void SpellMgr::LoadSpellRanks() std::list < std::pair < int32, int32 > > rankChain; int32 currentSpell = -1; int32 lastSpell = -1; - + // fill one chain while(currentSpell == lastSpell && !finished) { |