Core/Cleanup:
* move repeating code into separate method for storing locale strings in ObjectMgr (copy/paste sucks, you know) * fix 'signed/unsigned' warnings (at least in VS) * fix some other warnings and cleanup relative code --HG-- branch : trunk
This commit is contained in:
@@ -668,16 +668,16 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
|
||||
{
|
||||
if (caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
int32 value = int32((amount*-1)-10);
|
||||
int32 value = (-1 * amount) - 10;
|
||||
uint32 defva = uint32(caster->ToPlayer()->GetSkillValue(SKILL_DEFENSE) + caster->ToPlayer()->GetRatingBonusValue(CR_DEFENSE_SKILL));
|
||||
|
||||
if (defva > 400)
|
||||
value += int32((defva-400)*0.15);
|
||||
value += int32((defva - 400) * 0.15);
|
||||
|
||||
// Glyph of Icebound Fortitude
|
||||
if (AuraEffect const * aurEff = caster->GetAuraEffect(58625,0))
|
||||
if (AuraEffect const * aurEff = caster->GetAuraEffect(58625, 0))
|
||||
{
|
||||
uint32 valMax = aurEff->GetAmount();
|
||||
int32 valMax = aurEff->GetAmount();
|
||||
if (value < valMax)
|
||||
value = valMax;
|
||||
}
|
||||
@@ -1908,7 +1908,7 @@ void AuraEffect::PeriodicDummyTick(Unit * target, Unit * caster) const
|
||||
target->CastSpell((Unit*)NULL, m_spellProto->EffectTriggerSpell[m_effIndex], true);
|
||||
break;
|
||||
case 62399: // Overload Circuit
|
||||
if (target->GetMap()->IsDungeon() && target->GetAppliedAuras().count(62399) >= (target->GetMap()->IsHeroic() ? 4 : 2))
|
||||
if (target->GetMap()->IsDungeon() && int(target->GetAppliedAuras().count(62399)) >= (target->GetMap()->IsHeroic() ? 4 : 2))
|
||||
{
|
||||
target->CastSpell(target, 62475, true); // System Shutdown
|
||||
if (Unit *veh = target->GetVehicleBase())
|
||||
@@ -5920,7 +5920,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
{
|
||||
SpellEntry const * spell = sSpellStore.LookupEntry(spellId);
|
||||
|
||||
for (int i=0; i < spell->StackAmount; ++i)
|
||||
for (uint32 i = 0; i < spell->StackAmount; ++i)
|
||||
caster->CastSpell(target, spell->Id, true, NULL, NULL, GetCasterGUID());
|
||||
break;
|
||||
}
|
||||
@@ -5934,7 +5934,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
if (apply && caster)
|
||||
{
|
||||
SpellEntry const * spell = sSpellStore.LookupEntry(spellId);
|
||||
for (int i=0; i < spell->StackAmount; ++i)
|
||||
for (uint32 i = 0; i < spell->StackAmount; ++i)
|
||||
caster->CastSpell(target, spell->Id, true, NULL, NULL, GetCasterGUID());
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user