From a85ca687eb6c280f775cb90540fa18f87ea1a201 Mon Sep 17 00:00:00 2001 From: kaelima Date: Sat, 10 Dec 2011 15:40:55 +0100 Subject: Core/Spell: Fixed compile broken in 11fb0beaf0cb877b14f24aa88f19832e0aa3dc88 and renamed _player to player. --- src/server/game/Spells/SpellEffects.cpp | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'src/server/game/Spells/SpellEffects.cpp') diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 72a7c79dc69..d8095456fca 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -2093,10 +2093,10 @@ void Spell::EffectUnlearnSpecialization(SpellEffIndex effIndex) if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) return; - Player* _player = unitTarget->ToPlayer(); + Player* player = unitTarget->ToPlayer(); uint32 spellToUnlearn = m_spellInfo->Effects[effIndex].TriggerSpell; - _player->removeSpell(spellToUnlearn); + player->removeSpell(spellToUnlearn); sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell: Player %u has unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow()); } @@ -5875,16 +5875,15 @@ void Spell::EffectFeedPet(SpellEffIndex effIndex) if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET) return; - if (m_caster->GetTypeId() != TYPEID_PLAYER) + Player* player = m_caster->ToPlayer(); + if (!player) return; - Player* _player = m_caster->ToPlayer(); - Item* foodItem = itemTarget; if (!foodItem) return; - Pet* pet = _player->GetPet(); + Pet* pet = player->GetPet(); if (!pet) return; @@ -5898,7 +5897,7 @@ void Spell::EffectFeedPet(SpellEffIndex effIndex) ExecuteLogEffectDestroyItem(effIndex, foodItem->GetEntry()); uint32 count = 1; - _player->DestroyItemCount(foodItem, count, true); + player->DestroyItemCount(foodItem, count, true); // TODO: fix crash when a spell has two effects, both pointed at the same item target m_caster->CastCustomSpell(pet, m_spellInfo->Effects[effIndex].TriggerSpell, &benefit, NULL, NULL, true); @@ -6097,7 +6096,7 @@ void Spell::EffectReputation(SpellEffIndex effIndex) if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) return; - Player* _player = unitTarget->ToPlayer(); + Player* player = unitTarget->ToPlayer(); int32 rep_change = damage; @@ -6114,10 +6113,10 @@ void Spell::EffectReputation(SpellEffIndex effIndex) } // Bonus from spells that increase reputation gain - float bonus = rep_change * _player->GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN) / 100.0f; // 10% + float bonus = rep_change * player->GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN) / 100.0f; // 10% rep_change += (int32)bonus; - _player->GetReputationMgr().ModifyReputation(factionEntry, rep_change); + player->GetReputationMgr().ModifyReputation(factionEntry, rep_change); } void Spell::EffectQuestComplete(SpellEffIndex effIndex) @@ -6432,12 +6431,11 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/) if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT) return; - Player* _player = m_caster->ToPlayer() - - if (!_player) + Player* player = m_caster->ToPlayer(); + if (!player) return; - Pet* pet = _player->GetPet(); + Pet* pet = player->GetPet(); if (!pet || pet->isAlive()) return; @@ -6445,8 +6443,8 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/) return; float x, y, z; - _player->GetPosition(x, y, z); - _player->GetMap()->CreatureRelocation(pet, x, y, z, _player->GetOrientation()); + player->GetPosition(x, y, z); + player->GetMap()->CreatureRelocation(pet, x, y, z, player->GetOrientation()); pet->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE); pet->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); @@ -6455,7 +6453,7 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/) pet->SetHealth(pet->CountPctFromMaxHealth(damage)); //pet->AIM_Initialize(); - //_player->PetSpellInitialize(); + //player->PetSpellInitialize(); pet->SavePetToDB(PET_SAVE_AS_CURRENT); } -- cgit v1.2.3 From 39be215811e404187600168caa421304a9ada632 Mon Sep 17 00:00:00 2001 From: kaelima Date: Sat, 10 Dec 2011 16:26:04 +0100 Subject: Core/Protocol: Add debug output when receiving auction house packets. --- .../game/Server/Protocol/Handlers/AuctionHouseHandler.cpp | 14 +++++++++++++- src/server/game/Spells/SpellEffects.cpp | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'src/server/game/Spells/SpellEffects.cpp') diff --git a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp index 8c45b030603..0deaa6b984d 100755 --- a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp @@ -115,6 +115,8 @@ void WorldSession::SendAuctionOwnerNotification(AuctionEntry* auction) //this void creates new auction and adds auction to some auctionhouse void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data) { + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recieved CMSG_AUCTION_SELL_ITEM"); + uint64 auctioneer, item; uint32 etime, bid, buyout, count; recv_data >> auctioneer; @@ -253,6 +255,8 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data) //this function is called when client bids or buys out auction void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data) { + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recieved CMSG_AUCTION_PLACE_BID"); + uint64 auctioneer; uint32 auctionId; uint32 price; @@ -374,6 +378,8 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data) //this void is called when auction_owner cancels his auction void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data) { + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recieved CMSG_AUCTION_REMOVE_ITEM"); + uint64 auctioneer; uint32 auctionId; recv_data >> auctioneer; @@ -452,6 +458,8 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data) //called when player lists his bids void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data) { + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recieved CMSG_AUCTION_LIST_BIDDER_ITEMS"); + uint64 guid; //NPC guid uint32 listfrom; //page of auctions uint32 outbiddedCount; //count of outbidded auctions @@ -507,6 +515,8 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data) //this void sends player info about his auctions void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recv_data) { + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recieved CMSG_AUCTION_LIST_OWNER_ITEMS"); + uint32 listfrom; uint64 guid; @@ -542,6 +552,8 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recv_data) //this void is called when player clicks on search button void WorldSession::HandleAuctionListItems(WorldPacket & recv_data) { + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recieved CMSG_AUCTION_LIST_ITEMS"); + std::string searchedname; uint8 levelmin, levelmax, usable; uint32 listfrom, auctionSlotID, auctionMainCategory, auctionSubCategory, quality; @@ -607,7 +619,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data) void WorldSession::HandleAuctionListPendingSales(WorldPacket & recv_data) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_LIST_PENDING_SALES"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recieved CMSG_AUCTION_LIST_PENDING_SALES"); recv_data.read_skip(); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index d8095456fca..4eb514c5869 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -2098,7 +2098,7 @@ void Spell::EffectUnlearnSpecialization(SpellEffIndex effIndex) player->removeSpell(spellToUnlearn); - sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell: Player %u has unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell: Player %u has unlearned spell %u from NpcGUID: %u", player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow()); } void Spell::EffectPowerDrain(SpellEffIndex effIndex) -- cgit v1.2.3 From af32d0f616657a8a60065b5742339e9e87984d64 Mon Sep 17 00:00:00 2001 From: elecyb Date: Sun, 11 Dec 2011 19:11:22 -0300 Subject: Core/Spells: Fixed Healing Stream Totem bonus and Glyph of Healing Stream Totem Closes #2165 --- sql/updates/world/2011_12_11_00_world_spell_bonus_data.sql | 3 +++ src/server/game/Spells/SpellEffects.cpp | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 sql/updates/world/2011_12_11_00_world_spell_bonus_data.sql (limited to 'src/server/game/Spells/SpellEffects.cpp') diff --git a/sql/updates/world/2011_12_11_00_world_spell_bonus_data.sql b/sql/updates/world/2011_12_11_00_world_spell_bonus_data.sql new file mode 100644 index 00000000000..6e53fccf210 --- /dev/null +++ b/sql/updates/world/2011_12_11_00_world_spell_bonus_data.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_bonus_data` WHERE `entry` IN (52042,5672); +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`,`ap_bonus`, `ap_dot_bonus`, `comments`) VALUES +('5672','0.0827','-1','-1','-1','Shaman - Healing Stream Totem Rank 1'); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 4eb514c5869..839a466f0f0 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1421,11 +1421,19 @@ void Spell::EffectDummy(SpellEffIndex effIndex) { if (!unitTarget) return; - // Restorative Totems if (Unit* owner = m_caster->GetOwner()) + { + if (m_triggeredByAuraSpell) + damage = int32(owner->SpellHealingBonus(unitTarget, m_triggeredByAuraSpell, damage, HEAL)); + + // Restorative Totems if (AuraEffect* dummy = owner->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 338, 1)) AddPctN(damage, dummy->GetAmount()); + // Glyph of Healing Stream Totem + if (AuraEffect const* aurEff = owner->GetAuraEffect(55456, EFFECT_0)) + AddPctN(damage, aurEff->GetAmount()); + } m_caster->CastCustomSpell(unitTarget, 52042, &damage, 0, 0, true, 0, 0, m_originalCasterGUID); return; } -- cgit v1.2.3