diff options
| -rw-r--r-- | sql/updates/636_world_scripts.sql | 9 | ||||
| -rw-r--r-- | src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp | 2 | ||||
| -rw-r--r-- | src/bindings/scripts/scripts/zone/blackrock_depths/instance_blackrock_depths.cpp | 1 | ||||
| -rw-r--r-- | src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h | 1 | ||||
| -rw-r--r-- | src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp | 13 | ||||
| -rw-r--r-- | src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp | 211 | ||||
| -rw-r--r-- | src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp | 30 | ||||
| -rw-r--r-- | src/game/Spell.cpp | 44 | ||||
| -rw-r--r-- | src/game/Spell.h | 2 | ||||
| -rw-r--r-- | src/game/SpellAuras.cpp | 18 | ||||
| -rw-r--r-- | src/game/SpellMgr.cpp | 23 | ||||
| -rw-r--r-- | src/game/SpellMgr.h | 1 | ||||
| -rw-r--r-- | win/VC80/TrinityCore.vcproj | 515 |
13 files changed, 830 insertions, 40 deletions
diff --git a/sql/updates/636_world_scripts.sql b/sql/updates/636_world_scripts.sql new file mode 100644 index 00000000000..5527d639fb2 --- /dev/null +++ b/sql/updates/636_world_scripts.sql @@ -0,0 +1,9 @@ +-- event script for Medivh's Journal +delete from event_scripts where id = 10951; +insert into event_scripts values +(10951,0,10,17651, 300000, 0,-11159,-1907.22,91.48,0); + +-- remove every Image from Medivh (should not be spawned by db) +delete from creature where id = 17651; +-- add script +update creature_template set scriptname = 'npc_image_of_medivh' where entry = 17651;
\ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp index 96956b864da..4f01ea56348 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp @@ -258,7 +258,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI m_creature->AddThreat(who, 1.0f); } - if(!InCombat && !Intro && m_creature->IsWithinDistInMap(who, 200.0f) && (who->GetTypeId() == TYPEID_PLAYER)) + if(!InCombat && !Intro && m_creature->IsWithinDistInMap(who, 60.0f) && (who->GetTypeId() == TYPEID_PLAYER)) { if(pInstance) pInstance->SetData(DATA_TERONGOREFIENDEVENT, IN_PROGRESS); diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/instance_blackrock_depths.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/instance_blackrock_depths.cpp index 25f3a4dc079..aa89d902573 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/instance_blackrock_depths.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/instance_blackrock_depths.cpp @@ -29,7 +29,6 @@ update `creature_template` set `npcflag`='1',`ScriptName`='npc_tobias_seecher' w update `instance_template` set `script`='instance_blackrock_depths' where `map`='230'; */ -#include "GameObject.h" #include "precompiled.h" #include "def_blackrock_depths.h" diff --git a/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h b/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h index df39785f555..78c1c488637 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h +++ b/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h @@ -30,6 +30,7 @@ #define DATA_GAMEOBJECT_NETHER_DOOR 23 #define DATA_GAMEOBJECT_GAME_DOOR 24 #define DATA_GAMEOBJECT_GAME_EXIT_DOOR 25 +#define DATA_IMAGE_OF_MEDIVH 26 // Opera Performances #define EVENT_OZ 1 diff --git a/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp b/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp index 0ca3835d976..5af12a4fb0b 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp @@ -61,6 +61,8 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance uint64 GamesmansExitDoor; // Door after Chess uint64 NetherspaceDoor; // Door at Malchezaar + uint64 ImageGUID; + void Initialize() { for (uint8 i = 0; i < ENCOUNTERS; ++i) @@ -82,6 +84,8 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance GamesmansDoor = 0; GamesmansExitDoor = 0; NetherspaceDoor = 0; + + ImageGUID = 0; } bool IsEncounterInProgress() const @@ -111,6 +115,7 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance case DATA_NIGHTBANE_EVENT: return Encounters[11]; case DATA_OPERA_PERFORMANCE: return OperaEvent; case DATA_OPERA_OZ_DEATHCOUNT: return OzDeathCount; + case DATA_IMAGE_OF_MEDIVH: return ImageGUID; } return 0; @@ -174,6 +179,14 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance SaveToDB(); } + void SetData64(uint32 identifier, uint64 data) + { + switch(identifier) + { + case DATA_IMAGE_OF_MEDIVH: ImageGUID = data; + } + } + void OnObjectCreate(GameObject* go) { switch(go->GetEntry()) diff --git a/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp b/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp index adda6eefa98..bb44dd55cc0 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp @@ -17,13 +17,14 @@ /* ScriptData SDName: Karazhan SD%Complete: 100 -SDComment: Support for Barnes (Opera controller) and Berthold (Doorman). +SDComment: Support for Barnes (Opera controller) and Berthold (Doorman), Support for Quest 9645. SDCategory: Karazhan EndScriptData */ /* ContentData npc_barnes npc_berthold +npc_image_of_medivh EndContentData */ #include "precompiled.h" @@ -432,6 +433,209 @@ bool GossipSelect_npc_berthold(Player* player, Creature* _Creature, uint32 sende return true; } +/*### +# npc_image_of_medivh +####*/ + +#define SAY_DIALOG_MEDIVH_1 "You've got my attention, dragon. You'll find I'm not as easily scared as the villagers below." +#define SAY_DIALOG_ARCANAGOS_2 "Your dabbling in the arcane has gone too far, Medivh. You've attracted the attention of powers beyond your understanding. You must leave Karazhan at once!" +#define SAY_DIALOG_MEDIVH_3 "You dare challenge me at my own dwelling? Your arrogance is astounding, even for a dragon!" +#define SAY_DIALOG_ARCANAGOS_4 "A dark power seeks to use you, Medivh! If you stay, dire days will follow. You must hurry, we don't have much time!" +#define SAY_DIALOG_MEDIVH_5 "I do not know what you speak of, dragon... but I will not be bullied by this display of insolence. I'll leave Karazhan when it suits me!" +#define SAY_DIALOG_ARCANAGOS_6 "You leave me no alternative. I will stop you by force if you won't listen to reason!" +#define EMOTE_DIALOG_MEDIVH_7 "begins to cast a spell of great power, weaving his own essence into the magic." +#define SAY_DIALOG_ARCANAGOS_8 "What have you done, wizard? This cannot be! I'm burning from... within!" +#define SAY_DIALOG_MEDIVH_9 "He should not have angered me. I must go... recover my strength now..." + +#define MOB_ARCANAGOS 17652 +#define SPELL_FIRE_BALL 30967 +#define SPELL_UBER_FIREBALL 30971 +#define SPELL_CONFLAGRATION_BLAST 30977 +#define SPELL_MANA_SHIELD 31635 + +static float MedivPos[4] = {-11161.49,-1902.24,91.48,1.94}; +static float ArcanagosPos[4] = {-11169.75,-1881.48,95.39,4.83}; + +struct TRINITY_DLL_DECL npc_image_of_medivhAI : public ScriptedAI +{ + npc_image_of_medivhAI(Creature* c) : ScriptedAI(c) + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + Reset(); + } + + ScriptedInstance *pInstance; + + uint64 ArcanagosGUID; + + uint32 YellTimer; + uint32 Step; + uint32 FireMedivhTimer; + uint32 FireArcanagosTimer; + + bool EventStarted; + + void Reset() + { + ArcanagosGUID = 0; + + if(pInstance && pInstance->GetData64(DATA_IMAGE_OF_MEDIVH) == 0) + { + pInstance->SetData64(DATA_IMAGE_OF_MEDIVH, m_creature->GetGUID()); + (*m_creature).GetMotionMaster()->MovePoint(1,MedivPos[0],MedivPos[1],MedivPos[2]); + Step = 0; + }else + { + m_creature->DealDamage(m_creature,m_creature->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_creature->RemoveCorpse(); + } + } + void Aggro(Unit* who){} + + void MovementInform(uint32 type, uint32 id) + { + if(type != POINT_MOTION_TYPE) + return; + if(id == 1) + { + StartEvent(); + m_creature->SetOrientation(MedivPos[3]); + m_creature->SetOrientation(MedivPos[3]); + } + } + + void StartEvent() + { + Step = 1; + EventStarted = true; + Creature* Arcanagos = m_creature->SummonCreature(MOB_ARCANAGOS,ArcanagosPos[0],ArcanagosPos[1],ArcanagosPos[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + ArcanagosGUID = Arcanagos->GetGUID(); + Arcanagos->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING); + (*Arcanagos).GetMotionMaster()->MovePoint(0,ArcanagosPos[0],ArcanagosPos[1],ArcanagosPos[2]); + Arcanagos->SetOrientation(ArcanagosPos[3]); + m_creature->SetOrientation(MedivPos[3]); + YellTimer = 10000; + } + + + uint32 NextStep(uint32 Step) + { + Unit* arca = Unit::GetUnit((*m_creature),ArcanagosGUID); + Map *map = m_creature->GetMap(); + switch(Step) + { + case 0: return 9999999; + case 1: + m_creature->Yell(SAY_DIALOG_MEDIVH_1,LANG_UNIVERSAL,NULL); + return 10000; + case 2: + if(arca) + ((Creature*)arca)->Yell(SAY_DIALOG_ARCANAGOS_2,LANG_UNIVERSAL,NULL); + return 20000; + case 3: + m_creature->Yell(SAY_DIALOG_MEDIVH_3,LANG_UNIVERSAL,NULL); + return 10000; + case 4: + if(arca) + ((Creature*)arca)->Yell(SAY_DIALOG_ARCANAGOS_4, LANG_UNIVERSAL, NULL); + return 20000; + case 5: + m_creature->Yell(SAY_DIALOG_MEDIVH_5, LANG_UNIVERSAL, NULL); + return 20000; + case 6: + if(arca) + ((Creature*)arca)->Yell(SAY_DIALOG_ARCANAGOS_6, LANG_UNIVERSAL, NULL); + return 10000; + case 7: + FireArcanagosTimer = 500; + return 5000; + case 8: + FireMedivhTimer = 500; + DoCast(m_creature, SPELL_MANA_SHIELD); + return 10000; + case 9: + m_creature->TextEmote(EMOTE_DIALOG_MEDIVH_7, 0, false); + return 10000; + case 10: + if(arca) + m_creature->CastSpell(arca, SPELL_CONFLAGRATION_BLAST, false); + return 1000; + case 11: + if(arca) + ((Creature*)arca)->Yell(SAY_DIALOG_ARCANAGOS_8, LANG_UNIVERSAL, NULL); + return 5000; + case 12: + arca->GetMotionMaster()->MovePoint(0, -11010.82,-1761.18, 156.47); + arca->setActive(true); + arca->InterruptNonMeleeSpells(true); + arca->SetSpeed(MOVE_FLIGHT, 2.0f); + return 10000; + case 13: + m_creature->Yell(SAY_DIALOG_MEDIVH_9, LANG_UNIVERSAL, NULL); + return 10000; + case 14: + m_creature->SetVisibility(VISIBILITY_OFF); + m_creature->ClearInCombat(); + + if(map->IsDungeon()) + { + InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); + for (InstanceMap::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + if(i->getSource()->isAlive()) + { + if(i->getSource()->GetQuestStatus(9645) == QUEST_STATUS_INCOMPLETE) + i->getSource()->CompleteQuest(9645); + } + } + } + return 50000; + case 15: + arca->DealDamage(arca,arca->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + return 5000; + default : return 9999999; + } + + } + + void UpdateAI(const uint32 diff) + { + + if(YellTimer < diff) + { + if(EventStarted) + { + YellTimer = NextStep(Step++); + } + }else YellTimer -= diff; + + if(Step >= 7 && Step <= 12 ) + { + Unit* arca = Unit::GetUnit((*m_creature),ArcanagosGUID); + + if(FireArcanagosTimer < diff) + { + if(arca) + arca->CastSpell(m_creature, SPELL_FIRE_BALL, false); + FireArcanagosTimer = 6000; + }else FireArcanagosTimer -= diff; + + if(FireMedivhTimer < diff) + { + if(arca) + DoCast(arca, SPELL_FIRE_BALL); + FireMedivhTimer = 5000; + }else FireMedivhTimer -= diff; + + } + } +}; + +CreatureAI* GetAI_npc_image_of_medivh(Creature *_Creature) +{ + return new npc_image_of_medivhAI(_Creature); +} + void AddSC_karazhan() { Script* newscript; @@ -448,4 +652,9 @@ void AddSC_karazhan() newscript->pGossipHello = &GossipHello_npc_berthold; newscript->pGossipSelect = &GossipSelect_npc_berthold; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_image_of_medivh"; + newscript->GetAI = &GetAI_npc_image_of_medivh; + newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp b/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp index f9a90809c89..e68286d4f21 100644 --- a/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp +++ b/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp @@ -435,16 +435,30 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI DoYell(YELL_SURGE, LANG_UNIVERSAL, NULL); DoPlaySoundToSet(m_creature, SOUND_YELL_SURGE); - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 1); - if(!target) target = m_creature->getVictim(); + Unit *target = NULL; + std::list<HostilReference *> t_list = m_creature->getThreatManager().getThreatList(); + std::vector<Unit *> target_list; + for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + { + target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + //50 yard radius maximum + if(target && target->GetDistance2d(m_creature) < 50) + target_list.push_back(target); + target = NULL; + } + if(target_list.size()) + target = *(target_list.begin()+rand()%target_list.size()); + + if(!target) + target = m_creature->getVictim(); TankGUID = m_creature->getVictim()->GetGUID(); ChargeTargetGUID = target->GetGUID(); - - float x, y, z; - target->GetContactPoint(m_creature, x, y, z); - m_creature->SetSpeed(MOVE_RUN, 5.0f); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MovePoint(0, x, y, z); + + float x, y, z; + target->GetContactPoint(m_creature, x, y, z); + m_creature->SetSpeed(MOVE_RUN, 5.0f); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(0, x, y, z); Surge_Timer = 15000 + rand()%5000; return; diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 02763a38d64..576deea558e 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -404,13 +404,11 @@ Spell::~Spell() void Spell::FillTargetMap() { - // TODO: ADD the correct target FILLS!!!!!! - - for(uint32 i=0;i<3;i++) + for(uint32 i = 0; i < 3; ++i) { // not call for empty effect. // Also some spells use not used effect targets for store targets for dummy effect in triggered spells - if(m_spellInfo->Effect[i]==0) + if(!m_spellInfo->Effect[i]) continue; // TODO: find a way so this is not needed? @@ -419,23 +417,34 @@ void Spell::FillTargetMap() AddUnitTarget(m_caster, i); std::list<Unit*> tmpUnitMap; + uint32 targetA = m_spellInfo->EffectImplicitTargetA[i]; + uint32 targetB = m_spellInfo->EffectImplicitTargetB[i]; - SetTargetMap(i,m_spellInfo->EffectImplicitTargetA[i],tmpUnitMap); - SetTargetMap(i,m_spellInfo->EffectImplicitTargetB[i],tmpUnitMap); + if(targetA) + SetTargetMap(i, targetA, tmpUnitMap); + if(targetB) // In very rare case !A && B + SetTargetMap(i, targetB, tmpUnitMap); if(spellmgr.EffectTargetType[m_spellInfo->Effect[i]] != SPELL_REQUIRE_UNIT) { - if(spellmgr.EffectTargetType[m_spellInfo->Effect[i]] == SPELL_REQUIRE_DEST - && m_targets.HasDest() && m_spellInfo->speed > 0.0f) + if(spellmgr.EffectTargetType[m_spellInfo->Effect[i]] == SPELL_REQUIRE_DEST) + { + if(m_targets.HasDest() && m_spellInfo->speed > 0.0f) + { + float dist = m_caster->GetDistance(m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ); + if (dist < 5.0f) dist = 5.0f; + m_delayMoment = (uint64) floor(dist / m_spellInfo->speed * 1000.0f); + } + } + else if(spellmgr.EffectTargetType[m_spellInfo->Effect[i]] == SPELL_REQUIRE_ITEM) { - float dist = m_caster->GetDistance(m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ); - if (dist < 5.0f) dist = 5.0f; - m_delayMoment = (uint64) floor(dist / m_spellInfo->speed * 1000.0f); + if(m_targets.getItemTarget()) + AddItemTarget(m_targets.getItemTarget(), i); } continue; } - if(tmpUnitMap.empty()) + if(!targetA && !targetB) { // add here custom effects that need default target. // FOR EVERY TARGET TYPE THERE IS A DIFFERENT FILL!! @@ -502,12 +511,12 @@ void Spell::FillTargetMap() case SPELL_EFFECT_RESURRECT: case SPELL_EFFECT_CREATE_ITEM: case SPELL_EFFECT_TRIGGER_SPELL: - //case SPELL_EFFECT_TRIGGER_MISSILE: ?? case SPELL_EFFECT_SKILL_STEP: case SPELL_EFFECT_PROFICIENCY: case SPELL_EFFECT_SUMMON_OBJECT_WILD: case SPELL_EFFECT_SELF_RESURRECT: case SPELL_EFFECT_REPUTATION: + case SPELL_EFFECT_LEARN_SPELL: if(m_targets.getUnitTarget()) tmpUnitMap.push_back(m_targets.getUnitTarget()); else @@ -546,7 +555,7 @@ void Spell::FillTargetMap() if(Pet* pet = m_caster->GetPet()) tmpUnitMap.push_back(pet); break; - case SPELL_EFFECT_ENCHANT_ITEM: + /*case SPELL_EFFECT_ENCHANT_ITEM: case SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY: case SPELL_EFFECT_DISENCHANT: case SPELL_EFFECT_FEED_PET: @@ -554,7 +563,7 @@ void Spell::FillTargetMap() case SPELL_EFFECT_MILLING: if(m_targets.getItemTarget()) AddItemTarget(m_targets.getItemTarget(), i); - break; + break;*/ case SPELL_EFFECT_APPLY_AURA: switch(m_spellInfo->EffectApplyAuraName[i]) { @@ -2451,8 +2460,9 @@ void Spell::_handle_immediate_phase() { if(spellmgr.EffectTargetType[m_spellInfo->Effect[j]] == SPELL_REQUIRE_DEST) { - if(m_targets.HasDest()) - HandleEffects(m_originalCaster, NULL, NULL, j); + if(!m_targets.HasDest()) + m_targets.setDestination(m_caster, false); + HandleEffects(m_originalCaster, NULL, NULL, j); } else if(spellmgr.EffectTargetType[m_spellInfo->Effect[j]] == SPELL_REQUIRE_NONE) HandleEffects(m_originalCaster, NULL, NULL, j); diff --git a/src/game/Spell.h b/src/game/Spell.h index 093dde6be27..3d8dffef86b 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -468,7 +468,7 @@ class Spell Unit* m_caster; uint64 m_originalCasterGUID; // real source of cast (aura caster/etc), used for spell targets selection - // e.g. damage around area spell trigered by victim aura and da,age emeies of aura caster + // e.g. damage around area spell trigered by victim aura and damage enemies of aura caster Unit* m_originalCaster; // cached pointer for m_originalCaster, updated at Spell::UpdatePointers() Spell** m_selfContainer; // pointer to our spell container (if applicable) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 23a649042c8..541613ed2bb 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -353,14 +353,26 @@ m_periodicTimer(0), m_PeriodicEventId(0), m_AuraDRGroup(DIMINISHING_NONE) m_spellProto = spellproto; - m_currentBasePoints = currentBasePoints ? *currentBasePoints : m_spellProto->EffectBasePoints[eff]; + int32 damage; + if(currentBasePoints) + { + damage = *currentBasePoints; + m_currentBasePoints = damage - 1; + } + else + { + m_currentBasePoints = m_spellProto->EffectBasePoints[eff]; + if(caster) + damage = caster->CalculateSpellDamage(m_spellProto, m_effIndex, m_currentBasePoints, target); + else + damage = m_currentBasePoints + 1; + } m_isPassive = IsPassiveSpell(GetId()); m_positive = IsPositiveEffect(GetId(), m_effIndex); m_applyTime = time(NULL); - int32 damage; if(!caster) { m_caster_guid = target->GetGUID(); @@ -371,7 +383,7 @@ m_periodicTimer(0), m_PeriodicEventId(0), m_AuraDRGroup(DIMINISHING_NONE) { m_caster_guid = caster->GetGUID(); - damage = caster->CalculateSpellDamage(m_spellProto,m_effIndex,m_currentBasePoints,target); + //damage = caster->CalculateSpellDamage(m_spellProto,m_effIndex,m_currentBasePoints,target); m_maxduration = caster->CalculateSpellDuration(m_spellProto, m_effIndex, target); if (!damage && castItem && castItem->GetItemSuffixFactor()) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 52006dfb3cc..89cc4105bc6 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -61,11 +61,18 @@ SpellMgr::SpellMgr() case SPELL_EFFECT_PARRY: // 0 case SPELL_EFFECT_BLOCK: // 0 case SPELL_EFFECT_SKILL: // always with dummy 3 as A - case SPELL_EFFECT_LEARN_SPELL: // 0 + //case SPELL_EFFECT_LEARN_SPELL: // 0 may be 5 pet case SPELL_EFFECT_TRADE_SKILL: // 0 or 1 case SPELL_EFFECT_PROFICIENCY: // 0 EffectTargetType[i] = SPELL_REQUIRE_NONE; break; + case SPELL_EFFECT_ENCHANT_ITEM: + case SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY: + case SPELL_EFFECT_DISENCHANT: + case SPELL_EFFECT_FEED_PET: + case SPELL_EFFECT_PROSPECTING: + EffectTargetType[i] = SPELL_REQUIRE_ITEM; + break; default: EffectTargetType[i] = SPELL_REQUIRE_UNIT; break; @@ -1331,14 +1338,14 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool // return true; //use data of highest rank spell(needed for spells which ranks have different effects) - SpellEntry const *spellInfo1=sSpellStore.LookupEntry(GetLastSpellInChain(spellId_1)); - SpellEntry const *spellInfo2=sSpellStore.LookupEntry(GetLastSpellInChain(spellId_2)); + spellInfo_1=sSpellStore.LookupEntry(GetLastSpellInChain(spellId_1)); + spellInfo_2=sSpellStore.LookupEntry(GetLastSpellInChain(spellId_2)); //if spells have exactly the same effect they cannot stack for(uint32 i = 0; i < 3; ++i) - if(spellInfo1->Effect[i] != spellInfo2->Effect[i] - || spellInfo1->EffectApplyAuraName[i] != spellInfo2->EffectApplyAuraName[i] - || spellInfo1->EffectMiscValue[i] != spellInfo2->EffectMiscValue[i]) // paladin resist aura + if(spellInfo_1->Effect[i] != spellInfo_2->Effect[i] + || spellInfo_1->EffectApplyAuraName[i] != spellInfo_2->EffectApplyAuraName[i] + || spellInfo_1->EffectMiscValue[i] != spellInfo_2->EffectMiscValue[i]) // paladin resist aura return false; // need itemtype check? need an example to add that check return true; @@ -1430,8 +1437,8 @@ void SpellMgr::LoadSpellRequired() bar.step(); sLog.outString(); - sLog.outString( ">> Loaded 0 spell chain records" ); - sLog.outErrorDb("`spell_chains` table is empty!"); + sLog.outString( ">> Loaded 0 spell required records" ); + sLog.outErrorDb("`spell_required` table is empty!"); return; } uint32 rows = 0; diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index 239c728aa11..b085a90158f 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -258,6 +258,7 @@ enum SpellEffectTargetTypes SPELL_REQUIRE_NONE, SPELL_REQUIRE_UNIT, SPELL_REQUIRE_DEST, + SPELL_REQUIRE_ITEM, }; enum SpellSelectTargetTypes diff --git a/win/VC80/TrinityCore.vcproj b/win/VC80/TrinityCore.vcproj new file mode 100644 index 00000000000..6209bd3f9aa --- /dev/null +++ b/win/VC80/TrinityCore.vcproj @@ -0,0 +1,515 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="TrinityCore" + ProjectGUID="{A3A04E47-43A2-4C08-90B3-029CEF558594}" + RootNamespace="mangosd" + > + <Platforms> + <Platform + Name="Win32" + /> + <Platform + Name="x64" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory=".\trinitycore__$(PlatformName)_$(ConfigurationName)" + IntermediateDirectory=".\trinitycore__$(PlatformName)_$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\..\..\bin\Release\mangosd.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/MP" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\..\dep\include,..\..\src\framework,..\..\src\shared,..\..\src\game,..\..\src\trinitycore;..\..\dep\ACE_wrappers" + PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;NDEBUG;_CONSOLE;ENABLE_CLI" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + EnableEnhancedInstructionSet="1" + RuntimeTypeInfo="true" + PrecompiledHeaderFile=".\trinitycore__$(PlatformName)_$(ConfigurationName)\trinitycore.pch" + AssemblerListingLocation=".\trinitycore__$(PlatformName)_$(ConfigurationName)\" + ObjectFile=".\trinitycore__$(PlatformName)_$(ConfigurationName)\" + ProgramDataBaseFileName=".\trinitycore__$(PlatformName)_$(ConfigurationName)\" + WarningLevel="3" + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib advapi32.lib dbghelp.lib MSVCPRT.LIB msvcrt.lib" + OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\dep\lib\$(PlatformName)_$(ConfigurationName)" + GenerateDebugInformation="true" + ProgramDatabaseFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.pdb" + GenerateMapFile="true" + MapFileName="..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.map" + SubSystem="1" + LargeAddressAware="2" + LinkTimeCodeGeneration="0" + ImportLibrary="$(OutDir)\TrinityCore.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="copy ..\..\dep\lib\$(PlatformName)_$(ConfigurationName)\*.dll ..\..\bin\$(PlatformName)_$(ConfigurationName)
copy ..\..\src\trinitycore\trinitycore.conf.dist ..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.conf.dist
" + /> + </Configuration> + <Configuration + Name="Release|x64" + OutputDirectory=".\trinitycore__$(PlatformName)_$(ConfigurationName)" + IntermediateDirectory=".\trinitycore__$(PlatformName)_$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + TypeLibraryName=".\..\..\bin\Release\mangosd.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/MP" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\..\dep\include,..\..\src\framework,..\..\src\shared,..\..\src\game,..\..\src\trinitycore;..\..\dep\ACE_wrappers" + PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;NDEBUG;_CONSOLE;ENABLE_CLI" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + EnableEnhancedInstructionSet="0" + RuntimeTypeInfo="true" + PrecompiledHeaderFile=".\trinitycore__$(PlatformName)_$(ConfigurationName)\trinitycore.pch" + AssemblerListingLocation=".\trinitycore__$(PlatformName)_$(ConfigurationName)\" + ObjectFile=".\trinitycore__$(PlatformName)_$(ConfigurationName)\" + ProgramDataBaseFileName=".\trinitycore__$(PlatformName)_$(ConfigurationName)\" + WarningLevel="3" + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib advapi32.lib dbghelp.lib MSVCPRT.LIB msvcrt.lib" + OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\dep\lib\$(PlatformName)_$(ConfigurationName)" + GenerateDebugInformation="true" + ProgramDatabaseFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.pdb" + GenerateMapFile="true" + MapFileName="..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.map" + SubSystem="1" + LinkTimeCodeGeneration="0" + ImportLibrary="$(OutDir)\TrinityCore.lib" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="copy ..\..\dep\lib\$(PlatformName)_$(ConfigurationName)\*.dll ..\..\bin\$(PlatformName)_$(ConfigurationName)
copy ..\..\src\trinitycore\trinitycore.conf.dist ..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.conf.dist
" + /> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\trinitycore__$(PlatformName)_$(ConfigurationName)" + IntermediateDirectory=".\trinitycore__$(PlatformName)_$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\mangosd__$(PlatformName)_$(ConfigurationName)\mangosd.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/MP" + Optimization="0" + AdditionalIncludeDirectories="..\..\dep\include,..\..\src\framework,..\..\src\shared,..\..\src\game,..\..\src\trinitycore;..\..\dep\ACE_wrappers" + PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE;ENABLE_CLI" + IgnoreStandardIncludePath="false" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + RuntimeTypeInfo="true" + PrecompiledHeaderFile=".\trinitycore__$(PlatformName)_$(ConfigurationName)\trinitycore.pch" + AssemblerListingLocation=".\trinitycore__$(PlatformName)_$(ConfigurationName)\" + ObjectFile=".\trinitycore__$(PlatformName)_$(ConfigurationName)\" + ProgramDataBaseFileName=".\trinitycore__$(PlatformName)_$(ConfigurationName)\" + WarningLevel="3" + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib advapi32.lib dbghelp.lib MSVCPRTD.LIB msvcrtd.lib" + OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.exe" + Version="" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\dep\lib\$(PlatformName)_$(ConfigurationName)" + GenerateDebugInformation="true" + ProgramDatabaseFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.pdb" + GenerateMapFile="true" + MapFileName="..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.map" + SubSystem="1" + LargeAddressAware="2" + ImportLibrary="$(OutDir)\TrinityCore.lib" + FixedBaseAddress="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="copy ..\..\dep\lib\$(PlatformName)_$(ConfigurationName)\*.dll ..\..\bin\$(PlatformName)_$(ConfigurationName)
copy ..\..\src\trinitycore\trinitycore.conf.dist ..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.conf.dist
" + /> + </Configuration> + <Configuration + Name="Debug|x64" + OutputDirectory=".\trinitycore__$(PlatformName)_$(ConfigurationName)" + IntermediateDirectory=".\trinitycore__$(PlatformName)_$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + TypeLibraryName=".\mangosd__$(PlatformName)_$(ConfigurationName)\mangosd.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/MP" + Optimization="0" + AdditionalIncludeDirectories="..\..\dep\include,..\..\src\framework,..\..\src\shared,..\..\src\game,..\..\src\trinitycore;..\..\dep\ACE_wrappers" + PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE;ENABLE_CLI" + IgnoreStandardIncludePath="false" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + RuntimeTypeInfo="true" + PrecompiledHeaderFile=".\trinitycore__$(PlatformName)_$(ConfigurationName)\trinitycore.pch" + AssemblerListingLocation=".\trinitycore__$(PlatformName)_$(ConfigurationName)\" + ObjectFile=".\trinitycore__$(PlatformName)_$(ConfigurationName)\" + ProgramDataBaseFileName=".\trinitycore__$(PlatformName)_$(ConfigurationName)\" + WarningLevel="3" + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib advapi32.lib dbghelp.lib MSVCPRTD.LIB msvcrtd.lib" + OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.exe" + Version="" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\dep\lib\$(PlatformName)_$(ConfigurationName)" + GenerateDebugInformation="true" + ProgramDatabaseFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.pdb" + GenerateMapFile="true" + MapFileName="..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.map" + SubSystem="1" + ImportLibrary="$(OutDir)\TrinityCore.lib" + TargetMachine="17" + FixedBaseAddress="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="copy ..\..\dep\lib\$(PlatformName)_$(ConfigurationName)\*.dll ..\..\bin\$(PlatformName)_$(ConfigurationName)
copy ..\..\src\trinitycore\trinitycore.conf.dist ..\..\bin\$(PlatformName)_$(ConfigurationName)\TrinityCore.conf.dist
" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="doc" + > + <File + RelativePath="..\..\Authors" + > + </File> + <File + RelativePath="..\..\ChangeLog" + > + </File> + <File + RelativePath="..\..\Copying" + > + </File> + <File + RelativePath="..\..\Install" + > + </File> + <File + RelativePath="..\..\News" + > + </File> + <File + RelativePath="..\..\Readme" + > + </File> + <File + RelativePath="..\..\Thanks" + > + </File> + </Filter> + <File + RelativePath="..\..\src\trinitycore\CliRunnable.cpp" + > + </File> + <File + RelativePath="..\..\src\trinitycore\CliRunnable.h" + > + </File> + <File + RelativePath="..\..\src\trinitycore\Main.cpp" + > + </File> + <File + RelativePath="..\..\src\trinitycore\Master.cpp" + > + </File> + <File + RelativePath="..\..\src\trinitycore\Master.h" + > + </File> + <File + RelativePath="..\..\src\trinitycore\RASocket.cpp" + > + </File> + <File + RelativePath="..\..\src\trinitycore\RASocket.h" + > + </File> + <File + RelativePath="..\..\src\trinitycore\resource.h" + > + </File> + <File + RelativePath="..\..\src\trinitycore\TrinityCore.rc" + > + </File> + <File + RelativePath="..\..\src\shared\WheatyExceptionReport.cpp" + > + </File> + <File + RelativePath="..\..\src\shared\WheatyExceptionReport.h" + > + </File> + <File + RelativePath="..\..\src\trinitycore\WorldRunnable.cpp" + > + </File> + <File + RelativePath="..\..\src\trinitycore\WorldRunnable.h" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> |
