From 52edebe0251e3b3bad2e599a0ed71b4c8b01650f Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sat, 28 Feb 2009 17:35:49 +0100 Subject: [PATCH 1/8] *Use proper spell for preparation & add a check for proper remove - by Sorken --HG-- branch : trunk --- src/game/BattleGround.cpp | 4 +++- src/game/BattleGround.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index ccaab6cf6b..944e19bed1 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -980,7 +980,9 @@ void BattleGround::AddPlayer(Player *plr) if(GetStatus() == STATUS_WAIT_JOIN) // not started yet { - plr->CastSpell(plr, SPELL_ARENA_PREPARATION, true); + if(GetStatus() == STATUS_IN_PROGRESS) + plr->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION); + else plr->CastSpell(plr, SPELL_ARENA_PREPARATION, true); plr->SetHealth(plr->GetMaxHealth()); plr->SetPower(POWER_MANA, plr->GetMaxPower(POWER_MANA)); diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h index b28ce709ad..41f7e37d23 100644 --- a/src/game/BattleGround.h +++ b/src/game/BattleGround.h @@ -71,7 +71,7 @@ enum BattleGroundSpells SPELL_SPIRIT_HEAL_CHANNEL = 22011, // Spirit Heal Channel SPELL_SPIRIT_HEAL = 22012, // Spirit Heal SPELL_RESURRECTION_VISUAL = 24171, // Resurrection Impact Visual - SPELL_ARENA_PREPARATION = 32727, // use this one, 32728 not correct + SPELL_ARENA_PREPARATION = 32728, // use this one, 32727 has an invisibility aura which is wrong SPELL_ALLIANCE_GOLD_FLAG = 32724, SPELL_ALLIANCE_GREEN_FLAG = 32725, SPELL_HORDE_GOLD_FLAG = 35774, From 36d422693c71410c1ebd7a03dbba532a1065a713 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sat, 28 Feb 2009 18:31:32 +0100 Subject: [PATCH 2/8] *Allow scripting gameobjecttype 10 - by Edder --HG-- branch : trunk --- src/game/SpellEffects.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index c9e0d1e064..bdede08b46 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2859,6 +2859,10 @@ void Spell::SendLoot(uint64 guid, LootType loottype) if(uint32 trapEntry = gameObjTarget->GetGOInfo()->goober.linkedTrapId) gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster); + // activate GO scripts + Script->GOHello(player, gameObjTarget); + sWorld.ScriptsStart(sGameObjectScripts, gameObjTarget->GetDBTableGUIDLow(), player, gameObjTarget); + return; case GAMEOBJECT_TYPE_CHEST: From a224d61b82bebaeedf486ad7766d6d3e25244f14 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 1 Mar 2009 10:07:40 +0100 Subject: [PATCH 3/8] *Use correct timer for Lady Jainna's spell - by kancaras --HG-- branch : trunk --- .../scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp index 8d6686bb56..16628cce68 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp @@ -54,7 +54,7 @@ CreatureAI* GetAI_npc_jaina_proudmoore(Creature *_Creature) ai->Spell[0].TargetType = TARGETTYPE_RANDOM; ai->Spell[1].SpellId = SPELL_PYROBLAST; - ai->Spell[1].Cooldown = 2000 + rand()%7000; + ai->Spell[1].Cooldown = 5500 + rand()%4000; ai->Spell[1].TargetType = TARGETTYPE_RANDOM; ai->Spell[2].SpellId = SPELL_SUMMON_ELEMENTALS; From 8ef61f3d401ff65a0080ce4d183eec359f75ede9 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 1 Mar 2009 18:36:05 +0100 Subject: [PATCH 4/8] *Prevent to kill spirit of redemption - by Sorken --HG-- branch : trunk --- src/game/SpellEffects.cpp | 10 +--------- src/game/Unit.cpp | 2 ++ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index bdede08b46..91c1bec605 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -339,14 +339,6 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) } break; } - case 43648: //Electrical Storm - { - if(unitTarget && unitTarget->HasAura(44007, 0)) // Immune Aura - { - damage = 0; - } - break; - } // percent from health with min case 25599: // Thundercrash { @@ -1234,7 +1226,7 @@ void Spell::EffectDummy(uint32 i) m_caster->CastSpell(m_caster, 30452, true, NULL); return; - } + } } //All IconID Check in there diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 0fbeb5a9f7..d3c5888151 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -12709,6 +12709,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss) // FORM_SPIRITOFREDEMPTION and related auras pVictim->CastSpell(pVictim,27827,true,NULL,*itr); + pVictim->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // should not be attackable SpiritOfRedemption = true; break; } @@ -12719,6 +12720,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss) { DEBUG_LOG("SET JUST_DIED"); pVictim->setDeathState(JUST_DIED); + pVictim->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // reactive attackable flag } // 10% durability loss on death From 870fa0bdfae658f68ae69a1a2b99aa84ddd964d7 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 1 Mar 2009 21:51:38 +0100 Subject: [PATCH 5/8] *Replaced wrong calculation of tickcount in swiftmend with consts - by Anubisss --HG-- branch : trunk --- src/game/SpellEffects.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 91c1bec605..dbdef569a5 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2420,13 +2420,6 @@ void Spell::SpellDamageHeal(uint32 /*i*/) sLog.outError("Target(GUID:" I64FMTD ") has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID()); return; } - int idx = 0; - while(idx < 3) - { - if(targetAura->GetSpellProto()->EffectApplyAuraName[idx] == SPELL_AURA_PERIODIC_HEAL) - break; - idx++; - } int32 tickheal = targetAura->GetModifierValuePerStack(); if(Unit* auraCaster = targetAura->GetCaster()) @@ -2434,7 +2427,15 @@ void Spell::SpellDamageHeal(uint32 /*i*/) //int32 tickheal = targetAura->GetSpellProto()->EffectBasePoints[idx] + 1; //It is said that talent bonus should not be included //int32 tickheal = targetAura->GetModifierValue(); - int32 tickcount = GetSpellDuration(targetAura->GetSpellProto()) / targetAura->GetSpellProto()->EffectAmplitude[idx]; + int32 tickcount = 0; + if(targetAura->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID) + { + switch(targetAura->GetSpellProto()->SpellFamilyFlags)//TODO: proper spellfamily for 3.0.x + { + case 0x10: tickcount = 4; break; // Rejuvenation + case 0x40: tickcount = 6; break; // Regrowth + } + } addhealth += tickheal * tickcount; unitTarget->RemoveAurasDueToCasterSpell(targetAura->GetId(), targetAura->GetCasterGUID()); From 0496fac5aa251be1ea55d266bbf1c16b9157aa83 Mon Sep 17 00:00:00 2001 From: QAston Date: Mon, 2 Mar 2009 16:43:05 +0100 Subject: [PATCH 6/8] *Fix Alchemist Stone effect. --HG-- branch : trunk --- src/game/Unit.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index d3c5888151..cb71854614 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6465,6 +6465,30 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu } break; } + case SPELLFAMILY_POTION: + { + if (dummySpell->Id == 17619) + { + if (procSpell->SpellFamilyName == SPELLFAMILY_POTION) + { + for (uint8 i=0;i<3;i++) + { + if (procSpell->Effect[i]==SPELL_EFFECT_HEAL) + { + triggered_spell_id = 21399; + } + else if (procSpell->Effect[i]==SPELL_EFFECT_ENERGIZE) + { + triggered_spell_id = 21400; + } + else continue; + basepoints0 = CalculateSpellDamage(procSpell,i,procSpell->EffectBasePoints[i],this) * 0.4f; + CastCustomSpell(this,triggered_spell_id,&basepoints0,NULL,NULL,true,castItem,triggeredByAura); + } + return true; + } + } + } default: break; } From f23eda544cc3506fd65fca6f03ff05625912c0e6 Mon Sep 17 00:00:00 2001 From: QAston Date: Mon, 2 Mar 2009 16:45:24 +0100 Subject: [PATCH 7/8] *Sql for latest rev. --HG-- branch : trunk --- sql/updates/1138_world.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/1138_world.sql diff --git a/sql/updates/1138_world.sql b/sql/updates/1138_world.sql new file mode 100644 index 0000000000..3e45462aa7 --- /dev/null +++ b/sql/updates/1138_world.sql @@ -0,0 +1 @@ +INSERT INTO `spell_proc_event` VALUES (17619, 0x00, 13, 0x00000000, 0x00000000, 0x00000000, 0x00008000, 0x00000000, 0.000000, 0.000000, 0); \ No newline at end of file From cdd178b9c29853d5e498b474006a3635009a50a4 Mon Sep 17 00:00:00 2001 From: QAston Date: Mon, 2 Mar 2009 22:48:48 +0100 Subject: [PATCH 8/8] *Fix last sql. We are not on 309, sorry for that. --HG-- branch : trunk --- sql/updates/1138_world.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/updates/1138_world.sql b/sql/updates/1138_world.sql index 3e45462aa7..610f97139a 100644 --- a/sql/updates/1138_world.sql +++ b/sql/updates/1138_world.sql @@ -1 +1 @@ -INSERT INTO `spell_proc_event` VALUES (17619, 0x00, 13, 0x00000000, 0x00000000, 0x00000000, 0x00008000, 0x00000000, 0.000000, 0.000000, 0); \ No newline at end of file +INSERT INTO `spell_proc_event` VALUES (17619, 0x00, 13, 0x0000000000000000, 0x00008000, 0x00000000, 0.000000, 0.000000, 0);