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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user