diff options
4 files changed, 28 insertions, 11 deletions
diff --git a/sql/updates/world/2011_09_07_00_world_spell_linked_spell.sql b/sql/updates/world/2011_09_07_00_world_spell_linked_spell.sql new file mode 100644 index 00000000000..584ef63c4ad --- /dev/null +++ b/sql/updates/world/2011_09_07_00_world_spell_linked_spell.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=44572; +INSERT INTO `spell_linked_spell` VALUES +(44572,71757,0, 'Deep Freeze - Damage Proc'); + +DELETE FROM `spell_bonus_data` WHERE `entry`=71757; +INSERT INTO `spell_bonus_data` (`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`ap_dot_bonus`,`comments`) VALUES +(71757,2.143,0,0,0, 'Mage - Deep Freeze'); diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 83ece2eda31..d3d95abce14 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1791,10 +1791,12 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* case GO_DESTRUCTIBLE_DAMAGED: { EventInform(m_goInfo->building.damagedEvent); - sScriptMgr->OnGameObjectDamaged(this, eventInvoker); if (eventInvoker) + { + sScriptMgr->OnGameObjectDamaged(this, eventInvoker); if (Battleground* bg = eventInvoker->GetBattleground()) bg->EventPlayerDamagedGO(eventInvoker, this, m_goInfo->building.damagedEvent); + } RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED); SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED); @@ -1818,10 +1820,10 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* } case GO_DESTRUCTIBLE_DESTROYED: { - sScriptMgr->OnGameObjectDestroyed(this, eventInvoker); EventInform(m_goInfo->building.destroyedEvent); if (eventInvoker) { + sScriptMgr->OnGameObjectDestroyed(this, eventInvoker); if (Battleground* bg = eventInvoker->GetBattleground()) { bg->EventPlayerDamagedGO(eventInvoker, this, m_goInfo->building.destroyedEvent); diff --git a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp b/src/server/game/Server/Protocol/Handlers/LootHandler.cpp index 196679a4c73..7caf8f9ef07 100755 --- a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/LootHandler.cpp @@ -158,6 +158,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recv_data*/) if (loot) { + loot->NotifyMoneyRemoved(); if (shareMoney && player->GetGroup()) //item, pickpocket and players can be looted only single player { Group* group = player->GetGroup(); @@ -177,28 +178,27 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recv_data*/) for (std::vector<Player*>::const_iterator i = playersNear.begin(); i != playersNear.end(); ++i) { + (*i)->ModifyMoney(goldPerPlayer); + (*i)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY, goldPerPlayer); + WorldPacket data(SMSG_LOOT_MONEY_NOTIFY, 4 + 1); data << uint32(goldPerPlayer); - data << uint8(0); // Controls the text displayed 0 is "Your share is...", 1 "You loot..." + data << uint8(playersNear.size() > 1 ? 0 : 1); // Controls the text displayed in chat. 0 is "Your share is..." and 1 is "You loot..." (*i)->GetSession()->SendPacket(&data); - - (*i)->ModifyMoney(goldPerPlayer); - (*i)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY, goldPerPlayer); } } else { + player->ModifyMoney(loot->gold); + player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY, loot->gold); + WorldPacket data(SMSG_LOOT_MONEY_NOTIFY, 4 + 1); data << uint32(loot->gold); - data << uint8(1); + data << uint8(1); // "You loot..." SendPacket(&data); - - player->ModifyMoney(loot->gold); - player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY, loot->gold); } loot->gold = 0; - loot->NotifyMoneyRemoved(); } } diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index a917bb9a156..3f4d5d8a3ac 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -722,6 +722,14 @@ void Spell::SpellDamageSchoolDmg(SpellEffIndex effIndex) } break; } + case SPELLFAMILY_MAGE: + { + // Deep Freeze should deal damage to permanently stun-immune targets. + if (m_spellInfo->Id == 71757) + if (unitTarget->GetTypeId() != TYPEID_UNIT || !(unitTarget->IsImmunedToSpellEffect(sSpellMgr->GetSpellInfo(24932), 0))) + return; + break; + } } if (m_originalCaster && damage > 0 && apply_direct_bonus) |
