* Cleaning Wintergrasp from the core part 1

* When someone feels like coding it properly, it can be added back in.

--HG--
branch : trunk
This commit is contained in:
Brian
2010-01-20 06:26:13 -07:00
parent 7ce1c094c0
commit bbdca0aa43
8 changed files with 9 additions and 348 deletions
+9 -5
View File
@@ -36,8 +36,9 @@
#include "Opcodes.h"
// Temporal fix to wintergrasp spirit guides till 3.2
#include "OutdoorPvPWG.h"
#include "OutdoorPvPMgr.h"
//
//#include "OutdoorPvPWG.h"
//#include "OutdoorPvPMgr.h"
// WG end
void WorldSession::HandleBattlemasterHelloOpcode( WorldPacket & recv_data )
@@ -592,7 +593,7 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode( WorldPacket & recv_data )
if(!unit->isSpiritService()) // it's not spirit service
return;
if (bg)
/* if (bg)
{
sBattleGroundMgr.SendAreaSpiritHealerQueryOpcode(_player, bg, guid);
}
@@ -605,8 +606,10 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode( WorldPacket & recv_data )
pvpWG->SendAreaSpiritHealerQueryOpcode(_player, guid);
}
}
*/
}
void WorldSession::HandleAreaSpiritHealerQueueOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE");
@@ -623,7 +626,7 @@ void WorldSession::HandleAreaSpiritHealerQueueOpcode( WorldPacket & recv_data )
if(!unit->isSpiritService()) // it's not spirit service
return;
if (bg)
/* if (bg)
{
bg->AddPlayerToResurrectQueue(guid, _player->GetGUID());
}
@@ -637,9 +640,10 @@ void WorldSession::HandleAreaSpiritHealerQueueOpcode( WorldPacket & recv_data )
}
}
*/
}
void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_BATTLEMASTER_JOIN_ARENA");
-3
View File
@@ -198,8 +198,6 @@ SET(game_STAT_SRCS
OutdoorPvPTF.h
OutdoorPvPZM.cpp
OutdoorPvPZM.h
OutdoorPvPWG.cpp
OutdoorPvPWG.h
Path.h
PetAI.cpp
PetAI.h
@@ -745,7 +743,6 @@ if (DO_SCRIPTS)
../scripts/northrend/icecrown.cpp
../scripts/northrend/sholazar_basin.cpp
../scripts/northrend/storm_peaks.cpp
../scripts/northrend/wintergrasp.cpp
../scripts/northrend/zuldrak.cpp
../scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
../scripts/outland/auchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp
-13
View File
@@ -606,17 +606,6 @@ ChatCommand * ChatHandler::getCommandTable()
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand wintergraspCommandTable[] =
{
{ "status", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWintergraspStatusCommand, "", NULL },
{ "enable", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWintergraspEnableCommand, "", NULL },
{ "start", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWintergraspStartCommand, "", NULL },
{ "stop", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWintergraspStopCommand, "", NULL },
{ "switch", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWintergraspSwitchTeamCommand, "", NULL },
{ "timer", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWintergraspTimerCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand wpCommandTable[] =
{
{ "show", SEC_GAMEMASTER, false, &ChatHandler::HandleWpShowCommand, "", NULL },
@@ -743,8 +732,6 @@ ChatCommand * ChatHandler::getCommandTable()
{ "bindsight", SEC_ADMINISTRATOR, false, &ChatHandler::HandleBindSightCommand, "", NULL },
{ "unbindsight", SEC_ADMINISTRATOR, false, &ChatHandler::HandleUnbindSightCommand, "", NULL },
{ "playall", SEC_ADMINISTRATOR, false, &ChatHandler::HandlePlayAllCommand, "", NULL },
{ "wg", SEC_ADMINISTRATOR, false, NULL, "", wintergraspCommandTable },
{ NULL, 0, false, NULL, "", NULL }
};
-146
View File
@@ -40,7 +40,6 @@
#include <fstream>
#include <map>
#include "GlobalEvents.h"
#include "OutdoorPvPWG.h"
#include "OutdoorPvPMgr.h"
#include "TargetedMovementGenerator.h" // for HandleNpcUnFollowCommand
@@ -4243,148 +4242,3 @@ bool ChatHandler::HandleNpcSetLinkCommand(const char* args)
PSendSysMessage("LinkGUID '%u' added to creature with DBTableGUID: '%u'", linkguid, pCreature->GetDBTableGUIDLow());
return true;
}
bool ChatHandler::HandleWintergraspStatusCommand(const char* args)
{
OutdoorPvPWG *pvpWG = (OutdoorPvPWG*)sOutdoorPvPMgr.GetOutdoorPvPToZoneId(4197);
if (!pvpWG || !sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_ENABLED))
{
SendSysMessage(LANG_BG_WG_DISABLE);
SetSentErrorMessage(true);
return false;
}
PSendSysMessage(LANG_BG_WG_STATUS, objmgr.GetTrinityStringForDBCLocale(
pvpWG->getDefenderTeam() == TEAM_ALLIANCE ? LANG_BG_AB_ALLY : LANG_BG_AB_HORDE),
secsToTimeString(pvpWG->GetTimer(), true).c_str(),
pvpWG->isWarTime() ? "Yes" : "No",
pvpWG->GetNumPlayersH(),
pvpWG->GetNumPlayersA());
return true;
}
bool ChatHandler::HandleWintergraspStartCommand(const char* args)
{
OutdoorPvPWG *pvpWG = (OutdoorPvPWG*)sOutdoorPvPMgr.GetOutdoorPvPToZoneId(4197);
if (!pvpWG || !sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_ENABLED))
{
SendSysMessage(LANG_BG_WG_DISABLE);
SetSentErrorMessage(true);
return false;
}
pvpWG->forceStartBattle();
PSendSysMessage(LANG_BG_WG_BATTLE_FORCE_START);
return true;
}
bool ChatHandler::HandleWintergraspStopCommand(const char* args)
{
OutdoorPvPWG *pvpWG = (OutdoorPvPWG*)sOutdoorPvPMgr.GetOutdoorPvPToZoneId(4197);
if (!pvpWG || !sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_ENABLED))
{
SendSysMessage(LANG_BG_WG_DISABLE);
SetSentErrorMessage(true);
return false;
}
pvpWG->forceStopBattle();
PSendSysMessage(LANG_BG_WG_BATTLE_FORCE_STOP);
return true;
}
bool ChatHandler::HandleWintergraspEnableCommand(const char* args)
{
if(!*args)
return false;
OutdoorPvPWG *pvpWG = (OutdoorPvPWG*)sOutdoorPvPMgr.GetOutdoorPvPToZoneId(4197);
if (!pvpWG || !sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_ENABLED))
{
SendSysMessage(LANG_BG_WG_DISABLE);
SetSentErrorMessage(true);
return false;
}
if (!strncmp(args, "on", 3))
{
if (!sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_ENABLED))
{
pvpWG->forceStopBattle();
sWorld.setConfig(CONFIG_OUTDOORPVP_WINTERGRASP_ENABLED, true);
}
PSendSysMessage(LANG_BG_WG_ENABLE);
return true;
}
else if (!strncmp(args, "off", 4))
{
if (sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_ENABLED))
{
pvpWG->forceStopBattle();
sWorld.setConfig(CONFIG_OUTDOORPVP_WINTERGRASP_ENABLED, false);
}
PSendSysMessage(LANG_BG_WG_DISABLE);
return true;
}
else
{
SendSysMessage(LANG_USE_BOL);
SetSentErrorMessage(true);
return false;
}
}
bool ChatHandler::HandleWintergraspTimerCommand(const char* args)
{
if(!*args)
return false;
OutdoorPvPWG *pvpWG = (OutdoorPvPWG*)sOutdoorPvPMgr.GetOutdoorPvPToZoneId(4197);
if (!pvpWG)
{
SendSysMessage(LANG_BG_WG_DISABLE);
SetSentErrorMessage(true);
return false;
}
int32 time = atoi (args);
// Min value 1 min
if (1 > time)
time = 1;
// Max value during wartime = 60. No wartime = 1440 (day)
if (pvpWG->isWarTime())
{
if (60 < time)
return false;
}
else
if (1440 < time)
return false;
time *= MINUTE * IN_MILISECONDS;
pvpWG->setTimer((uint32)time);
PSendSysMessage(LANG_BG_WG_CHANGE_TIMER, secsToTimeString(pvpWG->GetTimer(), true).c_str());
return true;
}
bool ChatHandler::HandleWintergraspSwitchTeamCommand(const char* args)
{
OutdoorPvPWG *pvpWG = (OutdoorPvPWG*)sOutdoorPvPMgr.GetOutdoorPvPToZoneId(4197);
if (!pvpWG)
{
SendSysMessage(LANG_BG_WG_DISABLE);
SetSentErrorMessage(true);
return false;
}
uint32 timer = pvpWG->GetTimer();
pvpWG->forceChangeTeam();
pvpWG->setTimer(timer);
PSendSysMessage(LANG_BG_WG_SWITCH_FACTION, GetTrinityString(pvpWG->getDefenderTeam() == TEAM_ALLIANCE ? LANG_BG_AB_ALLY : LANG_BG_AB_HORDE));
return true;
}
-14
View File
@@ -23,7 +23,6 @@
#include "OutdoorPvPZM.h"
#include "OutdoorPvPSI.h"
#include "OutdoorPvPEP.h"
#include "OutdoorPvPWG.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "Policies/SingletonImp.h"
@@ -126,19 +125,6 @@ void OutdoorPvPMgr::InitOutdoorPvP()
m_OutdoorPvPSet.push_back(pOP);
sLog.outDebug("OutdoorPvP : EP successfully initiated.");
}
pOP = new OutdoorPvPWG;
// respawn, init variables
if(!pOP->SetupOutdoorPvP())
{
sLog.outDebug("OutdoorPvP : Wintergrasp init failed.");
delete pOP;
}
else
{
m_OutdoorPvPSet.push_back(pOP);
sLog.outDebug("OutdoorPvP : Wintergrasp successfully initiated.");
}
}
void OutdoorPvPMgr::AddZone(uint32 zoneid, OutdoorPvP *handle)
-2
View File
@@ -382,7 +382,6 @@ extern void AddSC_howling_fjord();
extern void AddSC_icecrown();
extern void AddSC_sholazar_basin();
extern void AddSC_storm_peaks();
extern void AddSC_wintergrasp();
extern void AddSC_zuldrak();
//outland
@@ -847,7 +846,6 @@ void AddScripts()
AddSC_icecrown();
AddSC_sholazar_basin();
AddSC_storm_peaks();
AddSC_wintergrasp();
AddSC_zuldrak();
//outland
-95
View File
@@ -1,95 +0,0 @@
/* Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "ScriptedPch.h"
#include "OutdoorPvPWG.h"
#define GOSSIP_HELLO_DEMO1 "Build catapult."
#define GOSSIP_HELLO_DEMO2 "Build demolisher."
#define GOSSIP_HELLO_DEMO3 "Build siege engine."
#define GOSSIP_HELLO_DEMO4 "I cannot build more!"
struct TRINITY_DLL_DECL npc_demolisher_engineererAI : public ScriptedAI
{
npc_demolisher_engineererAI(Creature* pCreature) : ScriptedAI(pCreature)
{
me->SetReactState(REACT_PASSIVE);
}
/*
void JustDied(Unit *killer)
{
if(me->GetZoneScript())
me->GetZoneScript()->SetData(DATA_ENGINEER_DIE, me->GetDBTableGUIDLow());
}
*/
};
CreatureAI* GetAI_npc_demolisher_engineerer(Creature* pCreature)
{
return new npc_demolisher_engineererAI (pCreature);
}
bool GossipHello_npc_demolisher_engineerer(Player* pPlayer, Creature* pCreature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if(pPlayer->isGameMaster() || pCreature->GetZoneScript() && pCreature->GetZoneScript()->GetData(pCreature->GetDBTableGUIDLow()))
{
if (pPlayer->HasAura(SPELL_CORPORAL))
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
else if (pPlayer->HasAura(SPELL_LIEUTENANT))
{
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
}
}
else
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9);
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
return true;
}
bool GossipSelect_npc_demolisher_engineerer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
pPlayer->CLOSE_GOSSIP_MENU();
if(pPlayer->isGameMaster() || pCreature->GetZoneScript() && pCreature->GetZoneScript()->GetData(pCreature->GetDBTableGUIDLow()))
{
switch(uiAction - GOSSIP_ACTION_INFO_DEF)
{
case 0: pPlayer->CastSpell(pPlayer, 56663, false, NULL, NULL, pCreature->GetGUID()); break;
case 1: pPlayer->CastSpell(pPlayer, 56575, false, NULL, NULL, pCreature->GetGUID()); break;
case 2: pPlayer->CastSpell(pPlayer, pPlayer->GetTeamId() ? 61408 : 56661, false, NULL, NULL, pCreature->GetGUID()); break;
}
}
return true;
}
void AddSC_wintergrasp()
{
Script *newscript;
newscript = new Script;
newscript->Name = "npc_demolisher_engineerer";
newscript->GetAI = &GetAI_npc_demolisher_engineerer;
newscript->pGossipHello = &GossipHello_npc_demolisher_engineerer;
newscript->pGossipSelect = &GossipSelect_npc_demolisher_engineerer;
newscript->RegisterSelf();
}
-70
View File
@@ -2083,65 +2083,6 @@ Ra.Secure = 1
# Default: 0 = Only 1 Guild Master per guild
# 1 = Allow more than one Guild Master
#
# OutdoorPvP.Wintergrasp.Enabled
# Determines whether the Wintergrasp battle is enabled or not.
# Default: 0 = Disable
# 1 = Enable
#
# OutdoorPvP.Wintergrasp.StartTime
# The start time of the first battle after server starts (in minutes)
# Default: 30
#
# OutdoorPvP.Wintergrasp.BattleTime
# Time limit of a battle (in minutes)
# Default: 30
#
# OutdoorPvP.Wintergrasp.Interval
# Interval between battles (in minutes)
# Default: 150
#
# OutdoorPvP.Wintergrasp.CustomHonorRewards
# Defines whether custom honor rewards should be given to player
# for partaking in the Wintergrasp Battle.
# Default: 0 = Disable
# 1 = Enable
#
# OutdoorPvP.Wintergrasp.CustomHonorBattleWin
# Defines the amount of honor points that should be given to the
# team winning the Wintergrasp Battle.
# Requires OutdoorPvP.Wintergrasp.CustomHonorRewards = 1.
# Default: 3000
#
# OutdoorPvP.Wintergrasp.CustomHonorBattleLose
# Defines the amount of honor points that should be given to the
# team losing the Wintergrasp Battle.
# Requires OutdoorPvP.Wintergrasp.CustomHonorRewards = 1.
# Default: 1250
#
# OutdoorPvP.Wintergrasp.CustomHonorDamageTower
# Defines the amount of honor points that should be given to the
# team for damaging a tower.
# Requires OutdoorPvP.Wintergrasp.CustomHonorRewards = 1.
# Default: 750
#
# OutdoorPvP.Wintergrasp.CustomHonorDestroyedTower
# Defines the amount of honor points that should be given to the
# team for destroying a tower.
# Requires OutdoorPvP.Wintergrasp.CustomHonorRewards = 1.
# Default: 750
#
# OutdoorPvP.Wintergrasp.CustomHonorDamagedBuilding
# Defines the amount of honor points that should be given to the
# team for damaged buildings after the battle.
# Requires OutdoorPvP.Wintergrasp.CustomHonorRewards = 1.
# Default: 750
#
# OutdoorPvP.Wintergrasp.CustomHonorIntactBuilding
# Defines the amount of honor points that should be given to the
# team for intact buildings after the battle.
# Requires OutdoorPvP.Wintergrasp.CustomHonorRewards = 1.
# Default: 1500
#
# ForbiddenMaps
# Map ids that users below SEC_GAMEMASTER cannot enter,
# with delimiter ','
@@ -2187,17 +2128,6 @@ PvPToken.MapAllowType = 4
PvPToken.ItemID = 29434
PvPToken.ItemCount = 1
Guild.AllowMultipleGuildMaster = 0
OutdoorPvP.Wintergrasp.Enabled = 0
OutdoorPvP.Wintergrasp.StartTime = 30
OutdoorPvP.Wintergrasp.BattleTime = 30
OutdoorPvP.Wintergrasp.Interval = 150
OutdoorPvP.Wintergrasp.CustomHonorRewards = 0
OutdoorPvP.Wintergrasp.CustomHonorBattleWin = 3000
OutdoorPvP.Wintergrasp.CustomHonorBattleLose = 1250
OutdoorPvP.Wintergrasp.CustomHonorDamageTower = 750
OutdoorPvP.Wintergrasp.CustomHonorDestroyedTower = 750
OutdoorPvP.Wintergrasp.CustomHonorDamagedBuilding = 750
OutdoorPvP.Wintergrasp.CustomHonorIntactBuilding = 1500
NoResetTalentsCost = 0
ShowKickInWorld = 0
RecordUpdateTimeDiffInterval = 60000