Core: Minor cleanup

This commit is contained in:
Shauren
2011-05-12 10:43:11 +02:00
parent 169e4bfa2b
commit c98438ae8f
4 changed files with 10 additions and 10 deletions
@@ -901,7 +901,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
continue; continue;
uint32 counter =0; uint32 counter =0;
for (RewardedQuestSet::const_iterator itr = GetPlayer()->getRewardedQuests().begin(); itr != GetPlayer()->getRewardedQuests().end(); itr++) for (RewardedQuestSet::const_iterator itr = GetPlayer()->getRewardedQuests().begin(); itr != GetPlayer()->getRewardedQuests().end(); ++itr)
{ {
Quest const* quest = sObjectMgr->GetQuestTemplate(*itr); Quest const* quest = sObjectMgr->GetQuestTemplate(*itr);
if (quest && quest->GetZoneOrSort() >= 0 && uint32(quest->GetZoneOrSort()) == achievementCriteria->complete_quests_in_zone.zoneID) if (quest && quest->GetZoneOrSort() >= 0 && uint32(quest->GetZoneOrSort()) == achievementCriteria->complete_quests_in_zone.zoneID)
+1 -2
View File
@@ -7939,12 +7939,11 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const *proto, ScalingSt
float minDamage = proto->Damage[0].DamageMin; float minDamage = proto->Damage[0].DamageMin;
float maxDamage = proto->Damage[0].DamageMax; float maxDamage = proto->Damage[0].DamageMax;
int32 extraDPS = 0;
// If set dpsMod in ScalingStatValue use it for min (70% from average), max (130% from average) damage // If set dpsMod in ScalingStatValue use it for min (70% from average), max (130% from average) damage
if (ssv) if (ssv)
{ {
extraDPS = ssv->getDPSMod(proto->ScalingStatValue); int32 extraDPS = ssv->getDPSMod(proto->ScalingStatValue);
if (extraDPS) if (extraDPS)
{ {
float average = extraDPS * proto->Delay / 1000.0f; float average = extraDPS * proto->Delay / 1000.0f;
+6 -6
View File
@@ -5732,15 +5732,15 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
if (GetTypeId() != TYPEID_PLAYER) if (GetTypeId() != TYPEID_PLAYER)
return false; return false;
SpellCooldowns const SpellCDs = this->ToPlayer()->GetSpellCooldowns(); SpellCooldowns const cooldowns = this->ToPlayer()->GetSpellCooldowns();
// remove cooldowns on all ranks of Frost Nova // remove cooldowns on all ranks of Frost Nova
for (SpellCooldowns::const_iterator itr = SpellCDs.begin(); itr != SpellCDs.end(); itr++) for (SpellCooldowns::const_iterator itr = cooldowns.begin(); itr != cooldowns.end(); ++itr)
{ {
SpellEntry const* SpellCDs_entry = sSpellStore.LookupEntry(itr->first); SpellEntry const* cdSpell = sSpellStore.LookupEntry(itr->first);
// Frost Nova // Frost Nova
if (SpellCDs_entry && SpellCDs_entry->SpellFamilyName == SPELLFAMILY_MAGE if (cdSpell && cdSpell->SpellFamilyName == SPELLFAMILY_MAGE
&& SpellCDs_entry->SpellFamilyFlags[0] & 0x00000040) && cdSpell->SpellFamilyFlags[0] & 0x00000040)
this->ToPlayer()->RemoveSpellCooldown(SpellCDs_entry->Id, true); this->ToPlayer()->RemoveSpellCooldown(cdSpell->Id, true);
} }
break; break;
} }
+2 -1
View File
@@ -28,7 +28,8 @@ class GameObject;
class ZoneScript class ZoneScript
{ {
public: public:
explicit ZoneScript() {} ZoneScript() {}
virtual ~ZoneScript() {}
virtual uint32 GetCreatureEntry(uint32 /*guidlow*/, CreatureData const* data) { return data->id; } virtual uint32 GetCreatureEntry(uint32 /*guidlow*/, CreatureData const* data) { return data->id; }
virtual uint32 GetGameObjectEntry(uint32 /*guidlow*/, uint32 entry) { return entry; } virtual uint32 GetGameObjectEntry(uint32 /*guidlow*/, uint32 entry) { return entry; }