Core/Entities: fixed array size

Core/Misc: fixed compile warning
This commit is contained in:
joschiwald
2017-01-01 19:51:14 +01:00
parent 86b98686a9
commit c23dd79dfa
3 changed files with 6 additions and 52 deletions

View File

@@ -483,7 +483,7 @@ void BattlefieldTB::UpdateNPCsAndGameObjects()
door->SetGoState(GetState() == BATTLEFIELD_INACTIVE ? GO_STATE_ACTIVE : GO_STATE_READY);
// Decide which cellblock and questgiver will be active.
m_iCellblockRandom = GetState() == BATTLEFIELD_INACTIVE ? urand(0, CELLBLOCK_MAX - 1) : CELLBLOCK_NONE;
m_iCellblockRandom = GetState() == BATTLEFIELD_INACTIVE ? urand(CELLBLOCK_THE_HOLE, CELLBLOCK_CURSED_DEPTHS) : uint8(CELLBLOCK_NONE);
// To The Hole gate
if (GameObject* door = GetGameObject(m_gateToTheHoleGUID))

View File

@@ -675,7 +675,7 @@ enum CombatRating
CR_UNUSED_12 = 31
};
#define MAX_COMBAT_RATING 31
#define MAX_COMBAT_RATING 32
enum DamageEffectType
{

View File

@@ -1737,57 +1737,13 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
if (!(mode & AURA_EFFECT_HANDLE_REAL))
return;
SpellShapeshiftFormEntry const* shapeInfo = sSpellShapeshiftFormStore.LookupEntry(GetMiscValue());
ASSERT(shapeInfo, "Spell %u uses unknown ShapeshiftForm (%u).", GetId(), GetMiscValue());
Unit* target = aurApp->GetTarget();
uint32 modelid = 0;
Powers PowerType = POWER_MANA;
ShapeshiftForm form = ShapeshiftForm(GetMiscValue());
switch (form)
{
case FORM_CAT_FORM:
case FORM_GHOUL:
case FORM_TIGER_STANCE:
case FORM_OX_STANCE:
PowerType = POWER_ENERGY;
break;
case FORM_BEAR_FORM:
case FORM_BATTLE_STANCE:
case FORM_DEFENSIVE_STANCE:
case FORM_BERSERKER_STANCE:
PowerType = POWER_RAGE;
break;
case FORM_TREE_OF_LIFE:
case FORM_TRAVEL_FORM:
case FORM_AQUATIC_FORM:
case FORM_AMBIENT:
case FORM_THARONJA_SKELETON:
case FORM_DARKMOON_TEST_OF_STRENGTH:
case FORM_BLB_PLAYER:
case FORM_SHADOW_DANCE:
case FORM_CRANE_STANCE:
case FORM_GHOST_WOLF:
case FORM_SERPENT_STANCE:
case FORM_ZOMBIE:
case FORM_METAMORPHOSIS:
case FORM_UNDEAD:
case FORM_FLIGHT_FORM_EPIC:
case FORM_SHADOWFORM:
case FORM_FLIGHT_FORM:
case FORM_STEALTH:
case FORM_MOONKIN_FORM:
case FORM_SPIRIT_OF_REDEMPTION:
break;
default:
TC_LOG_ERROR("spells", "Auras: Unknown Shapeshift Type: %u", GetMiscValue());
}
modelid = target->GetModelForForm(form);
uint32 modelid = target->GetModelForForm(form);
if (apply)
{
@@ -1919,8 +1875,6 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
if (target->GetTypeId() == TYPEID_PLAYER)
{
SpellShapeshiftFormEntry const* shapeInfo = sSpellShapeshiftFormStore.LookupEntry(form);
ASSERT(shapeInfo);
// Learn spells for shapeshift form - no need to send action bars or add spells to spellbook
for (uint8 i = 0; i < MAX_SHAPESHIFT_SPELLS; ++i)
{