aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_10_18_00_world_trinity_string.sql17
-rw-r--r--sql/updates/world/2012_10_23_00_world_trinity_string.sql17
-rwxr-xr-xsrc/server/game/DungeonFinding/LFGMgr.cpp90
3 files changed, 64 insertions, 60 deletions
diff --git a/sql/updates/world/2012_10_18_00_world_trinity_string.sql b/sql/updates/world/2012_10_18_00_world_trinity_string.sql
deleted file mode 100644
index a12b20388eb..00000000000
--- a/sql/updates/world/2012_10_18_00_world_trinity_string.sql
+++ /dev/null
@@ -1,17 +0,0 @@
-DELETE FROM `trinity_string` WHERE `entry` IN (9986, 9987, 9989, 9990, 9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999);
-INSERT INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`)
-VALUES
- (9986, 'Error', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
- (9987, 'None', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
- (9988, 'Leader', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
- (9989, 'Dps', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
- (9990, 'Healer', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
- (9991, 'Tank', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
- (9992, 'Raid browser', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
- (9993, 'Finished dungeon', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
- (9994, 'In dungeon', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
- (9995, 'Vote kick', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
- (9996, 'Proposal', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
- (9997, 'Queued', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
- (9998, 'Role check', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
- (9999, 'None', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
diff --git a/sql/updates/world/2012_10_23_00_world_trinity_string.sql b/sql/updates/world/2012_10_23_00_world_trinity_string.sql
new file mode 100644
index 00000000000..0c9a6f4d050
--- /dev/null
+++ b/sql/updates/world/2012_10_23_00_world_trinity_string.sql
@@ -0,0 +1,17 @@
+DELETE FROM `trinity_string` WHERE `entry` IN (9986, 9987, 9989, 9990, 9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999);
+INSERT INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`)
+VALUES
+ (9999, 'Error', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+ (9998, 'None', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+ (9997, 'Leader', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+ (9996, 'Dps', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+ (9995, 'Healer', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+ (9994, 'Tank', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+ (9993, 'Raid browser', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+ (9992, 'Finished dungeon', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+ (9991, 'In dungeon', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+ (9990, 'Vote kick', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+ (9989, 'Proposal', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+ (9988, 'Queued', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+ (9987, 'Role check', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+ (9986, 'None', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 5e494c7d986..e523c7f1c38 100755
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -889,11 +889,13 @@ void LFGMgr::UpdateRoleCheck(uint64 gguid, uint64 guid /* = 0 */, uint8 roles /*
SetState(gguid, LFG_STATE_QUEUED);
LfgQueue& queue = GetQueue(gguid);
queue.AddQueueData(gguid, time_t(time(NULL)), roleCheck.dungeons, roleCheck.roles);
+ m_RoleChecks.erase(itRoleCheck);
}
else if (roleCheck.state != LFG_ROLECHECK_INITIALITING)
+ {
RestoreState(gguid, "Rolecheck Failed");
-
- m_RoleChecks.erase(itRoleCheck);
+ m_RoleChecks.erase(itRoleCheck);
+ }
}
/**
@@ -1386,18 +1388,22 @@ void LFGMgr::UpdateBoot(uint64 guid, bool accept)
*/
void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false*/)
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::TeleportPlayer: [" UI64FMTD "] is being teleported %s", player->GetGUID(), out ? "out" : "in");
-
Group* grp = player->GetGroup();
uint64 gguid = grp->GetGUID();
LFGDungeonData const* dungeon = GetLFGDungeon(GetDungeon(gguid));
- if (!dungeon || (out && player->GetMapId() != uint32(dungeon->map)))
+ if (!dungeon)
return;
if (out)
{
- player->RemoveAurasDueToSpell(LFG_SPELL_LUCK_OF_THE_DRAW);
- player->TeleportToBGEntryPoint();
+ sLog->outDebug(LOG_FILTER_LFG, "TeleportPlayer: Player %s is being teleported out. Current Map %u - Expected Map %u",
+ player->GetName(), player->GetMapId(), uint32(dungeon->map));
+ if (player->GetMapId() == uint32(dungeon->map))
+ {
+ player->RemoveAurasDueToSpell(LFG_SPELL_LUCK_OF_THE_DRAW);
+ player->TeleportToBGEntryPoint();
+ }
+
return;
}
@@ -1415,57 +1421,55 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false*
error = LFG_TELEPORTERROR_IN_VEHICLE;
else if (player->GetCharmGUID())
error = LFG_TELEPORTERROR_CHARMING;
- else
+ else if (player->GetMapId() != uint32(dungeon->map)) // Do not teleport players in dungeon to the entrance
{
- if (!dungeon)
- error = LFG_TELEPORTERROR_INVALID_LOCATION;
- else if (player->GetMapId() != uint32(dungeon->map)) // Do not teleport players in dungeon to the entrance
- {
- uint32 mapid = dungeon->map;
- float x = dungeon->x;
- float y = dungeon->y;
- float z = dungeon->z;
- float orientation = dungeon->o;
+ uint32 mapid = dungeon->map;
+ float x = dungeon->x;
+ float y = dungeon->y;
+ float z = dungeon->z;
+ float orientation = dungeon->o;
- if (!fromOpcode)
+ if (!fromOpcode)
+ {
+ // Select a player inside to be teleported to
+ for (GroupReference* itr = grp->GetFirstMember(); itr != NULL && !mapid; itr = itr->next())
{
- // Select a player inside to be teleported to
- for (GroupReference* itr = grp->GetFirstMember(); itr != NULL && !mapid; itr = itr->next())
+ Player* plrg = itr->getSource();
+ if (plrg && plrg != player && plrg->GetMapId() == uint32(dungeon->map))
{
- Player* plrg = itr->getSource();
- if (plrg && plrg != player && plrg->GetMapId() == uint32(dungeon->map))
- {
- mapid = plrg->GetMapId();
- x = plrg->GetPositionX();
- y = plrg->GetPositionY();
- z = plrg->GetPositionZ();
- orientation = plrg->GetOrientation();
- }
+ mapid = plrg->GetMapId();
+ x = plrg->GetPositionX();
+ y = plrg->GetPositionY();
+ z = plrg->GetPositionZ();
+ orientation = plrg->GetOrientation();
}
}
+ }
- if (error == LFG_TELEPORTERROR_OK)
- {
- if (!player->GetMap()->IsDungeon())
- player->SetBattlegroundEntryPoint();
+ if (error == LFG_TELEPORTERROR_OK)
+ {
+ if (!player->GetMap()->IsDungeon())
+ player->SetBattlegroundEntryPoint();
- if (player->isInFlight())
- {
- player->GetMotionMaster()->MovementExpired();
- player->CleanupAfterTaxiFlight();
- }
+ if (player->isInFlight())
+ {
+ player->GetMotionMaster()->MovementExpired();
+ player->CleanupAfterTaxiFlight();
+ }
- if (!player->TeleportTo(mapid, x, y, z, orientation))
- {
- error = LFG_TELEPORTERROR_INVALID_LOCATION;
- sLog->outError(LOG_FILTER_LFG, "LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "] to map %u: ", player->GetGUID(), mapid);
- }
+ if (!player->TeleportTo(mapid, x, y, z, orientation))
+ {
+ error = LFG_TELEPORTERROR_INVALID_LOCATION;
+ sLog->outError(LOG_FILTER_LFG, "TeleportPlayer: Failed to teleport [" UI64FMTD "] to map %u (x: %f, y: %f, z: %f)", player->GetGUID(), mapid, x, y, z);
}
}
}
if (error != LFG_TELEPORTERROR_OK)
player->GetSession()->SendLfgTeleportError(uint8(error));
+
+ sLog->outDebug(LOG_FILTER_LFG, "TeleportPlayer: Player %s is being teleported in. Result: %u",
+ player->GetName(), error);
}
/**