diff --git a/src/game/DBCStores.cpp b/src/game/DBCStores.cpp index 92a63909a..bda9278f3 100644 --- a/src/game/DBCStores.cpp +++ b/src/game/DBCStores.cpp @@ -32,7 +32,7 @@ typedef std::map AreaFlagByMapID; struct WMOAreaTableTripple { - WMOAreaTableTripple(int32 r, int32 a, int32 g) : rootId(r), adtId(a), groupId(g) + WMOAreaTableTripple(int32 r, int32 a, int32 g) : groupId(g), rootId(r), adtId(a) { } diff --git a/src/game/Group.cpp b/src/game/Group.cpp index 3fb9dc26a..a13867482 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -751,8 +751,6 @@ void Group::StartLootRool(Creature* lootTarget, LootMethod method, Loot* loot, u LootItem const& lootItem = loot->items[itemSlot]; - ItemPrototype const* item = ObjectMgr::GetItemPrototype(lootItem.itemid); - Roll* r = new Roll(lootTarget->GetGUID(), method, lootItem); //a vector is filled with only near party members diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 255b611da..2e97aee60 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -37,8 +37,10 @@ char const* petTypeSuffix[MAX_PET_TYPE] = }; Pet::Pet(PetType type) : -Creature(CREATURE_SUBTYPE_PET), m_removed(false), m_petType(type), m_happinessTimer(7500), m_duration(0), m_resetTalentsCost(0), -m_bonusdamage(0), m_resetTalentsTime(0), m_usedTalentCount(0), m_auraUpdateMask(0), m_loading(false), +Creature(CREATURE_SUBTYPE_PET), +m_resetTalentsCost(0), m_resetTalentsTime(0), m_usedTalentCount(0), +m_removed(false), m_happinessTimer(7500), m_petType(type), m_duration(0), +m_bonusdamage(0), m_auraUpdateMask(0), m_loading(false), m_declinedname(NULL), m_petModeFlags(PET_MODE_DEFAULT) { m_name = "Pet"; @@ -1142,7 +1144,7 @@ void Pet::_SaveSpells() void Pet::_LoadAuras(uint32 timediff) { RemoveAllAuras(); - + QueryResult *result = CharacterDatabase.PQuery("SELECT caster_guid,item_guid,spell,stackcount,remaincharges,basepoints0,basepoints1,basepoints2,maxduration0,maxduration1,maxduration2,remaintime0,remaintime1,remaintime2,effIndexMask FROM pet_aura WHERE guid = '%u'",m_charmInfo->GetPetNumber()); if(result) @@ -1210,7 +1212,7 @@ void Pet::_LoadAuras(uint32 timediff) aura->SetLoadedState(damage[i], maxduration[i], remaintime[i]); holder->AddAura(aura, SpellEffectIndex(i)); } - + if (!holder->IsEmptyHolder()) { holder->SetLoadedState(caster_guid, ObjectGuid(HIGHGUID_ITEM, item_lowguid), stackcount, remaincharges); @@ -1586,9 +1588,6 @@ bool Pet::resetTalents(bool no_cost) Player *player = (Player *)owner; - uint32 level = getLevel(); - uint32 talentPointsForLevel = GetMaxTalentPointsForLevel(level); - if (m_usedTalentCount == 0) { UpdateFreeTalentPoints(false); // for fix if need counter diff --git a/src/game/Player.cpp b/src/game/Player.cpp index c0138be70..635bbd2f3 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -404,7 +404,7 @@ void TradeData::SetAccepted(bool state, bool crosssend /*= false*/) UpdateMask Player::updateVisualBits; -Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputationMgr(this), m_mover(this), m_camera(this) +Player::Player (WorldSession *session): Unit(), m_mover(this), m_camera(this), m_achievementMgr(this), m_reputationMgr(this) { m_transport = 0; diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 05c98d2fc..936da2dee 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -374,8 +374,8 @@ static AuraType const frozenAuraTypes[] = { SPELL_AURA_MOD_ROOT, SPELL_AURA_MOD_ Aura::Aura(SpellEntry const* spellproto, SpellEffectIndex eff, int32 *currentBasePoints, SpellAuraHolder *holder, Unit *target, Unit *caster, Item* castItem) : m_spellmod(NULL), m_timeCla(1000), m_periodicTimer(0), m_periodicTick(0), m_removeMode(AURA_REMOVE_BY_DEFAULT), -m_effIndex(eff), m_spellAuraHolder(holder), m_isPersistent(false), -m_positive(false), m_isPeriodic(false), m_isAreaAura(false), m_in_use(0) +m_effIndex(eff), m_positive(false), m_isPeriodic(false), m_isAreaAura(false), +m_isPersistent(false), m_in_use(0), m_spellAuraHolder(holder) { MANGOS_ASSERT(target); @@ -386,7 +386,6 @@ m_positive(false), m_isPeriodic(false), m_isAreaAura(false), m_in_use(0) bool isPassive = IsPassiveSpell(GetSpellProto()); bool isPermanent = false; m_positive = IsPositiveEffect(spellproto->Id, m_effIndex); - uint64 caster_guid = !caster ? target->GetGUID() : caster->GetGUID(); m_applyTime = time(NULL); @@ -6690,7 +6689,7 @@ void Aura::PeriodicTick() uint32 absorbHeal = 0; pCaster->CalculateHealAbsorb(heal, &absorbHeal); - + int32 gain = pCaster->DealHeal(pCaster, heal - absorbHeal, spellProto, false, absorbHeal); pCaster->getHostileRefManager().threatAssist(pCaster, gain * 0.5f, spellProto); break; @@ -7791,10 +7790,11 @@ bool Aura::IsLastAuraOnHolder() return true; } -SpellAuraHolder::SpellAuraHolder(SpellEntry const* spellproto, Unit *target, WorldObject *caster, Item *castItem) : m_caster_guid(0), m_target(target), -m_castItemGuid(castItem?castItem->GetGUID():0), m_permanent(false), -m_isRemovedOnShapeLost(true), m_in_use(0), m_deleted(false), m_removeMode(AURA_REMOVE_BY_DEFAULT), m_AuraDRGroup(DIMINISHING_NONE), m_auraSlot(MAX_AURAS), -m_auraFlags(AFLAG_NONE), m_auraLevel(1), m_procCharges(0), m_stackAmount(1) +SpellAuraHolder::SpellAuraHolder(SpellEntry const* spellproto, Unit *target, WorldObject *caster, Item *castItem) : +m_target(target), m_caster_guid(0), m_castItemGuid(castItem?castItem->GetGUID():0), +m_auraSlot(MAX_AURAS), m_auraFlags(AFLAG_NONE), m_auraLevel(1), m_procCharges(0), +m_stackAmount(1), m_removeMode(AURA_REMOVE_BY_DEFAULT), m_AuraDRGroup(DIMINISHING_NONE), +m_permanent(false), m_isRemovedOnShapeLost(true), m_deleted(false), m_in_use(0) { MANGOS_ASSERT(target); MANGOS_ASSERT(spellproto && spellproto == sSpellStore.LookupEntry( spellproto->Id ) && "`info` must be pointer to sSpellStore element"); @@ -8979,7 +8979,7 @@ bool SpellAuraHolder::IsPositive() const bool SpellAuraHolder::IsEmptyHolder() const { for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i) - if (Aura *aur = m_auras[i]) + if (m_auras[i]) return false; return true; } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index e645350e7..9e3d7a5a7 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -2377,7 +2377,6 @@ void Unit::CalculateHealAbsorb(const uint32 heal, uint32 *absorb) for(AuraList::const_iterator i = vHealAbsorb.begin(); i != vHealAbsorb.end() && RemainingHeal > 0; ++i) { Modifier* mod = (*i)->GetModifier(); - SpellEntry const* spellProto = (*i)->GetSpellProto(); // Max Amount can be absorbed by this aura int32 currentAbsorb = mod->m_amount; @@ -4382,7 +4381,7 @@ void Unit::RemoveAuraHolderDueToSpellByDispel(uint32 spellId, int32 stackAmount, { if (Aura *dot = GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, UI64LIT(0x0000040000000000), 0x00000000, casterGUID)) { - if(Unit* caster = dot->GetCaster()) + if (dot->GetCaster()) { // use clean value for initial damage int32 bp0 = dot->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_1); @@ -4689,8 +4688,6 @@ void Unit::RemoveSingleAuraFromSpellAuraHolder(SpellAuraHolder *holder, SpellEff void Unit::RemoveAura(Aura *Aur, AuraRemoveMode mode) { - SpellEntry const* AurSpellInfo = Aur->GetSpellProto(); - // remove from list before mods removing (prevent cyclic calls, mods added before including to aura list - use reverse order) if (Aur->GetModifier()->m_auraname < TOTAL_AURAS) { @@ -9621,7 +9618,6 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag continue; SpellProcEventEntry const *spellProcEvent = i->spellProcEvent; - SpellEntry const *spellInfo = triggeredByHolder->GetSpellProto(); bool useCharges = triggeredByHolder->GetAuraCharges() > 0; bool procSuccess = true; bool anyAuraProc = false; diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index 775313730..84a6331b7 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -42,9 +42,9 @@ /// WorldSession constructor WorldSession::WorldSession(uint32 id, WorldSocket *sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale) : LookingForGroup_auto_join(false), LookingForGroup_auto_add(false), m_muteTime(mute_time), -_player(NULL), m_Socket(sock),_security(sec), _accountId(id), m_expansion(expansion), +_player(NULL), m_Socket(sock),_security(sec), _accountId(id), m_expansion(expansion), _logoutTime(0), +m_inQueue(false), m_playerLoading(false), m_playerLogout(false), m_playerRecentlyLogout(false), m_playerSave(false), m_sessionDbcLocale(sWorld.GetAvailableDbcLocale(locale)), m_sessionDbLocaleIndex(sObjectMgr.GetIndexForLocale(locale)), -_logoutTime(0), m_inQueue(false), m_playerLoading(false), m_playerLogout(false), m_playerRecentlyLogout(false), m_playerSave(false), m_latency(0), m_tutorialState(TUTORIALDATA_UNCHANGED) { if (sock) @@ -884,4 +884,4 @@ void WorldSession::ExecuteOpcode( OpcodeHandler const& opHandle, WorldPacket* pa if (packet->rpos() < packet->wpos() && sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG)) LogUnprocessedTail(packet); -} \ No newline at end of file +} diff --git a/src/game/WorldSocket.cpp b/src/game/WorldSocket.cpp index 8bd90eb0e..e2a9b69f0 100644 --- a/src/game/WorldSocket.cpp +++ b/src/game/WorldSocket.cpp @@ -98,6 +98,8 @@ struct ClientPktHeader WorldSocket::WorldSocket (void) : WorldHandler (), +m_LastPingTime (ACE_Time_Value::zero), +m_OverSpeedPings (0), m_Session (0), m_RecvWPct (0), m_RecvPct (), @@ -105,9 +107,7 @@ m_Header (sizeof (ClientPktHeader)), m_OutBuffer (0), m_OutBufferSize (65536), m_OutActive (false), -m_Seed (static_cast (rand32 ())), -m_OverSpeedPings (0), -m_LastPingTime (ACE_Time_Value::zero) +m_Seed (static_cast (rand32 ())) { reference_counting_policy ().value (ACE_Event_Handler::Reference_Counting_Policy::ENABLED); diff --git a/src/game/WorldSocketMgr.cpp b/src/game/WorldSocketMgr.cpp index 25ff79b10..634cf1505 100644 --- a/src/game/WorldSocketMgr.cpp +++ b/src/game/WorldSocketMgr.cpp @@ -54,9 +54,9 @@ class ReactorRunnable : protected ACE_Task_Base public: ReactorRunnable () : - m_ThreadId (-1), + m_Reactor (0), m_Connections (0), - m_Reactor (0) + m_ThreadId (-1) { ACE_Reactor_Impl* imp = 0; @@ -207,8 +207,8 @@ class ReactorRunnable : protected ACE_Task_Base }; WorldSocketMgr::WorldSocketMgr () : - m_NetThreadsCount (0), m_NetThreads (0), + m_NetThreadsCount (0), m_SockOutKBuff (-1), m_SockOutUBuff (65536), m_UseNoDelay (true), diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index f7332bd82..10e8e791e 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10508" + #define REVISION_NR "10509" #endif // __REVISION_NR_H__