V1037 Two or more case-branches perform the same actions. Check lines: 379, 400 Pet.cpp 379

V1037 Two or more case-branches perform the same actions. Check lines: 145, 388 Pet.cpp 145 @Appled
V1037 Two or more case-branches perform the same actions. Check lines: 308, 370 Pet.cpp 308
V1037 Two or more case-branches perform the same actions. Check lines: 1723, 1734, 1740 Pet.cpp 1723
V1037 Two or more case-branches perform the same actions. Check lines: 1731, 1737 Pet.cpp 1731
V560 A part of conditional expression is always true: unitMapMgr. AIInterface.cpp 3019
V560 A part of conditional expression is always true: ssvrow. Player.cpp 6711
This commit is contained in:
Zyres
2023-07-08 19:37:35 +02:00
parent e41385d6b1
commit 174a14ccde
3 changed files with 10 additions and 27 deletions

View File

@@ -3016,7 +3016,7 @@ void AIInterface::eventUnitDied(Unit* pUnit, uint32_t /*misc1*/)
if (killed)
{
if (unitMapMgr && unitMapMgr->getScript())
if (unitMapMgr->getScript())
unitMapMgr->getScript()->OnSpawnGroupKilled(spawnGroupData->groupId);
}
}

View File

@@ -305,8 +305,6 @@ uint32 Pet::GetAutoCastTypeForSpell(SpellInfo const* ent)
case 47986:
case 48001:
case 48002:
return AUTOCAST_EVENT_NONE;
break;
//////////////////////////////////////////////////////////////////////////////////////////
// Hunter Pet Spells
@@ -370,31 +368,22 @@ uint32 Pet::GetAutoCastTypeForSpell(SpellInfo const* ent)
return AUTOCAST_EVENT_NONE;
break;
//////////////////////////////////////////////////////////////////////////////////////////
// Mage Pet Spells
//SPELL_HASH_WATERBOLT // Waterbolt
case 31707:
case 72898:
return AUTOCAST_EVENT_ATTACK;
break;
//////////////////////////////////////////////////////////////////////////////////////////
// Shaman Pet Spells
//SPELL_HASH_SPIRIT_HUNT
//SPELL_HASH_SPIRIT_HUNT // Shaman Pet Spells
case 58877:
case 58879:
return AUTOCAST_EVENT_ON_SPAWN;
break;
//SPELL_HASH_TWIN_HOWL
//SPELL_HASH_WATERBOLT // Mage Pet Spells
case 31707:
case 72898:
//SPELL_HASH_TWIN_HOWL // Shaman Pet Spells
case 58857:
// SPELL_HASH_BASH
case 5211:
case 6798:
case 8983:
case 25515:
case 43612:
//case 43612: Zyres already defined on line 145 (AUTOCAST_EVENT_ON_SPAWN) @appled
case 57094:
case 58861:
return AUTOCAST_EVENT_ATTACK;
@@ -1720,6 +1709,8 @@ void Pet::ApplySummonLevelAbilities()
case 11859: // Doomguard
case 89: // Infernal
case PET_FELGUARD:
case 26125: // Risen Ally
case 27893: // Rune Weapon
stat_index = 4;
break;
case PET_WATER_ELEMENTAL:
@@ -1728,17 +1719,9 @@ void Pet::ApplySummonLevelAbilities()
m_aiInterface->setMeleeDisabled(true);
break;
case SHADOWFIEND:
stat_index = 5;
break;
case 26125: // Risen Ally
stat_index = 4;
break;
case 29264: // Spirit Wolf
stat_index = 5;
break;
case 27893: // Rune Weapon
stat_index = 4;
break;
}
if (getEntry() == 89)
has_mana = false;

View File

@@ -6708,7 +6708,7 @@ void Player::calculateHeirloomBonus(ItemProperties const* proto, int16_t slot, b
float maxDamage = proto->Damage[i].Max;
// If set dpsMod in ScalingStatValue use it for min (70% from average), max (130% from average) damage
if (ssvrow && i == 0) // scaling stats only for first damage
if (i == 0) // scaling stats only for first damage
{
int32_t extraDPS = ssvrow->getDPSMod(proto->ScalingStatsFlag);
if (extraDPS)