aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorSubv <s.v.h21@hotmail.com>2012-10-21 17:18:35 -0500
committerSubv <s.v.h21@hotmail.com>2012-10-21 17:18:35 -0500
commit1fc3aad9d73df53173f2f186bf5cc94923c77c99 (patch)
tree8d3a3d6ea24d2722a9b7ba8c8dfa98dc0d8427d1 /src/server
parentc343448989916df4fa41f42b57c5629e9997603d (diff)
parent4fd9f8693b238866634c651e71798e7a4d3a7a1a (diff)
Merge branch 'master' of https://github.com/TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/DataStores/DBCfmt.h src/server/game/DungeonFinding/LFGMgr.h src/server/scripts/Kalimdor/feralas.cpp
Diffstat (limited to 'src/server')
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.cpp2
-rw-r--r--src/server/game/DataStores/DBCStores.cpp2
-rwxr-xr-xsrc/server/game/DataStores/DBCStores.h2
-rw-r--r--src/server/game/DataStores/DBCStructure.h2
-rw-r--r--[-rwxr-xr-x]src/server/game/DataStores/DBCfmt.h0
-rwxr-xr-xsrc/server/game/DungeonFinding/LFGMgr.cpp40
-rw-r--r--[-rwxr-xr-x]src/server/game/DungeonFinding/LFGMgr.h17
-rwxr-xr-xsrc/server/game/Entities/GameObject/GameObject.cpp13
-rw-r--r--src/server/game/Entities/Player/Player.cpp4
-rwxr-xr-xsrc/server/game/Groups/Group.cpp2
-rwxr-xr-xsrc/server/game/Handlers/LFGHandler.cpp6
-rwxr-xr-xsrc/server/game/Maps/Map.cpp4
-rwxr-xr-xsrc/server/game/Miscellaneous/Language.h30
-rw-r--r--src/server/game/World/World.cpp19
-rw-r--r--src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp144
-rw-r--r--src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h3
-rw-r--r--src/server/scripts/Kalimdor/feralas.cpp2
-rw-r--r--src/server/scripts/Northrend/storm_peaks.cpp48
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp4
19 files changed, 204 insertions, 140 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index b7eea9f0b7e..16fa33fc7a5 100755
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -755,7 +755,7 @@ void ConditionMgr::LoadConditions(bool isReload)
Condition* cond = new Condition();
int32 iSourceTypeOrReferenceId = fields[0].GetInt32();
cond->SourceGroup = fields[1].GetUInt32();
- cond->SourceEntry = fields[2].GetUInt32();
+ cond->SourceEntry = fields[2].GetInt32();
cond->SourceId = fields[3].GetInt32();
cond->ElseGroup = fields[4].GetUInt32();
int32 iConditionTypeOrReference = fields[5].GetInt32();
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index 584b070def2..8a647bacfea 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -140,7 +140,7 @@ DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore(ItemRandomProp
DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore(ItemRandomSuffixfmt);
DBCStorage <ItemSetEntry> sItemSetStore(ItemSetEntryfmt);
-DBCStorage <LFGDungeonEntryDbc> sLFGDungeonStore(LFGDungeonEntryfmt);
+DBCStorage <LFGDungeonEntry> sLFGDungeonStore(LFGDungeonEntryfmt);
DBCStorage <LiquidTypeEntry> sLiquidTypeStore(LiquidTypefmt);
DBCStorage <LockEntry> sLockStore(LockEntryfmt);
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index 288ecbf6a0e..c4e012c62c1 100755
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
@@ -152,7 +152,7 @@ extern DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore;
extern DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore;
extern DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore;
extern DBCStorage <ItemSetEntry> sItemSetStore;
-extern DBCStorage <LFGDungeonEntryDbc> sLFGDungeonStore;
+extern DBCStorage <LFGDungeonEntry> sLFGDungeonStore;
extern DBCStorage <LiquidTypeEntry> sLiquidTypeStore;
extern DBCStorage <LockEntry> sLockStore;
extern DBCStorage <MailTemplateEntry> sMailTemplateStore;
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index c4b0a760862..87e77ad491e 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -1347,7 +1347,7 @@ struct ItemSetEntry
uint32 required_skill_value; // 36 m_requiredSkillRank
};
-struct LFGDungeonEntryDbc
+struct LFGDungeonEntry
{
uint32 ID; // 0
char* name; // 1
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index c1430c7bef0..c1430c7bef0 100755..100644
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 16fda8952ac..357b7f1ecee 100755
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -31,17 +31,20 @@
#include "GroupMgr.h"
#include "GameEventMgr.h"
-LFGMgr::LFGMgr(): m_QueueTimer(0), m_lfgProposalId(1),
- m_options(sWorld->getBoolConfig(CONFIG_DUNGEON_FINDER_ENABLE)),
- m_lfgPlayerScript(new LFGPlayerScript()), m_lfgGroupScript(new LFGGroupScript())
-{ }
+LFGMgr::LFGMgr(): m_QueueTimer(0), m_lfgProposalId(1)
+{
+ m_options = sWorld->getBoolConfig(CONFIG_DUNGEON_FINDER_ENABLE);
+ if (m_options)
+ {
+ new LFGPlayerScript();
+ new LFGGroupScript();
+ }
+}
LFGMgr::~LFGMgr()
{
for (LfgRewardMap::iterator itr = m_RewardMap.begin(); itr != m_RewardMap.end(); ++itr)
delete itr->second;
- delete m_lfgPlayerScript;
- delete m_lfgGroupScript;
}
void LFGMgr::_LoadFromDB(Field* fields, uint64 guid)
@@ -239,7 +242,7 @@ void LFGMgr::LoadRewards()
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
-LFGDungeonEntry const* LFGMgr::GetLFGDungeon(uint32 id)
+LFGDungeonData const* LFGMgr::GetLFGDungeon(uint32 id)
{
LFGDungeonMap::const_iterator itr = m_LfgDungeonMap.find(id);
if (itr != m_LfgDungeonMap.end())
@@ -262,7 +265,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
// Initialize Dungeon map with data from dbcs
for (uint32 i = 0; i < sLFGDungeonStore.GetNumRows(); ++i)
{
- LFGDungeonEntryDbc const* dungeon = sLFGDungeonStore.LookupEntry(i);
+ LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(i);
if (!dungeon)
continue;
@@ -272,7 +275,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
case LFG_TYPE_HEROIC:
case LFG_TYPE_RAID:
case LFG_TYPE_RANDOM:
- m_LfgDungeonMap[dungeon->ID] = LFGDungeonEntry(dungeon);
+ m_LfgDungeonMap[dungeon->ID] = LFGDungeonData(dungeon);
break;
}
}
@@ -299,7 +302,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
continue;
}
- LFGDungeonEntry& data = dungeonItr->second;
+ LFGDungeonData& data = dungeonItr->second;
data.x = fields[1].GetFloat();
data.y = fields[2].GetFloat();
data.z = fields[3].GetFloat();
@@ -314,7 +317,10 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
// Fill all other teleport coords from areatriggers
for (LFGDungeonMap::iterator itr = m_LfgDungeonMap.begin(); itr != m_LfgDungeonMap.end(); ++itr)
{
- LFGDungeonEntry& dungeon = itr->second;
+ LFGDungeonData& dungeon = itr->second;
+ if (dungeon.type == LFG_TYPE_RANDOM)
+ continue;
+
// No teleport coords in database, load from areatriggers
if (dungeon.x == 0.0f && dungeon.y == 0.0f && dungeon.z == 0.0f)
{
@@ -462,7 +468,7 @@ void LFGMgr::InitializeLockedDungeons(Player* player, uint8 level /* = 0 */)
for (LfgDungeonSet::const_iterator it = dungeons.begin(); it != dungeons.end(); ++it)
{
- LFGDungeonEntry const* dungeon = GetLFGDungeon(*it);
+ LFGDungeonData const* dungeon = GetLFGDungeon(*it);
if (!dungeon) // should never happen - We provide a list from sLFGDungeonStore
continue;
@@ -1014,7 +1020,7 @@ void LFGMgr::MakeNewGroup(const LfgProposal& proposal)
}
// Set the dungeon difficulty
- LFGDungeonEntry const* dungeon = GetLFGDungeon(proposal.dungeonId);
+ LFGDungeonData const* dungeon = GetLFGDungeon(proposal.dungeonId);
ASSERT(dungeon);
Group* grp = proposal.group ? sGroupMgr->GetGroupByGUID(GUID_LOPART(proposal.group)) : NULL;
@@ -1384,7 +1390,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false*
Group* grp = player->GetGroup();
uint64 gguid = grp->GetGUID();
- LFGDungeonEntry const* dungeon = GetLFGDungeon(GetDungeon(gguid));
+ LFGDungeonData const* dungeon = GetLFGDungeon(GetDungeon(gguid));
if (!dungeon || (out && player->GetMapId() != uint32(dungeon->map)))
return;
@@ -1501,7 +1507,7 @@ void LFGMgr::RewardDungeonDoneFor(const uint32 dungeonId, Player* player)
SetState(guid, LFG_STATE_FINISHED_DUNGEON);
// Give rewards only if its a random or seasonal dungeon
- LFGDungeonEntry const* dungeon = GetLFGDungeon(rDungeonId);
+ LFGDungeonData const* dungeon = GetLFGDungeon(rDungeonId);
if (!dungeon || (dungeon->type != LFG_TYPE_RANDOM && !dungeon->seasonal))
{
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RewardDungeonDoneFor: [" UI64FMTD "] dungeon %u is not random nor seasonal", guid, rDungeonId);
@@ -1551,7 +1557,7 @@ void LFGMgr::RewardDungeonDoneFor(const uint32 dungeonId, Player* player)
*/
const LfgDungeonSet& LFGMgr::GetDungeonsByRandom(uint32 randomdungeon)
{
- LFGDungeonEntry const* dungeon = GetLFGDungeon(randomdungeon);
+ LFGDungeonData const* dungeon = GetLFGDungeon(randomdungeon);
uint32 group = dungeon ? dungeon->group : 0;
return m_CachedDungeonMap[group];
}
@@ -1586,7 +1592,7 @@ LfgReward const* LFGMgr::GetRandomDungeonReward(uint32 dungeon, uint8 level)
*/
LfgType LFGMgr::GetDungeonType(uint32 dungeonId)
{
- LFGDungeonEntry const* dungeon = GetLFGDungeon(dungeonId);
+ LFGDungeonData const* dungeon = GetLFGDungeon(dungeonId);
if (!dungeon)
return LFG_TYPE_NONE;
diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h
index 4fb03bfe701..e60f144a94f 100755..100644
--- a/src/server/game/DungeonFinding/LFGMgr.h
+++ b/src/server/game/DungeonFinding/LFGMgr.h
@@ -25,8 +25,6 @@
#include "LFGGroupData.h"
#include "LFGPlayerData.h"
-class LFGPlayerScript;
-class LFGGroupScript;
class Group;
class Player;
@@ -117,7 +115,7 @@ enum LfgRoleCheckState
};
// Forward declaration (just to have all typedef together)
-struct LFGDungeonEntry;
+struct LFGDungeonData;
struct LfgReward;
struct LfgQueueInfo;
struct LfgRoleCheck;
@@ -136,7 +134,7 @@ typedef std::map<uint64, LfgProposalPlayer> LfgProposalPlayerMap;
typedef std::map<uint64, LfgPlayerBoot> LfgPlayerBootMap;
typedef std::map<uint64, LfgGroupData> LfgGroupDataMap;
typedef std::map<uint64, LfgPlayerData> LfgPlayerDataMap;
-typedef UNORDERED_MAP<uint32, LFGDungeonEntry> LFGDungeonMap;
+typedef UNORDERED_MAP<uint32, LFGDungeonData> LFGDungeonMap;
// Data needed by SMSG_LFG_JOIN_RESULT
struct LfgJoinResultData
@@ -251,12 +249,12 @@ struct LfgPlayerBoot
std::string reason; ///< kick reason
};
-struct LFGDungeonEntry
+struct LFGDungeonData
{
- LFGDungeonEntry(): id(0), name(""), map(0), type(0), expansion(0), group(0), minlevel(0),
+ LFGDungeonData(): id(0), name(""), map(0), type(0), expansion(0), group(0), minlevel(0),
maxlevel(0), difficulty(REGULAR_DIFFICULTY), seasonal(false), x(0.0f), y(0.0f), z(0.0f), o(0.0f)
{ }
- LFGDungeonEntry(LFGDungeonEntryDbc const* dbc): id(dbc->ID), name(dbc->name), map(dbc->map),
+ LFGDungeonData(LFGDungeonEntry const* dbc): id(dbc->ID), name(dbc->name), map(dbc->map),
type(dbc->type), expansion(dbc->expansion), group(dbc->grouptype),
minlevel(dbc->minlevel), maxlevel(dbc->maxlevel), difficulty(Difficulty(dbc->difficulty)),
seasonal(dbc->flags & LFG_FLAG_SEASONAL), x(0.0f), y(0.0f), z(0.0f), o(0.0f)
@@ -358,7 +356,7 @@ class LFGMgr
static char const * GetStateString(LfgState state);
void LoadLFGDungeons(bool reload = false);
- LFGDungeonEntry const* GetLFGDungeon(uint32 id);
+ LFGDungeonData const* GetLFGDungeon(uint32 id);
LFGDungeonMap& GetLFGDungeonMap();
void ClearState(uint64 guid, char const *debugMsg);
@@ -406,9 +404,6 @@ class LFGMgr
LfgPlayerDataMap m_Players; ///< Player data
LfgGroupDataMap m_Groups; ///< Group data
LfgGuidList m_teleport; ///< Players being teleported
-
- LFGPlayerScript *m_lfgPlayerScript;
- LFGGroupScript *m_lfgGroupScript;
};
#define sLFGMgr ACE_Singleton<LFGMgr, ACE_Null_Mutex>::instance()
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 68d69c2e14a..6f84e50d81f 100755
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -1116,6 +1116,19 @@ void GameObject::Use(Unit* user)
player->SendPreparedGossip(this);
return;
}
+ case GAMEOBJECT_TYPE_TRAP: //6
+ {
+ GameObjectTemplate const* goInfo = GetGOInfo();
+ if (goInfo->trap.spellId)
+ CastSpell(user, goInfo->trap.spellId);
+
+ m_cooldownTime = time(NULL) + (goInfo->trap.cooldown ? goInfo->trap.cooldown : uint32(4)); // template or 4 seconds
+
+ if (goInfo->trap.type == 1) // Deactivate after trigger
+ SetLootState(GO_JUST_DEACTIVATED);
+
+ return;
+ }
//Sitting: Wooden bench, chairs enzz
case GAMEOBJECT_TYPE_CHAIR: //7
{
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 9e62f85e3a1..9ea1a7b1be3 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -11684,7 +11684,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje
bool lootedObjectInDungeon = false;
Map const* map = lootedObject->GetMap();
if (uint32 dungeonId = sLFGMgr->GetDungeon(GetGroup()->GetGUID(), true))
- if (LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId))
+ if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId))
if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == uint32(map->GetDifficulty()))
lootedObjectInDungeon = true;
@@ -23573,7 +23573,7 @@ bool Player::inRandomLfgDungeon()
const LfgDungeonSet& dungeons = sLFGMgr->GetSelectedDungeons(GetGUID());
if (!dungeons.empty())
{
- LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(*dungeons.begin());
+ LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(*dungeons.begin());
if (dungeon && (dungeon->type == LFG_TYPE_RANDOM || dungeon->seasonal))
return true;
}
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 2b35020fd62..6fb15cb7756 100755
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -631,7 +631,7 @@ bool Group::RemoveMember(uint64 guid, const RemoveMethod &method /*= GROUP_REMOV
if (isLFGGroup() && GetMembersCount() == 1)
{
Player* Leader = ObjectAccessor::FindPlayer(GetLeaderGUID());
- LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(sLFGMgr->GetDungeon(GetGUID()));
+ LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(sLFGMgr->GetDungeon(GetGUID()));
if ((Leader && dungeon && Leader->isAlive() && Leader->GetMapId() != uint32(dungeon->map)) || !dungeon)
{
Disband();
diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp
index 02c5b2e1414..9f25f0e9c86 100755
--- a/src/server/game/Handlers/LFGHandler.cpp
+++ b/src/server/game/Handlers/LFGHandler.cpp
@@ -167,7 +167,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
LFGDungeonMap& LfgDungeons = sLFGMgr->GetLFGDungeonMap();
for (LFGDungeonMap::const_iterator itr = LfgDungeons.begin(); itr != LfgDungeons.end(); ++itr)
{
- LFGDungeonEntry const& dungeon = itr->second;
+ LFGDungeonData const& dungeon = itr->second;
if ((dungeon.type == LFG_TYPE_RANDOM || (dungeon.seasonal && sLFGMgr->IsSeasonActive(dungeon.id)))
&& dungeon.expansion <= expansion && dungeon.minlevel <= level && level <= dungeon.maxlevel)
randomDungeons.insert(dungeon.Entry());
@@ -405,7 +405,7 @@ void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck& roleCheck)
{
for (LfgDungeonSet::iterator it = dungeons.begin(); it != dungeons.end(); ++it)
{
- LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(*it);
+ LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(*it);
data << uint32(dungeon ? dungeon->Entry() : 0); // Dungeon
}
}
@@ -555,7 +555,7 @@ void WorldSession::SendLfgUpdateProposal(uint32 proposalId, LfgProposal const& p
dungeonEntry = (*playerDungeons.begin());
}
- if (LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(dungeonEntry))
+ if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonEntry))
dungeonEntry = dungeon->Entry();
data << uint32(dungeonEntry); // Dungeon
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index eff6543443a..d0ad280404d 100755
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -2469,8 +2469,8 @@ bool InstanceMap::AddPlayerToMap(Player* player)
if (group && group->isLFGGroup())
if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
- if (LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId))
- if (LFGDungeonEntry const* randomDungeon = sLFGMgr->GetLFGDungeon(*(sLFGMgr->GetSelectedDungeons(player->GetGUID()).begin())))
+ if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId))
+ if (LFGDungeonData const* randomDungeon = sLFGMgr->GetLFGDungeon(*(sLFGMgr->GetSelectedDungeons(player->GetGUID()).begin())))
if (uint32(dungeon->map) == GetId() && dungeon->difficulty == uint32(GetDifficulty()) && randomDungeon->type == uint32(LFG_TYPE_RANDOM))
player->CastSpell(player, LFG_SPELL_LUCK_OF_THE_DRAW, true);
}
diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h
index 1de08a21563..ac56a814c9c 100755
--- a/src/server/game/Miscellaneous/Language.h
+++ b/src/server/game/Miscellaneous/Language.h
@@ -998,6 +998,21 @@ enum TrinityStrings
LANG_WORLD_CLOSED = 7523,
LANG_WORLD_OPENED = 7524,
+ LANG_LFG_STATE_NONE = 9986,
+ LANG_LFG_STATE_ROLECHECK = 9987,
+ LANG_LFG_STATE_QUEUED = 9988,
+ LANG_LFG_STATE_PROPOSAL = 9989,
+ LANG_LFG_STATE_BOOT = 9990,
+ LANG_LFG_STATE_DUNGEON = 9991,
+ LANG_LFG_STATE_FINISHED_DUNGEON = 9992,
+ LANG_LFG_STATE_RAIDBROWSER = 9993,
+ LANG_LFG_ROLE_TANK = 9994,
+ LANG_LFG_ROLE_HEALER = 9995,
+ LANG_LFG_ROLE_DAMAGE = 9996,
+ LANG_LFG_ROLE_LEADER = 9997,
+ LANG_LFG_ROLE_NONE = 9998,
+ LANG_LFG_ERROR = 9999,
+
// Use for not-in-offcial-sources patches
// 10000-10999
// opvp hp
@@ -1086,21 +1101,6 @@ enum TrinityStrings
LANG_AUTO_BROADCAST = 11000,
LANG_INVALID_REALMID = 11001,
- LANG_LFG_STATE_NONE = 11002,
- LANG_LFG_STATE_ROLECHECK = 11003,
- LANG_LFG_STATE_QUEUED = 11004,
- LANG_LFG_STATE_PROPOSAL = 11005,
- LANG_LFG_STATE_BOOT = 11006,
- LANG_LFG_STATE_DUNGEON = 11007,
- LANG_LFG_STATE_FINISHED_DUNGEON = 11008,
- LANG_LFG_STATE_RAIDBROWSER = 11009,
- LANG_LFG_ROLE_TANK = 11010,
- LANG_LFG_ROLE_HEALER = 11011,
- LANG_LFG_ROLE_DAMAGE = 11012,
- LANG_LFG_ROLE_LEADER = 11013,
- LANG_LFG_ROLE_NONE = 11014,
- LANG_LFG_ERROR = 11015,
-
// NOT RESERVED IDS 12000-1999999999
// `db_script_string` table index 2000000000-2000009999 (MIN_DB_SCRIPT_STRING_ID-MAX_DB_SCRIPT_STRING_ID)
// For other tables maybe 2000010000-2147483647 (max index)
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 43c0f5bd73c..04f39a568a8 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -1467,16 +1467,6 @@ void World::SetInitialWorldSettings()
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Vehicle Accessories...");
sObjectMgr->LoadVehicleAccessories(); // must be after LoadCreatureTemplates() and LoadNPCSpellClickSpells()
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading LFG entrance positions...");
- sLFGMgr->LoadLFGDungeons();
-
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Dungeon boss data...");
- sObjectMgr->LoadInstanceEncounters();
-
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading LFG rewards...");
- sLFGMgr->LoadRewards();
-
-
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading SpellArea Data..."); // must be after quest load
sSpellMgr->LoadSpellAreas();
@@ -1495,6 +1485,15 @@ void World::SetInitialWorldSettings()
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading AreaTrigger script names...");
sObjectMgr->LoadAreaTriggerScripts();
+ sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading LFG entrance positions..."); // Must be after areatriggers
+ sLFGMgr->LoadLFGDungeons();
+
+ sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Dungeon boss data...");
+ sObjectMgr->LoadInstanceEncounters();
+
+ sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading LFG rewards...");
+ sLFGMgr->LoadRewards();
+
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Graveyard-zone links...");
sObjectMgr->LoadGraveyardZones();
diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
index f1aa3d68bce..8f79c4973f7 100644
--- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
+++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
@@ -30,40 +30,32 @@ Script Data End */
#define GOSSIP_START_EVENT "I am ready to being"
-enum eBlastmasterEmiShortfuse
+enum BlastmasterEmi
{
GOSSIP_TEXT_EMI = 1693,
- SAY_BLASTMASTER_0 = -1090000,
- SAY_BLASTMASTER_1 = -1090001,
- SAY_BLASTMASTER_2 = -1090002,
- SAY_BLASTMASTER_3 = -1090003,
- SAY_BLASTMASTER_4 = -1090004,
- SAY_BLASTMASTER_5 = -1090005,
- SAY_BLASTMASTER_6 = -1090006,
- SAY_BLASTMASTER_7 = -1090007,
- SAY_BLASTMASTER_8 = -1090008,
- SAY_BLASTMASTER_9 = -1090009,
- SAY_BLASTMASTER_10 = -1090010,
- SAY_BLASTMASTER_11 = -1090011,
- SAY_BLASTMASTER_12 = -1090012,
- SAY_BLASTMASTER_13 = -1090013,
- SAY_BLASTMASTER_14 = -1090014,
- SAY_BLASTMASTER_15 = -1090015,
- SAY_BLASTMASTER_16 = -1090016,
- SAY_BLASTMASTER_17 = -1090017,
- SAY_BLASTMASTER_18 = -1090018,
- SAY_BLASTMASTER_19 = -1090019,
- SAY_BLASTMASTER_20 = -1090020,
- SAY_BLASTMASTER_21 = -1090021,
- SAY_BLASTMASTER_22 = -1090022,
- SAY_BLASTMASTER_23 = -1090023,
- SAY_BLASTMASTER_24 = -1090024,
- SAY_BLASTMASTER_25 = -1090025,
- SAY_BLASTMASTER_26 = -1090026,
- SAY_BLASTMASTER_27 = -1090027,
-
- SAY_GRUBBIS = -1090028
+ SAY_BLASTMASTER_0 = 0,
+ SAY_BLASTMASTER_1 = 1,
+ SAY_BLASTMASTER_2 = 2,
+ SAY_BLASTMASTER_3 = 3,
+ SAY_BLASTMASTER_4 = 4,
+ SAY_BLASTMASTER_5 = 5,
+ SAY_BLASTMASTER_6 = 6,
+ SAY_BLASTMASTER_7 = 7,
+ SAY_BLASTMASTER_8 = 8,
+ SAY_BLASTMASTER_9 = 9,
+ SAY_BLASTMASTER_10 = 10,
+ SAY_BLASTMASTER_11 = 11,
+ SAY_BLASTMASTER_12 = 12,
+ SAY_BLASTMASTER_13 = 13,
+ SAY_BLASTMASTER_14 = 14,
+ SAY_BLASTMASTER_15 = 15,
+ SAY_BLASTMASTER_16 = 16,
+ SAY_BLASTMASTER_17 = 17,
+ SAY_BLASTMASTER_18 = 18,
+ SAY_BLASTMASTER_19 = 19,
+
+ SAY_GRUBBIS = 0
};
const Position SpawnPosition[] =
@@ -78,13 +70,16 @@ const Position SpawnPosition[] =
{-552.534f, -110.012f, -153.577f, 0.747f},
{-550.708f, -116.436f, -153.103f, 0.679f},
{-554.030f, -115.983f, -152.635f, 0.695f},
- {-494.595f, -87.516f, 149.116f, 3.344f},
+ {-494.595f, -87.516f, -149.116f, 3.344f},
{-493.349f, -90.845f, -148.882f, 3.717f},
{-491.995f, -87.619f, -148.197f, 3.230f},
{-490.732f, -90.739f, -148.091f, 3.230f},
{-490.554f, -89.114f, -148.055f, 3.230f},
{-495.240f, -90.808f, -149.493f, 3.238f},
- {-494.195f, -89.553f, -149.131f, 3.254f}
+ {-494.195f, -89.553f, -149.131f, 3.254f},
+ {-511.3304f, -139.9622f, -152.4761f, 0.7504908f},
+ {-510.6754f, -139.4371f, -152.6167f, 3.33359f},
+ {-511.8976f, -139.3562f, -152.4785f, 3.961899f}
};
class npc_blastmaster_emi_shortfuse : public CreatureScript
@@ -300,12 +295,12 @@ public:
NextStep(25000, false, 18);
break;
case 13:
- Summon(7);
+ Summon(6);
NextStep(25000, false, 19);
break;
case 14:
SetInFace(false);
- DoScriptText(SAY_BLASTMASTER_26, me);
+ Talk(SAY_BLASTMASTER_17);
SetEscortPaused(true);
NextStep(5000, false, 20);
break;
@@ -318,8 +313,8 @@ public:
{
case 1:
SetEscortPaused(true);
- DoScriptText(SAY_BLASTMASTER_0, me);
- NextStep(1500, true);
+ Talk(SAY_BLASTMASTER_0);
+ NextStep(2000, true);
break;
case 2:
if (!instance)
@@ -368,7 +363,7 @@ public:
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
- DoScriptText(SAY_BLASTMASTER_19, me);
+ Talk(SAY_BLASTMASTER_7);
break;
case 4:
if (GameObject* go = me->SummonGameObject(183410, -542.199f, -96.854f, -155.790f, 0, 0, 0, 0, 0, 1000))
@@ -378,38 +373,37 @@ public:
}
break;
case 5:
- me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
- me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
- me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
- DoScriptText(SAY_BLASTMASTER_15, me);
- break;
- case 6:
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[10], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[11], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[12], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[13], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[14], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
break;
- case 7:
+ case 6:
if (GameObject* go = me->SummonGameObject(183410, -507.820f, -103.333f, -151.353f, 0, 0, 0, 0, 0, 1000))
{
GoSummonList.push_back(go->GetGUID());
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); //We can't use it!
- Summon(6);
+ Summon(5);
}
break;
- case 8:
+ case 7:
if (GameObject* go = me->SummonGameObject(183410, -511.829f, -86.249f, -151.431f, 0, 0, 0, 0, 0, 1000))
{
GoSummonList.push_back(go->GetGUID());
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); //We can't use it!
}
break;
- case 9:
- if (Creature* pGrubbis = me->SummonCreature(NPC_GRUBBIS, SpawnPosition[15], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000))
- DoScriptText(SAY_GRUBBIS, pGrubbis);
+ case 8:
+ if (Creature* grubbis = me->SummonCreature(NPC_GRUBBIS, SpawnPosition[15], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000))
+ grubbis->AI()->Talk(SAY_GRUBBIS);
me->SummonCreature(NPC_CHOMPER, SpawnPosition[16], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
break;
+ case 9:
+ me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[17].GetPositionX(), SpawnPosition[17].GetPositionY(), SpawnPosition[17].GetPositionZ(), SpawnPosition[17].GetOrientation(), 0, 0, 0, 0, 7200);
+ me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[18].GetPositionX(), SpawnPosition[18].GetPositionY(), SpawnPosition[18].GetPositionZ(), SpawnPosition[18].GetOrientation(), 0, 0, 0, 0, 7200);
+ me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[19].GetPositionX(), SpawnPosition[19].GetPositionY(), SpawnPosition[19].GetPositionZ(), SpawnPosition[19].GetOrientation(), 0, 0, 0, 0, 7200);
+ break;
}
}
@@ -422,29 +416,29 @@ public:
switch (uiPhase)
{
case 1:
- DoScriptText(SAY_BLASTMASTER_1, me);
- NextStep(1500, true);
+ Talk(SAY_BLASTMASTER_1);
+ NextStep(2000, true);
break;
case 2:
SetEscortPaused(false);
NextStep(0, false, 0);
break;
case 3:
- DoScriptText(SAY_BLASTMASTER_2, me);
+ Talk(SAY_BLASTMASTER_2);
SetEscortPaused(false);
NextStep(0, false, 0);
break;
case 4:
- DoScriptText(SAY_BLASTMASTER_3, me);
+ Talk(SAY_BLASTMASTER_3);
NextStep(3000, true);
break;
case 5:
- DoScriptText(SAY_BLASTMASTER_4, me);
+ Talk(SAY_BLASTMASTER_4);
NextStep(3000, true);
break;
case 6:
SetInFace(true);
- DoScriptText(SAY_BLASTMASTER_5, me);
+ Talk(SAY_BLASTMASTER_5);
Summon(1);
if (instance)
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
@@ -452,12 +446,12 @@ public:
NextStep(3000, true);
break;
case 7:
- DoScriptText(SAY_BLASTMASTER_6, me);
+ Talk(SAY_BLASTMASTER_6);
SetEscortPaused(false);
NextStep(0, false, 0);
break;
case 8:
- me->HandleEmoteCommand(EMOTE_STATE_WORK);
+ me->HandleEmoteCommand(EMOTE_STATE_USE_STANDING);
NextStep(25000, true);
break;
case 9:
@@ -466,31 +460,32 @@ public:
break;
case 10:
Summon(4);
+ Talk(SAY_BLASTMASTER_8);
NextStep(0, false);
break;
case 11:
- DoScriptText(SAY_BLASTMASTER_17, me);
+ Talk(SAY_BLASTMASTER_9);
NextStep(5000, true);
break;
case 12:
- DoScriptText(SAY_BLASTMASTER_18, me);
+ Talk(SAY_BLASTMASTER_10);
NextStep(5000, true);
break;
case 13:
- DoScriptText(SAY_BLASTMASTER_20, me);
+ Talk(SAY_BLASTMASTER_11);
CaveDestruction(true);
NextStep(8000, true);
break;
case 14:
- DoScriptText(SAY_BLASTMASTER_21, me);
+ Talk(SAY_BLASTMASTER_12);
NextStep(8500, true);
break;
case 15:
- DoScriptText(SAY_BLASTMASTER_22, me);
+ Talk(SAY_BLASTMASTER_13);
NextStep(2000, true);
break;
case 16:
- DoScriptText(SAY_BLASTMASTER_23, me);
+ Talk(SAY_BLASTMASTER_14);
SetInFace(false);
if (instance)
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_LEFT)))
@@ -499,31 +494,36 @@ public:
break;
case 17:
SetEscortPaused(false);
- DoScriptText(SAY_BLASTMASTER_24, me);
- Summon(6);
+ Talk(SAY_BLASTMASTER_15);
+ Summon(5);
NextStep(0, false);
break;
case 18:
- Summon(7);
+ Summon(6);
NextStep(0, false);
break;
case 19:
SetInFace(false);
- Summon(8);
- DoScriptText(SAY_BLASTMASTER_25, me);
+ Summon(7);
+ Talk(SAY_BLASTMASTER_16);
NextStep(0, false);
break;
case 20:
- DoScriptText(SAY_BLASTMASTER_27, me);
+ Talk(SAY_BLASTMASTER_18);
NextStep(2000, true);
break;
case 21:
- Summon(9);
+ Summon(8);
NextStep(0, false);
break;
case 22:
CaveDestruction(false);
- DoScriptText(SAY_BLASTMASTER_20, me);
+ Talk(SAY_BLASTMASTER_11);
+ NextStep(3000, true);
+ break;
+ case 23:
+ Summon(9);
+ Talk(SAY_BLASTMASTER_19);
NextStep(0, false);
break;
}
diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h
index a62cf9f9cae..068ba5d26af 100644
--- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h
+++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h
@@ -21,7 +21,8 @@
enum eGameObjects
{
GO_CAVE_IN_LEFT = 146085,
- GO_CAVE_IN_RIGHT = 146086
+ GO_CAVE_IN_RIGHT = 146086,
+ GO_RED_ROCKET = 103820
};
enum eCreatures
diff --git a/src/server/scripts/Kalimdor/feralas.cpp b/src/server/scripts/Kalimdor/feralas.cpp
index 79aa25cea71..a3b153f5ebb 100644
--- a/src/server/scripts/Kalimdor/feralas.cpp
+++ b/src/server/scripts/Kalimdor/feralas.cpp
@@ -27,7 +27,9 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
#include "ScriptedGossip.h"
+#include "SpellScript.h"
void AddSC_feralas()
{
+
}
diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp
index 976a6e5dba5..fc4f2785990 100644
--- a/src/server/scripts/Northrend/storm_peaks.cpp
+++ b/src/server/scripts/Northrend/storm_peaks.cpp
@@ -564,6 +564,53 @@ class npc_hyldsmeet_protodrake : public CreatureScript
}
};
+enum CloseRift
+{
+ SPELL_DESPAWN_RIFT = 61665
+};
+
+class spell_close_rift : public SpellScriptLoader
+{
+ public:
+ spell_close_rift() : SpellScriptLoader("spell_close_rift") { }
+
+ class spell_close_rift_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_close_rift_AuraScript);
+
+ bool Load()
+ {
+ _counter = 0;
+ return true;
+ }
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ return sSpellMgr->GetSpellInfo(SPELL_DESPAWN_RIFT);
+ }
+
+ void HandlePeriodic(AuraEffect const* /* aurEff */)
+ {
+ if (++_counter == 5)
+ GetTarget()->CastSpell((Unit*)NULL, SPELL_DESPAWN_RIFT, true);
+ }
+
+ void Register()
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_close_rift_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ }
+
+ private:
+ uint8 _counter;
+
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_close_rift_AuraScript();
+ }
+};
+
void AddSC_storm_peaks()
{
new npc_agnetta_tyrsdottar();
@@ -574,4 +621,5 @@ void AddSC_storm_peaks()
new npc_freed_protodrake();
new npc_icefang();
new npc_hyldsmeet_protodrake();
+ new spell_close_rift();
}
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index fee77fc5796..3bca0d088a4 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -1581,12 +1581,12 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader
}
- LFGDungeonEntry const* randomDungeon = sLFGMgr->GetLFGDungeon(*itr);
+ LFGDungeonData const* randomDungeon = sLFGMgr->GetLFGDungeon(*itr);
if (Group* group = owner->GetGroup())
if (Map const* map = owner->GetMap())
if (group->isLFGGroup())
if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
- if (LFGDungeonEntry const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId))
+ if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId))
if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == uint32(map->GetDifficulty()))
if (randomDungeon && randomDungeon->type == LFG_TYPE_RANDOM)
return; // in correct dungeon