aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXanadu <none@none>2010-02-05 19:16:03 +0100
committerXanadu <none@none>2010-02-05 19:16:03 +0100
commit45002f590e27e2b48ae64d6d83bc4415e232ef33 (patch)
tree74ffacc8ee39834d7ce9fa9c99c31d9e7f5a10aa /src
parentf8d1920fa591d2aba16bf70023c64f4379c0114d (diff)
parent4674dec37bafefb5a1d62a4ff33c1da8ed5dd0c0 (diff)
Merge
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/InstanceSaveMgr.cpp16
-rw-r--r--src/scripts/northrend/draktharon_keep/boss_novos.cpp3
-rw-r--r--src/scripts/northrend/draktharon_keep/boss_tharon_ja.cpp1
-rw-r--r--src/scripts/northrend/draktharon_keep/boss_trollgore.cpp1
4 files changed, 16 insertions, 5 deletions
diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp
index 9e8cd3eb694..b94dbe38377 100644
--- a/src/game/InstanceSaveMgr.cpp
+++ b/src/game/InstanceSaveMgr.cpp
@@ -501,7 +501,9 @@ void InstanceSaveManager::LoadResetTimes()
continue;
// the reset_delay must be at least one day
- uint32 period = (mapDiff->resetTime / DAY * sWorld.getRate(RATE_INSTANCE_RESET_TIME)) * DAY;
+ uint32 period = ((mapDiff->resetTime * sWorld.getRate(RATE_INSTANCE_RESET_TIME))/DAY) * DAY;
+ if (period < DAY)
+ period = DAY;
time_t t = GetResetTimeFor(mapid,difficulty);
if(!t)
@@ -529,6 +531,8 @@ void InstanceSaveManager::LoadResetTimes()
if(t - tim[type-1] > now)
break;
+ ScheduleReset(true, t - tim[type-1], InstResetEvent(type, mapid, difficulty, -1));
+
for(ResetTimeMapDiffInstances::const_iterator in_itr = mapDiffResetInstances.lower_bound(map_diff_pair);
in_itr != mapDiffResetInstances.upper_bound(map_diff_pair); ++in_itr)
{
@@ -662,8 +666,16 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
// calculate the next reset time
uint32 diff = sWorld.getConfig(CONFIG_INSTANCE_RESET_TIME_HOUR) * HOUR;
- uint32 period = mapDiff->resetTime * DAY;
+
+ uint32 period = ((mapDiff->resetTime * sWorld.getRate(RATE_INSTANCE_RESET_TIME))/DAY) * DAY;
+ if (period < DAY)
+ period = DAY;
+
uint64 next_reset = ((now + timeLeft + MINUTE) / DAY * DAY) + period + diff;
+
+ SetResetTimeFor(mapid, difficulty, next_reset);
+ ScheduleReset(true, time_t(next_reset-3600), InstResetEvent(1, mapid, difficulty, -1));
+
// update it in the DB
CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%d' AND difficulty = '%d'", next_reset, mapid, difficulty);
}
diff --git a/src/scripts/northrend/draktharon_keep/boss_novos.cpp b/src/scripts/northrend/draktharon_keep/boss_novos.cpp
index 17e1c022abf..2ea61e0dc92 100644
--- a/src/scripts/northrend/draktharon_keep/boss_novos.cpp
+++ b/src/scripts/northrend/draktharon_keep/boss_novos.cpp
@@ -159,7 +159,7 @@ struct boss_novosAI : public Scripted_NoMovementAI
} else uiTimer -= diff;
if (uiCrystalHandlerTimer <= diff)
{
- //TODO: say
+ DoScriptText(SAY_NECRO_ADD, m_creature);
Creature *pCrystalHandler = m_creature->SummonCreature(CREATURE_CRYSTAL_HANDLER, CrystalHandlerSpawnPoint.x, CrystalHandlerSpawnPoint.y , CrystalHandlerSpawnPoint.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
pCrystalHandler->GetMotionMaster()->MovePoint(0, AddDestinyPoint.x, AddDestinyPoint.y, AddDestinyPoint.z);
uiCrystalHandlerTimer = urand(20000,30000);
@@ -178,6 +178,7 @@ struct boss_novosAI : public Scripted_NoMovementAI
}
void JustDied(Unit* killer)
{
+ DoScriptText(SAY_DEATH, m_creature);
if (pInstance)
{
pInstance->SetData(DATA_NOVOS_EVENT, DONE);
diff --git a/src/scripts/northrend/draktharon_keep/boss_tharon_ja.cpp b/src/scripts/northrend/draktharon_keep/boss_tharon_ja.cpp
index f374dc761b9..57e1bea1f70 100644
--- a/src/scripts/northrend/draktharon_keep/boss_tharon_ja.cpp
+++ b/src/scripts/northrend/draktharon_keep/boss_tharon_ja.cpp
@@ -60,7 +60,6 @@ enum PlayerSkills
SPELL_PLAYER_PHASE2_TOUCH_OF_LIFE = 49617
};
*/
-//not in db
enum Yells
{
SAY_AGGRO = -1600011,
diff --git a/src/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/src/scripts/northrend/draktharon_keep/boss_trollgore.cpp
index 00f72318ba1..8bea8bda8dc 100644
--- a/src/scripts/northrend/draktharon_keep/boss_trollgore.cpp
+++ b/src/scripts/northrend/draktharon_keep/boss_trollgore.cpp
@@ -42,7 +42,6 @@ enum Spells
H_SPELL_CONSUME = SPELL_CONSUME_59803,
H_SPELL_CONSUME_AURA = SPELL_CONSUME_59805,
};
-//not in db
enum Yells
{
SAY_AGGRO = -1600006,