aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWarpten <vertozor@gmail.com>2012-12-07 17:29:31 +0100
committerWarpten <vertozor@gmail.com>2012-12-07 17:29:31 +0100
commite6c763f4337cfe4ab673bb17b6d0c24c9dae1c60 (patch)
treee7a56dd9901b60c7b7d07aaeb2ab80f68d6b83af /src
parentfb2e5c3c5840a77452a2418805eabd01147a4346 (diff)
Core/Spells: Fixed multiple spell effects where RadiusEntry is NULL but where MaxRadiusEntry is a valid radius entry.
Also fixed COD and money being swapped when sending mails, and another typo when sending battleground log data.
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Battlegrounds/BattlegroundMgr.cpp19
-rw-r--r--src/server/game/Handlers/MailHandler.cpp2
-rw-r--r--src/server/game/Spells/SpellInfo.cpp14
-rw-r--r--src/server/game/Spells/SpellInfo.h2
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp3
5 files changed, 28 insertions, 12 deletions
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
index 79c4f1accab..362c4e3fb65 100644
--- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
@@ -403,7 +403,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
data->WriteBit(playerGUID[5]);
data->WriteBit(playerGUID[1]);
data->WriteBit(playerGUID[6]);
- data->WriteBit(player->GetTeam() == ALLIANCE);
+ data->WriteBit(player->GetBGTeam() == ALLIANCE);
data->WriteBit(playerGUID[7]);
buff << uint32(itr->second->HealingDone); // healing done
@@ -444,7 +444,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
break;
case 529:
data->WriteBits(0x00000002, 24);
- buff << uint32(((BattlegroundABScore*)itr->second)->BasesAssaulted); // bases asssulted
+ buff << uint32(((BattlegroundABScore*)itr->second)->BasesAssaulted); // bases assaulted
buff << uint32(((BattlegroundABScore*)itr->second)->BasesDefended); // bases defended
break;
case 30:
@@ -462,7 +462,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
break;
case 628: // IC
data->WriteBits(0x00000002, 24);
- buff << uint32(((BattlegroundICScore*)itr->second)->BasesAssaulted); // bases asssulted
+ buff << uint32(((BattlegroundICScore*)itr->second)->BasesAssaulted); // bases assaulted
buff << uint32(((BattlegroundICScore*)itr->second)->BasesDefended); // bases defended
break;
case 726:
@@ -472,7 +472,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
break;
case 761:
data->WriteBits(0x00000002, 24);
- buff << uint32(((BattlegroundBFGScore*)itr->second)->BasesAssaulted); // bases asssulted
+ buff << uint32(((BattlegroundBFGScore*)itr->second)->BasesAssaulted); // bases assaulted
buff << uint32(((BattlegroundBFGScore*)itr->second)->BasesDefended); // bases defended
break;
default:
@@ -495,7 +495,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
break;
case BATTLEGROUND_AB:
data->WriteBits(0x00000002, 24);
- buff << uint32(((BattlegroundABScore*)itr->second)->BasesAssaulted); // bases asssulted
+ buff << uint32(((BattlegroundABScore*)itr->second)->BasesAssaulted); // bases assaulted
buff << uint32(((BattlegroundABScore*)itr->second)->BasesDefended); // bases defended
break;
case BATTLEGROUND_EY:
@@ -509,7 +509,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
break;
case BATTLEGROUND_IC:
data->WriteBits(0x00000002, 24);
- buff << uint32(((BattlegroundICScore*)itr->second)->BasesAssaulted); // bases asssulted
+ buff << uint32(((BattlegroundICScore*)itr->second)->BasesAssaulted); // bases assaulted
buff << uint32(((BattlegroundICScore*)itr->second)->BasesDefended); // bases defended
break;
case BATTLEGROUND_TP:
@@ -519,7 +519,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
break;
case BATTLEGROUND_BFG:
data->WriteBits(0x00000002, 24);
- buff << uint32(((BattlegroundBFGScore*)itr->second)->BasesAssaulted); // bases asssulted
+ buff << uint32(((BattlegroundBFGScore*)itr->second)->BasesAssaulted); // bases assaulted
buff << uint32(((BattlegroundBFGScore*)itr->second)->BasesDefended); // bases defended
break;
case BATTLEGROUND_NA:
@@ -576,7 +576,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
*data << uint8(bg->GetPlayersCountByTeam(HORDE));
if (bg->GetStatus() == STATUS_WAIT_LEAVE)
- *data << uint8(bg->GetWinner()); // who win
+ *data << uint8(bg->GetWinner());
*data << uint8(bg->GetPlayersCountByTeam(ALLIANCE));
}
@@ -777,7 +777,7 @@ Battleground* BattlegroundMgr::GetBattlegroundTemplate(BattlegroundTypeId bgType
return NULL;
BattlegroundContainer const& bgs = itr->second.m_Battlegrounds;
- //map is sorted and we can be sure that lowest instance id has only BG template
+ // map is sorted and we can be sure that lowest instance id has only BG template
return bgs.empty() ? NULL : bgs.begin()->second;
}
@@ -1497,4 +1497,3 @@ void BattlegroundMgr::RemoveBattleground(BattlegroundTypeId bgTypeId, uint32 ins
{
bgDataStore[bgTypeId].m_Battlegrounds.erase(instanceId);
}
-
diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp
index 3e84ab5151c..9e4e8c56da9 100644
--- a/src/server/game/Handlers/MailHandler.cpp
+++ b/src/server/game/Handlers/MailHandler.cpp
@@ -40,7 +40,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
recvData >> unk1;
recvData >> unk2; // Stationery?
- recvData >> money >> COD; // money and cod
+ recvData >> COD >> money; // money and cod
bodyLength = recvData.ReadBits(12);
subjectLength = recvData.ReadBits(9);
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index fbc0ae1d803..9b9b888a9f3 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -341,6 +341,7 @@ SpellEffectInfo::SpellEffectInfo(SpellEntry const* /*spellEntry*/, SpellInfo con
TargetA = SpellImplicitTargetInfo(_effect ? _effect->EffectImplicitTargetA : 0);
TargetB = SpellImplicitTargetInfo(_effect ? _effect->EffectImplicitTargetB : 0);
RadiusEntry = _effect && _effect->EffectRadiusIndex ? sSpellRadiusStore.LookupEntry(_effect->EffectRadiusIndex) : NULL;
+ MaxRadiusEntry = _effect && _effect->EffectRadiusMaxIndex ? sSpellRadiusStore.LookupEntry(_effect->EffectRadiusMaxIndex) : NULL;
ChainTarget = _effect ? _effect->EffectChainTarget : 0;
ItemType = _effect ? _effect->EffectItemType : 0;
TriggerSpell = _effect ? _effect->EffectTriggerSpell : 0;
@@ -534,10 +535,23 @@ bool SpellEffectInfo::HasRadius() const
return RadiusEntry != NULL;
}
+bool SpellEffectInfo::HasMaxRadius() const
+{
+ return MaxRadiusEntry != NULL;
+}
+
float SpellEffectInfo::CalcRadius(Unit* caster, Spell* spell) const
{
if (!HasRadius())
+ {
+ if (HasMaxRadius())
+ {
+ //! Still not sure which to pick. Anyway at the current time (Patch 4.3.4) most of the spell effects
+ //! have no radius mod per level, and RadiusMin is equal to RadiusMax.
+ return MaxRadiusEntry->RadiusMin;
+ }
return 0.0f;
+ }
float radius = RadiusEntry->RadiusMin;
if (caster)
diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h
index 9abb82bbc4b..b51ed93a86f 100644
--- a/src/server/game/Spells/SpellInfo.h
+++ b/src/server/game/Spells/SpellInfo.h
@@ -247,6 +247,7 @@ public:
SpellImplicitTargetInfo TargetA;
SpellImplicitTargetInfo TargetB;
SpellRadiusEntry const* RadiusEntry;
+ SpellRadiusEntry const* MaxRadiusEntry;
uint32 ChainTarget;
uint32 ItemType;
uint32 TriggerSpell;
@@ -276,6 +277,7 @@ public:
float CalcDamageMultiplier(Unit* caster, Spell* spell = NULL) const;
bool HasRadius() const;
+ bool HasMaxRadius() const;
float CalcRadius(Unit* caster = NULL, Spell* = NULL) const;
uint32 GetProvidedTargetMask() const;
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index da020d944e8..78217cfd7cd 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -497,11 +497,12 @@ void AddSC_mage_spell_scripts()
{
new spell_mage_blast_wave();
new spell_mage_cold_snap();
+ new spell_mage_cone_of_cold();
+ new spell_mage_conjure_refreshment();
new spell_mage_frost_warding_trigger();
new spell_mage_incanters_absorbtion_absorb();
new spell_mage_incanters_absorbtion_manashield();
new spell_mage_polymorph_cast_visual();
new spell_mage_summon_water_elemental();
new spell_mage_living_bomb();
- new spell_mage_cone_of_cold();
}