*Integrate Script system to Core

-added ScriptMgr for loading scripts
-removed bindings
-moved script system to src/game
-moved scripts to src/scripts
-VC project files updated
-cmakes updated (not 100% done yet)

NOTE to Devs:
-file locations changed
-precompiled renamed to ScriptedPch
-ecsort_ai renamed to ScriptedEscortAI
-follower_ai renamed to ScriptedFollowerAI
-guard_ai renamed to ScriptedGuardAI
-simple_ai renamed to ScriptedSimpleAI
-sc_creature renamed to ScriptedCreature
-sc_gossip renamed to ScriptedGossip
-sc_instance  renamed to ScriptedInstance

*use the new headers in scripts, thank you

NOTE to ALL:
cmake not fully tested, please report any errors with it
could make creashes, incompability
USE AT YOUR OWN RISK before further tests!!

--HG--
branch : trunk
This commit is contained in:
Rat
2010-01-19 11:36:05 +01:00
parent f5dea61b66
commit 0cc053ea4d
601 changed files with 3908 additions and 7245 deletions
+120
View File
@@ -0,0 +1,120 @@
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* 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
*/
/* ScriptData
SDName: Areatrigger_Scripts
SD%Complete: 100
SDComment: Scripts for areatriggers
SDCategory: Areatrigger
EndScriptData */
/* ContentData
at_coilfang_waterfall 4591
at_legion_teleporter 4560 Teleporter TO Invasion Point: Cataclysm
at_ravenholdt
at_warsong_slaughterhouse
at_warsong_grainery
at_torp_farm
EndContentData */
#include "ScriptedPch.h"
/*######
## at_coilfang_waterfall
######*/
enum eCoilfangGOs
{
GO_COILFANG_WATERFALL = 184212
};
bool AreaTrigger_at_coilfang_waterfall(Player *pPlayer, const AreaTriggerEntry *pAt)
{
if (GameObject* pGo = GetClosestGameObjectWithEntry(pPlayer, GO_COILFANG_WATERFALL, 35.0f))
if (pGo->getLootState() == GO_READY)
pGo->UseDoorOrButton();
return false;
}
/*#####
## at_legion_teleporter
#####*/
enum eLegionTeleporter
{
SPELL_TELE_A_TO = 37387,
QUEST_GAINING_ACCESS_A = 10589,
SPELL_TELE_H_TO = 37389,
QUEST_GAINING_ACCESS_H = 10604
};
bool AreaTrigger_at_legion_teleporter(Player *pPlayer, const AreaTriggerEntry *pAt)
{
if (pPlayer->isAlive() && !pPlayer->isInCombat())
{
if (pPlayer->GetTeam() == ALLIANCE && pPlayer->GetQuestRewardStatus(QUEST_GAINING_ACCESS_A))
{
pPlayer->CastSpell(pPlayer, SPELL_TELE_A_TO, false);
return true;
}
if (pPlayer->GetTeam() == HORDE && pPlayer->GetQuestRewardStatus(QUEST_GAINING_ACCESS_H))
{
pPlayer->CastSpell(pPlayer, SPELL_TELE_H_TO, false);
return true;
}
return false;
}
return false;
}
enum eRavenholdt
{
QUEST_MANOR_RAVENHOLDT = 6681,
NPC_RAVENHOLDT = 13936
};
bool AreaTrigger_at_ravenholdt(Player* pPlayer, const AreaTriggerEntry* pAt)
{
if (pPlayer->GetQuestStatus(QUEST_MANOR_RAVENHOLDT) == QUEST_STATUS_INCOMPLETE)
pPlayer->KilledMonsterCredit(NPC_RAVENHOLDT, 0);
return false;
}
void AddSC_areatrigger_scripts()
{
Script *newscript;
newscript = new Script;
newscript->Name = "at_coilfang_waterfall";
newscript->pAreaTrigger = &AreaTrigger_at_coilfang_waterfall;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "at_legion_teleporter";
newscript->pAreaTrigger = &AreaTrigger_at_legion_teleporter;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "at_ravenholdt";
newscript->pAreaTrigger = &AreaTrigger_at_ravenholdt;
newscript->RegisterSelf();
}