diff options
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/BattleGroundMgr.cpp | 2 | ||||
| -rw-r--r-- | src/game/Chat.cpp | 9 | ||||
| -rw-r--r-- | src/game/Unit.cpp | 6 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index 2b904ba6850..15178b1398d 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -1677,7 +1677,7 @@ void BattleGroundMgr::InitAutomaticArenaPointDistribution() if(!result) { sLog.outDebug("Battleground: Next arena point distribution time not found in SavedVariables, reseting it now."); - m_NextAutoDistributionTime = sWorld.GetGameTime() + BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY * sWorld.getConfig(CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS); + m_NextAutoDistributionTime = time(NULL) + BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY * sWorld.getConfig(CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS); CharacterDatabase.PExecute("INSERT INTO saved_variables (NextArenaPointDistributionTime) VALUES ('"I64FMTD"')", m_NextAutoDistributionTime); } else diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index 283cd8b9582..9c6c38a6b8b 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -878,8 +878,10 @@ int ChatHandler::ParseCommands(const char* text) ASSERT(text); ASSERT(*text); - if(m_session->GetSecurity() == 0) - return 0; + std::string fullcmd = text; + + //if(m_session->GetSecurity() == 0) + // return 0; /// chat case (.command or !command format) if(m_session) @@ -891,8 +893,7 @@ int ChatHandler::ParseCommands(const char* text) /// ignore single . and ! in line if(strlen(text) < 2) return 0; - - std::string fullcmd = text; // original `text` can't be used. It content destroyed in command code processing. + // original `text` can't be used. It content destroyed in command code processing. /// ignore messages staring from many dots. if(text[0] == '.' && text[1] == '.' || text[0] == '!' && text[1] == '!') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 5a60510e23f..b0e9ebd030e 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3673,7 +3673,7 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit { int32 basePoints = aur->GetBasePoints(); // construct the new aura for the attacker - Aura * new_aur = CreateAura(aur->GetSpellProto(), aur->GetEffIndex(), &basePoints, stealer); + Aura * new_aur = CreateAura(aur->GetSpellProto(), aur->GetEffIndex(), NULL/*&basePoints*/, stealer); if(!new_aur) continue; @@ -4049,7 +4049,7 @@ DynamicObject * Unit::GetDynObject(uint32 spellId, uint32 effIndex) { for (DynObjectGUIDs::iterator i = m_dynObjGUIDs.begin(); i != m_dynObjGUIDs.end();) { - DynamicObject* dynObj = ObjectAccessor::GetDynamicObject(*this,*m_dynObjGUIDs.begin()); + DynamicObject* dynObj = ObjectAccessor::GetDynamicObject(*this, *i); if(!dynObj) { i = m_dynObjGUIDs.erase(i); @@ -4067,7 +4067,7 @@ DynamicObject * Unit::GetDynObject(uint32 spellId) { for (DynObjectGUIDs::iterator i = m_dynObjGUIDs.begin(); i != m_dynObjGUIDs.end();) { - DynamicObject* dynObj = ObjectAccessor::GetDynamicObject(*this,*m_dynObjGUIDs.begin()); + DynamicObject* dynObj = ObjectAccessor::GetDynamicObject(*this, *i); if(!dynObj) { i = m_dynObjGUIDs.erase(i); |
