aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp2
-rw-r--r--src/server/game/Entities/Player/Player.cpp21
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp33
-rw-r--r--src/server/game/Movement/MotionMaster.cpp37
-rw-r--r--src/server/game/Movement/MotionMaster.h1
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp7
-rw-r--r--src/server/game/World/World.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp26
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp23
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp43
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp21
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp5
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.cpp4
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.h2
14 files changed, 103 insertions, 124 deletions
diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp
index bd5defe2bc3..64463948574 100644
--- a/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp
+++ b/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp
@@ -64,7 +64,7 @@ void AuctionBotBuyer::LoadConfig()
}
}
-void AuctionBotBuyer::LoadBuyerValues(BuyerConfiguration& config)
+void AuctionBotBuyer::LoadBuyerValues(BuyerConfiguration& /* config */)
{
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index de06b0ae5ea..285c7373134 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -4830,10 +4830,22 @@ void Player::DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRe
stmt->setUInt32(0, guid);
trans->Append(stmt);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHARACTER_ARENA_STATS);
+ stmt->setUInt32(0, guid);
+ trans->Append(stmt);
+
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_AURA);
stmt->setUInt32(0, guid);
trans->Append(stmt);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_PLAYER_BGDATA);
+ stmt->setUInt32(0, guid);
+ trans->Append(stmt);
+
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_BATTLEGROUND_RANDOM);
+ stmt->setUInt32(0, guid);
+ trans->Append(stmt);
+
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_GIFT);
stmt->setUInt32(0, guid);
trans->Append(stmt);
@@ -4923,10 +4935,6 @@ void Player::DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRe
stmt->setUInt32(0, guid);
trans->Append(stmt);
- stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_PLAYER_BGDATA);
- stmt->setUInt32(0, guid);
- trans->Append(stmt);
-
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_GLYPHS);
stmt->setUInt32(0, guid);
trans->Append(stmt);
@@ -4955,6 +4963,10 @@ void Player::DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRe
stmt->setUInt32(0, guid);
trans->Append(stmt);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_STATS);
+ stmt->setUInt32(0, guid);
+ trans->Append(stmt);
+
CharacterDatabase.CommitTransaction(trans);
break;
}
@@ -19732,6 +19744,7 @@ void Player::_SaveInventory(SQLTransaction& trans)
m_itemUpdateQueue.clear();
}
+
void Player::_SaveMail(SQLTransaction& trans)
{
if (!m_mailsLoaded)
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 2a421a45ecb..f74201fee60 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -8601,7 +8601,6 @@ void ObjectMgr::LoadBroadcastTexts()
}
_broadcastTextStore.rehash(result->GetRowCount());
- uint32 count = 0;
do
{
@@ -8627,26 +8626,23 @@ void ObjectMgr::LoadBroadcastTexts()
{
if (!sSoundEntriesStore.LookupEntry(bct.SoundId))
{
- TC_LOG_INFO("sql.sql", "BroadcastText (Id: %u) in table `broadcast_text` has SoundId %u but sound does not exist. Skipped.", bct.Id, bct.SoundId);
- // don't load bct of higher expansions
- continue;
+ TC_LOG_DEBUG("broadcasttext", "BroadcastText (Id: %u) in table `broadcast_text` has SoundId %u but sound does not exist.", bct.Id, bct.SoundId);
+ bct.SoundId = 0;
}
}
if (!GetLanguageDescByID(bct.Language))
{
- TC_LOG_ERROR("sql.sql", "BroadcastText (Id: %u) in table `broadcast_text` using Language %u but Language does not exist. Skipped.", bct.Id, bct.Language);
- // don't load bct of higher expansions
- continue;
+ TC_LOG_DEBUG("broadcasttext", "BroadcastText (Id: %u) in table `broadcast_text` using Language %u but Language does not exist.", bct.Id, bct.Language);
+ bct.Language = LANG_UNIVERSAL;
}
if (bct.EmoteId0)
{
if (!sEmotesStore.LookupEntry(bct.EmoteId0))
{
- TC_LOG_ERROR("sql.sql", "BroadcastText (Id: %u) in table `broadcast_text` has EmoteId0 %u but emote does not exist. Skipped.", bct.Id, bct.EmoteId0);
- // don't load bct of higher expansions
- continue;
+ TC_LOG_DEBUG("broadcasttext", "BroadcastText (Id: %u) in table `broadcast_text` has EmoteId0 %u but emote does not exist.", bct.Id, bct.EmoteId0);
+ bct.EmoteId0 = 0;
}
}
@@ -8654,9 +8650,8 @@ void ObjectMgr::LoadBroadcastTexts()
{
if (!sEmotesStore.LookupEntry(bct.EmoteId1))
{
- TC_LOG_ERROR("sql.sql", "BroadcastText (Id: %u) in table `broadcast_text` has EmoteId1 %u but emote does not exist. Skipped.", bct.Id, bct.EmoteId1);
- // don't load bct of higher expansions
- continue;
+ TC_LOG_DEBUG("broadcasttext", "BroadcastText (Id: %u) in table `broadcast_text` has EmoteId1 %u but emote does not exist.", bct.Id, bct.EmoteId1);
+ bct.EmoteId1 = 0;
}
}
@@ -8664,19 +8659,16 @@ void ObjectMgr::LoadBroadcastTexts()
{
if (!sEmotesStore.LookupEntry(bct.EmoteId2))
{
- TC_LOG_ERROR("sql.sql", "BroadcastText (Id: %u) in table `broadcast_text` has EmoteId2 %u but emote does not exist. Skipped.", bct.Id, bct.EmoteId2);
- // don't load bct of higher expansions
- continue;
+ TC_LOG_DEBUG("broadcasttext", "BroadcastText (Id: %u) in table `broadcast_text` has EmoteId2 %u but emote does not exist.", bct.Id, bct.EmoteId2);
+ bct.EmoteId2 = 0;
}
}
_broadcastTextStore[bct.Id] = bct;
-
- ++count;
}
while (result->NextRow());
- TC_LOG_INFO("server.loading", ">> Loaded %u broadcast texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded " SZFMTD " broadcast texts in %u ms", _broadcastTextStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadBroadcastTextLocales()
@@ -8702,8 +8694,7 @@ void ObjectMgr::LoadBroadcastTextLocales()
BroadcastTextContainer::iterator bct = _broadcastTextStore.find(id);
if (bct == _broadcastTextStore.end())
{
- TC_LOG_INFO("sql.sql", "BroadcastText (Id: %u) in table `locales_broadcast_text` does not exist or is incompatible. Skipped!", id);
- // don't load bct of higher expansions
+ TC_LOG_ERROR("sql.sql", "BroadcastText (Id: %u) in table `locales_broadcast_text` does not exist. Skipped!", id);
continue;
}
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 47e5b77a0da..bda3ad851c8 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -387,6 +387,43 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
}
+void MotionMaster::MoveCirclePath(float x, float y, float z, float radius, bool clockwise, uint8 stepCount)
+{
+ float step = 2 * float(M_PI) / stepCount * (clockwise ? -1.0f : 1.0f);
+ Position const& pos = { x, y, z, 0.0f };
+ float angle = pos.GetAngle(_owner->GetPositionX(), _owner->GetPositionY());
+
+ Movement::MoveSplineInit init(_owner);
+
+ for (uint8 i = 0; i < stepCount; angle += step, ++i)
+ {
+ G3D::Vector3 point;
+ point.x = x + radius * cosf(angle);
+ point.y = y + radius * sinf(angle);
+
+ if (_owner->IsFlying())
+ point.z = z;
+ else
+ point.z = _owner->GetMap()->GetHeight(_owner->GetPhaseMask(), point.x, point.y, z);
+
+ init.Path().push_back(point);
+ }
+
+ if (_owner->IsFlying())
+ {
+ init.SetFly();
+ init.SetCyclic();
+ init.SetAnimation(Movement::ToFly);
+ }
+ else
+ {
+ init.SetWalk(true);
+ init.SetCyclic();
+ }
+
+ init.Launch();
+}
+
void MotionMaster::MoveFall(uint32 id /*=0*/)
{
// use larger distance for vmap height search than in most other cases
diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h
index 2821cd5a59b..0b547d96e7f 100644
--- a/src/server/game/Movement/MotionMaster.h
+++ b/src/server/game/Movement/MotionMaster.h
@@ -184,6 +184,7 @@ class MotionMaster //: private std::stack<MovementGenerator *>
void MoveJump(Position const& pos, float speedXY, float speedZ, uint32 id = EVENT_JUMP)
{ MoveJump(pos.m_positionX, pos.m_positionY, pos.m_positionZ, speedXY, speedZ, id); };
void MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id = EVENT_JUMP);
+ void MoveCirclePath(float x, float y, float z, float radius, bool clockwise, uint8 stepCount);
void MoveFall(uint32 id = 0);
void MoveSeekAssistance(float x, float y, float z);
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 93a4c96b92f..4af0b93789f 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -749,12 +749,13 @@ void Aura::SetDuration(int32 duration, bool withMods)
void Aura::RefreshDuration(bool withMods)
{
- if (withMods)
+ Unit* caster = GetCaster();
+ if (withMods && caster)
{
int32 duration = m_spellInfo->GetMaxDuration();
// Calculate duration of periodics affected by haste.
- if (GetCaster()->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, m_spellInfo) || m_spellInfo->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION)
- duration = int32(duration * GetCaster()->GetFloatValue(UNIT_MOD_CAST_SPEED));
+ if (caster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, m_spellInfo) || m_spellInfo->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION)
+ duration = int32(duration * caster->GetFloatValue(UNIT_MOD_CAST_SPEED));
SetMaxDuration(duration);
SetDuration(duration);
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 930bf20b6e7..84f22f2f1a9 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -3024,7 +3024,7 @@ void World::ResetRandomBG()
{
TC_LOG_INFO("misc", "Random BG status reset for all characters.");
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_BATTLEGROUND_RANDOM);
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_BATTLEGROUND_RANDOM_ALL);
CharacterDatabase.Execute(stmt);
for (SessionMap::const_iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp
index 3ced85f09a2..97be139cefe 100644
--- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp
+++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp
@@ -36,19 +36,27 @@ EndContentData */
# at_malfurion_Stormrage_trigger
#####*/
-class at_malfurion_stormrage : public AreaTriggerScript
+enum MalfurionMisc
{
-public:
- at_malfurion_stormrage() : AreaTriggerScript("at_malfurion_stormrage") { }
+ NPC_MALFURION_STORMRAGE = 15362,
+ QUEST_ERANIKUS_TYRANT_OF_DREAMS = 8733,
+ QUEST_THE_CHARGE_OF_DRAGONFLIGHTS = 8555,
+};
- bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) override
- {
- if (player->GetInstanceScript() && !player->FindNearestCreature(15362, 15))
- player->SummonCreature(15362, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), -1.52f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 100000);
- return false;
- }
+class at_malfurion_stormrage : public AreaTriggerScript
+{
+ public:
+ at_malfurion_stormrage() : AreaTriggerScript("at_malfurion_stormrage") { }
+ bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) override
+ {
+ if (player->GetInstanceScript() && !player->FindNearestCreature(NPC_MALFURION_STORMRAGE, 15.0f) &&
+ player->GetQuestStatus(QUEST_THE_CHARGE_OF_DRAGONFLIGHTS) == QUEST_STATUS_REWARDED && player->GetQuestStatus(QUEST_ERANIKUS_TYRANT_OF_DREAMS) != QUEST_STATUS_REWARDED)
+ player->SummonCreature(NPC_MALFURION_STORMRAGE, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), -1.52f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 100000);
+ return false;
+ }
};
+
/*#####
# go_atalai_statue
#####*/
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
index 9edde447f32..927ebfbc55c 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -2640,13 +2640,7 @@ class npc_quel_delar_sword : public CreatureScript
break;
case EVENT_QUEL_DELAR_FLIGHT:
{
- Movement::MoveSplineInit init(me);
- FillCirclePath(QuelDelarCenterPos, 18.0f, 718.046f, init.Path(), true);
- init.SetFly();
- init.SetCyclic();
- init.SetAnimation(Movement::ToFly);
- init.Launch();
-
+ me->GetMotionMaster()->MoveCirclePath(QuelDelarCenterPos.GetPositionX(), QuelDelarCenterPos.GetPositionY(), 718.046f, 18.0f, true, 16);
_events.ScheduleEvent(EVENT_QUEL_DELAR_LAND, 15000);
break;
}
@@ -2694,21 +2688,6 @@ class npc_quel_delar_sword : public CreatureScript
}
private:
- void FillCirclePath(Position const& centerPos, float radius, float z, Movement::PointsArray& path, bool clockwise)
- {
- float step = clockwise ? -M_PI / 8.0f : M_PI / 8.0f;
- float angle = centerPos.GetAngle(me->GetPositionX(), me->GetPositionY());
-
- for (uint8 i = 0; i < 16; angle += step, ++i)
- {
- G3D::Vector3 point;
- point.x = centerPos.GetPositionX() + radius * cosf(angle);
- point.y = centerPos.GetPositionY() + radius * sinf(angle);
- point.z = z;
- path.push_back(point);
- }
- }
-
EventMap _events;
InstanceScript* _instance;
bool _intro;
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
index 43069f10464..6c3b2187325 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
@@ -520,11 +520,7 @@ public:
_despawned = false;
break;
case ACTION_CYCLIC_MOVEMENT:
- Movement::MoveSplineInit init(me);
- FillCirclePath(MalygosPositions[3], 120.0f, 283.2763f, init.Path(), true);
- init.SetFly();
- init.SetCyclic();
- init.Launch();
+ me->GetMotionMaster()->MoveCirclePath(MalygosPositions[3].GetPositionX(), MalygosPositions[3].GetPositionY(), 283.2763f, 120.0f, true, 16);
break;
}
}
@@ -1020,22 +1016,6 @@ public:
}
private:
- // Used to generate perfect cyclic movements (Enter Circle).
- void FillCirclePath(Position const& centerPos, float radius, float z, Movement::PointsArray& path, bool clockwise)
- {
- float step = clockwise ? float(-M_PI) / 8.0f : float(M_PI) / 8.0f;
- float angle = centerPos.GetAngle(me->GetPositionX(), me->GetPositionY());
-
- for (uint8 i = 0; i < 16; angle += step, ++i)
- {
- G3D::Vector3 point;
- point.x = centerPos.GetPositionX() + radius * cosf(angle);
- point.y = centerPos.GetPositionY() + radius * sinf(angle);
- point.z = z; // Don't use any height getters unless all bugs are fixed.
- path.push_back(point);
- }
- }
-
uint8 _phase; // Counter for phases used with a getter.
uint8 _summonDeaths; // Keeps count of arcane trash.
uint8 _preparingPulsesChecker; // In retail they use 2 preparing pulses with 7 sec CD, after they pass 2 seconds.
@@ -1326,11 +1306,7 @@ public:
{
if (action < ACTION_DELAYED_DESPAWN)
{
- Movement::MoveSplineInit init(me);
- FillCirclePath(MalygosPositions[3], 35.0f, 282.3402f, init.Path(), true);
- init.SetFly();
- init.SetCyclic();
- init.Launch();
+ me->GetMotionMaster()->MoveCirclePath(MalygosPositions[3].GetPositionX(), MalygosPositions[3].GetPositionY(), 282.3402f, 35.0f, true, 16);
}
else
{
@@ -1339,21 +1315,6 @@ public:
}
private:
- void FillCirclePath(Position const& centerPos, float radius, float z, Movement::PointsArray& path, bool clockwise)
- {
- float step = clockwise ? float(-M_PI) / 9.0f : float(M_PI) / 9.0f;
- float angle = centerPos.GetAngle(me->GetPositionX(), me->GetPositionY());
-
- for (uint8 i = 0; i < 18; angle += step, ++i)
- {
- G3D::Vector3 point;
- point.x = centerPos.GetPositionX() + radius * cosf(angle);
- point.y = centerPos.GetPositionY() + radius * sinf(angle);
- point.z = z; // Don't use any height getters unless all bugs are fixed.
- path.push_back(point);
- }
- }
-
InstanceScript* _instance;
};
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
index a682e405d08..a7a9f8dde88 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
@@ -1126,30 +1126,11 @@ class npc_ominous_cloud : public CreatureScript
DoCast(me, SPELL_OMINOUS_CLOUD_VISUAL);
}
- void FillCirclePath(Position const& centerPos, float radius, float z, Movement::PointsArray& path, bool clockwise)
- {
- float step = clockwise ? float(-M_PI) / 8.0f : float(M_PI) / 8.0f;
- float angle = centerPos.GetAngle(me->GetPositionX(), me->GetPositionY());
-
- for (uint8 i = 0; i < 16; angle += step, ++i)
- {
- G3D::Vector3 point;
- point.x = centerPos.GetPositionX() + radius * cosf(angle);
- point.y = centerPos.GetPositionY() + radius * sinf(angle);
- point.z = me->GetMap()->GetHeight(me->GetPhaseMask(), point.x, point.y, z + 5.0f);
- path.push_back(point);
- }
- }
-
void UpdateAI(uint32 /*diff*/) override { }
void DoAction(int32 action) override
{
- Movement::MoveSplineInit init(me);
- FillCirclePath(YoggSaronSpawnPos, me->GetDistance2d(YoggSaronSpawnPos.GetPositionX(), YoggSaronSpawnPos.GetPositionY()), me->GetPositionZ(), init.Path(), action != 0);
- init.SetWalk(true);
- init.SetCyclic();
- init.Launch();
+ me->GetMotionMaster()->MoveCirclePath(YoggSaronSpawnPos.GetPositionX(), YoggSaronSpawnPos.GetPositionY(), me->GetPositionZ() + 5.0f, me->GetDistance2d(YoggSaronSpawnPos.GetPositionX(), YoggSaronSpawnPos.GetPositionY()), true, 16);
}
};
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index 9b341180c99..4aea36e3fe7 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -395,6 +395,9 @@ enum NesingwaryTrapper
GO_CARIBOU_TRAP_15 = 188008,
SPELL_TRAPPED = 46104,
+
+ // Texts
+ SAY_NESINGWARY_1 = 0
};
#define CaribouTrapsNum 15
@@ -471,7 +474,7 @@ public:
phase = 3;
break;
case 3:
- //Talk(SAY_NESINGWARY_1);
+ Talk(SAY_NESINGWARY_1);
phaseTimer = 2000;
phase = 4;
break;
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
index 265b0578841..c8632b8a3c2 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
@@ -60,7 +60,8 @@ void CharacterDatabaseConnection::DoPrepareStatements()
PrepareStatement(CHAR_SEL_CHAR_POSITION_XYZ, "SELECT map, position_x, position_y, position_z FROM characters WHERE guid = ?", CONNECTION_SYNCH);
PrepareStatement(CHAR_SEL_CHAR_POSITION, "SELECT position_x, position_y, position_z, orientation, map, taxi_path FROM characters WHERE guid = ?", CONNECTION_SYNCH);
- PrepareStatement(CHAR_DEL_BATTLEGROUND_RANDOM, "DELETE FROM character_battleground_random", CONNECTION_ASYNC);
+ PrepareStatement(CHAR_DEL_BATTLEGROUND_RANDOM_ALL, "DELETE FROM character_battleground_random", CONNECTION_ASYNC);
+ PrepareStatement(CHAR_DEL_BATTLEGROUND_RANDOM, "DELETE FROM character_battleground_random WHERE guid = ?", CONNECTION_ASYNC);
PrepareStatement(CHAR_INS_BATTLEGROUND_RANDOM, "INSERT INTO character_battleground_random (guid) VALUES (?)", CONNECTION_ASYNC);
PrepareStatement(CHAR_SEL_CHARACTER, "SELECT guid, account, name, race, class, gender, level, xp, money, playerBytes, playerBytes2, playerFlags, "
@@ -300,6 +301,7 @@ void CharacterDatabaseConnection::DoPrepareStatements()
PrepareStatement(CHAR_DEL_ARENA_TEAM_MEMBER, "DELETE FROM arena_team_member WHERE arenaTeamId = ? AND guid = ?", CONNECTION_ASYNC);
PrepareStatement(CHAR_UPD_ARENA_TEAM_STATS, "UPDATE arena_team SET rating = ?, weekGames = ?, weekWins = ?, seasonGames = ?, seasonWins = ?, rank = ? WHERE arenaTeamId = ?", CONNECTION_ASYNC);
PrepareStatement(CHAR_UPD_ARENA_TEAM_MEMBER, "UPDATE arena_team_member SET personalRating = ?, weekGames = ?, weekWins = ?, seasonGames = ?, seasonWins = ? WHERE arenaTeamId = ? AND guid = ?", CONNECTION_ASYNC);
+ PrepareStatement(CHAR_DEL_CHARACTER_ARENA_STATS, "DELETE FROM character_arena_stats WHERE guid = ?", CONNECTION_ASYNC);
PrepareStatement(CHAR_REP_CHARACTER_ARENA_STATS, "REPLACE INTO character_arena_stats (guid, slot, matchMakerRating) VALUES (?, ?, ?)", CONNECTION_ASYNC);
PrepareStatement(CHAR_SEL_PLAYER_ARENA_TEAMS, "SELECT arena_team_member.arenaTeamId FROM arena_team_member JOIN arena_team ON arena_team_member.arenaTeamId = arena_team.arenaTeamId WHERE guid = ?", CONNECTION_SYNCH);
PrepareStatement(CHAR_UPD_ARENA_TEAM_NAME, "UPDATE arena_team SET name = ? WHERE arenaTeamId = ?", CONNECTION_ASYNC);
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h
index f7ff5b9186e..e56a24d6865 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.h
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.h
@@ -72,6 +72,7 @@ enum CharacterDatabaseStatements
CHAR_SEL_CHAR_POSITION_XYZ,
CHAR_SEL_CHAR_POSITION,
+ CHAR_DEL_BATTLEGROUND_RANDOM_ALL,
CHAR_DEL_BATTLEGROUND_RANDOM,
CHAR_INS_BATTLEGROUND_RANDOM,
@@ -253,6 +254,7 @@ enum CharacterDatabaseStatements
CHAR_DEL_ARENA_TEAM_MEMBER,
CHAR_UPD_ARENA_TEAM_STATS,
CHAR_UPD_ARENA_TEAM_MEMBER,
+ CHAR_DEL_CHARACTER_ARENA_STATS,
CHAR_REP_CHARACTER_ARENA_STATS,
CHAR_SEL_PLAYER_ARENA_TEAMS,
CHAR_UPD_ARENA_TEAM_NAME,