diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 20 | ||||
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 18 | ||||
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 5 | ||||
-rw-r--r-- | src/server/game/Maps/Map.cpp | 43 | ||||
-rw-r--r-- | src/server/game/Server/Protocol/Handlers/QuestHandler.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 20 | ||||
-rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 6 |
7 files changed, 60 insertions, 54 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 9fcf5339522..ff9a57d54c9 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -3705,8 +3705,8 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) if (!pSkill) continue; - if (_spell_idx->second->learnOnGetSkill == ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL && - pSkill->categoryId != SKILL_CATEGORY_CLASS ||// not unlearn class skills (spellbook/talent pages) + if ((_spell_idx->second->learnOnGetSkill == ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL && + pSkill->categoryId != SKILL_CATEGORY_CLASS) ||// not unlearn class skills (spellbook/talent pages) // lockpicking/runeforging special case, not have ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL ((pSkill->id == SKILL_LOCKPICKING || pSkill->id == SKILL_RUNEFORGING) && _spell_idx->second->max_value == 0)) { @@ -9940,7 +9940,7 @@ uint8 Player::_CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, return EQUIP_ERR_ALREADY_LOOTED; // no maximum - if (pProto->MaxCount <= 0 && pProto->ItemLimitCategory == 0 || pProto->MaxCount == 2147483647) + if ((pProto->MaxCount <= 0 && pProto->ItemLimitCategory == 0) || pProto->MaxCount == 2147483647) return EQUIP_ERR_OK; if (pProto->MaxCount > 0) @@ -10034,7 +10034,7 @@ uint8 Player::_CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVe return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; // prevent cheating - if (slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END || slot >= PLAYER_SLOT_END) + if ((slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END) || slot >= PLAYER_SLOT_END) return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG; } else @@ -13891,7 +13891,7 @@ void Player::SendPreparedQuest(uint64 guid) else { Object* pObject = ObjectAccessor::GetObjectByTypeMask(*this, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM); - if (!pObject||!pObject->hasQuest(quest_id) && !pObject->hasInvolvedQuest(quest_id)) + if (!pObject || (!pObject->hasQuest(quest_id) && !pObject->hasInvolvedQuest(quest_id))) { PlayerTalkClass->CloseGossip(); return; @@ -14712,8 +14712,8 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg) // alternative quest from group also must be active if (i_exstatus == mQuestStatus.end() || - i_exstatus->second.m_status != QUEST_STATUS_INCOMPLETE && - (i_prevstatus->second.m_status != QUEST_STATUS_COMPLETE || GetQuestRewardStatus(prevId))) + (i_exstatus->second.m_status != QUEST_STATUS_INCOMPLETE && + (i_prevstatus->second.m_status != QUEST_STATUS_COMPLETE || GetQuestRewardStatus(prevId)))) { if (msg) SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ); @@ -19970,7 +19970,7 @@ void Player::AddSpellAndCategoryCooldowns(SpellEntry const* spellInfo, uint32 it { // shoot spells used equipped item cooldown values already assigned in GetAttackTime(RANGED_ATTACK) // prevent 0 cooldowns set by another way - if (rec <= 0 && catrec <= 0 && (cat == 76 || IsAutoRepeatRangedSpell(spellInfo) && spellInfo->Id != 75)) + if (rec <= 0 && catrec <= 0 && (cat == 76 || (IsAutoRepeatRangedSpell(spellInfo) && spellInfo->Id != 75))) rec = GetAttackTime(RANGED_ATTACK); // Now we have cooldown data (if found any), time to apply mods @@ -22070,8 +22070,8 @@ void Player::SendCorpseReclaimDelay(bool load) return; uint32 count; - if (pvp && sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP) || - !pvp && sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE)) + if ((pvp && sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP)) || + (!pvp && sWorld.getConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE))) { count = (m_deathExpireTime-corpse->GetGhostTime())/DEATH_EXPIRE_STEP; if (count >= MAX_DEATH_COUNT) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 2d349b770e7..4ac5e777662 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -537,7 +537,7 @@ bool Unit::HasAuraTypeWithFamilyFlags(AuraType auraType, uint32 familyName, uint void Unit::DealDamageMods(Unit *pVictim, uint32 &damage, uint32* absorb) { - if (!pVictim->isAlive() || pVictim->hasUnitState(UNIT_STAT_UNATTACKABLE) || pVictim->GetTypeId() == TYPEID_UNIT && pVictim->ToCreature()->IsInEvadeMode()) + if (!pVictim->isAlive() || pVictim->hasUnitState(UNIT_STAT_UNATTACKABLE) || (pVictim->GetTypeId() == TYPEID_UNIT && pVictim->ToCreature()->IsInEvadeMode())) { if (absorb) *absorb += damage; @@ -1172,7 +1172,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss) if (!pVictim) return; - if (!pVictim->isAlive() || pVictim->hasUnitState(UNIT_STAT_UNATTACKABLE) || pVictim->GetTypeId() == TYPEID_UNIT && pVictim->ToCreature()->IsInEvadeMode()) + if (!pVictim->isAlive() || pVictim->hasUnitState(UNIT_STAT_UNATTACKABLE) || (pVictim->GetTypeId() == TYPEID_UNIT && pVictim->ToCreature()->IsInEvadeMode())) return; SpellEntry const *spellProto = sSpellStore.LookupEntry(damageInfo->SpellID); @@ -1433,7 +1433,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss) if (!pVictim) return; - if (!pVictim->isAlive() || pVictim->hasUnitState(UNIT_STAT_UNATTACKABLE) || pVictim->GetTypeId() == TYPEID_UNIT && pVictim->ToCreature()->IsInEvadeMode()) + if (!pVictim->isAlive() || pVictim->hasUnitState(UNIT_STAT_UNATTACKABLE) || (pVictim->GetTypeId() == TYPEID_UNIT && pVictim->ToCreature()->IsInEvadeMode())) return; //You don't lose health from damage taken from another player while in a sanctuary @@ -5424,7 +5424,7 @@ bool Unit::HandleSpellCritChanceAuraProc(Unit *pVictim, uint32 /*damage*/, AuraE } // default case - if (!target || target != this && !target->isAlive()) + if (!target || (target != this && !target->isAlive())) return false; if (cooldown && GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->HasSpellCooldown(triggered_spell_id)) @@ -8706,7 +8706,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig // Enlightenment (trigger only from mana cost spells) case 35095: { - if (!procSpell || procSpell->powerType != POWER_MANA || procSpell->manaCost == 0 && procSpell->ManaCostPercentage == 0 && procSpell->manaCostPerlevel == 0) + if (!procSpell || procSpell->powerType != POWER_MANA || (procSpell->manaCost == 0 && procSpell->ManaCostPercentage == 0 && procSpell->manaCostPerlevel == 0)) return false; break; } @@ -10515,7 +10515,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3 for (uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j) { if (spellProto->Effect[j] == SPELL_EFFECT_HEALTH_LEECH || - spellProto->Effect[j] == SPELL_EFFECT_APPLY_AURA && spellProto->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_LEECH) + (spellProto->Effect[j] == SPELL_EFFECT_APPLY_AURA && spellProto->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_LEECH)) { CastingTime /= 2; break; @@ -14640,7 +14640,7 @@ void Unit::SetContestedPvP(Player *attackedPlayer) { Player* player = GetCharmerOrOwnerPlayerOrPlayerItself(); - if (!player || attackedPlayer && (attackedPlayer == player || player->duel && player->duel->opponent == attackedPlayer)) + if (!player || (attackedPlayer && (attackedPlayer == player || player->duel && player->duel->opponent == attackedPlayer))) return; player->SetContestedPvPTimer(30000); @@ -15586,7 +15586,7 @@ void Unit::RemoveCharmedBy(Unit *charmer) return; ASSERT(type != CHARM_TYPE_POSSESS || charmer->GetTypeId() == TYPEID_PLAYER); - ASSERT(type != CHARM_TYPE_VEHICLE || GetTypeId() == TYPEID_UNIT && IsVehicle()); + ASSERT(type != CHARM_TYPE_VEHICLE || (GetTypeId() == TYPEID_UNIT && IsVehicle())); charmer->SetCharm(this, false); @@ -15626,7 +15626,7 @@ void Unit::RemoveCharmedBy(Unit *charmer) //a guardian should always have charminfo if (charmer->GetTypeId() == TYPEID_PLAYER && this != charmer->GetFirstControlled()) charmer->ToPlayer()->SendRemoveControlBar(); - else if (GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT && !this->ToCreature()->isGuardian()) + else if (GetTypeId() == TYPEID_PLAYER || (GetTypeId() == TYPEID_UNIT && !this->ToCreature()->isGuardian())) DeleteCharmInfo(); } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index bc834d1b53b..31fce16b114 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -2595,7 +2595,8 @@ void ObjectMgr::LoadItemSetNames() { uint32 entry = *itr; // add data from item_template if available - if (pProto = GetItemPrototype(entry)) + pProto = GetItemPrototype(entry); + if (pProto) { sLog.outErrorDb("Item set part (Entry: %u) does not have entry in `item_set_names`, adding data from `item_template`.", entry); ItemSetNameEntry &data = mItemSetNameMap[entry]; @@ -5634,7 +5635,7 @@ uint32 ObjectMgr::GetNearestTaxiNode(float x, float y, float z, uint32 mapid, ui { TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(i); - if (!node || node->map_id != mapid || !node->MountCreatureID[team == ALLIANCE ? 1 : 0] && node->MountCreatureID[0] != 32981) // dk flight + if (!node || node->map_id != mapid || (!node->MountCreatureID[team == ALLIANCE ? 1 : 0] && node->MountCreatureID[0] != 32981)) // dk flight continue; uint8 field = (uint8)((i - 1) / 32); diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 8b955782b7f..9c4b4f80a56 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -1719,7 +1719,8 @@ uint16 Map::GetAreaFlag(float x, float y, float z, bool *isOutdoors) const if (GetAreaInfo(x, y, z, mogpFlags, adtId, rootId, groupId)) { haveAreaInfo = true; - if (wmoEntry = GetWMOAreaTableEntryByTripple(rootId, adtId, groupId)) + wmoEntry = GetWMOAreaTableEntryByTripple(rootId, adtId, groupId); + if (wmoEntry) atEntry = GetAreaEntryByAreaID(wmoEntry->areaId); } @@ -3233,8 +3234,8 @@ void Map::ScriptsProcess() // when script called for item spell casting then target == (unit or GO) and source is player WorldObject* worldObject; - Player* pTarget = NULL; - if (pTarget = target->ToPlayer()) + Player* pTarget = target->ToPlayer(); + if (pTarget) { if (source->GetTypeId() != TYPEID_UNIT && source->GetTypeId() != TYPEID_GAMEOBJECT && source->GetTypeId() != TYPEID_PLAYER) { @@ -3244,23 +3245,27 @@ void Map::ScriptsProcess() } worldObject = dynamic_cast<WorldObject*>(source); } - else if (pTarget = source->ToPlayer()) + else { - if (target->GetTypeId() != TYPEID_UNIT && target->GetTypeId() != TYPEID_GAMEOBJECT && target->GetTypeId() != TYPEID_PLAYER) - { - sLog.outError("%s target is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.", - step.script->GetDebugInfo().c_str(), target->GetTypeId(), target->GetEntry(), target->GetGUIDLow()); - break; - } - worldObject = dynamic_cast<WorldObject*>(target); - } - else - { - sLog.outError("%s neither source nor target is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", - step.script->GetDebugInfo().c_str(), - source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0, - target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0); - break; + pTarget = source->ToPlayer(); + if (pTarget) + { + if (target->GetTypeId() != TYPEID_UNIT && target->GetTypeId() != TYPEID_GAMEOBJECT && target->GetTypeId() != TYPEID_PLAYER) + { + sLog.outError("%s target is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.", + step.script->GetDebugInfo().c_str(), target->GetTypeId(), target->GetEntry(), target->GetGUIDLow()); + break; + } + worldObject = dynamic_cast<WorldObject*>(target); + } + else + { + sLog.outError("%s neither source nor target is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", + step.script->GetDebugInfo().c_str(), + source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0, + target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0); + break; + } } // quest id and flags checked at script loading diff --git a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp index 3b0bbebedc8..4d66e9b7f29 100644 --- a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp @@ -239,7 +239,7 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recv_data) // Verify that the guid is valid and is a questgiver or involved in the requested quest Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM); - if (!pObject||!pObject->hasQuest(quest) && !pObject->hasInvolvedQuest(quest)) + if (!pObject || (!pObject->hasQuest(quest) && !pObject->hasInvolvedQuest(quest))) { _player->PlayerTalkClass->CloseGossip(); return; diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 5b199560db0..512d1c90f98 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1877,7 +1877,7 @@ void Spell::SearchAreaTarget(std::list<Unit*> &TagUnitMap, float radius, SpellNo Trinity::SpellNotifierCreatureAndPlayer notifier(m_caster, TagUnitMap, radius, type, TargetType, pos, entry); if ((m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_PLAYERS_ONLY) - || TargetType == SPELL_TARGETS_ENTRY && !entry) + || (TargetType == SPELL_TARGETS_ENTRY && !entry)) m_caster->GetMap()->VisitWorld(pos->m_positionX, pos->m_positionY, radius, notifier); else m_caster->GetMap()->VisitAll(pos->m_positionX, pos->m_positionY, radius, notifier); @@ -2551,13 +2551,13 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) case 51327: case 51328: // Search for ghoul if our ghoul or dead body not valid unit target - if (!(m_targets.getUnitTarget() && (m_targets.getUnitTarget()->GetEntry() == 26125 && m_targets.getUnitTarget()->GetOwnerGUID() == m_caster->GetGUID() + if (!(m_targets.getUnitTarget() && ((m_targets.getUnitTarget()->GetEntry() == 26125 && m_targets.getUnitTarget()->GetOwnerGUID() == m_caster->GetGUID()) || (m_targets.getUnitTarget()->getDeathState() == CORPSE && m_targets.getUnitTarget()->GetDisplayId() == m_targets.getUnitTarget()->GetNativeDisplayId() && m_targets.getUnitTarget()->GetTypeId() == TYPEID_UNIT && !m_targets.getUnitTarget()->ToCreature()->isDeadByDefault() - && !(m_targets.getUnitTarget()->GetCreatureTypeMask() & CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL)) - && m_targets.getUnitTarget()->GetDisplayId() == m_targets.getUnitTarget()->GetNativeDisplayId()))) + && !(m_targets.getUnitTarget()->GetCreatureTypeMask() & CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL) + && m_targets.getUnitTarget()->GetDisplayId() == m_targets.getUnitTarget()->GetNativeDisplayId())))) { CleanupTargetList(); @@ -3301,7 +3301,7 @@ void Spell::cast(bool skipCheck) SendSpellGo(); // Okay, everything is prepared. Now we need to distinguish between immediate and evented delayed spells - if (m_spellInfo->speed > 0.0f && !IsChanneledSpell(m_spellInfo) || m_spellInfo->Id == 14157) + if ((m_spellInfo->speed > 0.0f && !IsChanneledSpell(m_spellInfo)) || m_spellInfo->Id == 14157) { // Remove used for cast item if need (it can be already NULL after TakeReagents call // in case delayed spell remove item at cast delay start @@ -4989,7 +4989,7 @@ SpellCastResult Spell::CheckCast(bool strict) // - with greater than 10 min CD without SPELL_ATTR_EX4_USABLE_IN_ARENA flag // - with SPELL_ATTR_EX4_NOT_USABLE_IN_ARENA flag if ((m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_NOT_USABLE_IN_ARENA) || - GetSpellRecoveryTime(m_spellInfo) > 10 * MINUTE * IN_MILLISECONDS && !(m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_USABLE_IN_ARENA)) + (GetSpellRecoveryTime(m_spellInfo) > 10 * MINUTE * IN_MILLISECONDS && !(m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_USABLE_IN_ARENA))) if (MapEntry const* mapEntry = sMapStore.LookupEntry(m_caster->GetMapId())) if (mapEntry->IsBattleArena()) return SPELL_FAILED_NOT_IN_ARENA; @@ -5360,7 +5360,7 @@ SpellCastResult Spell::CheckCast(bool strict) if (m_caster->GetTypeId() != TYPEID_PLAYER // only players can open locks, gather etc. // we need a go target in case of TARGET_GAMEOBJECT - || m_spellInfo->EffectImplicitTargetA[i] == TARGET_GAMEOBJECT && !m_targets.getGOTarget()) + || (m_spellInfo->EffectImplicitTargetA[i] == TARGET_GAMEOBJECT && !m_targets.getGOTarget())) return SPELL_FAILED_BAD_TARGETS; Item *pTempItem = NULL; @@ -5378,8 +5378,8 @@ SpellCastResult Spell::CheckCast(bool strict) (!pTempItem || !pTempItem->GetProto()->LockID || !pTempItem->IsLocked())) return SPELL_FAILED_BAD_TARGETS; - if (m_spellInfo->Id != 1842 || m_targets.getGOTarget() && - m_targets.getGOTarget()->GetGOInfo()->type != GAMEOBJECT_TYPE_TRAP) + if (m_spellInfo->Id != 1842 || (m_targets.getGOTarget() && + m_targets.getGOTarget()->GetGOInfo()->type != GAMEOBJECT_TYPE_TRAP)) if (m_caster->ToPlayer()->InBattleground() && // In Battleground players can use only flags and banners !m_caster->ToPlayer()->CanUseBattlegroundObject()) return SPELL_FAILED_TRY_AGAIN; @@ -6745,7 +6745,7 @@ bool Spell::CheckTarget(Unit* target, uint32 eff) bool Spell::IsNeedSendToClient() const { return m_spellInfo->SpellVisual[0] || m_spellInfo->SpellVisual[1] || IsChanneledSpell(m_spellInfo) || - m_spellInfo->speed > 0.0f || !m_triggeredByAuraSpell && !m_IsTriggeredSpell; + m_spellInfo->speed > 0.0f || (!m_triggeredByAuraSpell && !m_IsTriggeredSpell); } bool Spell::HaveTargetsForEffect(uint8 effect) const diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 4f7ad15230d..c0c2632e7e7 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3073,7 +3073,7 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32 return false; if (questStart) // not in expected required quest state - if (!player || (!questStartCanActive || !player->IsActiveQuest(questStart)) && !player->GetQuestRewardStatus(questStart)) + if (!player || ((!questStartCanActive || !player->IsActiveQuest(questStart)) && !player->GetQuestRewardStatus(questStart))) return false; if (questEnd) // not in expected forbidden quest state @@ -3081,7 +3081,7 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32 return false; if (auraSpell) // not have expected aura - if (!player || auraSpell > 0 && !player->HasAura(auraSpell) || auraSpell < 0 && player->HasAura(-auraSpell)) + if (!player || (auraSpell > 0 && !player->HasAura(auraSpell)) || (auraSpell < 0 && player->HasAura(-auraSpell))) return false; // Extra conditions -- leaving the possibility add extra conditions... @@ -3110,7 +3110,7 @@ bool SpellMgr::CanAurasStack(SpellEntry const *spellInfo_1, SpellEntry const *sp SpellSpecific spellSpec_2 = GetSpellSpecific(spellInfo_2); if (spellSpec_1 && spellSpec_2) if (IsSingleFromSpellSpecificPerTarget(spellSpec_1, spellSpec_2) - || sameCaster && IsSingleFromSpellSpecificPerCaster(spellSpec_1, spellSpec_2)) + || (sameCaster && IsSingleFromSpellSpecificPerCaster(spellSpec_1, spellSpec_2))) return false; SpellGroupStackRule stackRule = CheckSpellGroupStackRules(spellInfo_1->Id, spellInfo_2->Id); |