From 7438fc6dd74fc8c971e66660bbc63b6680a16f5c Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 25 Dec 2008 10:35:24 -0600 Subject: *Make the pets of shaman and druid stronger and gain bonus damage from owners' spell damage. --HG-- branch : trunk --- src/game/Pet.cpp | 21 +++++++++++++++++++++ src/game/StatSystem.cpp | 17 +++++++++++++++++ 2 files changed, 38 insertions(+) (limited to 'src') diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 836ee6d8459..72d9f725a3b 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -1152,6 +1152,25 @@ bool Pet::InitStatsForLevel(uint32 petlevel) SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0); SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, 1000); + switch(GetEntry()) + { + case 1964: //force of nature + SetCreateHealth(30 + 30*petlevel); + SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 2.5f - (petlevel / 2))); + SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 2.5f + (petlevel / 2))); + break; + case 15352: //earth elemental 36213 + SetCreateHealth(100 + 120*petlevel); + SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4))); + SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4))); + break; + case 15438: //fire elemental + SetCreateHealth(30 + 40*petlevel); + SetCreateMana(28 + 10*petlevel); + SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 4 - petlevel)); + SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 4 + petlevel)); + break; + default: SetCreateMana(28 + 10*petlevel); SetCreateHealth(28 + 30*petlevel); @@ -1161,6 +1180,8 @@ bool Pet::InitStatsForLevel(uint32 petlevel) SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4))); //damage range is then petlevel / 2 SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4))); + break; + } break; default: sLog.outError("Pet have incorrect type (%u) for levelup.", getPetType()); diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index 3e9ddcf3bef..dd324fbc684 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -944,6 +944,23 @@ void Pet::UpdateAttackPowerAndDamage(bool ranged) frost = 0; SetBonusDamage( int32(frost * 0.4f)); } + //force of nature + else if(GetEntry() == 1964) + { + int32 spellDmg = int32(owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_NATURE)) - owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_NATURE); + if(spellDmg > 0) + SetBonusDamage(int32(spellDmg * 0.09f)); + } + //greater fire elemental + else if(GetEntry() == 15438) + { + if(Unit* shaman = owner->GetOwner()) + { + int32 spellDmg = int32(shaman->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE)) - shaman->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE); + if(spellDmg > 0) + SetBonusDamage(int32(spellDmg * 0.4f)); + } + } } SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, val + bonusAP); -- cgit v1.2.3 From cfd890628fba774ade5750f74fbd8035cfb74f52 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 25 Dec 2008 10:36:00 -0600 Subject: *Update spell target selection about area auras. --HG-- branch : trunk --- src/game/Spell.cpp | 15 ++++++++------- src/game/SpellMgr.cpp | 5 +++++ 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 6f5dd73f724..c4a73950381 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -409,10 +409,11 @@ void Spell::FillTargetMap() if(!m_spellInfo->Effect[i]) continue; - // TODO: find a way so this is not needed? - // for area auras always add caster as target (needed for totems for example) - if(IsAreaAuraEffect(m_spellInfo->Effect[i])) - AddUnitTarget(m_caster, i); + uint32 effectTargetType = spellmgr.EffectTargetType[m_spellInfo->Effect[i]]; + + // is it possible that areaaura is not applied to caster? + if(effectTargetType == SPELL_REQUIRE_NONE) + continue; std::list tmpUnitMap; uint32 targetA = m_spellInfo->EffectImplicitTargetA[i]; @@ -423,9 +424,9 @@ void Spell::FillTargetMap() if(targetB) // In very rare case !A && B SetTargetMap(i, targetB, tmpUnitMap); - if(spellmgr.EffectTargetType[m_spellInfo->Effect[i]] != SPELL_REQUIRE_UNIT) + if(effectTargetType != SPELL_REQUIRE_UNIT) { - if(spellmgr.EffectTargetType[m_spellInfo->Effect[i]] == SPELL_REQUIRE_DEST) + if(effectTargetType == SPELL_REQUIRE_DEST) { if(m_targets.HasDest() && m_spellInfo->speed > 0.0f) { @@ -434,7 +435,7 @@ void Spell::FillTargetMap() m_delayMoment = (uint64) floor(dist / m_spellInfo->speed * 1000.0f); } } - else if(spellmgr.EffectTargetType[m_spellInfo->Effect[i]] == SPELL_REQUIRE_ITEM) + else if(effectTargetType == SPELL_REQUIRE_ITEM) { if(m_targets.getItemTarget()) AddItemTarget(m_targets.getItemTarget(), i); diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 78175708cba..2e285ea7176 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -64,6 +64,11 @@ SpellMgr::SpellMgr() //case SPELL_EFFECT_LEARN_SPELL: // 0 may be 5 pet case SPELL_EFFECT_TRADE_SKILL: // 0 or 1 case SPELL_EFFECT_PROFICIENCY: // 0 + case SPELL_EFFECT_APPLY_AREA_AURA_PARTY: + case SPELL_EFFECT_APPLY_AREA_AURA_FRIEND: + case SPELL_EFFECT_APPLY_AREA_AURA_ENEMY: + case SPELL_EFFECT_APPLY_AREA_AURA_PET: + case SPELL_EFFECT_APPLY_AREA_AURA_OWNER: EffectTargetType[i] = SPELL_REQUIRE_NONE; break; case SPELL_EFFECT_ENCHANT_ITEM: -- cgit v1.2.3 From 3915777c719f53de87d5bf0a7386f46d415187b3 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Thu, 25 Dec 2008 21:27:07 +0100 Subject: *Support for quest 9531 --HG-- branch : trunk --- sql/updates/645_world_scripts.sql | 6 + .../scripts/zone/azuremyst_isle/azuremyst_isle.cpp | 157 ++++++++++++++++++++- 2 files changed, 162 insertions(+), 1 deletion(-) create mode 100644 sql/updates/645_world_scripts.sql (limited to 'src') diff --git a/sql/updates/645_world_scripts.sql b/sql/updates/645_world_scripts.sql new file mode 100644 index 00000000000..bb4916be082 --- /dev/null +++ b/sql/updates/645_world_scripts.sql @@ -0,0 +1,6 @@ +delete from creature where id=17318; +update creature_template set scriptname='npc_geezle' where entry=17318; +delete from event_scripts where id=10675; +insert into event_scripts () VALUES (10675, 0, 10, 17318, 120000, 0, -5134.3, -11250.3, 5.29568, 6.23554), +(10675, 72, 7, 9531, 0, 0, 0, 0, 0, 0); +update quest_template set specialflags=2, reqcreatureorgoid1=0, reqcreatureorgocount1=0 where entry=9531; \ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp index 59dc502b2f5..cfb87a142b6 100644 --- a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp +++ b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Azuremyst_Isle SD%Complete: 75 -SDComment: Quest support: 9283, 9537, 9582, 9554(special flight path, proper model for mount missing). Injured Draenei cosmetic only +SDComment: Quest support: 9283, 9537, 9582, 9554, 9531(special flight path, proper model for mount missing). Injured Draenei cosmetic only SDCategory: Azuremyst Isle EndScriptData */ @@ -27,6 +27,7 @@ npc_engineer_spark_overgrind npc_injured_draenei npc_magwin npc_susurrus +npc_geezle EndContentData */ #include "precompiled.h" @@ -462,6 +463,154 @@ bool GossipSelect_npc_susurrus(Player *player, Creature *_Creature, uint32 sende return true; } +/*###### +## npc_geezle +######*/ +//delete from creature where id=17318; +//update creature_template set scriptname='npc_geezle' where entry=17318; +//delete from event_scripts where id=10675; +//insert into event_scripts () VALUES (10675, 0, 10, 17318, 120000, 0, -5134.3, -11250.3, 5.29568, 6.23554), (10675, 72, 7, 9531, 0, 0, 0, 0, 0, 0); +//update quest_template set specialflags=2, reqcreatureorgoid1=0, reqcreatureorgocount1=0 where entry=9531; +#define GEEZLE_SAY_1 "What's the big idea, Spark?" +#define SPARK_SAY_2 "What's the big idea? You nearly blew my cover, idiot! I told you to put the compass and navigation maps somewhere safe - not out in the open for any fool to discover." +#define SPARK_SAY_3 "The Master has gone to great lengths to secure information about the whereabouts of the Exodar. You could have blown the entire operation, including the cover of our spy on the inside." +#define GEEZLE_SAY_4 "Relax, Spark! I have it all under control. We'll strip mine the Exodar right out from under 'em - making both you and I very, very rich in the process." +#define SPARK_SAY_5 "Relax? Do you know what Kael'thas does to those that fail him, Geezle? Eternal suffering and pain... Do NOT screw this up, fool." +#define SPARK_SAY_6 "Our Bloodmyst scouts have located our contact. The fool, Velen, will soon leave himself open and defenseless -- long enough for us to strike! Now get out of my sight before I vaporize you..." +#define GEEZLE_SAY_7 "Yes, sir. It won't happen again..." + +#define EMOTE_SPARK "picks up the naga flag." +#define MOB_SPARK 17243 +#define GO_NAGA_FLAG 181694 + +static float SparkPos[4] = {-5030.95, -11291.99, 7.97}; + +struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI +{ + npc_geezleAI(Creature *c) : ScriptedAI(c) {Reset();} + + std::list FlagList; + + uint64 SparkGUID; + + uint32 Step; + uint32 SayTimer; + + bool EventStarted; + + void Reset() + { + SparkGUID = 0; + Step = 0; + StartEvent(); + } + + void Aggro(Unit* who){} + + void StartEvent() + { + Step = 1; + EventStarted = true; + Creature* Spark = m_creature->SummonCreature(MOB_SPARK, SparkPos[0], SparkPos[1], SparkPos[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1000); + SparkGUID = Spark->GetGUID(); + Spark->setActive(true); + Spark->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->GetMotionMaster()->MovePoint(0, -5092.26, -11252, 0.71); + Spark->GetMotionMaster()->MovePoint(0, -5080.70, -11253.61, 0.56); + SayTimer = 23000; + } + + uint32 NextStep(uint32 Step) + { + Unit* Spark = Unit::GetUnit((*m_creature), SparkGUID); + + switch(Step) + { + case 0: return 99999; + case 1: + //DespawnNagaFlag(true); + ((Creature*)Spark)->TextEmote(EMOTE_SPARK, NULL, false); + return 1000; + case 2: + DoSay(GEEZLE_SAY_1, LANG_UNIVERSAL, Spark); + Spark->SetInFront(m_creature); + m_creature->SetInFront(Spark); + return 5000; + case 3: + ((Creature*)Spark)->Say(SPARK_SAY_2, LANG_UNIVERSAL, NULL); + return 7000; + case 4: + ((Creature*)Spark)->Say(SPARK_SAY_3, LANG_UNIVERSAL, NULL); + return 8000; + case 5: + DoSay(GEEZLE_SAY_4, LANG_UNIVERSAL, Spark); + return 8000; + case 6: + ((Creature*)Spark)->Say(SPARK_SAY_5, LANG_UNIVERSAL, NULL); + return 9000; + case 7: + ((Creature*)Spark)->Say(SPARK_SAY_6, LANG_UNIVERSAL, NULL); + return 8000; + case 8: + DoSay(GEEZLE_SAY_7, LANG_UNIVERSAL, Spark); + return 2000; + case 9: + m_creature->GetMotionMaster()->MoveTargetedHome(); + Spark->GetMotionMaster()->MovePoint(0, -5030.95, -11291.99, 7.97); + return 20000; + case 10: + Spark->DealDamage(Spark,Spark->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + //DespawnNagaFlag(false); + m_creature->SetVisibility(VISIBILITY_OFF); + default: return 99999999; + } + } + + void DespawnNagaFlag(bool despawn) + { + CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); + Cell cell(pair); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + Trinity::AllGameObjectsWithEntryInGrid go_check(GO_NAGA_FLAG); + Trinity::GameObjectListSearcher go_search(FlagList, go_check); + TypeContainerVisitor + , GridTypeMapContainer> go_visit(go_search); + CellLock cell_lock(cell, pair); + cell_lock->Visit(cell_lock, go_visit, *(m_creature->GetMap())); + + Player* player = NULL; + if (!FlagList.empty()) + { + for(std::list::iterator itr = FlagList.begin(); itr != FlagList.end(); ++itr) + { + //TODO: Found how to despawn and respawn + if(despawn) + (*itr)->RemoveFromWorld(); + else + (*itr)->Respawn(); + } + } else error_log("SD2 ERROR: FlagList is empty!"); + } + + void UpdateAI(const uint32 diff) + { + if(SayTimer < diff) + { + if(EventStarted) + { + SayTimer = NextStep(Step++); + } + }else SayTimer -= diff; + } +}; + +CreatureAI* GetAI_npc_geezleAI(Creature *_Creature) +{ + return new npc_geezleAI(_Creature); +} + /*###### ## ######*/ @@ -498,4 +647,10 @@ void AddSC_azuremyst_isle() newscript->pGossipHello = &GossipHello_npc_susurrus; newscript->pGossipSelect = &GossipSelect_npc_susurrus; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_geezle"; + newscript->GetAI = &GetAI_npc_geezleAI; + newscript->RegisterSelf(); + } -- cgit v1.2.3 From 898d64dcca411fbcb823f0fcb1d36804e9afc2c3 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Thu, 25 Dec 2008 21:30:32 +0100 Subject: *Prevent creature's spells from crushing - by Machiavelli --HG-- branch : trunk --- src/game/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 86d1d23be75..a9c822bddec 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -2947,7 +2947,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack } } - if(GetTypeId()!=TYPEID_PLAYER && !(((Creature*)this)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRUSH) && !((Creature*)this)->isPet() ) + if(GetTypeId()!=TYPEID_PLAYER && !(((Creature*)this)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRUSH) && !((Creature*)this)->isPet() && !SpellCasted /*Only autoattack can be crushing blow*/ ) { // mobs can score crushing blows if they're 3 or more levels above victim // or when their weapon skill is 15 or more above victim's defense skill -- cgit v1.2.3 From 8837453f24b1f4871fdafbe83548a8853331ede2 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Thu, 25 Dec 2008 22:37:02 +0100 Subject: *Removed comments --HG-- branch : trunk --- src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp index cfb87a142b6..92ce2caaa40 100644 --- a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp +++ b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp @@ -466,11 +466,7 @@ bool GossipSelect_npc_susurrus(Player *player, Creature *_Creature, uint32 sende /*###### ## npc_geezle ######*/ -//delete from creature where id=17318; -//update creature_template set scriptname='npc_geezle' where entry=17318; -//delete from event_scripts where id=10675; -//insert into event_scripts () VALUES (10675, 0, 10, 17318, 120000, 0, -5134.3, -11250.3, 5.29568, 6.23554), (10675, 72, 7, 9531, 0, 0, 0, 0, 0, 0); -//update quest_template set specialflags=2, reqcreatureorgoid1=0, reqcreatureorgocount1=0 where entry=9531; + #define GEEZLE_SAY_1 "What's the big idea, Spark?" #define SPARK_SAY_2 "What's the big idea? You nearly blew my cover, idiot! I told you to put the compass and navigation maps somewhere safe - not out in the open for any fool to discover." #define SPARK_SAY_3 "The Master has gone to great lengths to secure information about the whereabouts of the Exodar. You could have blown the entire operation, including the cover of our spy on the inside." -- cgit v1.2.3 From 59ed3f9d2fbb401dfc9b9d92ea948cb99ba961ea Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 25 Dec 2008 17:26:05 -0600 Subject: *Remove mangle hack for nalorakk. --HG-- branch : trunk --- .../scripts/scripts/zone/zulaman/boss_nalorakk.cpp | 16 ++-------------- src/game/Pet.cpp | 2 +- src/game/Unit.cpp | 2 ++ 3 files changed, 5 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp b/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp index 44e68f0dfbf..844e4a6c0ce 100644 --- a/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp +++ b/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp @@ -467,25 +467,13 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI else { if(LaceratingSlash_Timer < diff) { - if(!m_creature->getVictim()->HasAura(SPELL_MANGLEEFFECT, 0)) - DoCast(m_creature->getVictim(), SPELL_LACERATINGSLASH); - else - { - int32 bp0 = 3470; - m_creature->CastCustomSpell(m_creature->getVictim(), SPELL_LACERATINGSLASH, &bp0, NULL, NULL, false); - } + DoCast(m_creature->getVictim(), SPELL_LACERATINGSLASH); LaceratingSlash_Timer = 18000 + rand()%5000; }else LaceratingSlash_Timer -= diff; if(RendFlesh_Timer < diff) { - if(!m_creature->getVictim()->HasAura(SPELL_MANGLEEFFECT, 0)) - DoCast(m_creature->getVictim(), SPELL_RENDFLESH); - else - { - int32 bp1 = 4670; - m_creature->CastCustomSpell(m_creature->getVictim(), SPELL_RENDFLESH, NULL, &bp1, NULL, false); - } + DoCast(m_creature->getVictim(), SPELL_RENDFLESH); RendFlesh_Timer = 5000 + rand()%5000; }else RendFlesh_Timer -= diff; diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 72d9f725a3b..d42ab2af746 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -1165,7 +1165,7 @@ bool Pet::InitStatsForLevel(uint32 petlevel) SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4))); break; case 15438: //fire elemental - SetCreateHealth(30 + 40*petlevel); + SetCreateHealth(40*petlevel); SetCreateMana(28 + 10*petlevel); SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 4 - petlevel)); SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 4 + petlevel)); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a9c822bddec..a079964ce3e 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8606,8 +8606,10 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3 TakenTotalMod *= (mod+100.0f)/100.0f; } break; + //This is changed in WLK, using aura 255 //Mangle case 2312: + case 44955: for(int j=0;j<3;j++) { if(GetEffectMechanic(spellProto, j)==MECHANIC_BLEED) -- cgit v1.2.3 From 6e784a14fdd298216969f7726645d474bc5c4151 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 25 Dec 2008 17:39:46 -0600 Subject: *Calculate base spell damage/healing when casting but not hitting. *Fix the bug that conflagrate consumes other players' immolate. --HG-- branch : trunk --- src/game/Spell.cpp | 151 ++++++++++++++++++++++++++++------------------ src/game/Spell.h | 7 ++- src/game/SpellEffects.cpp | 97 ++++++++++++++++++----------- 3 files changed, 160 insertions(+), 95 deletions(-) (limited to 'src') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index c4a73950381..b6fca5a0597 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -174,14 +174,8 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster ) *data >> m_targetMask; if(m_targetMask == TARGET_FLAG_SELF) - { - //m_destX = caster->GetPositionX(); - //m_destY = caster->GetPositionY(); - //m_destZ = caster->GetPositionZ(); - //m_unitTarget = caster; - //m_unitTargetGUID = caster->GetGUID(); return true; - } + // TARGET_FLAG_UNK2 is used for non-combat pets, maybe other? if( m_targetMask & (TARGET_FLAG_UNIT|TARGET_FLAG_UNK2) ) if(!readGUID(*data, m_unitTargetGUID)) @@ -721,7 +715,7 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex) target.targetGUID = targetGUID; // Store target GUID target.effectMask = 1<killTarget) - { - // remove spell_magnet aura after first spell redirect and destroy target if its totem - if(unit->GetTypeId() == TYPEID_UNIT && ((Creature*)unit)->isTotem()) - unit->Kill(unit); - } - // Get original caster (if exist) and calculate damage/healing from him data Unit *caster = m_originalCasterGUID ? m_originalCaster : m_caster; @@ -963,8 +950,8 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) unitTarget = unit; // Reset damage/healing counter - m_damage = 0; - m_healing = 0; + m_damage = target->damage; + m_healing = -target->damage; // Fill base trigger info uint32 procAttacker = m_procAttacker; @@ -991,7 +978,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) // All calculated do it! // Do healing and triggers - if (m_healing) + if (m_healing > 0) { bool crit = caster->isSpellCrit(NULL, m_spellInfo, m_spellSchoolMask); uint32 addhealth = m_healing; @@ -1017,7 +1004,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) bg->UpdatePlayerScore(((Player*)caster), SCORE_HEALING_DONE, gain); } // Do damage and triggers - else if (m_damage) + else if (m_damage > 0) { // Fill base damage struct (unitTarget - is real spell target) SpellNonMeleeDamage damageInfo(caster, unitTarget, m_spellInfo->Id, m_spellSchoolMask); @@ -1170,8 +1157,9 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask) { if (effectMask & (1<DmgMultiplier[effectNumber]; @@ -1180,7 +1168,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask) if(Player* modOwner = m_originalCaster->GetSpellModOwner()) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_EFFECT_PAST_FIRST, multiplier,this); m_damageMultipliers[effectNumber] *= multiplier; - } + }*/ } } @@ -1450,6 +1438,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list &TagUnitMap) else radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex)); + //Chain: 2, 6, 22, 25, 45, 77 uint32 EffectChainTarget = m_spellInfo->EffectChainTarget[i]; uint32 unMaxTargets = m_spellInfo->MaxAffectedTargets; @@ -1462,6 +1451,13 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list &TagUnitMap) } } + if(EffectChainTarget > 1) + { + //otherwise, this multiplier is used for something else + m_damageMultipliers[i] = 1.0f; + m_applyMultiplierMask |= 1 << i; + } + switch(spellmgr.SpellTargetType[cur]) { case TARGET_TYPE_UNIT_CASTER: @@ -2203,23 +2199,6 @@ void Spell::cast(bool skipCheck) FillTargetMap(); - // who did this hack? - // Conflagrate - consumes immolate - if ((m_spellInfo->TargetAuraState == AURA_STATE_IMMOLATE) && m_targets.getUnitTarget()) - { - // for caster applied auras only - Unit::AuraList const &mPeriodic = m_targets.getUnitTarget()->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); - for(Unit::AuraList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i) - { - if( (*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && ((*i)->GetSpellProto()->SpellFamilyFlags & 4) && - (*i)->GetCasterGUID()==m_caster->GetGUID() ) - { - m_targets.getUnitTarget()->RemoveAura((*i)->GetId(), (*i)->GetEffIndex()); - break; - } - } - } - if(const std::vector *spell_triggered = spellmgr.GetSpellLinked(m_spellInfo->Id)) { for(std::vector::const_iterator i = spell_triggered->begin(); i != spell_triggered->end(); ++i) @@ -2250,13 +2229,10 @@ void Spell::cast(bool skipCheck) return; } - - SendCastResult(castResult); SendSpellGo(); // we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()... - for(int i = 0; i < 3; ++i) - m_currentBasePoints[i] = CalculateDamage(i, NULL); + CalculateDamageDoneForAllTargets(); // Okay, everything is prepared. Now we need to distinguish between immediate and evented delayed spells if (m_spellInfo->speed > 0.0f && !IsChanneledSpell(m_spellInfo)) @@ -2398,17 +2374,6 @@ void Spell::_handle_immediate_phase() // Don't do spell log, if is school damage spell if(m_spellInfo->Effect[j] == SPELL_EFFECT_SCHOOL_DAMAGE || m_spellInfo->Effect[j] == 0) m_needSpellLog = false; - - uint32 EffectChainTarget = m_spellInfo->EffectChainTarget[j]; - if(m_originalCaster) - if(Player* modOwner = m_originalCaster->GetSpellModOwner()) - modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_JUMP_TARGETS, EffectChainTarget, this); - - // initialize multipliers - m_damageMultipliers[j] = 1.0f; - if( (m_spellInfo->EffectImplicitTargetA[j] == TARGET_CHAIN_DAMAGE || m_spellInfo->EffectImplicitTargetA[j] == TARGET_CHAIN_HEAL) && - (EffectChainTarget > 1) ) - m_applyMultiplierMask |= 1 << j; } // initialize Diminishing Returns Data @@ -3287,7 +3252,7 @@ void Spell::HandleThreatSpells(uint32 spellId) DEBUG_LOG("Spell %u, rank %u, added an additional %i threat", spellId, spellmgr.GetSpellRank(spellId), threatSpell->threat); } -void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTarget,uint32 i, float DamageMultiplier) +void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTarget,uint32 i, float /*DamageMultiplier*/) { unitTarget = pUnitTarget; itemTarget = pItemTarget; @@ -3296,14 +3261,15 @@ void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTar uint8 eff = m_spellInfo->Effect[i]; uint32 mechanic = m_spellInfo->EffectMechanic[i]; - damage = int32(m_currentBasePoints[i] * DamageMultiplier); - sLog.outDebug( "Spell: Effect : %u", eff); //Simply return. Do not display "immune" in red text on client if(unitTarget && unitTarget->IsImmunedToSpellEffect(eff, mechanic)) return; + //we do not need DamageMultiplier here. + damage = CalculateDamage(i, NULL); + if(efftargetGUID) // Found in list { - (*ihit).killTarget = true; + (*ihit).damage = target->GetHealth(); break; } } @@ -5330,4 +5296,73 @@ bool Spell::IsValidSingleTargetSpell(Unit const* target) const // return false; } return true; +} + +void Spell::CalculateDamageDoneForAllTargets() +{ + float multiplier[3]; + for(int i = 0; i < 3; ++i) + { + if ( m_applyMultiplierMask & (1 << i) ) + { + // Get multiplier + multiplier[i] = m_spellInfo->DmgMultiplier[i]; + // Apply multiplier mods + if(m_originalCaster) + if(Player* modOwner = m_originalCaster->GetSpellModOwner()) + modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_EFFECT_PAST_FIRST, multiplier[i], this); + } + } + + for(std::list::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) + { + TargetInfo target = *ihit; + + uint32 mask = target.effectMask; + if(!mask) + continue; + + Unit* unit = m_caster->GetGUID()==target.targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, target.targetGUID); + if (!unit) + return; + + if (target.missCondition==SPELL_MISS_NONE) // In case spell hit target, do all effect on that target + target.damage += CalculateDamageDone(unit, mask, multiplier); + else if (target.missCondition == SPELL_MISS_REFLECT) // In case spell reflect from target, do all effect on caster (if hit) + { + if (target.reflectResult == SPELL_MISS_NONE) // If reflected spell hit caster -> do all effect on him + target.damage += CalculateDamageDone(m_caster, mask, multiplier); + } + } +} + +int32 Spell::CalculateDamageDone(Unit *unit, const uint32 effectMask, float *multiplier) +{ + m_damage = 0; + unitTarget = unit; + for(uint32 i = 0; i < 3; ++i) + { + if (effectMask & (1<Effect[i]) + { + case SPELL_EFFECT_SCHOOL_DAMAGE: + SpellDamageSchoolDmg(i); + break; + case SPELL_EFFECT_WEAPON_DAMAGE: + case SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL: + case SPELL_EFFECT_NORMALIZED_WEAPON_DMG: + case SPELL_EFFECT_WEAPON_PERCENT_DAMAGE: + SpellDamageWeaponDmg(i); + break; + case SPELL_EFFECT_HEAL: + SpellDamageHeal(i); + break; + } + if ( m_applyMultiplierMask & (1 << i) ) + m_damageMultipliers[i] *= multiplier[i]; + } + } + return m_damage; } \ No newline at end of file diff --git a/src/game/Spell.h b/src/game/Spell.h index 284e0b88fb1..17a103ad0c5 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -505,7 +505,7 @@ class Spell SpellMissInfo reflectResult:8; uint8 effectMask:8; bool processed:1; - bool killTarget:1; + int32 damage; }; std::list m_UniqueTargetInfo; uint8 m_needAliveTargetMask; // Mask req. alive targets @@ -542,6 +542,11 @@ class Spell void SearchChainTarget(std::list &data, Unit* pUnitTarget, float max_range, uint32 unMaxTargets); bool IsValidSingleTargetEffect(Unit const* target, Targets type) const; bool IsValidSingleTargetSpell(Unit const* target) const; + void CalculateDamageDoneForAllTargets(); + int32 CalculateDamageDone(Unit *unit, const uint32 effectMask, float *multiplier); + void SpellDamageSchoolDmg(uint32 i); + void SpellDamageWeaponDmg(uint32 i); + void SpellDamageHeal(uint32 i); // ------------------------------------------- //List For Triggered Spells diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 04a93bfb77c..7b591306c89 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -301,6 +301,10 @@ void Spell::EffectEnvirinmentalDMG(uint32 i) } void Spell::EffectSchoolDMG(uint32 effect_idx) +{ +} + +void Spell::SpellDamageSchoolDmg(uint32 effect_idx) { if( unitTarget && unitTarget->isAlive()) { @@ -395,6 +399,22 @@ void Spell::EffectSchoolDMG(uint32 effect_idx) if(unitTarget->HasAuraState(AURA_STATE_IMMOLATE)) damage += int32(damage*0.25); } + + // Conflagrate - consumes immolate + if (m_spellInfo->TargetAuraState == AURA_STATE_IMMOLATE) + { + // for caster applied auras only + Unit::AuraList const &mPeriodic = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); + for(Unit::AuraList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i) + { + if( (*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && ((*i)->GetSpellProto()->SpellFamilyFlags & 4) && + (*i)->GetCasterGUID()==m_caster->GetGUID() ) + { + unitTarget->RemoveAurasDueToCasterSpell((*i)->GetId(), m_caster->GetGUID()); + break; + } + } + } break; } case SPELLFAMILY_DRUID: @@ -532,6 +552,23 @@ void Spell::EffectSchoolDMG(uint32 effect_idx) { int32 base = irand((int32)m_caster->GetWeaponDamageRange(RANGED_ATTACK, MINDAMAGE),(int32)m_caster->GetWeaponDamageRange(RANGED_ATTACK, MAXDAMAGE)); damage += int32(float(base)/m_caster->GetAttackTime(RANGED_ATTACK)*2800 + m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)*0.2f); + + bool found = false; + + // check dazed affect + Unit::AuraList const& decSpeedList = unitTarget->GetAurasByType(SPELL_AURA_MOD_DECREASE_SPEED); + for(Unit::AuraList::const_iterator iter = decSpeedList.begin(); iter != decSpeedList.end(); ++iter) + { + if((*iter)->GetSpellProto()->SpellIconID==15 && (*iter)->GetSpellProto()->Dispel==0) + { + found = true; + break; + } + } + + //TODO: should this be put on taken but not done? + if(found) + m_damage += m_spellInfo->EffectBasePoints[1]; } //Explosive Trap Effect else if(m_spellInfo->SpellFamilyFlags & 0x00000004) @@ -1258,7 +1295,7 @@ void Spell::EffectDummy(uint32 i) //Life Tap (only it have this with dummy effect) if (m_spellInfo->SpellFamilyFlags == 0x40000) { - float cost = m_currentBasePoints[0];//+1; + float cost = damage; if(Player* modOwner = m_caster->GetSpellModOwner()) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_COST, cost,this); @@ -1378,29 +1415,6 @@ void Spell::EffectDummy(uint32 i) } break; case SPELLFAMILY_HUNTER: - // Steady Shot - if(m_spellInfo->SpellFamilyFlags & 0x100000000LL) - { - if( !unitTarget || !unitTarget->isAlive()) - return; - - bool found = false; - - // check dazed affect - Unit::AuraList const& decSpeedList = unitTarget->GetAurasByType(SPELL_AURA_MOD_DECREASE_SPEED); - for(Unit::AuraList::const_iterator iter = decSpeedList.begin(); iter != decSpeedList.end(); ++iter) - { - if((*iter)->GetSpellProto()->SpellIconID==15 && (*iter)->GetSpellProto()->Dispel==0) - { - found = true; - break; - } - } - - if(found) - m_damage+= damage; - return; - } // Kill command if(m_spellInfo->SpellFamilyFlags & 0x00080000000000LL) { @@ -2077,7 +2091,7 @@ void Spell::EffectApplyAura(uint32 i) sLog.outDebug("Spell: Aura is: %u", m_spellInfo->EffectApplyAuraName[i]); - Aura* Aur = CreateAura(m_spellInfo, i, &m_currentBasePoints[i], unitTarget, caster, m_CastItem); + Aura* Aur = CreateAura(m_spellInfo, i, &damage, unitTarget, caster, m_CastItem); // Now Reduce spell duration using data received at spell hit int32 duration = Aur->GetAuraMaxDuration(); @@ -2127,7 +2141,7 @@ void Spell::EffectApplyAura(uint32 i) if (AdditionalSpellInfo) { // applied at target by target - Aura* AdditionalAura = CreateAura(AdditionalSpellInfo, 0, &m_currentBasePoints[0], unitTarget,unitTarget, 0); + Aura* AdditionalAura = CreateAura(AdditionalSpellInfo, 0, NULL, unitTarget,unitTarget, 0); unitTarget->AddAura(AdditionalAura); sLog.outDebug("Spell: Additional Aura is: %u", AdditionalSpellInfo->EffectApplyAuraName[0]); } @@ -2294,10 +2308,16 @@ void Spell::EffectPowerBurn(uint32 i) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_MULTIPLE_VALUE, multiplier); new_damage = int32(new_damage*multiplier); - m_damage+=new_damage; + //m_damage+=new_damage; should not apply spell bonus + //TODO: no log + unitTarget->ModifyHealth(-new_damage); } void Spell::EffectHeal( uint32 /*i*/ ) +{ +} + +void Spell::SpellDamageHeal(uint32 /*i*/) { if( unitTarget && unitTarget->isAlive() && damage >= 0) { @@ -2369,7 +2389,7 @@ void Spell::EffectHeal( uint32 /*i*/ ) else addhealth = caster->SpellHealingBonus(m_spellInfo, addhealth,HEAL, unitTarget); - m_healing+=addhealth; + m_damage -= addhealth; } } @@ -2470,7 +2490,7 @@ void Spell::DoCreateItem(uint32 i, uint32 itemtype) // TODO: maybe all this can be replaced by using correct calculated `damage` value if(pProto->Class != ITEM_CLASS_CONSUMABLE || m_spellInfo->SpellFamilyName != SPELLFAMILY_MAGE) { - num_to_add = m_currentBasePoints[i]; + num_to_add = damage; /*int32 basePoints = m_currentBasePoints[i]; int32 randomPoints = m_spellInfo->EffectDieSides[i]; if (randomPoints) @@ -2482,7 +2502,7 @@ void Spell::DoCreateItem(uint32 i, uint32 itemtype) num_to_add = 1; else if(player->getLevel() >= m_spellInfo->spellLevel) { - num_to_add = m_currentBasePoints[i]; + num_to_add = damage; /*int32 basePoints = m_currentBasePoints[i]; float pointPerLevel = m_spellInfo->EffectRealPointsPerLevel[i]; num_to_add = basePoints + 1 + uint32((player->getLevel() - m_spellInfo->spellLevel)*pointPerLevel);*/ @@ -3076,7 +3096,7 @@ void Spell::EffectApplyAreaAura(uint32 i) if(!unitTarget->isAlive()) return; - AreaAura* Aur = new AreaAura(m_spellInfo, i, &m_currentBasePoints[i], unitTarget, m_caster, m_CastItem); + AreaAura* Aur = new AreaAura(m_spellInfo, i, &damage, unitTarget, m_caster, m_CastItem); unitTarget->AddAura(Aur); } @@ -4178,6 +4198,10 @@ void Spell::EffectTaunt(uint32 /*i*/) } void Spell::EffectWeaponDmg(uint32 i) +{ +} + +void Spell::SpellDamageWeaponDmg(uint32 i) { if(!unitTarget) return; @@ -4464,9 +4488,10 @@ void Spell::EffectHealMaxHealth(uint32 /*i*/) if(!unitTarget->isAlive()) return; - uint32 heal = m_caster->GetMaxHealth(); - - m_healing+=heal; + uint32 addhealth = unitTarget->GetMaxHealth() - unitTarget->GetHealth(); + unitTarget->SetHealth(unitTarget->GetMaxHealth()); + if(m_originalCaster) + m_originalCaster->SendHealSpellLog(unitTarget, m_spellInfo->Id, addhealth, false); } void Spell::EffectInterruptCast(uint32 i) @@ -5306,7 +5331,7 @@ void Spell::EffectEnchantHeldItem(uint32 i) uint32 enchant_id = m_spellInfo->EffectMiscValue[i]; int32 duration = GetSpellDuration(m_spellInfo); //Try duration index first .. if(!duration) - duration = m_currentBasePoints[i];//+1; //Base points after .. + duration = damage;//+1; //Base points after .. if(!duration) duration = 10; //10 seconds for enchants which don't have listed duration @@ -5612,7 +5637,7 @@ void Spell::EffectReputation(uint32 i) Player *_player = (Player*)unitTarget; - int32 rep_change = m_currentBasePoints[i];//+1; // field store reputation change -1 + int32 rep_change = damage;//+1; // field store reputation change -1 uint32 faction_id = m_spellInfo->EffectMiscValue[i]; -- cgit v1.2.3 From 56f8b5ee84129d775fb291b0baa062717e6faead Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 25 Dec 2008 19:47:07 -0600 Subject: *Fix mining. --HG-- branch : trunk --- src/game/SpellEffects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 7b591306c89..f4bf1af0180 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2916,7 +2916,7 @@ void Spell::EffectOpenLock(uint32 /*i*/) SkillId = SKILL_LOCKPICKING; // skill bonus provided by casting spell (mostly item spells) - uint32 spellSkillBonus = uint32(m_currentBasePoints[0]/*+1*/); + uint32 spellSkillBonus = uint32(damage/*m_currentBasePoints[0]+1*/); uint32 reqSkillValue = lockInfo->requiredminingskill; -- cgit v1.2.3 From 4365900bddd2da1dd83ee6e202c26806d39dbdde Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 25 Dec 2008 21:38:08 -0600 Subject: *Fix the bug that make healing/damage spell do not work. --HG-- branch : trunk --- src/game/Spell.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index b6fca5a0597..a5da4e0fe78 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5344,7 +5344,14 @@ int32 Spell::CalculateDamageDone(Unit *unit, const uint32 effectMask, float *mul { if (effectMask & (1<Effect[i]) { case SPELL_EFFECT_SCHOOL_DAMAGE: @@ -5360,8 +5367,6 @@ int32 Spell::CalculateDamageDone(Unit *unit, const uint32 effectMask, float *mul SpellDamageHeal(i); break; } - if ( m_applyMultiplierMask & (1 << i) ) - m_damageMultipliers[i] *= multiplier[i]; } } return m_damage; -- cgit v1.2.3 From 682184c668942c9a65beef92d9adf74cfb763e5a Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 25 Dec 2008 21:45:41 -0600 Subject: *Fix mining (this time it should work). --HG-- branch : trunk --- src/game/Spell.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index a5da4e0fe78..1e2ac245aeb 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3890,7 +3890,8 @@ uint8 Spell::CanCast(bool strict) SkillValue = 0; // add the damage modifier from the spell casted (cheat lock / skeleton key etc.) (use m_currentBasePoints, CalculateDamage returns wrong value) - SkillValue += m_currentBasePoints[i]/*+1*/; + // TODO: is this a hack? + SkillValue += m_currentBasePoints[i]+1; // get the required lock value int32 ReqValue=0; -- cgit v1.2.3 From 4a6c246e3b2e789f0eb3038a41a5b32027f23f91 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 25 Dec 2008 23:04:20 -0600 Subject: *Fix a typo. --HG-- branch : trunk --- src/game/Spell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 1e2ac245aeb..90dbfc0930c 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5325,7 +5325,7 @@ void Spell::CalculateDamageDoneForAllTargets() Unit* unit = m_caster->GetGUID()==target.targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, target.targetGUID); if (!unit) - return; + continue; if (target.missCondition==SPELL_MISS_NONE) // In case spell hit target, do all effect on that target target.damage += CalculateDamageDone(unit, mask, multiplier); -- cgit v1.2.3 From 3cfb1e0870e6eefd31b0cbb0144de657209b302b Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Fri, 26 Dec 2008 09:27:29 +0100 Subject: *Changed defines in Supremus script - by Anubisss --HG-- branch : trunk --- .../scripts/zone/black_temple/boss_supremus.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp index 6ae77e670aa..6c642ea41a3 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp @@ -30,7 +30,7 @@ EndScriptData */ //Spells #define SPELL_MOLTEN_PUNCH 40126 -#define SPELL_HURTFUL_STRIKE 41926 +#define SPELL_HATEFUL_STRIKE 41926 #define SPELL_MOLTEN_FLAME 40980 #define SPELL_VOLCANIC_ERUPTION 40117 #define SPELL_VOLCANIC_SUMMON 40276 @@ -63,7 +63,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI uint32 SwitchTargetTimer; uint32 PhaseSwitchTimer; uint32 SummonVolcanoTimer; - uint32 HurtfulStrikeTimer; + uint32 HatefulStrikeTimer; uint32 BerserkTimer; bool Phase1; @@ -82,7 +82,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI else ToggleDoors(false); } - HurtfulStrikeTimer = 5000; + HatefulStrikeTimer = 5000; SummonFlameTimer = 20000; SwitchTargetTimer = 90000; PhaseSwitchTimer = 60000; @@ -123,7 +123,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI void JustSummoned(Creature *summon) {summons.Summon(summon);} void SummonedCreatureDespawn(Creature *summon) {summons.Despawn(summon);} - Unit* CalculateHurtfulStrikeTarget() + Unit* CalculateHatefulStrikeTarget() { uint32 health = 0; Unit* target = NULL; @@ -166,14 +166,14 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI if(Phase1) { - if(HurtfulStrikeTimer < diff) + if(HatefulStrikeTimer < diff) { - if(Unit* target = CalculateHurtfulStrikeTarget()) + if(Unit* target = CalculateHatefulStrikeTarget()) { - DoCast(target, SPELL_HURTFUL_STRIKE); - HurtfulStrikeTimer = 5000; + DoCast(target, SPELL_HATEFUL_STRIKE); + HatefulStrikeTimer = 5000; } - }else HurtfulStrikeTimer -= diff; + }else HatefulStrikeTimer -= diff; } if(!Phase1) -- cgit v1.2.3 From ec865f7916ab03675f9cc1b1a344a2f706a7a493 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Fri, 26 Dec 2008 13:30:46 +0100 Subject: *Implemented new function for Creature and Gameobject searching with gridsearchers - patch provided by Lightguard *Names: *Unit* FindCreature(uint32 entry, uint32 range); *GameObject* ScriptedAI::FindGameObject(uint32 entry); --HG-- branch : trunk --- src/bindings/scripts/include/sc_creature.cpp | 50 ++++++++++++++++++++++++++++ src/bindings/scripts/include/sc_creature.h | 6 ++++ 2 files changed, 56 insertions(+) (limited to 'src') diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp index e3bcc2129cc..cd1e5788ebd 100644 --- a/src/bindings/scripts/include/sc_creature.cpp +++ b/src/bindings/scripts/include/sc_creature.cpp @@ -735,6 +735,56 @@ void ScriptedAI::DoTeleportAll(float x, float y, float z, float o) i_pl->TeleportTo(m_creature->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT); } +Unit* ScriptedAI::FindCreature(uint32 entry, uint32 range) +{ + CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); + Cell cell(pair); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + std::list NPCList; + + Trinity::AllCreaturesOfEntryInRange check(m_creature, entry, range); + Trinity::CreatureListSearcher searcher(NPCList, check); + TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); + + CellLock cell_lock(cell, pair); + cell_lock->Visit(cell_lock, visitor, *(m_creature->GetMap())); + + if (!NPCList.empty()) + { + for(std::list::iterator itr = NPCList.begin(); itr != NPCList.end(); ++itr) + { + return Creature::GetUnit((*m_creature), (*itr)->GetGUID()); + } + }else error_log("SD2 ERROR: Entry: %u not found!", entry); return NULL; +} + +GameObject* ScriptedAI::FindGameObject(uint32 entry) +{ + CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); + Cell cell(pair); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + std::list GOList; + + Trinity::AllGameObjectsWithEntryInGrid go_check(entry); + Trinity::GameObjectListSearcher go_search(GOList, go_check); + TypeContainerVisitor + , GridTypeMapContainer> go_visit(go_search); + CellLock cell_lock(cell, pair); + cell_lock->Visit(cell_lock, go_visit, *(m_creature->GetMap())); + + if (!GOList.empty()) + { + for(std::list::iterator itr = GOList.begin(); itr != GOList.end(); ++itr) + { + return (*itr); + } + } + else error_log("SD2 ERROR: GameObject Entry: %u not found!", entry); return NULL; +} Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff) { diff --git a/src/bindings/scripts/include/sc_creature.h b/src/bindings/scripts/include/sc_creature.h index c0c09d70e34..b45fc5fda77 100644 --- a/src/bindings/scripts/include/sc_creature.h +++ b/src/bindings/scripts/include/sc_creature.h @@ -148,6 +148,12 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI void DoTeleportPlayer(Unit* pUnit, float x, float y, float z, float o); void DoTeleportAll(float x, float y, float z, float o); + //Get a single creature of given entry + Unit* FindCreature(uint32 entry, uint32 range); + + //Get a single gameobject of given entry + GameObject* ScriptedAI::FindGameObject(uint32 entry); + //Returns friendly unit with the most amount of hp missing from max hp Unit* DoSelectLowestHpFriendly(float range, uint32 MinHPDiff = 1); -- cgit v1.2.3 From d6fe6be53ae02d0b32c6fe2a20446e756fc722fe Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Fri, 26 Dec 2008 13:31:30 +0100 Subject: *Cleanup in blackrock_depths.cpp --HG-- branch : trunk --- .../zone/blackrock_depths/blackrock_depths.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp index 08afd55c98b..2930f6eafec 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Blackrock_Depths SD%Complete: 95 -SDComment: Quest support: 4001, 4342, 7604. Vendor Lokhtos Darkbargainer. +SDComment: Quest support: 4001, 4342, 7604, 4322. Vendor Lokhtos Darkbargainer. SDCategory: Blackrock Depths EndScriptData */ @@ -25,12 +25,15 @@ EndScriptData */ mob_phalanx npc_kharan_mighthammer npc_lokhtos_darkbargainer +npc_dughal_stormwing +npc_marshal_windsor +npc_marshal_reginald_windsor +npc_tobias_seecher EndContentData */ #include "precompiled.h" #include "../../npc/npc_escortAI.h" #include "def_blackrock_depths.h" -#include "GameObject.h" /*###### ## mob_phalanx @@ -281,6 +284,7 @@ CreatureAI* GetAI_npc_dughal_stormwing(Creature *_Creature) dughal_stormwingAI->AddWaypoint(0, 280.42,-82.86, -77.12,0); dughal_stormwingAI->AddWaypoint(1, 287.64,-87.01, -76.79,0); dughal_stormwingAI->AddWaypoint(2, 354.63,-64.95, -67.53,0); + return (CreatureAI*)dughal_stormwingAI; } bool GossipHello_npc_dughal_stormwing(Player *player, Creature *_Creature) @@ -425,6 +429,7 @@ struct TRINITY_DLL_DECL npc_marshal_windsorAI : public npc_escortAI CreatureAI* GetAI_npc_marshal_windsor(Creature *_Creature) { npc_marshal_windsorAI* marshal_windsorAI = new npc_marshal_windsorAI(_Creature); + marshal_windsorAI->AddWaypoint(0, 316.336,-225.528, -77.7258,7000); marshal_windsorAI->AddWaypoint(1, 316.336,-225.528, -77.7258,2000); marshal_windsorAI->AddWaypoint(2, 322.96,-207.13, -77.87,0); @@ -445,6 +450,7 @@ CreatureAI* GetAI_npc_marshal_windsor(Creature *_Creature) marshal_windsorAI->AddWaypoint(17, 403.61,-51.71, -63.92,2000); marshal_windsorAI->AddWaypoint(18, 403.61,-51.71, -63.92,1000); marshal_windsorAI->AddWaypoint(19, 403.61,-51.71, -63.92,0); + return (CreatureAI*)marshal_windsorAI; } @@ -545,8 +551,8 @@ struct TRINITY_DLL_DECL npc_marshal_reginald_windsorAI : public npc_escortAI break; case 32: m_creature->Say(SAY_REGINALD_WINDSOR_20_2, LANG_UNIVERSAL, PlayerGUID); - PlayerStart->GroupEventHappens(QUEST_JAIL_BREAK,m_creature); - pInstance->SetData(DATA_SHILL,ENCOUNTER_STATE_ENDED); + PlayerStart->GroupEventHappens(QUEST_JAIL_BREAK, m_creature); + pInstance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED); break; } } @@ -636,6 +642,7 @@ struct TRINITY_DLL_DECL npc_marshal_reginald_windsorAI : public npc_escortAI CreatureAI* GetAI_npc_marshal_reginald_windsor(Creature *_Creature) { npc_marshal_reginald_windsorAI* marshal_reginald_windsorAI = new npc_marshal_reginald_windsorAI(_Creature); + marshal_reginald_windsorAI->AddWaypoint(0, 403.61,-52.71, -63.92,4000); marshal_reginald_windsorAI->AddWaypoint(1, 403.61,-52.71, -63.92,4000); marshal_reginald_windsorAI->AddWaypoint(2, 406.33,-54.87, -63.95,0); @@ -667,10 +674,11 @@ CreatureAI* GetAI_npc_marshal_reginald_windsor(Creature *_Creature) marshal_reginald_windsorAI->AddWaypoint(28, 484.21,-56.24, -62.43,0); marshal_reginald_windsorAI->AddWaypoint(29, 470.39,-6.01, -70.10,0); marshal_reginald_windsorAI->AddWaypoint(30, 451.27,30.85, -70.07,0); - marshal_reginald_windsorAI->AddWaypoint(31, 452.45,29.85, -70.37,1500); //tezi trqbva da se opravqt + marshal_reginald_windsorAI->AddWaypoint(31, 452.45,29.85, -70.37,1500); marshal_reginald_windsorAI->AddWaypoint(32, 452.45,29.85, -70.37,7000); marshal_reginald_windsorAI->AddWaypoint(33, 452.45,29.85, -70.37,10000); marshal_reginald_windsorAI->AddWaypoint(34, 451.27,31.85, -70.07,0); + return (CreatureAI*)marshal_reginald_windsorAI; } @@ -742,6 +750,7 @@ CreatureAI* GetAI_npc_tobias_seecher(Creature *_Creature) tobias_seecherAI->AddWaypoint(2, 533.59, -249.38, -67.04); tobias_seecherAI->AddWaypoint(3, 519.44, -217.02, -59.34); tobias_seecherAI->AddWaypoint(4, 506.55, -153.49, -62.34); + return (CreatureAI*)tobias_seecherAI; } -- cgit v1.2.3 From 8e52469ad1890c75d55648392b3812b537be5796 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Fri, 26 Dec 2008 13:32:17 +0100 Subject: *Use the new function in ghostlands.cpp --HG-- branch : trunk --- .../scripts/scripts/zone/ghostlands/ghostlands.cpp | 61 +++------------------- 1 file changed, 7 insertions(+), 54 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp index 1eff1d97606..bf172c1566b 100644 --- a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp +++ b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp @@ -161,7 +161,8 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI case 0: { m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - setCage(true); + GameObject* Cage = FindGameObject(GO_CAGE); + Cage->SetGoState(0); DoSay(SAY_START, LANG_UNIVERSAL, player); break; } @@ -196,7 +197,8 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI case 33: m_creature->SetOrientation(5.858011); DoSay(SAY_END2, LANG_UNIVERSAL, player); - captainAnswer(); + Unit* CaptainHelios = FindCreature(NPC_CAPTAIN_HELIOS, 50); + ((Creature*)CaptainHelios)->Say(CAPTAIN_ANSWER, LANG_UNIVERSAL, PlayerGUID); break; } } @@ -207,7 +209,9 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI { if (!IsBeingEscorted) m_creature->setFaction(1602); - setCage(false); + + GameObject* Cage = FindGameObject(GO_CAGE); + Cage->SetGoState(1); } void JustDied(Unit* killer) @@ -224,57 +228,6 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI { npc_escortAI::UpdateAI(diff); } - - void setCage(bool open) - { - CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); - Cell cell(pair); - cell.data.Part.reserved = ALL_DISTRICT; - cell.SetNoCreate(); - - Trinity::AllGameObjectsWithEntryInGrid go_check(GO_CAGE); - Trinity::GameObjectListSearcher go_search(CageList, go_check); - TypeContainerVisitor - , GridTypeMapContainer> go_visit(go_search); - CellLock cell_lock(cell, pair); - cell_lock->Visit(cell_lock, go_visit, *(m_creature->GetMap())); - - if (!CageList.empty()) - { - for(std::list::iterator itr = CageList.begin(); itr != CageList.end(); ++itr) - { - if( open ) - (*itr)->SetGoState(0); - else - (*itr)->SetGoState(1); - } - } else error_log("SD2 ERROR: CageList is empty!"); - } - - void captainAnswer() - { - CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); - Cell cell(pair); - cell.data.Part.reserved = ALL_DISTRICT; - cell.SetNoCreate(); - - std::list NPCList; - - Trinity::AllCreaturesOfEntryInRange check(m_creature, NPC_CAPTAIN_HELIOS, 100); - Trinity::CreatureListSearcher searcher(NPCList, check); - TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); - - CellLock cell_lock(cell, pair); - cell_lock->Visit(cell_lock, visitor, *(m_creature->GetMap())); - - if (!NPCList.empty()) - { - for(std::list::iterator itr = NPCList.begin(); itr != NPCList.end(); ++itr) - { - (*itr)->Say(CAPTAIN_ANSWER, LANG_UNIVERSAL, PlayerGUID); - } - }else error_log("SD2 ERROR: Captain Helios not found!"); - } }; bool QuestAccept_npc_ranger_lilatha(Player* player, Creature* creature, Quest const* quest) -- cgit v1.2.3 From 023efbafdd93b36d4886bf7c2f2fcc167f359d21 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Fri, 26 Dec 2008 13:45:46 +0100 Subject: *New check for SPELL_FAILED_NO_DUELING by dungeons - by redcell --HG-- branch : trunk --- src/game/SpellEffects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index f4bf1af0180..e8fdbf5adce 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -5085,7 +5085,7 @@ void Spell::EffectDuel(uint32 i) // Players can only fight a duel with each other outside (=not inside dungeons and not in capital cities) // Don't have to check the target's map since you cannot challenge someone across maps - if( caster->GetMapId() != 0 && caster->GetMapId() != 1 && caster->GetMapId() != 530) + if(caster->GetMap()->Instanceable()) { SendCastResult(SPELL_FAILED_NO_DUELING); // Dueling isn't allowed here return; -- cgit v1.2.3 From 178ddecde69cb037667ecff8af87aba9e298f976 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Fri, 26 Dec 2008 14:21:29 +0100 Subject: *Restore build on linux - by Lightguard --HG-- branch : trunk --- src/bindings/scripts/include/sc_creature.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/bindings/scripts/include/sc_creature.h b/src/bindings/scripts/include/sc_creature.h index b45fc5fda77..90a66911ac7 100644 --- a/src/bindings/scripts/include/sc_creature.h +++ b/src/bindings/scripts/include/sc_creature.h @@ -152,7 +152,7 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI Unit* FindCreature(uint32 entry, uint32 range); //Get a single gameobject of given entry - GameObject* ScriptedAI::FindGameObject(uint32 entry); + GameObject* FindGameObject(uint32 entry); //Returns friendly unit with the most amount of hp missing from max hp Unit* DoSelectLowestHpFriendly(float range, uint32 MinHPDiff = 1); -- cgit v1.2.3 From d9e8f38eff6a842f3397dec7eb16dd62ee8dc151 Mon Sep 17 00:00:00 2001 From: w12x Date: Fri, 26 Dec 2008 14:55:16 +0100 Subject: Fixed a crash in OutdoorPvPObjective::UpdateActivePlayerProximityCheck caused by incrementing an already deleted iterator. --HG-- branch : trunk --- src/game/OutdoorPvP.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/OutdoorPvP.cpp b/src/game/OutdoorPvP.cpp index f2310aa4e0c..06d56897f1e 100644 --- a/src/game/OutdoorPvP.cpp +++ b/src/game/OutdoorPvP.cpp @@ -446,8 +446,11 @@ void OutdoorPvPObjective::UpdateActivePlayerProximityCheck() { for(int team = 0; team < 2; ++team) { - for(std::set::iterator itr = m_ActivePlayerGuids[team].begin(); itr != m_ActivePlayerGuids[team].end(); ++ itr) + std::set::iterator itr, next; + for(itr = m_ActivePlayerGuids[team].begin(); itr != m_ActivePlayerGuids[team].end(); itr = next) { + next = itr; + ++next; // if the player is online if(Player * pl = objmgr.GetPlayer(*itr)) { -- cgit v1.2.3 From fcba716f402caa0e23405b6b57d6d3f22752dc7f Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Fri, 26 Dec 2008 17:05:13 +0100 Subject: *Fix the crash with Object::SetUInt32Value in ghostlands.cpp --HG-- branch : trunk --- src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp index bf172c1566b..f7c929be704 100644 --- a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp +++ b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp @@ -211,6 +211,7 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI m_creature->setFaction(1602); GameObject* Cage = FindGameObject(GO_CAGE); + if(Cage) Cage->SetGoState(1); } -- cgit v1.2.3 From db1a5d4ba015657706d0b89eca5cb7232a8512d1 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Fri, 26 Dec 2008 17:49:45 +0100 Subject: *Add condition for ghostlands.cpp *Remove unused creature_movement - by EIFEL --HG-- branch : trunk --- src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp | 2 ++ src/game/Creature.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp index f7c929be704..ca9c9c6bf44 100644 --- a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp +++ b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp @@ -162,6 +162,7 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI { m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); GameObject* Cage = FindGameObject(GO_CAGE); + if(Cage) Cage->SetGoState(0); DoSay(SAY_START, LANG_UNIVERSAL, player); break; @@ -198,6 +199,7 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI m_creature->SetOrientation(5.858011); DoSay(SAY_END2, LANG_UNIVERSAL, player); Unit* CaptainHelios = FindCreature(NPC_CAPTAIN_HELIOS, 50); + if(CaptainHelios) ((Creature*)CaptainHelios)->Say(CAPTAIN_ANSWER, LANG_UNIVERSAL, PlayerGUID); break; } diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index c57b8a27fb9..629b5ec6d43 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1519,7 +1519,6 @@ void Creature::DeleteFromDB() WorldDatabase.BeginTransaction(); WorldDatabase.PExecuteLog("DELETE FROM creature WHERE guid = '%u'", m_DBTableGuid); WorldDatabase.PExecuteLog("DELETE FROM creature_addon WHERE guid = '%u'", m_DBTableGuid); - WorldDatabase.PExecuteLog("DELETE FROM creature_movement WHERE id = '%u'", m_DBTableGuid); WorldDatabase.PExecuteLog("DELETE FROM game_event_creature WHERE guid = '%u'", m_DBTableGuid); WorldDatabase.PExecuteLog("DELETE FROM game_event_model_equip WHERE guid = '%u'", m_DBTableGuid); WorldDatabase.CommitTransaction(); -- cgit v1.2.3 From 10003756dfe74fd81deb67a16df32af78337a735 Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 26 Dec 2008 12:23:21 -0600 Subject: *Fix broken damage and healing spells. Patch by Rognar. --HG-- branch : trunk --- src/game/Spell.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 90dbfc0930c..33467e75ad6 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1565,7 +1565,6 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list &TagUnitMap) switch(cur) { case TARGET_UNIT_AREA_ENEMY_GROUND: - case TARGET_UNIT_AREA_ENEMY_CHANNEL: m_targets.m_targetMask |= TARGET_FLAG_DEST_LOCATION; case TARGET_UNIT_AREA_ENEMY: SearchAreaTarget(TagUnitMap, radius, PUSH_DEST_CENTER, SPELL_TARGETS_AOE_DAMAGE); @@ -5317,7 +5316,7 @@ void Spell::CalculateDamageDoneForAllTargets() for(std::list::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) { - TargetInfo target = *ihit; + TargetInfo &target = *ihit; uint32 mask = target.effectMask; if(!mask) -- cgit v1.2.3 From 54ba9c12df7e8cf4c1c928202c645310cd7bb411 Mon Sep 17 00:00:00 2001 From: w12x Date: Fri, 26 Dec 2008 20:15:53 +0100 Subject: Added missing initialization to 3-parameter _SCallback. This fixes 2-parameter async sql callbacks, for instance character renaming. --HG-- branch : trunk --- src/framework/Utilities/Callback.h | 2 +- win/TrinityCore&Script VC90.sln | 302 ++++++++++++++++++------------------- 2 files changed, 152 insertions(+), 152 deletions(-) (limited to 'src') diff --git a/src/framework/Utilities/Callback.h b/src/framework/Utilities/Callback.h index 7335e19c758..84da3e2fc74 100644 --- a/src/framework/Utilities/Callback.h +++ b/src/framework/Utilities/Callback.h @@ -142,7 +142,7 @@ namespace Trinity void _Execute() { (*m_method)(m_param1, m_param2, m_param3); } public: _SCallback(Method method, ParamType1 param1, ParamType2 param2, ParamType3 param3) - : m_method(method), m_param1(param1), m_param2(param2) {} + : m_method(method), m_param1(param1), m_param2(param2), m_param3(param3) {} _SCallback(_SCallback < ParamType1, ParamType2, ParamType3 > const& cb) : m_method(cb.m_method), m_param1(cb.m_param1), m_param2(cb.m_param2), m_param3(cb.m_param3) {} }; diff --git a/win/TrinityCore&Script VC90.sln b/win/TrinityCore&Script VC90.sln index f320ab3f99f..2e749c005c1 100644 --- a/win/TrinityCore&Script VC90.sln +++ b/win/TrinityCore&Script VC90.sln @@ -1,151 +1,151 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game", "VC90\game.vcproj", "{1DC6C4DA-A028-41F3-877D-D5400C594F88}" - ProjectSection(ProjectDependencies) = postProject - {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared", "VC90\shared.vcproj", "{90297C34-F231-4DF4-848E-A74BCC0E40ED}" - ProjectSection(ProjectDependencies) = postProject - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} = {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8} = {BD537C9A-FECA-1BAD-6757-8A6348EA12C8} - {8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {8072769E-CF10-48BF-B9E1-12752A5DAC6E} - {262199E8-EEDF-4700-A1D1-E9CC901CF480} = {262199E8-EEDF-4700-A1D1-E9CC901CF480} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zthread", "VC90\zthread.vcproj", "{262199E8-EEDF-4700-A1D1-E9CC901CF480}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "VC90\zlib.vcproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "framework", "VC90\framework.vcproj", "{BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "VC90\g3dlite.vcproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sockets", "VC90\sockets.vcproj", "{04BAF755-0D67-46F8-B1C6-77AE5368F3CB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrinityCore", "VC90\TrinityCore.vcproj", "{A3A04E47-43A2-4C08-90B3-029CEF558594}" - ProjectSection(ProjectDependencies) = postProject - {563E9905-3657-460C-AE63-0AC39D162E23} = {563E9905-3657-460C-AE63-0AC39D162E23} - {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} = {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} - {1DC6C4DA-A028-41F3-877D-D5400C594F88} = {1DC6C4DA-A028-41F3-877D-D5400C594F88} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrinityRealm", "VC90\TrinityRealm.vcproj", "{563E9905-3657-460C-AE63-0AC39D162E23}" - ProjectSection(ProjectDependencies) = postProject - {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} = {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScriptsFull", "..\src\bindings\scripts\VC90\90ScriptDev2.vcproj", "{4295C8A9-79B7-4354-8064-F05FB9CA0C96}" - ProjectSection(ProjectDependencies) = postProject - {A3A04E47-43A2-4C08-90B3-029CEF558594} = {A3A04E47-43A2-4C08-90B3-029CEF558594} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ACEWraper", "VC90\ACE_vc9.vcproj", "{BD537C9A-FECA-1BAD-6757-8A6348EA12C8}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|Win32.ActiveCfg = Debug|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|Win32.Build.0 = Debug|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|x64.ActiveCfg = Debug|x64 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|x64.Build.0 = Debug|x64 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|Win32.ActiveCfg = Release|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|Win32.Build.0 = Release|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|x64.ActiveCfg = Release|x64 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|x64.Build.0 = Release|x64 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|Win32.ActiveCfg = Debug|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|Win32.Build.0 = Debug|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|x64.ActiveCfg = Debug|x64 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|x64.Build.0 = Debug|x64 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|Win32.ActiveCfg = Release|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|Win32.Build.0 = Release|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|x64.ActiveCfg = Release|x64 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|x64.Build.0 = Release|x64 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|Win32.ActiveCfg = Debug|Win32 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|Win32.Build.0 = Debug|Win32 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|x64.ActiveCfg = Debug|x64 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|x64.Build.0 = Debug|x64 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|Win32.ActiveCfg = Release|Win32 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|Win32.Build.0 = Release|Win32 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|x64.ActiveCfg = Release|x64 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|x64.Build.0 = Release|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.ActiveCfg = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.Build.0 = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.ActiveCfg = Debug|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.Build.0 = Debug|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.ActiveCfg = Release|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.Build.0 = Release|x64 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|Win32.ActiveCfg = Debug|Win32 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|Win32.Build.0 = Debug|Win32 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|x64.ActiveCfg = Debug|x64 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|x64.Build.0 = Debug|x64 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|Win32.ActiveCfg = Release|Win32 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|Win32.Build.0 = Release|Win32 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|x64.ActiveCfg = Release|x64 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|x64.Build.0 = Release|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.ActiveCfg = Debug|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.Build.0 = Debug|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.ActiveCfg = Release|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.Build.0 = Release|x64 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|Win32.ActiveCfg = Debug|Win32 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|Win32.Build.0 = Debug|Win32 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|x64.ActiveCfg = Debug|x64 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|x64.Build.0 = Debug|x64 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|Win32.ActiveCfg = Release|Win32 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|Win32.Build.0 = Release|Win32 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|x64.ActiveCfg = Release|x64 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|x64.Build.0 = Release|x64 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|Win32.ActiveCfg = Debug|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|Win32.Build.0 = Debug|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|x64.ActiveCfg = Debug|x64 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|x64.Build.0 = Debug|x64 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|Win32.ActiveCfg = Release|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|Win32.Build.0 = Release|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|x64.ActiveCfg = Release|x64 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|x64.Build.0 = Release|x64 - {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|Win32.ActiveCfg = Debug|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|Win32.Build.0 = Debug|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|x64.ActiveCfg = Debug|x64 - {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|x64.Build.0 = Debug|x64 - {563E9905-3657-460C-AE63-0AC39D162E23}.Release|Win32.ActiveCfg = Release|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Release|Win32.Build.0 = Release|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Release|x64.ActiveCfg = Release|x64 - {563E9905-3657-460C-AE63-0AC39D162E23}.Release|x64.Build.0 = Release|x64 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.ActiveCfg = Debug|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.Build.0 = Debug|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.ActiveCfg = Debug|x64 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.Build.0 = Debug|x64 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.ActiveCfg = Release|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.Build.0 = Release|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.ActiveCfg = Release|x64 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.Build.0 = Release|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|Win32.ActiveCfg = Debug|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|Win32.Build.0 = Debug|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|x64.ActiveCfg = Debug|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|x64.Build.0 = Debug|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|Win32.ActiveCfg = Release|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|Win32.Build.0 = Release|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|x64.ActiveCfg = Release|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(DPCodeReviewSolutionGUID) = preSolution - DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game", "VC90\game.vcproj", "{1DC6C4DA-A028-41F3-877D-D5400C594F88}" + ProjectSection(ProjectDependencies) = postProject + {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared", "VC90\shared.vcproj", "{90297C34-F231-4DF4-848E-A74BCC0E40ED}" + ProjectSection(ProjectDependencies) = postProject + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} = {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8} = {BD537C9A-FECA-1BAD-6757-8A6348EA12C8} + {8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {8072769E-CF10-48BF-B9E1-12752A5DAC6E} + {262199E8-EEDF-4700-A1D1-E9CC901CF480} = {262199E8-EEDF-4700-A1D1-E9CC901CF480} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zthread", "VC90\zthread.vcproj", "{262199E8-EEDF-4700-A1D1-E9CC901CF480}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "VC90\zlib.vcproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "framework", "VC90\framework.vcproj", "{BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "VC90\g3dlite.vcproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sockets", "VC90\sockets.vcproj", "{04BAF755-0D67-46F8-B1C6-77AE5368F3CB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrinityCore", "VC90\TrinityCore.vcproj", "{A3A04E47-43A2-4C08-90B3-029CEF558594}" + ProjectSection(ProjectDependencies) = postProject + {563E9905-3657-460C-AE63-0AC39D162E23} = {563E9905-3657-460C-AE63-0AC39D162E23} + {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} = {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} + {1DC6C4DA-A028-41F3-877D-D5400C594F88} = {1DC6C4DA-A028-41F3-877D-D5400C594F88} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrinityRealm", "VC90\TrinityRealm.vcproj", "{563E9905-3657-460C-AE63-0AC39D162E23}" + ProjectSection(ProjectDependencies) = postProject + {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} = {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScriptsFull", "..\src\bindings\scripts\VC90\90ScriptDev2.vcproj", "{4295C8A9-79B7-4354-8064-F05FB9CA0C96}" + ProjectSection(ProjectDependencies) = postProject + {A3A04E47-43A2-4C08-90B3-029CEF558594} = {A3A04E47-43A2-4C08-90B3-029CEF558594} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ACEWraper", "VC90\ACE_vc9.vcproj", "{BD537C9A-FECA-1BAD-6757-8A6348EA12C8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|Win32.ActiveCfg = Debug|Win32 + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|Win32.Build.0 = Debug|Win32 + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|x64.ActiveCfg = Debug|x64 + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|x64.Build.0 = Debug|x64 + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|Win32.ActiveCfg = Release|Win32 + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|Win32.Build.0 = Release|Win32 + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|x64.ActiveCfg = Release|x64 + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|x64.Build.0 = Release|x64 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|Win32.ActiveCfg = Debug|Win32 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|Win32.Build.0 = Debug|Win32 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|x64.ActiveCfg = Debug|x64 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|x64.Build.0 = Debug|x64 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|Win32.ActiveCfg = Release|Win32 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|Win32.Build.0 = Release|Win32 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|x64.ActiveCfg = Release|x64 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|x64.Build.0 = Release|x64 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|Win32.ActiveCfg = Debug|Win32 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|Win32.Build.0 = Debug|Win32 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|x64.ActiveCfg = Debug|x64 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|x64.Build.0 = Debug|x64 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|Win32.ActiveCfg = Release|Win32 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|Win32.Build.0 = Release|Win32 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|x64.ActiveCfg = Release|x64 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|x64.Build.0 = Release|x64 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.ActiveCfg = Debug|Win32 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.Build.0 = Debug|Win32 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.ActiveCfg = Debug|x64 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.Build.0 = Debug|x64 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.ActiveCfg = Release|x64 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.Build.0 = Release|x64 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|Win32.ActiveCfg = Debug|Win32 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|Win32.Build.0 = Debug|Win32 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|x64.ActiveCfg = Debug|x64 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|x64.Build.0 = Debug|x64 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|Win32.ActiveCfg = Release|Win32 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|Win32.Build.0 = Release|Win32 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|x64.ActiveCfg = Release|x64 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|x64.Build.0 = Release|x64 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.ActiveCfg = Debug|x64 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.Build.0 = Debug|x64 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.ActiveCfg = Release|x64 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.Build.0 = Release|x64 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|Win32.ActiveCfg = Debug|Win32 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|Win32.Build.0 = Debug|Win32 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|x64.ActiveCfg = Debug|x64 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|x64.Build.0 = Debug|x64 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|Win32.ActiveCfg = Release|Win32 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|Win32.Build.0 = Release|Win32 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|x64.ActiveCfg = Release|x64 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|x64.Build.0 = Release|x64 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|Win32.ActiveCfg = Debug|Win32 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|Win32.Build.0 = Debug|Win32 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|x64.ActiveCfg = Debug|x64 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|x64.Build.0 = Debug|x64 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|Win32.ActiveCfg = Release|Win32 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|Win32.Build.0 = Release|Win32 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|x64.ActiveCfg = Release|x64 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|x64.Build.0 = Release|x64 + {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|Win32.ActiveCfg = Debug|Win32 + {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|Win32.Build.0 = Debug|Win32 + {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|x64.ActiveCfg = Debug|x64 + {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|x64.Build.0 = Debug|x64 + {563E9905-3657-460C-AE63-0AC39D162E23}.Release|Win32.ActiveCfg = Release|Win32 + {563E9905-3657-460C-AE63-0AC39D162E23}.Release|Win32.Build.0 = Release|Win32 + {563E9905-3657-460C-AE63-0AC39D162E23}.Release|x64.ActiveCfg = Release|x64 + {563E9905-3657-460C-AE63-0AC39D162E23}.Release|x64.Build.0 = Release|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.ActiveCfg = Debug|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.Build.0 = Debug|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.ActiveCfg = Debug|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.Build.0 = Debug|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.ActiveCfg = Release|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.Build.0 = Release|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.ActiveCfg = Release|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.Build.0 = Release|x64 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|Win32.ActiveCfg = Debug|Win32 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|Win32.Build.0 = Debug|Win32 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|x64.ActiveCfg = Debug|x64 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|x64.Build.0 = Debug|x64 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|Win32.ActiveCfg = Release|Win32 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|Win32.Build.0 = Release|Win32 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|x64.ActiveCfg = Release|x64 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(DPCodeReviewSolutionGUID) = preSolution + DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} + EndGlobalSection +EndGlobal -- cgit v1.2.3 From f6b2eb4e5b0aea5e29c7220d97c420d5abeca1b8 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Fri, 26 Dec 2008 20:25:31 +0100 Subject: *Gossips for creature 20907 --HG-- branch : trunk --- sql/updates/667_world_scripts.sql | 1 + .../scripts/zone/netherstorm/netherstorm.cpp | 54 +++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 sql/updates/667_world_scripts.sql (limited to 'src') diff --git a/sql/updates/667_world_scripts.sql b/sql/updates/667_world_scripts.sql new file mode 100644 index 00000000000..1da0cea44e1 --- /dev/null +++ b/sql/updates/667_world_scripts.sql @@ -0,0 +1 @@ +update creature_template set scriptname='npc_professor_dabiri' where entry=20907; \ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp b/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp index 555ffc0b769..8d1c528f7ae 100644 --- a/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp +++ b/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp @@ -670,11 +670,13 @@ bool AreaTrigger_at_commander_dawnforge(Player *player, AreaTriggerEntry *at) ## npc_protectorate_nether_drake ######*/ +#define GOSSIP_ITEM "I'm ready to fly! Take me up, dragon!" + bool GossipHello_npc_protectorate_nether_drake(Player *player, Creature *_Creature) { //On Nethery Wings if (player->GetQuestStatus(10438) == QUEST_STATUS_INCOMPLETE && player->HasItemCount(29778,1) ) - player->ADD_GOSSIP_ITEM(0, "Fly me to Ultris", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID()); @@ -697,6 +699,49 @@ bool GossipSelect_npc_protectorate_nether_drake(Player *player, Creature *_Creat return true; } +/*###### +## npc_professor_dabiri +######*/ + +#define SPELL_PHASE_DISTRUPTOR 35780 +#define GOSSIP_ITEM "I need a new phase distruptor, Professor" +#define WHISPER_DABIRI "Saeed is currently engaged or awaiting orders to engage. You may check directly east of me and see if Saeed is ready for you. If he is not present then he is off fighting another battle. I recommend that you wait for him to return before attacking Dimensius." + +#define QUEST_DIMENSIUS 10439 +#define QUEST_ON_NETHERY_WINGS 10438 + +bool GossipHello_npc_professor_dabiri(Player *player, Creature *_Creature) +{ + if (_Creature->isQuestGiver()) + player->PrepareQuestMenu( _Creature->GetGUID() ); + + if(player->GetQuestStatus(QUEST_ON_NETHERY_WINGS) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(29778, 1)) + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_professor_dabiri(Player *player, Creature *_Creature, uint32 sender, uint32 action ) +{ + if (action == GOSSIP_ACTION_INFO_DEF+1) + { + _Creature->CastSpell(player, SPELL_PHASE_DISTRUPTOR, false); + player->CLOSE_GOSSIP_MENU(); + } + + return true; +} + +bool QuestAccept_npc_professor_dabiri(Player *player, Creature *creature, Quest const *quest ) +{ + if(quest->GetQuestId() == QUEST_DIMENSIUS) + creature->Whisper(WHISPER_DABIRI, player->GetGUID(), false); + + return true; +} + /*###### ## npc_veronia ######*/ @@ -870,6 +915,13 @@ void AddSC_netherstorm() newscript->pGossipSelect = &GossipSelect_npc_protectorate_nether_drake; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "npc_professor_dabiri"; + newscript->pGossipHello = &GossipHello_npc_professor_dabiri; + newscript->pGossipSelect = &GossipSelect_npc_professor_dabiri; + newscript->pQuestAccept = &QuestAccept_npc_professor_dabiri; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name="npc_veronia"; newscript->pGossipHello = &GossipHello_npc_veronia; -- cgit v1.2.3 From c58a199db80fd3d24075582d239f782416c78de1 Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 26 Dec 2008 15:46:10 -0600 Subject: *Try to fix the bug about crash caused by waypoint. --HG-- branch : trunk --- src/game/WaypointMovementGenerator.cpp | 12 +++++++++--- src/game/WaypointMovementGenerator.h | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp index 85ef44b51be..67c56d763bc 100644 --- a/src/game/WaypointMovementGenerator.cpp +++ b/src/game/WaypointMovementGenerator.cpp @@ -36,11 +36,17 @@ void WaypointMovementGenerator::Initialize(Creature &u) { u.StopMoving(); - i_nextMoveTime.Reset(0); - i_currentNode = -1; if(!path_id) path_id = u.GetWaypointPath(); - waypoints = WaypointMgr.GetPath(path_id); + waypoints = WaypointMgr.GetPath(path_id); + if(waypoints && waypoints->size()) + { + Traveller traveller(unit); + node = *(waypoints->at(i_currentNode)); + InitTraveller(u,node); + i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z); + i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime()); + } } template<> diff --git a/src/game/WaypointMovementGenerator.h b/src/game/WaypointMovementGenerator.h index 5e01984d42c..99d111063de 100644 --- a/src/game/WaypointMovementGenerator.h +++ b/src/game/WaypointMovementGenerator.h @@ -81,7 +81,7 @@ class TRINITY_DLL_SPEC WaypointMovementGenerator private: WaypointData node; - uint32 i_currentNode, path_id; + uint32 path_id; TimeTrackerSmall i_nextMoveTime; WaypointPath *waypoints; bool repeating, StopedByPlayer; -- cgit v1.2.3 From 032de9a49108b2df6ee01c92c7de2557e4eb6136 Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 26 Dec 2008 15:55:12 -0600 Subject: *Update IsAOE function. --HG-- branch : trunk --- src/game/SharedDefines.h | 4 ++-- src/game/SpellEffects.cpp | 2 +- src/game/SpellMgr.cpp | 32 +++++++++++++++++++++++++++++++- src/game/SpellMgr.h | 32 ++++---------------------------- src/game/Unit.cpp | 2 +- 5 files changed, 39 insertions(+), 33 deletions(-) (limited to 'src') diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 51fba0b48ed..07840998cf2 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -821,7 +821,7 @@ enum Targets TARGET_GAMEOBJECT = 23, //TARGET_OBJECT_OPEN TARGET_IN_FRONT_OF_CASTER = 24, - //TARGET_UNIT_CONE_ENEMY + TARGET_UNIT_CONE_ENEMY = 24, TARGET_DUELVSPLAYER = 25, TARGET_UNIT_TARGET_ANY = 25, TARGET_GAMEOBJECT_ITEM = 26, @@ -874,7 +874,7 @@ enum Targets TARGET_UNIT_CONE_ALLY = 59, TARGET_UNIT_AREA_SCRIPT = 60, TARGET_AREAEFFECT_PARTY_AND_CLASS = 61, - //TARGET_UNIT_CLASS_TARGET + TARGET_UNIT_CLASS_TARGET = 61, TARGET_TEST = 62, // for a test spell TARGET_DUELVSPLAYER_COORDINATES = 63, TARGET_DEST_TARGET_ENEMY_UNKNOWN = 63, diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index e8fdbf5adce..85984eeaa3d 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -568,7 +568,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) //TODO: should this be put on taken but not done? if(found) - m_damage += m_spellInfo->EffectBasePoints[1]; + damage += m_spellInfo->EffectBasePoints[1]; } //Explosive Trap Effect else if(m_spellInfo->SpellFamilyFlags & 0x00000004) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 2e285ea7176..6f6cb7e8d65 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -118,7 +118,8 @@ SpellMgr::SpellMgr() case TARGET_UNIT_AREA_ENTRY: case TARGET_UNIT_AREA_PARTY_GROUND: case TARGET_UNIT_AREA_PARTY: - case TARGET_UNIT_AREA_ENEMY_CHANNEL: + //case TARGET_UNIT_AREA_ENEMY_CHANNEL: + //case TARGET_UNIT_AREA_ALLY_CHANNEL: SpellTargetType[i] = TARGET_TYPE_AREA_DEST; break; case TARGET_DEST_TARGET_ENEMY: @@ -156,6 +157,35 @@ SpellMgr::SpellMgr() SpellTargetType[i] = TARGET_TYPE_DEFAULT; } } + + for(int i = 0; i < TOTAL_SPELL_TARGETS; ++i) + { + switch(i) + { + case TARGET_UNIT_AREA_ENEMY_GROUND: + case TARGET_UNIT_AREA_ENEMY: + case TARGET_UNIT_AREA_ALLY_GROUND: + case TARGET_UNIT_AREA_ALLY: + case TARGET_UNIT_AREA_ENTRY_GROUND: + case TARGET_UNIT_AREA_ENTRY: + case TARGET_UNIT_AREA_PARTY_GROUND: + case TARGET_UNIT_AREA_PARTY: + //Check persistant aura seperately + //case TARGET_UNIT_AREA_ENEMY_CHANNEL: + //case TARGET_UNIT_AREA_ALLY_CHANNEL: + case TARGET_UNIT_PARTY_TARGET: + case TARGET_UNIT_PARTY_CASTER: + case TARGET_UNIT_CONE_ENEMY: + case TARGET_UNIT_CONE_ALLY: + case TARGET_UNIT_CONE_ENEMY_UNKNOWN: + case TARGET_UNIT_RAID: + IsAreaEffectTarget[i] = true; + break; + default: + IsAreaEffectTarget[i] = false; + break; + } + } } SpellMgr::~SpellMgr() diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index d8b4b866655..716760a70c6 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -359,38 +359,14 @@ bool IsAuraAddedBySpell(uint32 auraType, uint32 spellId); bool IsSpellAllowedInLocation(SpellEntry const *spellInfo,uint32 map_id,uint32 zone_id,uint32 area_id); -inline bool IsAreaEffectTarget( Targets target ) -{ - switch (target ) - { - case TARGET_AREAEFFECT_CUSTOM: - case TARGET_ALL_ENEMY_IN_AREA: - case TARGET_ALL_ENEMY_IN_AREA_INSTANT: - case TARGET_ALL_PARTY_AROUND_CASTER: - case TARGET_ALL_AROUND_CASTER: - case TARGET_ALL_ENEMY_IN_AREA_CHANNELED: - case TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER: - case TARGET_ALL_PARTY: - case TARGET_ALL_PARTY_AROUND_CASTER_2: - case TARGET_AREAEFFECT_PARTY: - case TARGET_AREAEFFECT_CUSTOM_2: - case TARGET_AREAEFFECT_PARTY_AND_CLASS: - case TARGET_IN_FRONT_OF_CASTER: - case TARGET_ALL_FRIENDLY_UNITS_IN_AREA: - return true; - default: - break; - } - return false; -} - +static bool IsAreaEffectTarget[TOTAL_SPELL_TARGETS]; inline bool IsAreaOfEffectSpell(SpellEntry const *spellInfo) { - if(IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetA[0])) || IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetB[0]))) + if(IsAreaEffectTarget[spellInfo->EffectImplicitTargetA[0]] || IsAreaEffectTarget[spellInfo->EffectImplicitTargetB[0]]) return true; - if(IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetA[1])) || IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetB[1]))) + if(IsAreaEffectTarget[spellInfo->EffectImplicitTargetA[1]] || IsAreaEffectTarget[spellInfo->EffectImplicitTargetB[1]]) return true; - if(IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetA[2])) || IsAreaEffectTarget(Targets(spellInfo->EffectImplicitTargetB[2]))) + if(IsAreaEffectTarget[spellInfo->EffectImplicitTargetA[2]] || IsAreaEffectTarget[spellInfo->EffectImplicitTargetB[2]]) return true; return false; } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a079964ce3e..010c5a4d8c4 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -12243,7 +12243,7 @@ uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectT break; } - if(IsAreaEffectTarget(Targets(spellProto->EffectImplicitTargetA[i])) || IsAreaEffectTarget(Targets(spellProto->EffectImplicitTargetB[i]))) + if(IsAreaEffectTarget[spellProto->EffectImplicitTargetA[i]] || IsAreaEffectTarget[spellProto->EffectImplicitTargetB[i]]) AreaEffect = true; } -- cgit v1.2.3 From 5818075b2872b81f01251e229e462314f2ddd805 Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 26 Dec 2008 15:59:39 -0600 Subject: Backed out changeset: 2c9f52df4699 --HG-- branch : trunk --- src/framework/Utilities/Callback.h | 2 +- win/TrinityCore&Script VC90.sln | 302 ++++++++++++++++++------------------- 2 files changed, 152 insertions(+), 152 deletions(-) (limited to 'src') diff --git a/src/framework/Utilities/Callback.h b/src/framework/Utilities/Callback.h index 84da3e2fc74..7335e19c758 100644 --- a/src/framework/Utilities/Callback.h +++ b/src/framework/Utilities/Callback.h @@ -142,7 +142,7 @@ namespace Trinity void _Execute() { (*m_method)(m_param1, m_param2, m_param3); } public: _SCallback(Method method, ParamType1 param1, ParamType2 param2, ParamType3 param3) - : m_method(method), m_param1(param1), m_param2(param2), m_param3(param3) {} + : m_method(method), m_param1(param1), m_param2(param2) {} _SCallback(_SCallback < ParamType1, ParamType2, ParamType3 > const& cb) : m_method(cb.m_method), m_param1(cb.m_param1), m_param2(cb.m_param2), m_param3(cb.m_param3) {} }; diff --git a/win/TrinityCore&Script VC90.sln b/win/TrinityCore&Script VC90.sln index 2e749c005c1..f320ab3f99f 100644 --- a/win/TrinityCore&Script VC90.sln +++ b/win/TrinityCore&Script VC90.sln @@ -1,151 +1,151 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game", "VC90\game.vcproj", "{1DC6C4DA-A028-41F3-877D-D5400C594F88}" - ProjectSection(ProjectDependencies) = postProject - {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared", "VC90\shared.vcproj", "{90297C34-F231-4DF4-848E-A74BCC0E40ED}" - ProjectSection(ProjectDependencies) = postProject - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} = {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8} = {BD537C9A-FECA-1BAD-6757-8A6348EA12C8} - {8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {8072769E-CF10-48BF-B9E1-12752A5DAC6E} - {262199E8-EEDF-4700-A1D1-E9CC901CF480} = {262199E8-EEDF-4700-A1D1-E9CC901CF480} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zthread", "VC90\zthread.vcproj", "{262199E8-EEDF-4700-A1D1-E9CC901CF480}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "VC90\zlib.vcproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "framework", "VC90\framework.vcproj", "{BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "VC90\g3dlite.vcproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sockets", "VC90\sockets.vcproj", "{04BAF755-0D67-46F8-B1C6-77AE5368F3CB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrinityCore", "VC90\TrinityCore.vcproj", "{A3A04E47-43A2-4C08-90B3-029CEF558594}" - ProjectSection(ProjectDependencies) = postProject - {563E9905-3657-460C-AE63-0AC39D162E23} = {563E9905-3657-460C-AE63-0AC39D162E23} - {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} = {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} - {1DC6C4DA-A028-41F3-877D-D5400C594F88} = {1DC6C4DA-A028-41F3-877D-D5400C594F88} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrinityRealm", "VC90\TrinityRealm.vcproj", "{563E9905-3657-460C-AE63-0AC39D162E23}" - ProjectSection(ProjectDependencies) = postProject - {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} = {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScriptsFull", "..\src\bindings\scripts\VC90\90ScriptDev2.vcproj", "{4295C8A9-79B7-4354-8064-F05FB9CA0C96}" - ProjectSection(ProjectDependencies) = postProject - {A3A04E47-43A2-4C08-90B3-029CEF558594} = {A3A04E47-43A2-4C08-90B3-029CEF558594} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ACEWraper", "VC90\ACE_vc9.vcproj", "{BD537C9A-FECA-1BAD-6757-8A6348EA12C8}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|Win32.ActiveCfg = Debug|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|Win32.Build.0 = Debug|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|x64.ActiveCfg = Debug|x64 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|x64.Build.0 = Debug|x64 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|Win32.ActiveCfg = Release|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|Win32.Build.0 = Release|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|x64.ActiveCfg = Release|x64 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|x64.Build.0 = Release|x64 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|Win32.ActiveCfg = Debug|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|Win32.Build.0 = Debug|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|x64.ActiveCfg = Debug|x64 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|x64.Build.0 = Debug|x64 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|Win32.ActiveCfg = Release|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|Win32.Build.0 = Release|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|x64.ActiveCfg = Release|x64 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|x64.Build.0 = Release|x64 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|Win32.ActiveCfg = Debug|Win32 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|Win32.Build.0 = Debug|Win32 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|x64.ActiveCfg = Debug|x64 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|x64.Build.0 = Debug|x64 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|Win32.ActiveCfg = Release|Win32 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|Win32.Build.0 = Release|Win32 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|x64.ActiveCfg = Release|x64 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|x64.Build.0 = Release|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.ActiveCfg = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.Build.0 = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.ActiveCfg = Debug|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.Build.0 = Debug|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.ActiveCfg = Release|x64 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.Build.0 = Release|x64 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|Win32.ActiveCfg = Debug|Win32 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|Win32.Build.0 = Debug|Win32 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|x64.ActiveCfg = Debug|x64 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|x64.Build.0 = Debug|x64 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|Win32.ActiveCfg = Release|Win32 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|Win32.Build.0 = Release|Win32 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|x64.ActiveCfg = Release|x64 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|x64.Build.0 = Release|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.ActiveCfg = Debug|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.Build.0 = Debug|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.ActiveCfg = Release|x64 - {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.Build.0 = Release|x64 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|Win32.ActiveCfg = Debug|Win32 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|Win32.Build.0 = Debug|Win32 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|x64.ActiveCfg = Debug|x64 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|x64.Build.0 = Debug|x64 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|Win32.ActiveCfg = Release|Win32 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|Win32.Build.0 = Release|Win32 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|x64.ActiveCfg = Release|x64 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|x64.Build.0 = Release|x64 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|Win32.ActiveCfg = Debug|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|Win32.Build.0 = Debug|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|x64.ActiveCfg = Debug|x64 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|x64.Build.0 = Debug|x64 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|Win32.ActiveCfg = Release|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|Win32.Build.0 = Release|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|x64.ActiveCfg = Release|x64 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|x64.Build.0 = Release|x64 - {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|Win32.ActiveCfg = Debug|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|Win32.Build.0 = Debug|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|x64.ActiveCfg = Debug|x64 - {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|x64.Build.0 = Debug|x64 - {563E9905-3657-460C-AE63-0AC39D162E23}.Release|Win32.ActiveCfg = Release|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Release|Win32.Build.0 = Release|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Release|x64.ActiveCfg = Release|x64 - {563E9905-3657-460C-AE63-0AC39D162E23}.Release|x64.Build.0 = Release|x64 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.ActiveCfg = Debug|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.Build.0 = Debug|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.ActiveCfg = Debug|x64 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.Build.0 = Debug|x64 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.ActiveCfg = Release|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.Build.0 = Release|Win32 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.ActiveCfg = Release|x64 - {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.Build.0 = Release|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|Win32.ActiveCfg = Debug|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|Win32.Build.0 = Debug|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|x64.ActiveCfg = Debug|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|x64.Build.0 = Debug|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|Win32.ActiveCfg = Release|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|Win32.Build.0 = Release|Win32 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|x64.ActiveCfg = Release|x64 - {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(DPCodeReviewSolutionGUID) = preSolution - DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game", "VC90\game.vcproj", "{1DC6C4DA-A028-41F3-877D-D5400C594F88}" + ProjectSection(ProjectDependencies) = postProject + {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared", "VC90\shared.vcproj", "{90297C34-F231-4DF4-848E-A74BCC0E40ED}" + ProjectSection(ProjectDependencies) = postProject + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} = {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8} = {BD537C9A-FECA-1BAD-6757-8A6348EA12C8} + {8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {8072769E-CF10-48BF-B9E1-12752A5DAC6E} + {262199E8-EEDF-4700-A1D1-E9CC901CF480} = {262199E8-EEDF-4700-A1D1-E9CC901CF480} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zthread", "VC90\zthread.vcproj", "{262199E8-EEDF-4700-A1D1-E9CC901CF480}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "VC90\zlib.vcproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "framework", "VC90\framework.vcproj", "{BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "VC90\g3dlite.vcproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sockets", "VC90\sockets.vcproj", "{04BAF755-0D67-46F8-B1C6-77AE5368F3CB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrinityCore", "VC90\TrinityCore.vcproj", "{A3A04E47-43A2-4C08-90B3-029CEF558594}" + ProjectSection(ProjectDependencies) = postProject + {563E9905-3657-460C-AE63-0AC39D162E23} = {563E9905-3657-460C-AE63-0AC39D162E23} + {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} = {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} + {1DC6C4DA-A028-41F3-877D-D5400C594F88} = {1DC6C4DA-A028-41F3-877D-D5400C594F88} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrinityRealm", "VC90\TrinityRealm.vcproj", "{563E9905-3657-460C-AE63-0AC39D162E23}" + ProjectSection(ProjectDependencies) = postProject + {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} = {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScriptsFull", "..\src\bindings\scripts\VC90\90ScriptDev2.vcproj", "{4295C8A9-79B7-4354-8064-F05FB9CA0C96}" + ProjectSection(ProjectDependencies) = postProject + {A3A04E47-43A2-4C08-90B3-029CEF558594} = {A3A04E47-43A2-4C08-90B3-029CEF558594} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ACEWraper", "VC90\ACE_vc9.vcproj", "{BD537C9A-FECA-1BAD-6757-8A6348EA12C8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|Win32.ActiveCfg = Debug|Win32 + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|Win32.Build.0 = Debug|Win32 + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|x64.ActiveCfg = Debug|x64 + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug|x64.Build.0 = Debug|x64 + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|Win32.ActiveCfg = Release|Win32 + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|Win32.Build.0 = Release|Win32 + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|x64.ActiveCfg = Release|x64 + {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release|x64.Build.0 = Release|x64 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|Win32.ActiveCfg = Debug|Win32 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|Win32.Build.0 = Debug|Win32 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|x64.ActiveCfg = Debug|x64 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug|x64.Build.0 = Debug|x64 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|Win32.ActiveCfg = Release|Win32 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|Win32.Build.0 = Release|Win32 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|x64.ActiveCfg = Release|x64 + {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release|x64.Build.0 = Release|x64 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|Win32.ActiveCfg = Debug|Win32 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|Win32.Build.0 = Debug|Win32 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|x64.ActiveCfg = Debug|x64 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug|x64.Build.0 = Debug|x64 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|Win32.ActiveCfg = Release|Win32 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|Win32.Build.0 = Release|Win32 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|x64.ActiveCfg = Release|x64 + {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release|x64.Build.0 = Release|x64 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.ActiveCfg = Debug|Win32 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.Build.0 = Debug|Win32 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.ActiveCfg = Debug|x64 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.Build.0 = Debug|x64 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.ActiveCfg = Release|x64 + {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.Build.0 = Release|x64 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|Win32.ActiveCfg = Debug|Win32 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|Win32.Build.0 = Debug|Win32 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|x64.ActiveCfg = Debug|x64 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug|x64.Build.0 = Debug|x64 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|Win32.ActiveCfg = Release|Win32 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|Win32.Build.0 = Release|Win32 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|x64.ActiveCfg = Release|x64 + {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release|x64.Build.0 = Release|x64 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.ActiveCfg = Debug|x64 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.Build.0 = Debug|x64 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.ActiveCfg = Release|x64 + {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.Build.0 = Release|x64 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|Win32.ActiveCfg = Debug|Win32 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|Win32.Build.0 = Debug|Win32 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|x64.ActiveCfg = Debug|x64 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug|x64.Build.0 = Debug|x64 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|Win32.ActiveCfg = Release|Win32 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|Win32.Build.0 = Release|Win32 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|x64.ActiveCfg = Release|x64 + {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|x64.Build.0 = Release|x64 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|Win32.ActiveCfg = Debug|Win32 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|Win32.Build.0 = Debug|Win32 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|x64.ActiveCfg = Debug|x64 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug|x64.Build.0 = Debug|x64 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|Win32.ActiveCfg = Release|Win32 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|Win32.Build.0 = Release|Win32 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|x64.ActiveCfg = Release|x64 + {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release|x64.Build.0 = Release|x64 + {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|Win32.ActiveCfg = Debug|Win32 + {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|Win32.Build.0 = Debug|Win32 + {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|x64.ActiveCfg = Debug|x64 + {563E9905-3657-460C-AE63-0AC39D162E23}.Debug|x64.Build.0 = Debug|x64 + {563E9905-3657-460C-AE63-0AC39D162E23}.Release|Win32.ActiveCfg = Release|Win32 + {563E9905-3657-460C-AE63-0AC39D162E23}.Release|Win32.Build.0 = Release|Win32 + {563E9905-3657-460C-AE63-0AC39D162E23}.Release|x64.ActiveCfg = Release|x64 + {563E9905-3657-460C-AE63-0AC39D162E23}.Release|x64.Build.0 = Release|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.ActiveCfg = Debug|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.Build.0 = Debug|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.ActiveCfg = Debug|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.Build.0 = Debug|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.ActiveCfg = Release|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.Build.0 = Release|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.ActiveCfg = Release|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.Build.0 = Release|x64 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|Win32.ActiveCfg = Debug|Win32 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|Win32.Build.0 = Debug|Win32 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|x64.ActiveCfg = Debug|x64 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Debug|x64.Build.0 = Debug|x64 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|Win32.ActiveCfg = Release|Win32 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|Win32.Build.0 = Release|Win32 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|x64.ActiveCfg = Release|x64 + {BD537C9A-FECA-1BAD-6757-8A6348EA12C8}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(DPCodeReviewSolutionGUID) = preSolution + DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} + EndGlobalSection +EndGlobal -- cgit v1.2.3 From bb3eece60eee973237b7bedbaf3e2548f4fe70bb Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 26 Dec 2008 16:07:26 -0600 Subject: *Reapply rev 666. --HG-- branch : trunk --- src/framework/Utilities/Callback.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/framework/Utilities/Callback.h b/src/framework/Utilities/Callback.h index 7335e19c758..84da3e2fc74 100644 --- a/src/framework/Utilities/Callback.h +++ b/src/framework/Utilities/Callback.h @@ -142,7 +142,7 @@ namespace Trinity void _Execute() { (*m_method)(m_param1, m_param2, m_param3); } public: _SCallback(Method method, ParamType1 param1, ParamType2 param2, ParamType3 param3) - : m_method(method), m_param1(param1), m_param2(param2) {} + : m_method(method), m_param1(param1), m_param2(param2), m_param3(param3) {} _SCallback(_SCallback < ParamType1, ParamType2, ParamType3 > const& cb) : m_method(cb.m_method), m_param1(cb.m_param1), m_param2(cb.m_param2), m_param3(cb.m_param3) {} }; -- cgit v1.2.3 From 07e2410ed830a620a0749e4039e0e544278267d7 Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 26 Dec 2008 16:15:44 -0600 Subject: *Fix the bug that areaaura do not have sound. --HG-- branch : trunk --- src/game/Spell.cpp | 2 ++ src/game/SpellMgr.cpp | 13 ++++++++----- src/game/SpellMgr.h | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 33467e75ad6..7aeb0159e9d 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -420,6 +420,8 @@ void Spell::FillTargetMap() if(effectTargetType != SPELL_REQUIRE_UNIT) { + if(effectTargetType == SPELL_REQUIRE_CASTER) + AddUnitTarget(m_caster, i); if(effectTargetType == SPELL_REQUIRE_DEST) { if(m_targets.HasDest() && m_spellInfo->speed > 0.0f) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 6f6cb7e8d65..e67030b77f2 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -64,11 +64,6 @@ SpellMgr::SpellMgr() //case SPELL_EFFECT_LEARN_SPELL: // 0 may be 5 pet case SPELL_EFFECT_TRADE_SKILL: // 0 or 1 case SPELL_EFFECT_PROFICIENCY: // 0 - case SPELL_EFFECT_APPLY_AREA_AURA_PARTY: - case SPELL_EFFECT_APPLY_AREA_AURA_FRIEND: - case SPELL_EFFECT_APPLY_AREA_AURA_ENEMY: - case SPELL_EFFECT_APPLY_AREA_AURA_PET: - case SPELL_EFFECT_APPLY_AREA_AURA_OWNER: EffectTargetType[i] = SPELL_REQUIRE_NONE; break; case SPELL_EFFECT_ENCHANT_ITEM: @@ -78,6 +73,14 @@ SpellMgr::SpellMgr() case SPELL_EFFECT_PROSPECTING: EffectTargetType[i] = SPELL_REQUIRE_ITEM; break; + //caster must be pushed otherwise no sound + case SPELL_EFFECT_APPLY_AREA_AURA_PARTY: + case SPELL_EFFECT_APPLY_AREA_AURA_FRIEND: + case SPELL_EFFECT_APPLY_AREA_AURA_ENEMY: + case SPELL_EFFECT_APPLY_AREA_AURA_PET: + case SPELL_EFFECT_APPLY_AREA_AURA_OWNER: + EffectTargetType[i] = SPELL_REQUIRE_CASTER; + break; default: EffectTargetType[i] = SPELL_REQUIRE_UNIT; break; diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index 716760a70c6..ef5e8379341 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -239,6 +239,7 @@ enum SpellEffectTargetTypes SPELL_REQUIRE_UNIT, SPELL_REQUIRE_DEST, SPELL_REQUIRE_ITEM, + SPELL_REQUIRE_CASTER, }; enum SpellSelectTargetTypes -- cgit v1.2.3