aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.cpp63
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.h2
-rw-r--r--src/server/game/Entities/Object/Object.cpp9
-rw-r--r--src/server/game/Entities/Object/Object.h1
-rw-r--r--src/server/game/Handlers/AuctionHouseHandler.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp105
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp9
-rw-r--r--src/server/scripts/EasternKingdoms/zone_hinterlands.cpp25
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp50
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp7
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp3
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp3
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp24
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h5
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp19
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp7
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp7
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp9
-rw-r--r--src/server/scripts/Outland/zone_shadowmoon_valley.cpp14
-rw-r--r--src/server/scripts/World/npcs_special.cpp39
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.cpp1
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.h1
23 files changed, 195 insertions, 216 deletions
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
index 53267a6e565..03270114a2a 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
@@ -432,7 +432,7 @@ void AuctionHouseObject::AddAuction(AuctionEntry* auction)
sScriptMgr->OnAuctionAdd(this, auction);
}
-bool AuctionHouseObject::RemoveAuction(AuctionEntry* auction, uint32 /*itemEntry*/)
+bool AuctionHouseObject::RemoveAuction(AuctionEntry* auction)
{
bool wasInMap = AuctionsMap.erase(auction->Id) ? true : false;
@@ -454,23 +454,20 @@ void AuctionHouseObject::Update()
if (AuctionsMap.empty())
return;
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_AUCTION_BY_TIME);
- stmt->setUInt32(0, (uint32)curTime+60);
- PreparedQueryResult result = CharacterDatabase.Query(stmt);
- if (!result)
- return;
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
- do
+ for (AuctionEntryMap::iterator it = AuctionsMap.begin(); it != AuctionsMap.end();)
{
// from auctionhousehandler.cpp, creates auction pointer & player pointer
- AuctionEntry* auction = GetAuction(result->Fetch()->GetUInt32());
+ AuctionEntry* auction = it->second;
+ // Increment iterator due to AuctionEntry deletion
+ ++it;
- if (!auction)
+ ///- filter auctions expired on next update
+ if (auction->expire_time > curTime + 60)
continue;
- SQLTransaction trans = CharacterDatabase.BeginTransaction();
-
///- Either cancel the auction if there was no bidder
if (auction->bidder == 0)
{
@@ -488,16 +485,15 @@ void AuctionHouseObject::Update()
sScriptMgr->OnAuctionSuccessful(this, auction);
}
- uint32 itemEntry = auction->itemEntry;
-
///- In any case clear the auction
auction->DeleteFromDB(trans);
- CharacterDatabase.CommitTransaction(trans);
sAuctionMgr->RemoveAItem(auction->itemGUIDLow);
- RemoveAuction(auction, itemEntry);
+ RemoveAuction(auction);
}
- while (result->NextRow());
+
+ // Run DB changes
+ CharacterDatabase.CommitTransaction(trans);
}
void AuctionHouseObject::BuildListBidderItems(WorldPacket& data, Player* player, uint32& count, uint32& totalcount)
@@ -592,22 +588,31 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
if (propRefID)
{
// Append the suffix to the name (ie: of the Monkey) if one exists
- // These are found in ItemRandomProperties.dbc, not ItemRandomSuffix.dbc
+ // These are found in ItemRandomSuffix.dbc and ItemRandomProperties.dbc
// even though the DBC names seem misleading
- const ItemRandomPropertiesEntry* itemRandProp = sItemRandomPropertiesStore.LookupEntry(propRefID);
- if (itemRandProp)
+ char* const* suffix = nullptr;
+
+ if (propRefID < 0)
+ {
+ const ItemRandomSuffixEntry* itemRandSuffix = sItemRandomSuffixStore.LookupEntry(-propRefID);
+ if (itemRandSuffix)
+ suffix = itemRandSuffix->nameSuffix;
+ }
+ else
+ {
+ const ItemRandomPropertiesEntry* itemRandProp = sItemRandomPropertiesStore.LookupEntry(propRefID);
+ if (itemRandProp)
+ suffix = itemRandProp->nameSuffix;
+ }
+
+ // dbc local name
+ if (suffix)
{
- char* const* temp = itemRandProp->nameSuffix;
-
- // dbc local name
- if (temp)
- {
- // Append the suffix (ie: of the Monkey) to the name using localization
- // or default enUS if localization is invalid
- name += ' ';
- name += temp[locdbc_idx >= 0 ? locdbc_idx : LOCALE_enUS];
- }
+ // Append the suffix (ie: of the Monkey) to the name using localization
+ // or default enUS if localization is invalid
+ name += ' ';
+ name += suffix[locdbc_idx >= 0 ? locdbc_idx : LOCALE_enUS];
}
}
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h
index fc70946d6c4..af8d8d48c59 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.h
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h
@@ -117,7 +117,7 @@ class AuctionHouseObject
void AddAuction(AuctionEntry* auction);
- bool RemoveAuction(AuctionEntry* auction, uint32 itemEntry);
+ bool RemoveAuction(AuctionEntry* auction);
void Update();
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index badf0d9271b..4ffddde021c 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -1449,6 +1449,13 @@ void Position::GetPositionOffsetTo(const Position & endPos, Position & retOffset
retOffset.SetOrientation(endPos.GetOrientation() - GetOrientation());
}
+Position Position::GetPositionWithOffset(Position const& offset) const
+{
+ Position ret(*this);
+ ret.RelocateOffset(offset);
+ return ret;
+}
+
float Position::GetAngle(const Position* obj) const
{
if (!obj)
@@ -2593,7 +2600,7 @@ void WorldObject::DestroyForNearbyPlayers()
if (!player->HaveAtClient(this))
continue;
- if (isType(TYPEMASK_UNIT) && ((Unit*)this)->GetCharmerGUID() == player->GetGUID()) /// @todo this is for puppet
+ if (isType(TYPEMASK_UNIT) && ToUnit()->GetCharmerGUID() == player->GetGUID()) /// @todo this is for puppet
continue;
DestroyForPlayer(player);
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index eb0bb92959f..98eb7989e5d 100644
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
@@ -340,6 +340,7 @@ struct Position
{ return std::sqrt(GetExactDistSq(pos)); }
void GetPositionOffsetTo(Position const & endPos, Position & retOffset) const;
+ Position GetPositionWithOffset(Position const& offset) const;
float GetAngle(Position const* pos) const;
float GetAngle(float x, float y) const;
diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp
index 9f227bd5710..f1ec44ae4ad 100644
--- a/src/server/game/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp
@@ -501,9 +501,8 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
auction->DeleteFromDB(trans);
- uint32 itemEntry = auction->itemEntry;
sAuctionMgr->RemoveAItem(auction->itemGUIDLow);
- auctionHouse->RemoveAuction(auction, itemEntry);
+ auctionHouse->RemoveAuction(auction);
}
player->SaveInventoryAndGoldToDB(trans);
CharacterDatabase.CommitTransaction(trans);
@@ -581,9 +580,8 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
auction->DeleteFromDB(trans);
CharacterDatabase.CommitTransaction(trans);
- uint32 itemEntry = auction->itemEntry;
sAuctionMgr->RemoveAItem(auction->itemGUIDLow);
- auctionHouse->RemoveAuction(auction, itemEntry);
+ auctionHouse->RemoveAuction(auction);
}
//called when player lists his bids
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index d67c28a3552..d2c0ae88590 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -217,11 +217,6 @@ enum mograine
SPELL_THUNDER = 53630
};
-struct Location
-{
- float x, y, z, o;
-};
-
void UpdateWorldState(Map* map, uint32 id, uint32 state)
{
Map::PlayerList const& players = map->GetPlayers();
@@ -236,10 +231,10 @@ void UpdateWorldState(Map* map, uint32 id, uint32 state)
}
}
-static Location LightofDawnLoc[]=
+Position const LightofDawnLoc[] =
{
{2281.335f, -5300.409f, 85.170f, 0}, // 0 Tirion Fordring loc
- {2283.896f, -5287.914f, 83.066f, 1.55f}, // 1 Tirion Fordring loc2
+ {2283.896f, -5287.914f, 83.066f, 1.55f}, // 1 Tirion Fordring loc2
{2281.461f, -5263.014f, 81.164f, 0}, // 2 Tirion charges
{2262.277f, -5293.477f, 82.167f, 0}, // 3 Tirion run
{2270.286f, -5287.73f, 82.262f, 0}, // 4 Tirion relocate
@@ -540,30 +535,30 @@ public:
if (temp->HasAura(SPELL_THE_LIGHT_OF_DAWN))
temp->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN);
temp->SetWalk(true);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[19].x, LightofDawnLoc[19].y, LightofDawnLoc[19].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[19]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiThassarianGUID))
{
if (temp->HasAura(SPELL_THE_LIGHT_OF_DAWN))
temp->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN);
temp->SetWalk(true);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[21].x, LightofDawnLoc[21].y, LightofDawnLoc[21].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[21]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
{
temp->SetWalk(true);
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[10].x, LightofDawnLoc[10].y, LightofDawnLoc[10].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[10]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID))
{
temp->SetWalk(true);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[13].x, LightofDawnLoc[13].y, LightofDawnLoc[13].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[13]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
{
temp->SetWalk(true);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[16].x, LightofDawnLoc[16].y, LightofDawnLoc[16].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[16]);
}
JumpToNextStep(10000);
}
@@ -729,30 +724,30 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKoltiraGUID))
{
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }));
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiOrbazGUID))
{
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }));
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiThassarianGUID))
{
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }));
}
for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiAbominationGUID[i]))
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }));
for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiBehemothGUID[i]))
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }));
for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiGhoulGUID[i]))
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }));
for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiWarriorGUID[i]))
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }));
JumpToNextStep(5000);
break;
@@ -782,7 +777,7 @@ public:
break;
case 15: // summon gate
- if (Creature* temp = me->SummonCreature(NPC_HIGHLORD_ALEXANDROS_MOGRAINE, LightofDawnLoc[22].x, LightofDawnLoc[22].y, LightofDawnLoc[22].z, LightofDawnLoc[22].o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
+ if (Creature* temp = me->SummonCreature(NPC_HIGHLORD_ALEXANDROS_MOGRAINE, LightofDawnLoc[22], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
{
temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
temp->CastSpell(temp, SPELL_ALEXANDROS_MOGRAINE_SPAWN, true);
@@ -796,7 +791,7 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiAlexandrosGUID))
{
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[23].x, LightofDawnLoc[23].y, LightofDawnLoc[23].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[23]);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN32);
}
SetHoldState(false); // makes darion turns back
@@ -810,7 +805,7 @@ public:
break;
case 18: // Darion's spirit out
- if (Creature* temp = me->SummonCreature(NPC_DARION_MOGRAINE, LightofDawnLoc[24].x, LightofDawnLoc[24].y, LightofDawnLoc[24].z, LightofDawnLoc[24].o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
+ if (Creature* temp = me->SummonCreature(NPC_DARION_MOGRAINE, LightofDawnLoc[24], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
{
temp->AI()->Talk(SAY_LIGHT_OF_DAWN35);
temp->SetWalk(false);
@@ -823,7 +818,7 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiDarionGUID))
{
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN07);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[25].x, LightofDawnLoc[25].y, LightofDawnLoc[25].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[25]);
}
JumpToNextStep(4000);
break;
@@ -857,7 +852,7 @@ public:
temp->AI()->Talk(SAY_LIGHT_OF_DAWN39);
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID)) // Tirion moves forward here
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[1].x, LightofDawnLoc[1].y, LightofDawnLoc[1].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[1]);
JumpToNextStep(15000);
break;
@@ -887,7 +882,7 @@ public:
break;
case 29: // lich king spawns
- if (Creature* temp = me->SummonCreature(NPC_THE_LICH_KING, LightofDawnLoc[26].x, LightofDawnLoc[26].y, LightofDawnLoc[26].z, LightofDawnLoc[26].o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
+ if (Creature* temp = me->SummonCreature(NPC_THE_LICH_KING, LightofDawnLoc[26], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
{
temp->AI()->Talk(SAY_LIGHT_OF_DAWN43);
uiLichKingGUID = temp->GetGUID();
@@ -920,7 +915,7 @@ public:
case 32:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[27].x, LightofDawnLoc[27].y, LightofDawnLoc[27].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[27]);
JumpToNextStep(6000);
break;
@@ -999,7 +994,7 @@ public:
if (fLichPositionX && fLichPositionY)
{
- Unit* temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].x + rand32() % 10, LightofDawnLoc[0].y + rand32() % 10, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
+ Unit* temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 10), float(rand32() % 10), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
temp->SetSpeed(MOVE_RUN, 2.0f);
@@ -1007,7 +1002,7 @@ public:
temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
uiDefenderGUID[0] = temp->GetGUID();
- temp = me->SummonCreature(NPC_RIMBLAT_EARTHSHATTER, LightofDawnLoc[0].x + rand32() % 10, LightofDawnLoc[0].y + rand32() % 10, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
+ temp = me->SummonCreature(NPC_RIMBLAT_EARTHSHATTER, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 10), float(rand32() % 10), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
temp->SetSpeed(MOVE_RUN, 2.0f);
@@ -1051,33 +1046,33 @@ public:
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[14].x, LightofDawnLoc[14].y, LightofDawnLoc[14].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[14]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID))
{
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[11].x, LightofDawnLoc[11].y, LightofDawnLoc[11].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[11]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
{
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[17].x, LightofDawnLoc[17].y, LightofDawnLoc[17].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[17]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiDefenderGUID[0]))
{
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 10, LightofDawnLoc[0].y + rand32() % 10, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 10), float(rand32() % 10), 0.0f, 0.0f }));
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEarthshatterGUID[0]))
{
temp->SetSpeed(MOVE_RUN, 6.0f);
temp->SetStandState(UNIT_STAND_STATE_DEAD);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x + rand32() % 10, LightofDawnLoc[0].y + rand32() % 10, LightofDawnLoc[0].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 10), float(rand32() % 10), 0.0f, 0.0f }));
}
JumpToNextStep(3000);
break;
@@ -1160,9 +1155,9 @@ public:
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
temp->SetSpeed(MOVE_RUN, 3.0f); // workarounds, make Tirion still running
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[2].x, LightofDawnLoc[2].y, LightofDawnLoc[2].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[2]);
if (Creature* lktemp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
- lktemp->Relocate(LightofDawnLoc[28].x, LightofDawnLoc[28].y, LightofDawnLoc[28].z); // workarounds, he should kick back by Tirion, but here we relocate him
+ lktemp->Relocate(LightofDawnLoc[28]); // workarounds, he should kick back by Tirion, but here we relocate him
}
JumpToNextStep(1500);
break;
@@ -1178,7 +1173,7 @@ public:
{
temp->SetSpeed(MOVE_RUN, 1.0f);
me->SetWalk(true);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[29].x, LightofDawnLoc[29].y, LightofDawnLoc[29].z); // 26
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[29]); // 26
}
JumpToNextStep(4000);
break;
@@ -1214,7 +1209,7 @@ public:
{
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
temp->SetSpeed(MOVE_RUN, 1.0f);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[6].x, LightofDawnLoc[6].y, LightofDawnLoc[6].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[6]);
}
JumpToNextStep(2500);
break;
@@ -1238,7 +1233,7 @@ public:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
{
temp->SetWalk(true);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[7].x, LightofDawnLoc[7].y, LightofDawnLoc[7].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[7]);
}
JumpToNextStep(5500);
break;
@@ -1246,7 +1241,7 @@ public:
case 63:
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
{
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[8].x, LightofDawnLoc[8].y, LightofDawnLoc[8].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[8]);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN61);
}
JumpToNextStep(15000);
@@ -1401,7 +1396,7 @@ public:
if (uiFight_duration <= diff + 5000)
{
if (!uiTirionGUID)
- if (Creature* temp = me->SummonCreature(NPC_HIGHLORD_TIRION_FORDRING, LightofDawnLoc[0].x, LightofDawnLoc[0].y, LightofDawnLoc[0].z, 1.528f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000))
+ if (Creature* temp = me->SummonCreature(NPC_HIGHLORD_TIRION_FORDRING, LightofDawnLoc[0].GetPositionWithOffset({ 0.0f, 0.0f, 0.0f, 1.528f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000))
{
temp->setFaction(me->getFaction());
temp->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(EQUIP_UNEQUIP));
@@ -1443,7 +1438,7 @@ public:
temp->AttackStop();
temp->setFaction(me->getFaction());
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[9].x, LightofDawnLoc[9].y, LightofDawnLoc[9].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[9]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID))
@@ -1454,7 +1449,7 @@ public:
temp->AttackStop();
temp->setFaction(me->getFaction());
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[12].x, LightofDawnLoc[12].y, LightofDawnLoc[12].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[12]);
}
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEligorGUID))
@@ -1465,7 +1460,7 @@ public:
temp->AttackStop();
temp->setFaction(me->getFaction());
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[15].x, LightofDawnLoc[15].y, LightofDawnLoc[15].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[15]);
}
DespawnNPC(uiRayneGUID);
@@ -1477,7 +1472,7 @@ public:
temp->AttackStop();
temp->setFaction(me->getFaction());
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[18].x, LightofDawnLoc[18].y, LightofDawnLoc[18].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[18]);
temp->CastSpell(temp, SPELL_THE_LIGHT_OF_DAWN, false);
}
@@ -1492,7 +1487,7 @@ public:
temp->AttackStop();
temp->setFaction(me->getFaction());
temp->SetWalk(false);
- temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[20].x, LightofDawnLoc[20].y, LightofDawnLoc[20].z);
+ temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[20]);
temp->CastSpell(temp, SPELL_THE_LIGHT_OF_DAWN, false);
}
@@ -1539,7 +1534,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiGhoulGUID[i]);
if (!temp)
{
- temp = me->SummonCreature(NPC_ACHERUS_GHOUL, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
+ temp = me->SummonCreature(NPC_ACHERUS_GHOUL, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->setFaction(2084);
uiGhoulGUID[i] = temp->GetGUID();
}
@@ -1549,7 +1544,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiAbominationGUID[i]);
if (!temp)
{
- temp = me->SummonCreature(NPC_WARRIOR_OF_THE_FROZEN_WASTES, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
+ temp = me->SummonCreature(NPC_WARRIOR_OF_THE_FROZEN_WASTES, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->setFaction(2084);
uiAbominationGUID[i] = temp->GetGUID();
}
@@ -1559,7 +1554,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiWarriorGUID[i]);
if (!temp)
{
- temp = me->SummonCreature(NPC_RAMPAGING_ABOMINATION, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
+ temp = me->SummonCreature(NPC_RAMPAGING_ABOMINATION, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->setFaction(2084);
uiWarriorGUID[i] = temp->GetGUID();
}
@@ -1569,7 +1564,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiBehemothGUID[i]);
if (!temp)
{
- temp = me->SummonCreature(NPC_FLESH_BEHEMOTH, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
+ temp = me->SummonCreature(NPC_FLESH_BEHEMOTH, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->setFaction(2084);
uiBehemothGUID[i] = temp->GetGUID();
}
@@ -1581,7 +1576,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiDefenderGUID[i]);
if (!temp)
{
- temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
+ temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->setFaction(2089);
me->AddThreat(temp, 0.0f);
uiDefenderGUID[i] = temp->GetGUID();
@@ -1592,7 +1587,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiEarthshatterGUID[i]);
if (!temp)
{
- temp = me->SummonCreature(NPC_RIMBLAT_EARTHSHATTER, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
+ temp = me->SummonCreature(NPC_RIMBLAT_EARTHSHATTER, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->setFaction(2089);
me->AddThreat(temp, 0.0f);
uiEarthshatterGUID[i] = temp->GetGUID();
@@ -1601,7 +1596,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiKorfaxGUID);
if (!temp)
{
- temp = me->SummonCreature(NPC_KORFAX_CHAMPION_OF_THE_LIGHT, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
+ temp = me->SummonCreature(NPC_KORFAX_CHAMPION_OF_THE_LIGHT, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
temp->setFaction(2089);
me->AddThreat(temp, 0.0f);
uiKorfaxGUID = temp->GetGUID();
@@ -1609,7 +1604,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiMaxwellGUID);
if (!temp)
{
- temp = me->SummonCreature(NPC_LORD_MAXWELL_TYROSUS, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
+ temp = me->SummonCreature(NPC_LORD_MAXWELL_TYROSUS, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
temp->setFaction(2089);
me->AddThreat(temp, 0.0f);
uiMaxwellGUID = temp->GetGUID();
@@ -1617,7 +1612,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiEligorGUID);
if (!temp)
{
- temp = me->SummonCreature(NPC_COMMANDER_ELIGOR_DAWNBRINGER, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
+ temp = me->SummonCreature(NPC_COMMANDER_ELIGOR_DAWNBRINGER, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
temp->setFaction(2089);
me->AddThreat(temp, 0.0f);
uiEligorGUID = temp->GetGUID();
@@ -1625,7 +1620,7 @@ public:
temp = ObjectAccessor::GetCreature(*me, uiRayneGUID);
if (!temp)
{
- temp = me->SummonCreature(NPC_RAYNE, LightofDawnLoc[0].x + rand32() % 30, LightofDawnLoc[0].y + rand32() % 30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
+ temp = me->SummonCreature(NPC_RAYNE, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->setFaction(2089);
me->AddThreat(temp, 0.0f);
uiRayneGUID = temp->GetGUID();
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index ac7f4c0aad4..5b154d9d6be 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -95,12 +95,7 @@ enum Spells
SPELL_DEATH = 42566 //not correct spell
};
-struct Locations
-{
- float x, y, z;
-};
-
-static Locations FlightPoint[]=
+G3D::Vector3 const FlightPoint[]=
{
{1754.00f, 1346.00f, 17.50f},
{1765.00f, 1347.00f, 19.00f},
@@ -125,7 +120,7 @@ static Locations FlightPoint[]=
{1758.00f, 1367.00f, 19.51f}
};
-static Locations Spawn[]=
+G3D::Vector3 const Spawn[]=
{
{1776.27f, 1348.74f, 19.20f}, //spawn point for pumpkin shrine mob
{1765.28f, 1347.46f, 17.55f} //spawn point for smoke
diff --git a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
index 268a78bb491..98074a54408 100644
--- a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
@@ -152,21 +152,16 @@ enum Rinji
GO_RINJI_CAGE = 142036
};
-struct Location
+Position const AmbushSpawn[] =
{
- float posX, posY, posZ;
+ { 191.296204f, -2839.329346f, 107.388f, 0.0f },
+ { 70.972466f, -2848.674805f, 109.459f, 0.0f }
};
-Location AmbushSpawn[] =
+Position const AmbushMoveTo[] =
{
- { 191.296204f, -2839.329346f, 107.388f },
- { 70.972466f, -2848.674805f, 109.459f }
-};
-
-Location AmbushMoveTo[] =
-{
- { 166.630386f, -2824.780273f, 108.153f },
- { 70.886589f, -2874.335449f, 116.675f }
+ { 166.630386f, -2824.780273f, 108.153f, 0.0f },
+ { 70.886589f, -2874.335449f, 116.675f, 0.0f }
};
class npc_rinji : public CreatureScript
@@ -226,20 +221,18 @@ public:
if (!_first)
spawnId = 1;
- me->SummonCreature(NPC_RANGER, AmbushSpawn[spawnId].posX, AmbushSpawn[spawnId].posY, AmbushSpawn[spawnId].posZ, 0.0f,
- TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
+ me->SummonCreature(NPC_RANGER, AmbushSpawn[spawnId], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
for (int i = 0; i < 2; ++i)
{
- me->SummonCreature(NPC_OUTRUNNER, AmbushSpawn[spawnId].posX, AmbushSpawn[spawnId].posY, AmbushSpawn[spawnId].posZ, 0.0f,
- TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
+ me->SummonCreature(NPC_OUTRUNNER, AmbushSpawn[spawnId], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
}
}
void JustSummoned(Creature* summoned) override
{
summoned->SetWalk(false);
- summoned->GetMotionMaster()->MovePoint(0, AmbushMoveTo[spawnId].posX, AmbushMoveTo[spawnId].posY, AmbushMoveTo[spawnId].posZ);
+ summoned->GetMotionMaster()->MovePoint(0, AmbushMoveTo[spawnId]);
}
void sQuestAccept(Player* player, Quest const* quest)
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp
index 8d23cf0a3e4..19b91b75dd4 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp
@@ -71,35 +71,27 @@ enum LieutenantDrake
SPELL_FRIGHTENING_SHOUT = 33789
};
-struct Location
+G3D::Vector3 const DrakeWP[]=
{
- uint32 wpId;
- float x;
- float y;
- float z;
-};
-
-static Location DrakeWP[]=
-{
- {0, 2125.84f, 88.2535f, 54.8830f},
- {1, 2111.01f, 93.8022f, 52.6356f},
- {2, 2106.70f, 114.753f, 53.1965f},
- {3, 2107.76f, 138.746f, 52.5109f},
- {4, 2114.83f, 160.142f, 52.4738f},
- {5, 2125.24f, 178.909f, 52.7283f},
- {6, 2151.02f, 208.901f, 53.1551f},
- {7, 2177.00f, 233.069f, 52.4409f},
- {8, 2190.71f, 227.831f, 53.2742f},
- {9, 2178.14f, 214.219f, 53.0779f},
- {10, 2154.99f, 202.795f, 52.6446f},
- {11, 2132.00f, 191.834f, 52.5709f},
- {12, 2117.59f, 166.708f, 52.7686f},
- {13, 2093.61f, 139.441f, 52.7616f},
- {14, 2086.29f, 104.950f, 52.9246f},
- {15, 2094.23f, 81.2788f, 52.6946f},
- {16, 2108.70f, 85.3075f, 53.3294f},
- {17, 2125.50f, 88.9481f, 54.7953f},
- {18, 2128.20f, 70.9763f, 64.4221f}
+ { 2125.84f, 88.2535f, 54.8830f },
+ { 2111.01f, 93.8022f, 52.6356f },
+ { 2106.70f, 114.753f, 53.1965f },
+ { 2107.76f, 138.746f, 52.5109f },
+ { 2114.83f, 160.142f, 52.4738f },
+ { 2125.24f, 178.909f, 52.7283f },
+ { 2151.02f, 208.901f, 53.1551f },
+ { 2177.00f, 233.069f, 52.4409f },
+ { 2190.71f, 227.831f, 53.2742f },
+ { 2178.14f, 214.219f, 53.0779f },
+ { 2154.99f, 202.795f, 52.6446f },
+ { 2132.00f, 191.834f, 52.5709f },
+ { 2117.59f, 166.708f, 52.7686f },
+ { 2093.61f, 139.441f, 52.7616f },
+ { 2086.29f, 104.950f, 52.9246f },
+ { 2094.23f, 81.2788f, 52.6946f },
+ { 2108.70f, 85.3075f, 53.3294f },
+ { 2125.50f, 88.9481f, 54.7953f },
+ { 2128.20f, 70.9763f, 64.4221f }
};
class boss_lieutenant_drake : public CreatureScript
@@ -163,7 +155,7 @@ public:
/// @todo make this work
if (CanPatrol && wpId == 0)
{
- me->GetMotionMaster()->MovePoint(DrakeWP[0].wpId, DrakeWP[0].x, DrakeWP[0].y, DrakeWP[0].z);
+ me->GetMotionMaster()->MovePoint(wpId, DrakeWP[wpId].x, DrakeWP[wpId].y, DrakeWP[wpId].z);
++wpId;
}
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
index 8a0921b604b..3f882e0b99e 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
@@ -31,6 +31,9 @@ enum GossipNPCs
GOSSIP_MENU_ETERNOS = 9574,
GOSSIP_MENU_BELGARISTRASZ = 9575,
+ SPELL_CREATE_EMERALD_ESSENCE = 49382, // no effects in spell_dbc
+ SPELL_CREATE_AMBER_ESSENCE = 49447, // no effects in spell_dbc
+ SPELL_CREATE_RUBY_ESSENCE = 49450, // no effects in spell_dbc
ITEM_EMERALD_ESSENCE = 37815,
ITEM_AMBER_ESSENCE = 37859,
ITEM_RUBY_ESSENCE = 37860
@@ -48,7 +51,7 @@ enum Drakes
SPELL_RUBY_EVASIVE_AURA = 50248, // Instant - Allows the Ruby Drake to generate Evasive Charges when hit by hostile attacks and spells.
SPELL_RUBY_EVASIVE_CHARGES = 50241,
SPELL_RUBY_EVASIVE_MANEUVERS = 50240, // Instant - 5 sec. cooldown - Allows your drake to dodge all incoming attacks and spells. Requires Evasive Charges to use. Each attack or spell dodged while this ability is active burns one Evasive Charge. Lasts 30 sec. or until all charges are exhausted.
- // you do not have acces to until you kill Mage-Lord Urom
+ // you do not have access to until you kill the Mage-Lord Urom
SPELL_RUBY_MARTYR = 50253, // Instant - 10 sec. cooldown - Redirect all harmful spells cast at friendly drakes to yourself for 10 sec.
/*
@@ -112,7 +115,7 @@ class npc_verdisa_beglaristrasz_eternos : public CreatureScript
void StoreEssence(Player* player, uint32 itemId)
{
- /// @todo: should be handled by spell, but not found in dbc (49450 and other?)
+ /// @todo: implement with spells
uint32 count = 1;
ItemPosCountVec dest;
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, count);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
index d3a6bc9b5ff..14087ace975 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
@@ -50,6 +50,7 @@ enum Spells
SPELL_HEAT = 65667,
SPELL_MOLTEN = 62373,
SPELL_BRITTLE = 62382,
+ SPELL_BRITTLE_25 = 67114,
SPELL_SHATTER = 62383,
SPELL_GROUND = 62548,
};
@@ -320,7 +321,7 @@ class npc_iron_construct : public CreatureScript
void DamageTaken(Unit* /*attacker*/, uint32& damage) override
{
- if (me->HasAura(SPELL_BRITTLE) && damage >= 5000)
+ if (me->HasAura(RAID_MODE(SPELL_BRITTLE, SPELL_BRITTLE_25)) && damage >= 5000)
{
DoCast(SPELL_SHATTER);
if (Creature* ignis = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(BOSS_IGNIS)))
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
index 9486d95639f..d643b3bd8ce 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
@@ -166,7 +166,6 @@ class boss_kologarn : public CreatureScript
left = apply;
if (!apply && isEncounterInProgress)
{
- who->ToCreature()->DespawnOrUnsummon();
Talk(SAY_LEFT_ARM_GONE);
events.ScheduleEvent(EVENT_RESPAWN_LEFT_ARM, 40000);
}
@@ -177,7 +176,6 @@ class boss_kologarn : public CreatureScript
right = apply;
if (!apply && isEncounterInProgress)
{
- who->ToCreature()->DespawnOrUnsummon();
Talk(SAY_RIGHT_ARM_GONE);
events.ScheduleEvent(EVENT_RESPAWN_RIGHT_ARM, 40000);
}
@@ -194,6 +192,7 @@ class boss_kologarn : public CreatureScript
{
rubbleStalker->CastSpell(rubbleStalker, SPELL_FALLING_RUBBLE, true);
rubbleStalker->CastSpell(rubbleStalker, SPELL_SUMMON_RUBBLE, true);
+ who->ToCreature()->DespawnOrUnsummon();
}
if (!right && !left)
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
index 4f40abde5b6..27b8d3e2fcc 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
@@ -78,6 +78,7 @@ class instance_ulduar : public InstanceMapScript
illusion = 0;
keepersCount = 0;
conSpeedAtory = false;
+ lumberjacked = false;
Unbroken = true;
IsDriveMeCrazyEligible = true;
_algalonSummoned = false;
@@ -102,6 +103,7 @@ class instance_ulduar : public InstanceMapScript
ObjectGuid ThorimGUID;
ObjectGuid FreyaGUID;
ObjectGuid ElderGUIDs[3];
+ ObjectGuid FreyaAchieveTriggerGUID;
ObjectGuid MimironGUID;
ObjectGuid MimironVehicleGUIDs[3];
ObjectGuid MimironComputerGUID;
@@ -141,6 +143,7 @@ class instance_ulduar : public InstanceMapScript
uint8 illusion;
uint8 keepersCount;
bool conSpeedAtory;
+ bool lumberjacked;
bool Unbroken;
bool IsDriveMeCrazyEligible;
@@ -321,7 +324,10 @@ class instance_ulduar : public InstanceMapScript
ElderGUIDs[2] = creature->GetGUID();
if (GetBossState(BOSS_FREYA) == DONE)
creature->DespawnOrUnsummon();
- break;
+ break;
+ case NPC_FREYA_ACHIEVE_TRIGGER:
+ FreyaAchieveTriggerGUID = creature->GetGUID();
+ break;
// Mimiron
case NPC_MIMIRON:
@@ -606,6 +612,15 @@ class instance_ulduar : public InstanceMapScript
conSpeedAtory = true;
}
break;
+ case NPC_IRONBRANCH:
+ case NPC_STONEBARK:
+ case NPC_BRIGHTLEAF:
+ if (!lumberjacked)
+ {
+ DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, CRITERIA_LUMBERJACKED);
+ lumberjacked = true;
+ }
+ break;
default:
break;
}
@@ -669,6 +684,13 @@ class instance_ulduar : public InstanceMapScript
if (state == DONE)
instance->SummonCreature(NPC_FREYA_OBSERVATION_RING, ObservationRingKeepersPos[0]);
break;
+ case BOSS_IRONBRANCH:
+ case BOSS_STONEBARK:
+ case BOSS_BRIGHTLEAF:
+ if (GetBossState(BOSS_BRIGHTLEAF) == DONE && GetBossState(BOSS_IRONBRANCH) == DONE && GetBossState(BOSS_STONEBARK) == DONE && GetBossState(BOSS_FREYA) != DONE)
+ if (Creature* trigger = instance->GetCreature(FreyaAchieveTriggerGUID))
+ trigger->CastSpell(trigger, SPELL_LUMBERJACKED_CREDIT, true);
+ break;
case BOSS_KOLOGARN:
if (state == DONE)
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
index 9b95d7cf7b8..82c4ef140f1 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
@@ -129,6 +129,9 @@ enum UlduarNPCs
NPC_NATURES_BLADE = 33527,
NPC_GUARDIAN_OF_LIFE = 33528,
+ // Freya Achievement Trigger
+ NPC_FREYA_ACHIEVE_TRIGGER = 33406,
+
// Yogg-Saron
NPC_SARA = 33134,
NPC_GUARDIAN_OF_YOGG_SARON = 33136,
@@ -273,6 +276,7 @@ enum LeviathanActions
enum UlduarAchievementCriteriaIds
{
CRITERIA_CON_SPEED_ATORY = 21597,
+ CRITERIA_LUMBERJACKED = 21686,
CRITERIA_DISARMED = 21687,
CRITERIA_WAITS_DREAMING_STORMWIND_25 = 10321,
CRITERIA_WAITS_DREAMING_CHAMBER_25 = 10322,
@@ -362,6 +366,7 @@ enum UlduarAchievementData
DATA_UNBROKEN = 29052906, // 2905, 2906 are achievement IDs,
MAX_HERALD_ARMOR_ITEMLEVEL = 226,
MAX_HERALD_WEAPON_ITEMLEVEL = 232,
+ SPELL_LUMBERJACKED_CREDIT = 65296
};
enum UlduarEvents
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
index bacb63b73bc..c6e4f40ef58 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
@@ -58,7 +58,7 @@ enum Misc
MAX_TEMPEST_MINIONS = 4
};
-struct Position TempestMinions[MAX_TEMPEST_MINIONS] =
+Position const TempestMinions[MAX_TEMPEST_MINIONS] =
{
{-203.980103f, -281.287720f, 91.650223f, 1.598807f},
{-233.489410f, -281.139282f, 91.652412f, 1.598807f},
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index aec4e982a49..64e9932c29b 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -298,12 +298,7 @@ static const Yells Conversation[22] =
{0, "", EMPTY, 1000, 0, false} // 21
};
-struct Locations
-{
- float x, y, z;
-};
-
-static const Locations HoverPosition[4]=
+G3D::Vector3 const HoverPosition[4]=
{
{657.0f, 340.0f, 355.0f},
{657.0f, 275.0f, 355.0f},
@@ -311,7 +306,7 @@ static const Locations HoverPosition[4]=
{705.0f, 340.0f, 355.0f}
};
-static const Locations GlaivePosition[4]=
+G3D::Vector3 const GlaivePosition[4]=
{
{695.105f, 305.303f, 354.256f},
{659.338f, 305.303f, 354.256f}, // the distance between two glaives is 36
@@ -319,13 +314,13 @@ static const Locations GlaivePosition[4]=
{664.338f, 305.303f, 354.256f}
};
-static const Locations EyeBlast[2]=
+G3D::Vector3 const EyeBlast[2]=
{
{677.0f, 350.0f, 354.0f}, // start point, pass through glaive point
{677.0f, 260.0f, 354.0f}
};
-static const Locations AkamaWP[13]=
+G3D::Vector3 const AkamaWP[13]=
{
{770.01f, 304.50f, 312.29f}, // Bottom of the first stairs, at the doors
{780.66f, 304.50f, 319.74f}, // Top of the first stairs
@@ -342,7 +337,7 @@ static const Locations AkamaWP[13]=
{782.01f, 304.55f, 319.76f} // Final location - back at the initial gates. This is where he will fight the minions! (12)
};
// 755.762f, 304.0747f, 312.1769f -- This is where Akama should be spawned
-static const Locations SpiritSpawns[2]=
+G3D::Vector3 const SpiritSpawns[2]=
{
{755.5426f, 309.9156f, 312.2129f},
{755.5426f, 298.7923f, 312.0834f}
@@ -734,14 +729,14 @@ public:
disty = EyeBlast[i].y - HoverPosition[HoverPoint].y;
dist[i] = distx * distx + disty * disty;
}
- Locations initial = EyeBlast[dist[0] < dist[1] ? 0 : 1];
+ G3D::Vector3 initial = EyeBlast[dist[0] < dist[1] ? 0 : 1];
for (uint8 i = 0; i < 2; ++i)
{
distx = GlaivePosition[i].x - HoverPosition[HoverPoint].x;
disty = GlaivePosition[i].y - HoverPosition[HoverPoint].y;
dist[i] = distx * distx + disty * disty;
}
- Locations final = GlaivePosition[dist[0] < dist[1] ? 0 : 1];
+ G3D::Vector3 final = GlaivePosition[dist[0] < dist[1] ? 0 : 1];
final.x = 2 * final.x - initial.x;
final.y = 2 * final.y - initial.y;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
index 39aac706acc..a4e589cde90 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
@@ -82,12 +82,7 @@ uint32 PrismaticAuras[]=
40897, // Holy
};
-struct Locations
-{
- float x, y, z;
-};
-
-static Locations TeleportPoint[]=
+G3D::Vector3 const TeleportPoint[]=
{
{959.996f, 212.576f, 193.843f},
{932.537f, 231.813f, 193.838f},
diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
index 23abf48233e..438816b7e10 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
@@ -84,12 +84,7 @@ enum ReliquaryOfSouls
NUMBER_ENSLAVED_SOUL = 8
};
-struct Position2d
-{
- float x, y;
-};
-
-static Position2d Coords[]=
+G3D::Vector2 const Coords[]=
{
{450.4f, 212.3f},
{542.1f, 212.3f},
diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
index ecc4457e454..6ff865cfcd0 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -141,14 +141,9 @@ enum Events
EVENT_SPIRIT_HEAL = 24
};
-struct Location
-{
- float x, y, z;
-};
-
-static Location ShadeWP = { 512.4877f, 400.7993f, 112.7837f };
+G3D::Vector3 const ShadeWP = { 512.4877f, 400.7993f, 112.7837f };
-static Location AkamaWP[] =
+G3D::Vector3 const AkamaWP[] =
{
{ 517.4877f, 400.7993f, 112.7837f },
{ 468.4435f, 401.1062f, 118.5379f }
diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
index e6f32a07538..031e877ffb0 100644
--- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
@@ -1213,13 +1213,8 @@ static TorlothCinematic TorlothAnim[]=
{0, 0}
};
-struct Location
-{
- float x, y, z, o;
-};
-
//Cordinates for Spawns
-static Location SpawnLocation[]=
+static Position SpawnLocation[]=
{
//Cords used for:
{-4615.8556f, 1342.2532f, 139.9f, 1.612f}, //Illidari Soldier
@@ -1727,12 +1722,7 @@ void npc_lord_illidan_stormrage::npc_lord_illidan_stormrageAI::SummonNextWave()
for (uint8 i = 0; i < count; ++i)
{
- Creature* Spawn = NULL;
- float X = SpawnLocation[locIndex + i].x;
- float Y = SpawnLocation[locIndex + i].y;
- float Z = SpawnLocation[locIndex + i].z;
- float O = SpawnLocation[locIndex + i].o;
- Spawn = me->SummonCreature(WavesInfo[WaveCount].CreatureId, X, Y, Z, O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
+ Creature* Spawn = me->SummonCreature(WavesInfo[WaveCount].CreatureId, SpawnLocation[locIndex + i], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
++LiveCount;
if (Spawn)
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index f613704164e..c6b23101be2 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -530,12 +530,7 @@ enum Doctor
HORDE_COORDS = 6
};
-struct Location
-{
- float x, y, z, o;
-};
-
-static Location AllianceCoords[]=
+Position const AllianceCoords[]=
{
{-3757.38f, -4533.05f, 14.16f, 3.62f}, // Top-far-right bunk as seen from entrance
{-3754.36f, -4539.13f, 14.16f, 5.13f}, // Top-far-left bunk
@@ -551,7 +546,7 @@ static Location AllianceCoords[]=
#define A_RUNTOY -4531.52f
#define A_RUNTOZ 11.91f
-static Location HordeCoords[]=
+Position const HordeCoords[]=
{
{-1013.75f, -3492.59f, 62.62f, 4.34f}, // Left, Behind
{-1017.72f, -3490.92f, 62.62f, 4.34f}, // Right, Behind
@@ -620,7 +615,7 @@ public:
bool Event;
GuidList Patients;
- std::vector<Location*> Coordinates;
+ std::vector<Position const*> Coordinates;
void Reset() override
{
@@ -653,7 +648,7 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
- void PatientDied(Location* point)
+ void PatientDied(Position const* point)
{
Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID);
if (player && ((player->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (player->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)))
@@ -678,7 +673,7 @@ public:
Reset();
}
- void PatientSaved(Creature* /*soldier*/, Player* player, Location* point)
+ void PatientSaved(Creature* /*soldier*/, Player* player, Position const* point)
{
if (player && PlayerGUID == player->GetGUID())
{
@@ -753,7 +748,7 @@ public:
}
ObjectGuid DoctorGUID;
- Location* Coord;
+ Position const* Coord;
void Reset() override
{
@@ -870,7 +865,6 @@ void npc_doctor::npc_doctorAI::UpdateAI(uint32 diff)
if (Coordinates.empty())
return;
- std::vector<Location*>::iterator itr = Coordinates.begin() + rand32() % Coordinates.size();
uint32 patientEntry = 0;
switch (me->GetEntry())
@@ -886,20 +880,21 @@ void npc_doctor::npc_doctorAI::UpdateAI(uint32 diff)
return;
}
- if (Location* point = *itr)
+ std::vector<Position const*>::iterator point = Coordinates.begin();
+ std::advance(point, urand(0, Coordinates.size() - 1));
+
+ if (Creature* Patient = me->SummonCreature(patientEntry, **point, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
{
- if (Creature* Patient = me->SummonCreature(patientEntry, point->x, point->y, point->z, point->o, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
- {
- //303, this flag appear to be required for client side item->spell to work (TARGET_SINGLE_FRIEND)
- Patient->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
+ //303, this flag appear to be required for client side item->spell to work (TARGET_SINGLE_FRIEND)
+ Patient->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
- Patients.push_back(Patient->GetGUID());
- ENSURE_AI(npc_injured_patient::npc_injured_patientAI, Patient->AI())->DoctorGUID = me->GetGUID();
- ENSURE_AI(npc_injured_patient::npc_injured_patientAI, Patient->AI())->Coord = point;
+ Patients.push_back(Patient->GetGUID());
+ ENSURE_AI(npc_injured_patient::npc_injured_patientAI, Patient->AI())->DoctorGUID = me->GetGUID();
+ ENSURE_AI(npc_injured_patient::npc_injured_patientAI, Patient->AI())->Coord = *point;
- Coordinates.erase(itr);
- }
+ Coordinates.erase(point);
}
+
SummonPatientTimer = 10000;
++SummonPatientCount;
}
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
index 010ceb12d78..ac9e17fb872 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
@@ -129,7 +129,6 @@ void CharacterDatabaseConnection::DoPrepareStatements()
PrepareStatement(CHAR_SEL_AUCTIONS, "SELECT id, auctioneerguid, itemguid, itemEntry, count, itemowner, buyoutprice, time, buyguid, lastbid, startbid, deposit FROM auctionhouse ah INNER JOIN item_instance ii ON ii.guid = ah.itemguid", CONNECTION_SYNCH);
PrepareStatement(CHAR_INS_AUCTION, "INSERT INTO auctionhouse (id, auctioneerguid, itemguid, itemowner, buyoutprice, time, buyguid, lastbid, startbid, deposit) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
PrepareStatement(CHAR_DEL_AUCTION, "DELETE FROM auctionhouse WHERE id = ?", CONNECTION_ASYNC);
- PrepareStatement(CHAR_SEL_AUCTION_BY_TIME, "SELECT id FROM auctionhouse WHERE time <= ? ORDER BY TIME ASC", CONNECTION_SYNCH);
PrepareStatement(CHAR_UPD_AUCTION_BID, "UPDATE auctionhouse SET buyguid = ?, lastbid = ? WHERE id = ?", CONNECTION_ASYNC);
PrepareStatement(CHAR_INS_MAIL, "INSERT INTO mail(id, messageType, stationery, mailTemplateId, sender, receiver, subject, body, has_items, expire_time, deliver_time, money, cod, checked) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
PrepareStatement(CHAR_DEL_MAIL_BY_ID, "DELETE FROM mail WHERE id = ?", CONNECTION_ASYNC);
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h
index 7305568d9ab..b04a484b248 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.h
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.h
@@ -128,7 +128,6 @@ enum CharacterDatabaseStatements
CHAR_SEL_AUCTION_ITEMS,
CHAR_INS_AUCTION,
CHAR_DEL_AUCTION,
- CHAR_SEL_AUCTION_BY_TIME,
CHAR_UPD_AUCTION_BID,
CHAR_SEL_AUCTIONS,
CHAR_INS_MAIL,