*Some work on wintergrasp. Player can get ranks by killing other players and can build vehicles at workshop. Vehicles can be used to destroy buildings. Except these no other thing is done.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-22 10:29:48 -05:00
parent 4ba955c4eb
commit ab5b273d3c
30 changed files with 2700 additions and 2105 deletions
+1
View File
@@ -477,6 +477,7 @@ SET(trinityscript_LIB_SRCS
scripts/zone/vault_of_archavon/instance_vault_of_archavon.cpp
scripts/zone/vault_of_archavon/boss_archavon.cpp
scripts/zone/vault_of_archavon/def_vault_of_archavon.h
scripts/zone/wintergrasp/wintergrasp.cpp
system.cpp
)
+6
View File
@@ -628,6 +628,9 @@ extern void AddSC_zulaman();
//Vault of Archavon
extern void AddSC_boss_archavon();
//Region
extern void AddSC_wintergrasp();
// -------------------
void LoadDatabase()
{
@@ -1510,6 +1513,9 @@ void ScriptsInit(char const* cfg_file = "trinitycore.conf")
//Vault of Archavon
AddSC_boss_archavon();
//Region
AddSC_wintergrasp();
// -------------------
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
File diff suppressed because it is too large Load Diff
@@ -457,14 +457,14 @@
RelativePath="..\scripts\npc\npc_professions.cpp"
>
</File>
<File
RelativePath="..\scripts\npc\npc_taxi.cpp"
>
</File>
<File
RelativePath="..\scripts\npc\npcs_special.cpp"
>
</File>
<File
RelativePath="..\scripts\npc\npc_taxi.cpp"
>
</File>
</Filter>
<Filter
Name="servers"
@@ -1972,7 +1972,7 @@
</File>
<File
RelativePath="..\scripts\zone\hellfire_citadel\hellfire_ramparts\def_hellfire_ramparts.h"
>
>
</File>
<File
RelativePath="..\scripts\zone\hellfire_citadel\hellfire_ramparts\instance_hellfire_ramparts.cpp"
@@ -2414,6 +2414,10 @@
<Filter
Name="Wintergrasp"
>
<File
RelativePath="..\scripts\zone\wintergrasp\wintergrasp.cpp"
>
</File>
</Filter>
<Filter
Name="Icecrown"
@@ -0,0 +1,60 @@
/* 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 "precompiled.h"
#include "Wintergrasp.h"
bool GossipHello_npc_demolisher_engineerer(Player *player, Creature *_creature)
{
if(_creature->isQuestGiver())
player->PrepareQuestMenu(_creature->GetGUID());
if(player->HasAura(SPELL_CORPORAL))
player->ADD_GOSSIP_ITEM(0, "Build catapult.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
else if(player->HasAura(SPELL_LIEUTENANT))
{
player->ADD_GOSSIP_ITEM(0, "Build catapult.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
player->ADD_GOSSIP_ITEM(0, "Build demolisher.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->ADD_GOSSIP_ITEM(0, "Build siege engine.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
}
player->SEND_GOSSIP_MENU(_creature->GetNpcTextId(), _creature->GetGUID());
return true;
}
bool GossipSelect_npc_demolisher_engineerer(Player* player, Creature* me, uint32 uiSender, uint32 uiAction)
{
player->CLOSE_GOSSIP_MENU();
switch(uiAction - GOSSIP_ACTION_INFO_DEF)
{
case 0: player->CastSpell(player, 56663, false); break;
case 1: player->CastSpell(player, 56575, false); break;
case 2: player->CastSpell(player, TEAM_ID(player->GetTeam()) ? 61408 : 56661, false); break;
}
return true;
}
void AddSC_wintergrasp()
{
Script *newscript;
newscript = new Script;
newscript->Name = "npc_demolisher_engineerer";
newscript->pGossipHello = &GossipHello_npc_demolisher_engineerer;
newscript->pGossipSelect = &GossipSelect_npc_demolisher_engineerer;
newscript->RegisterSelf();
}