*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
+4 -3
View File
@@ -38,6 +38,7 @@
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
#include "CellImpl.h"
#include "ScriptMgr.h"
class Aura;
//
@@ -2189,7 +2190,7 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
triggerTarget = target; //for druid dispel poison
target->CastSpell(triggerTarget, triggeredSpellInfo, true, 0, this, GetCasterGUID());
}
else if(target->GetTypeId()!=TYPEID_UNIT || !Script->EffectDummyCreature(caster, GetId(), GetEffIndex(), (Creature*)target))
else if(target->GetTypeId()!=TYPEID_UNIT || !sScriptMgr.EffectDummyCreature(caster, GetId(), GetEffIndex(), (Creature*)target))
sLog.outError("AuraEffect::TriggerSpell: Spell %u have 0 in EffectTriggered[%d], not handled custom case?",GetId(),GetEffIndex());
}
@@ -6007,13 +6008,13 @@ void AuraEffect::HandleAuraModFaction(AuraApplication const * aurApp, uint8 mode
if(apply)
{
target->setFaction(GetMiscValue());
if(target->GetTypeId()==TYPEID_PLAYER)
if(target->GetTypeId()==TYPEID_PLAYER)
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
}
else
{
target->RestoreFaction();
if(target->GetTypeId()==TYPEID_PLAYER)
if(target->GetTypeId()==TYPEID_PLAYER)
target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
}
}