change some packets. fix sql.
This commit is contained in:
+11
-11
@@ -1,16 +1,16 @@
|
|||||||
-- Wintergrasp Quests - Horde
|
-- Wintergrasp Quests - Horde
|
||||||
UPDATE `quest_template` SET `ExclusiveGroup`=13180 WHERE `entry` IN (13180,13178); -- Slay them all!
|
UPDATE `quest_template` SET `ExclusiveGroup`=13180 WHERE `id` IN (13180,13178); -- Slay them all!
|
||||||
UPDATE `quest_template` SET `ExclusiveGroup`=13185 WHERE `entry` IN (13185,13223); -- Stop/Defend the Siege
|
UPDATE `quest_template` SET `ExclusiveGroup`=13185 WHERE `id` IN (13185,13223); -- Stop/Defend the Siege
|
||||||
UPDATE `quest_template` SET `ExclusiveGroup`=13201 WHERE `entry` IN (13201,13194); -- Healing with Roses
|
UPDATE `quest_template` SET `ExclusiveGroup`=13201 WHERE `id` IN (13201,13194); -- Healing with Roses
|
||||||
UPDATE `quest_template` SET `ExclusiveGroup`=13199 WHERE `entry` IN (13193,13199); -- Bones and Arrows
|
UPDATE `quest_template` SET `ExclusiveGroup`=13199 WHERE `id` IN (13193,13199); -- Bones and Arrows
|
||||||
UPDATE `quest_template` SET `ExclusiveGroup`=13192 WHERE `entry` IN (13192,13202); -- Warding/Jinxing the Walls
|
UPDATE `quest_template` SET `ExclusiveGroup`=13192 WHERE `id` IN (13192,13202); -- Warding/Jinxing the Walls
|
||||||
UPDATE `quest_template` SET `ExclusiveGroup`=13200 WHERE `entry` IN (13200,13191); -- Fueling the Demolishers
|
UPDATE `quest_template` SET `ExclusiveGroup`=13200 WHERE `id` IN (13200,13191); -- Fueling the Demolishers
|
||||||
|
|
||||||
-- Wintergrasp Quests - Alliance
|
-- Wintergrasp Quests - Alliance
|
||||||
UPDATE `quest_template` SET `ExclusiveGroup`=13179 WHERE `entry` IN (13179,13177); -- No Mercy for the Merciless
|
UPDATE `quest_template` SET `ExclusiveGroup`=13179 WHERE `id` IN (13179,13177); -- No Mercy for the Merciless
|
||||||
UPDATE `quest_template` SET `ExclusiveGroup`=13186 WHERE `entry` IN (13186,13222); -- Stop/Defend the Siege
|
UPDATE `quest_template` SET `ExclusiveGroup`=13186 WHERE `id` IN (13186,13222); -- Stop/Defend the Siege
|
||||||
UPDATE `quest_template` SET `ExclusiveGroup`=13195 WHERE `entry` IN (13195,13156); -- A Rare Herb
|
UPDATE `quest_template` SET `ExclusiveGroup`=13195 WHERE `id` IN (13195,13156); -- A Rare Herb
|
||||||
UPDATE `quest_template` SET `ExclusiveGroup`=13196 WHERE `entry` IN (13196,13154); -- Bones and Arrows
|
UPDATE `quest_template` SET `ExclusiveGroup`=13196 WHERE `id` IN (13196,13154); -- Bones and Arrows
|
||||||
UPDATE `quest_template` SET `ExclusiveGroup`=13198 WHERE `entry` IN (13198,13153); -- Warding the Warriors
|
UPDATE `quest_template` SET `ExclusiveGroup`=13198 WHERE `id` IN (13198,13153); -- Warding the Warriors
|
||||||
|
|
||||||
-- Note: The offered quests (they are in pairs) depend on who controls the keep. npc_wg_quest_giver does that already?
|
-- Note: The offered quests (they are in pairs) depend on who controls the keep. npc_wg_quest_giver does that already?
|
||||||
|
|||||||
@@ -0,0 +1,150 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
|
||||||
|
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Common.h"
|
||||||
|
#include "ObjectAccessor.h"
|
||||||
|
#include "ObjectMgr.h"
|
||||||
|
#include "WorldPacket.h"
|
||||||
|
#include "WorldSession.h"
|
||||||
|
|
||||||
|
#include "Battlefield.h"
|
||||||
|
#include "BattlefieldMgr.h"
|
||||||
|
#include "Opcodes.h"
|
||||||
|
|
||||||
|
//This send to player windows for invite player to join the war
|
||||||
|
//Param1:(BattleId) the BattleId of Bf
|
||||||
|
//Param2:(ZoneId) the zone where the battle is (4197 for wg)
|
||||||
|
//Param3:(time) Time in second that the player have for accept
|
||||||
|
void WorldSession::SendBfInvitePlayerToWar(uint32 BattleId, uint32 ZoneId, uint32 p_time)
|
||||||
|
{
|
||||||
|
//Send packet
|
||||||
|
WorldPacket data(SMSG_BATTLEFIELD_MGR_ENTRY_INVITE, 12);
|
||||||
|
data << uint32(BattleId);
|
||||||
|
data << uint32(ZoneId);
|
||||||
|
data << uint32((time(NULL) + p_time));
|
||||||
|
|
||||||
|
//Sending the packet to player
|
||||||
|
SendPacket(&data);
|
||||||
|
}
|
||||||
|
|
||||||
|
//This send invitation to player to join the queue
|
||||||
|
//Param1:(BattleId) the BattleId of Bf
|
||||||
|
void WorldSession::SendBfInvitePlayerToQueue(uint32 BattleId)
|
||||||
|
{
|
||||||
|
WorldPacket data(SMSG_BATTLEFIELD_MGR_QUEUE_INVITE, 5);
|
||||||
|
|
||||||
|
data << uint32(BattleId);
|
||||||
|
data << uint8(1); //warmup ? used ?
|
||||||
|
|
||||||
|
//Sending packet to player
|
||||||
|
SendPacket(&data);
|
||||||
|
}
|
||||||
|
|
||||||
|
//This send packet for inform player that he join queue
|
||||||
|
//Param1:(BattleId) the BattleId of Bf
|
||||||
|
//Param2:(ZoneId) the zone where the battle is (4197 for wg)
|
||||||
|
//Param3:(CanQueue) if able to queue
|
||||||
|
//Param4:(Full) on log in is full
|
||||||
|
void WorldSession::SendBfQueueInviteResponce(uint32 BattleId,uint32 ZoneId, bool CanQueue, bool Full)
|
||||||
|
{
|
||||||
|
WorldPacket data(SMSG_BATTLEFIELD_MGR_QUEUE_REQUEST_RESPONSE, 11);
|
||||||
|
data << uint32(BattleId);
|
||||||
|
data << uint32(ZoneId);
|
||||||
|
data << uint8((CanQueue ? 1 : 0)); //Accepted //0 you cannot queue wg //1 you are queued
|
||||||
|
data << uint8((Full ? 0 : 1)); //Logging In //0 wg full //1 queue for upcoming
|
||||||
|
data << uint8(1); //Warmup
|
||||||
|
SendPacket(&data);
|
||||||
|
}
|
||||||
|
|
||||||
|
//This is call when player accept to join war
|
||||||
|
//Param1:(BattleId) the BattleId of Bf
|
||||||
|
void WorldSession::SendBfEntered(uint32 BattleId)
|
||||||
|
{
|
||||||
|
// m_PlayerInWar[plr->GetTeamId()].insert(plr->GetGUID());
|
||||||
|
WorldPacket data(SMSG_BATTLEFIELD_MGR_ENTERED, 7);
|
||||||
|
data << uint32(BattleId);
|
||||||
|
data << uint8(1); //unk
|
||||||
|
data << uint8(1); //unk
|
||||||
|
data << uint8(_player->isAFK() ? 1 : 0); //Clear AFK
|
||||||
|
SendPacket(&data);
|
||||||
|
}
|
||||||
|
|
||||||
|
void WorldSession::SendBfLeaveMessage(uint32 BattleId, uint8 reason)
|
||||||
|
{
|
||||||
|
WorldPacket data(SMSG_BATTLEFIELD_MGR_EJECTED, 7);
|
||||||
|
data << uint32(BattleId);
|
||||||
|
data << uint8(reason);//byte Reason (1=close invite,8="exited",10="to low level")
|
||||||
|
data << uint8(2);//byte BattleStatus
|
||||||
|
data << uint8(0);//bool Relocated
|
||||||
|
SendPacket(&data);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Send by client when he click on accept for queue
|
||||||
|
void WorldSession::HandleBfQueueInviteResponse(WorldPacket & recv_data)
|
||||||
|
{
|
||||||
|
uint32 BattleId;
|
||||||
|
uint8 Accepted;
|
||||||
|
|
||||||
|
recv_data >> BattleId >> Accepted;
|
||||||
|
sLog->outError("HandleQueueInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted);
|
||||||
|
Battlefield* Bf = sBattlefieldMgr.GetBattlefieldByBattleId(BattleId);
|
||||||
|
if (!Bf)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (Accepted)
|
||||||
|
{
|
||||||
|
Bf->PlayerAcceptInviteToQueue(_player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Send by client on clicking in accept or refuse of invitation windows for join game
|
||||||
|
void WorldSession::HandleBfEntryInviteResponse(WorldPacket & recv_data)
|
||||||
|
{
|
||||||
|
uint32 BattleId;
|
||||||
|
uint8 Accepted;
|
||||||
|
|
||||||
|
recv_data >> BattleId >> Accepted;
|
||||||
|
sLog->outError("HandleBattlefieldInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted);
|
||||||
|
Battlefield* Bf = sBattlefieldMgr.GetBattlefieldByBattleId(BattleId);
|
||||||
|
if (!Bf)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//If player accept invitation
|
||||||
|
if (Accepted)
|
||||||
|
{
|
||||||
|
Bf->PlayerAcceptInviteToWar(_player);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (_player->GetZoneId() == Bf->GetZoneId())
|
||||||
|
Bf->KickPlayerFromBf(_player->GetGUID());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void WorldSession::HandleBfExitRequest(WorldPacket & recv_data)
|
||||||
|
{
|
||||||
|
uint32 BattleId;
|
||||||
|
|
||||||
|
recv_data >> BattleId;
|
||||||
|
sLog->outError("HandleBfExitRequest: BattleID:%u ", BattleId);
|
||||||
|
Battlefield* Bf = sBattlefieldMgr.GetBattlefieldByBattleId(BattleId);
|
||||||
|
if (!Bf)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Bf->AskToLeaveQueue(_player);
|
||||||
|
}
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
#include "SpellAuras.h"
|
#include "SpellAuras.h"
|
||||||
#include "Vehicle.h"
|
#include "Vehicle.h"
|
||||||
|
|
||||||
enum eWGBfData
|
enum WGBfData
|
||||||
{
|
{
|
||||||
BATTLEFIELD_WG_ZONEID = 4197, // Wintergrasp
|
BATTLEFIELD_WG_ZONEID = 4197, // Wintergrasp
|
||||||
BATTLEFIELD_WG_MAPID = 571, // Northrend
|
BATTLEFIELD_WG_MAPID = 571, // Northrend
|
||||||
|
|||||||
@@ -786,7 +786,16 @@ class WorldSession
|
|||||||
void HandleResetInstancesOpcode(WorldPacket& recv_data);
|
void HandleResetInstancesOpcode(WorldPacket& recv_data);
|
||||||
void HandleHearthAndResurrect(WorldPacket& recv_data);
|
void HandleHearthAndResurrect(WorldPacket& recv_data);
|
||||||
void HandleInstanceLockResponse(WorldPacket& recvPacket);
|
void HandleInstanceLockResponse(WorldPacket& recvPacket);
|
||||||
void HandleUpdateMissileTrajectory(WorldPacket& recvPacket);
|
|
||||||
|
// Battlefield
|
||||||
|
void SendBfInvitePlayerToWar(uint32 BattleId,uint32 ZoneId,uint32 time);
|
||||||
|
void SendBfInvitePlayerToQueue(uint32 BattleId);
|
||||||
|
void SendBfQueueInviteResponce(uint32 BattleId,uint32 ZoneId, bool CanQueue = true, bool Full = false);
|
||||||
|
void SendBfEntered(uint32 BattleId);
|
||||||
|
void SendBfLeaveMessage(uint32 BattleId, uint8 reason = 8);
|
||||||
|
void HandleBfQueueInviteResponse(WorldPacket &recv_data);
|
||||||
|
void HandleBfEntryInviteResponse(WorldPacket &recv_data);
|
||||||
|
void HandleBfExitRequest(WorldPacket &recv_data);
|
||||||
|
|
||||||
// Looking for Dungeon/Raid
|
// Looking for Dungeon/Raid
|
||||||
void HandleLfgSetCommentOpcode(WorldPacket& recv_data);
|
void HandleLfgSetCommentOpcode(WorldPacket& recv_data);
|
||||||
|
|||||||
Reference in New Issue
Block a user