Core: step 1 - starting to fix core warnings

expecially from headers and some cpp files

Scripts and tools in next steps
This commit is contained in:
Yehonal
2017-09-16 13:47:19 +02:00
parent 584af79efa
commit 3dde305068
22 changed files with 66 additions and 51 deletions

View File

@@ -8,10 +8,12 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
if( CMAKE_COMPILER_IS_GNUCXX )
add_definitions(--no-warnings)
elseif( MSVC )
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
string(REGEX REPLACE "/W[0-4] " "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE "/W[0-4] " "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
add_definitions(/W0)
else()
add_definitions(-w)
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")

View File

@@ -26,11 +26,12 @@ class DelayExecutor : protected ACE_Task_Base
private:
ACE_Message_Queue<ACE_SYNCH> mqueue_;
ACE_Activation_Queue queue_;
ACE_Method_Request* pre_svc_hook_;
ACE_Method_Request* post_svc_hook_;
bool activated_;
ACE_Message_Queue<ACE_SYNCH> mqueue_;
ACE_Activation_Queue queue_;
void activated(bool s);
};

View File

@@ -107,9 +107,9 @@ struct NonTankTargetSelector : public std::unary_function<Unit*, bool>
struct PowerUsersSelector : public std::unary_function<Unit*, bool>
{
Unit const* _me;
Powers const _power;
float const _dist;
bool const _playerOnly;
Powers const _power;
PowerUsersSelector(Unit const* unit, Powers power, float dist, bool playerOnly) : _me(unit), _power(power), _dist(dist), _playerOnly(playerOnly) { }

View File

@@ -255,7 +255,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
(*itr)->SendPlaySound(e.action.sound.sound, e.action.sound.onlySelf > 0);
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SOUND: target: %s (GuidLow: %u), sound: %u, onlyself: %u",
(*itr)->GetName().c_str(), (*itr)->GetGUIDLow(), e.action.sound.sound);
(*itr)->GetName().c_str(), (*itr)->GetGUIDLow(), e.action.sound.sound, e.action.sound.onlySelf);
#endif
}
}
@@ -1088,7 +1088,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
instance->SetData64(e.action.setInstanceData64.field, targets->front()->GetGUID());
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA64: Field: %u, data: %u",
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA64: Field: %u, data: %lu",
e.action.setInstanceData64.field, targets->front()->GetGUID());
#endif
delete targets;
@@ -3175,7 +3175,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
// xinef: my addition
if (e.target.unitGUID.getFromHashMap)
{
if (target = ObjectAccessor::GetCreature(scriptTrigger ? *scriptTrigger : *GetBaseObject(), MAKE_NEW_GUID(e.target.unitGUID.dbGuid, e.target.unitGUID.entry, HIGHGUID_UNIT)))
if ((target = ObjectAccessor::GetCreature(scriptTrigger ? *scriptTrigger : *GetBaseObject(), MAKE_NEW_GUID(e.target.unitGUID.dbGuid, e.target.unitGUID.entry, HIGHGUID_UNIT))))
l->push_back(target);
}
else
@@ -3198,7 +3198,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
// xinef: my addition
if (e.target.goGUID.getFromHashMap)
{
if (target = ObjectAccessor::GetGameObject(scriptTrigger ? *scriptTrigger : *GetBaseObject(), MAKE_NEW_GUID(e.target.goGUID.dbGuid, e.target.goGUID.entry, HIGHGUID_GAMEOBJECT)))
if ((target = ObjectAccessor::GetGameObject(scriptTrigger ? *scriptTrigger : *GetBaseObject(), MAKE_NEW_GUID(e.target.goGUID.dbGuid, e.target.goGUID.entry, HIGHGUID_GAMEOBJECT))))
l->push_back(target);
}
else

View File

@@ -237,6 +237,8 @@ void SmartAIMgr::LoadSmartAIFromDB()
if (temp.event.friendlyCC.repeatMin == 0 && temp.event.friendlyCC.repeatMax == 0)
temp.event.event_flags |= SMART_EVENT_FLAG_NOT_REPEATABLE;
break;
default:
break;
}
// xinef: rozpierdol tc, niedojeby ze szok
@@ -416,8 +418,10 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
break;
case SMART_EVENT_OOC_LOS:
case SMART_EVENT_IC_LOS:
if (!IsMinMaxValid(e, e.event.los.cooldownMin, e.event.los.cooldownMax))
if (!IsMinMaxValid(e, e.event.los.cooldownMin, e.event.los.cooldownMax)) {
return false;
}
break;
case SMART_EVENT_RESPAWN:
if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_MAP && !sMapStore.LookupEntry(e.event.respawn.map))
@@ -971,14 +975,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
if (eventId < 1 || eventId >= events.size())
{
sLog->outError("SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStop);
sLog->outError("SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStop.id);
return false;
}
GameEventData const& eventData = events[eventId];
if (!eventData.isValid())
{
sLog->outError("SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStop);
sLog->outError("SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStop.id);
return false;
}
break;
@@ -991,14 +995,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
if (eventId < 1 || eventId >= events.size())
{
sLog->outError("SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStart);
sLog->outError("SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStart.id);
return false;
}
GameEventData const& eventData = events[eventId];
if (!eventData.isValid())
{
sLog->outError("SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStart);
sLog->outError("SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStart.id);
return false;
}
break;

View File

@@ -92,7 +92,7 @@ namespace ArenaSpectator
{
if (!IS_PLAYER_GUID(targetGUID))
return;
SendCommand(o, "%s0x%016llX;%s=%s;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, c);
SendCommand(o, "%s0x%016lX;%s=%s;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, c);
}
template<class T>
@@ -100,7 +100,7 @@ namespace ArenaSpectator
{
if (!IS_PLAYER_GUID(targetGUID))
return;
SendCommand(o, "%s0x%016llX;%s=%u;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, t);
SendCommand(o, "%s0x%016lX;%s=%u;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, t);
}
template<class T>
@@ -108,7 +108,7 @@ namespace ArenaSpectator
{
if (!IS_PLAYER_GUID(targetGUID))
return;
SendCommand(o, "%s0x%016llX;%s=0x%016llX;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, t);
SendCommand(o, "%s0x%016lX;%s=0x%016lX;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, t);
}
template<class T>
@@ -116,7 +116,7 @@ namespace ArenaSpectator
{
if (!IS_PLAYER_GUID(targetGUID))
return;
SendCommand(o, "%s0x%016llX;%s=%u,%i;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, id, casttime);
SendCommand(o, "%s0x%016lX;%s=%u,%i;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, id, casttime);
}
template<class T>
@@ -127,7 +127,7 @@ namespace ArenaSpectator
if (const SpellInfo* si = sSpellMgr->GetSpellInfo(id))
if (si->SpellIconID == 1)
return;
SendCommand(o, "%s0x%016llX;%s=%u,%u,%u;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, id, dur, maxdur);
SendCommand(o, "%s0x%016lX;%s=%u,%u,%u;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, id, dur, maxdur);
}
template<class T>
@@ -135,7 +135,7 @@ namespace ArenaSpectator
{
if (!IS_PLAYER_GUID(targetGUID))
return;
SendCommand(o, "%s0x%016llX;%s=%u,%u,%i,%i,%u,%u,%u,0x%016llX;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, remove ? 1 : 0, stack, dur, maxdur, id, dispel, isDebuff ? 1 : 0, caster);
SendCommand(o, "%s0x%016lX;%s=%u,%u,%i,%i,%u,%u,%u,0x%016lX;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, remove ? 1 : 0, stack, dur, maxdur, id, dispel, isDebuff ? 1 : 0, caster);
}
void HandleResetCommand(Player* p)
@@ -205,8 +205,8 @@ namespace ArenaSpectator
if (effMask & (1<<i))
{
AuraType at = aura->GetEffect(i)->GetAuraType();
if (aura->GetEffect(i)->GetAmount() && (aura->GetSpellInfo()->IsPositive() || targetGUID != aura->GetCasterGUID()) ||
at == SPELL_AURA_MECHANIC_IMMUNITY || at == SPELL_AURA_EFFECT_IMMUNITY || at == SPELL_AURA_STATE_IMMUNITY || at == SPELL_AURA_SCHOOL_IMMUNITY || at == SPELL_AURA_DISPEL_IMMUNITY)
if (aura->GetEffect(i)->GetAmount() && ((aura->GetSpellInfo()->IsPositive() || targetGUID != aura->GetCasterGUID()) ||
at == SPELL_AURA_MECHANIC_IMMUNITY || at == SPELL_AURA_EFFECT_IMMUNITY || at == SPELL_AURA_STATE_IMMUNITY || at == SPELL_AURA_SCHOOL_IMMUNITY || at == SPELL_AURA_DISPEL_IMMUNITY))
return true;
}
}

View File

@@ -416,14 +416,15 @@ void Battlefield::PlayerAcceptInviteToWar(Player* player)
void Battlefield::TeamCastSpell(TeamId team, int32 spellId)
{
if (spellId > 0)
if (spellId > 0) {
for (GuidSet::const_iterator itr = m_PlayersInWar[team].begin(); itr != m_PlayersInWar[team].end(); ++itr)
if (Player* player = ObjectAccessor::FindPlayer(*itr))
player->CastSpell(player, uint32(spellId), true);
else
} else {
for (GuidSet::const_iterator itr = m_PlayersInWar[team].begin(); itr != m_PlayersInWar[team].end(); ++itr)
if (Player* player = ObjectAccessor::FindPlayer(*itr))
player->RemoveAuraFromStack(uint32(-spellId));
}
}
void Battlefield::BroadcastPacketToZone(WorldPacket& data) const

View File

@@ -39,8 +39,8 @@
/*** BATTLEGROUND MANAGER ***/
/*********************************************************/
BattlegroundMgr::BattlegroundMgr() : m_ArenaTesting(false), m_Testing(false),
m_lastClientVisibleInstanceId(0), m_NextAutoDistributionTime(0), m_NextPeriodicQueueUpdateTime(5*IN_MILLISECONDS), randomBgDifficultyEntry(999, 0, 80, 80, 0)
BattlegroundMgr::BattlegroundMgr() : randomBgDifficultyEntry(999, 0, 80, 80, 0), m_ArenaTesting(false), m_Testing(false),
m_lastClientVisibleInstanceId(0), m_NextAutoDistributionTime(0), m_NextPeriodicQueueUpdateTime(5*IN_MILLISECONDS)
{
for (uint32 qtype = BATTLEGROUND_QUEUE_NONE; qtype < MAX_BATTLEGROUND_QUEUE_TYPES; ++qtype)
m_BattlegroundQueues[qtype].SetBgTypeIdAndArenaType(BGTemplateId(BattlegroundQueueTypeId(qtype)), BGArenaType(BattlegroundQueueTypeId(qtype)));

View File

@@ -142,11 +142,11 @@ class BattlegroundMgr
BattlegroundQueue m_BattlegroundQueues[MAX_BATTLEGROUND_QUEUE_TYPES];
std::vector<uint64> m_ArenaQueueUpdateScheduler;
uint32 m_lastClientVisibleInstanceId;
uint32 m_NextPeriodicQueueUpdateTime;
time_t m_NextAutoDistributionTime;
bool m_ArenaTesting;
bool m_Testing;
uint32 m_lastClientVisibleInstanceId;
time_t m_NextAutoDistributionTime;
uint32 m_NextPeriodicQueueUpdateTime;
BattleMastersMap mBattleMastersMap;
};

View File

@@ -391,8 +391,8 @@ void BattlegroundQueue::FillPlayersToBG(const int32 aliFree, const int32 hordeFr
// quick check if nothing we can do:
if (!sBattlegroundMgr->isTesting())
if (aliFree > hordeFree && m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE].empty() ||
hordeFree > aliFree && m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_HORDE].empty())
if ((aliFree > hordeFree && m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE].empty()) ||
(hordeFree > aliFree && m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_HORDE].empty()))
return;
// ally: at first fill as much as possible
@@ -447,8 +447,8 @@ void BattlegroundQueue::FillPlayersToBGWithSpecific(const int32 aliFree, const i
// quick check if nothing we can do:
if (!sBattlegroundMgr->isTesting())
if (m_QueuedGroups[thisBracketId][BG_QUEUE_NORMAL_ALLIANCE].empty() && specificQueue->m_QueuedGroups[specificBracketId][BG_QUEUE_NORMAL_ALLIANCE].empty() ||
m_QueuedGroups[thisBracketId][BG_QUEUE_NORMAL_HORDE].empty() && specificQueue->m_QueuedGroups[specificBracketId][BG_QUEUE_NORMAL_HORDE].empty())
if ((m_QueuedGroups[thisBracketId][BG_QUEUE_NORMAL_ALLIANCE].empty() && specificQueue->m_QueuedGroups[specificBracketId][BG_QUEUE_NORMAL_ALLIANCE].empty()) ||
(m_QueuedGroups[thisBracketId][BG_QUEUE_NORMAL_HORDE].empty() && specificQueue->m_QueuedGroups[specificBracketId][BG_QUEUE_NORMAL_HORDE].empty()))
return;
// copy groups from both queues to new joined container

View File

@@ -261,10 +261,11 @@ class BattlegroundAB : public Battleground
{
}
uint8 _state;
TeamId _ownerTeamId;
uint32 _iconNone;
uint32 _iconCapture;
TeamId _ownerTeamId;
uint8 _state;
bool _captured;
};

View File

@@ -377,8 +377,8 @@ class BattlegroundEY : public Battleground
}
TeamId _ownerTeamId;
uint32 _areaTrigger;
int8 _barStatus;
uint32 _areaTrigger;
int8 _playersCount[BG_TEAMS_COUNT];
bool IsUnderControl(TeamId teamId) const { return _ownerTeamId == teamId; }

View File

@@ -47,7 +47,7 @@ void BattlegroundRV::CheckPositionForUnit(Unit* unit)
{
float groundZ_vmap = unit->GetMap()->GetHeight(unit->GetPositionX(), unit->GetPositionY(), 37.0f, true, 50.0f);
float groundZ_dyntree = unit->GetMap()->GetDynamicMapTree().getHeight(unit->GetPositionX(), unit->GetPositionY(), 37.0f, 50.0f, unit->GetPhaseMask());
if (groundZ_vmap > 28.0f && groundZ_vmap < 29.0f || groundZ_dyntree > 28.0f && groundZ_dyntree < 37.0f)
if ((groundZ_vmap > 28.0f && groundZ_vmap < 29.0f) || (groundZ_dyntree > 28.0f && groundZ_dyntree < 37.0f))
{
float groundZ = std::max<float>(groundZ_vmap, groundZ_dyntree);
if (unit->GetPositionZ() < groundZ - 0.2f || unit->GetPositionZ() > groundZ + 3.5f)

View File

@@ -624,9 +624,9 @@ void BattlegroundSA::EventPlayerDamagedGO(Player* /*player*/, GameObject* go, ui
case BG_SA_GREEN_GATE:
{
GameObject* go = NULL;
if (go = GetBGObject(BG_SA_RED_GATE))
if ((go = GetBGObject(BG_SA_RED_GATE)))
go->SetDestructibleBuildingModifyState(true);
if (go = GetBGObject(BG_SA_PURPLE_GATE))
if ((go = GetBGObject(BG_SA_PURPLE_GATE)))
go->SetDestructibleBuildingModifyState(true);
break;
}

View File

@@ -28,10 +28,11 @@ class AsynchPetSummon
AsynchPetSummon(uint32 entry, Position position, PetType petType, uint32 duration, uint32 createdBySpell, uint64 casterGUID) :
m_entry(entry), pos(position), m_petType(petType),
m_duration(duration), m_createdBySpell(createdBySpell), m_casterGUID(casterGUID) { }
uint32 m_entry;
Position pos;
uint32 m_entry, m_createdBySpell, m_duration;
PetType m_petType;
uint32 m_duration, m_createdBySpell;
uint64 m_casterGUID;
};

View File

@@ -1323,7 +1323,7 @@ public:
class SafeUnitPointer
{
public:
explicit SafeUnitPointer(Unit* defVal) : defaultValue(defVal), ptr(defVal) {}
explicit SafeUnitPointer(Unit* defVal) : ptr(defVal), defaultValue(defVal) {}
SafeUnitPointer(const SafeUnitPointer& p) { ASSERT(false); }
void Initialize(Unit* defVal) { defaultValue = defVal; ptr = defVal; }
~SafeUnitPointer();
@@ -2368,7 +2368,7 @@ class Unit : public WorldObject
// pussywizard:
// MMaps
std::map<uint64, MMapTargetData> m_targetsNotAcceptable;
bool isTargetNotAcceptableByMMaps(uint64 guid, uint32 currTime, const Position* t = NULL) const { std::map<uint64, MMapTargetData>::const_iterator itr = m_targetsNotAcceptable.find(guid); if (itr != m_targetsNotAcceptable.end() && (itr->second._endTime >= currTime || t && !itr->second.PosChanged(*this, *t))) return true; return false; }
bool isTargetNotAcceptableByMMaps(uint64 guid, uint32 currTime, const Position* t = NULL) const { std::map<uint64, MMapTargetData>::const_iterator itr = m_targetsNotAcceptable.find(guid); if (itr != m_targetsNotAcceptable.end() && (itr->second._endTime >= currTime || (t && !itr->second.PosChanged(*this, *t)))) return true; return false; }
uint32 m_mmapNotAcceptableStartTime;
// Safe mover
std::set<SafeUnitPointer*> SafeUnitPointerSet;

View File

@@ -46,14 +46,14 @@ class TargetedMovementGeneratorMedium : public MovementGeneratorMedium< T, D >,
protected:
void _setTargetLocation(T* owner, bool initial);
PathGenerator* i_path;
uint32 lastPathingFailMSTime;
TimeTrackerSmall i_recheckDistance;
TimeTrackerSmall i_recheckDistanceForced;
float i_offset;
float i_angle;
bool i_recalculateTravel : 1;
bool i_targetReached : 1;
PathGenerator* i_path;
uint32 lastPathingFailMSTime;
};
template<class T>

View File

@@ -180,8 +180,8 @@ bool ArenaSpectator::HandleSpectatorSpectateCommand(ChatHandler* handler, char c
}
bool bgPreparation = false;
if (!handler->GetSession()->GetSecurity() && bgmap->GetBG()->GetStatus() != STATUS_IN_PROGRESS ||
handler->GetSession()->GetSecurity() && bgmap->GetBG()->GetStatus() != STATUS_WAIT_JOIN && bgmap->GetBG()->GetStatus() != STATUS_IN_PROGRESS)
if ((!handler->GetSession()->GetSecurity() && bgmap->GetBG()->GetStatus() != STATUS_IN_PROGRESS) ||
(handler->GetSession()->GetSecurity() && bgmap->GetBG()->GetStatus() != STATUS_WAIT_JOIN && bgmap->GetBG()->GetStatus() != STATUS_IN_PROGRESS))
{
bgPreparation = true;
handler->SendSysMessage("Arena is not in progress yet. You will be invited as soon as it starts.");
@@ -193,7 +193,7 @@ bool ArenaSpectator::HandleSpectatorSpectateCommand(ChatHandler* handler, char c
{
handler->PSendSysMessage("To spectate, please fix the following:");
for (std::list<std::string>::const_iterator itr = errors.begin(); itr != errors.end(); ++itr)
handler->PSendSysMessage(("- "+(*itr)).c_str());
handler->PSendSysMessage("- %s",(*itr).c_str());
return true;
}

View File

@@ -2200,7 +2200,7 @@ class spell_pvp_trinket_wotf_shared_cd : public SpellScriptLoader
// Spell::SendSpellCooldown() skips all spells with TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD
player->AddSpellAndCategoryCooldowns(GetSpellInfo(), GetCastItem() ? GetCastItem()->GetEntry() : 0, GetSpell());
if (player->GetTeamId(true) == TEAM_HORDE)
if (player->GetTeamId(true) == TEAM_HORDE) {
if (GetSpellInfo()->Id == SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER)
{
WorldPacket data;
@@ -2225,6 +2225,7 @@ class spell_pvp_trinket_wotf_shared_cd : public SpellScriptLoader
player->GetSession()->SendPacket(&data2);
}
}
}
void Register()

View File

@@ -1053,6 +1053,8 @@ class spell_item_oracle_ablutions : public SpellScriptLoader
case POWER_ENERGY:
caster->CastSpell(caster, SPELL_ABLUTION_ENERGY, true);
break;
default:
break;
}
if (Player* player = caster->ToPlayer())
{

View File

@@ -1197,6 +1197,8 @@ class spell_q6124_6129_apply_salve : public SpellScriptLoader
if (creatureTarget->GetEntry() == NPC_SICKLY_DEER)
newEntry = NPC_CURED_DEER;
break;
default:
break;
}
if (newEntry)
{

View File

@@ -662,7 +662,7 @@ class spell_sha_earth_shield : public SpellScriptLoader
AddPct(amount, glyphe->GetAmount());
// xinef: Improved Shields
if (baseAmount = amount - baseAmount)
if ((baseAmount = amount - baseAmount))
if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_SHAMAN, 19, EFFECT_1))
{
ApplyPct(baseAmount, aurEff->GetAmount());