--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-02 16:34:17 -06:00
7 changed files with 69 additions and 43 deletions
+1
View File
@@ -0,0 +1 @@
INSERT INTO `spell_proc_event` VALUES (17619, 0x00, 13, 0x0000000000000000, 0x00008000, 0x00000000, 0.000000, 0.000000, 0);
@@ -54,7 +54,7 @@ CreatureAI* GetAI_npc_jaina_proudmoore(Creature *_Creature)
ai->Spell[0].TargetType = TARGETTYPE_RANDOM; ai->Spell[0].TargetType = TARGETTYPE_RANDOM;
ai->Spell[1].SpellId = SPELL_PYROBLAST; 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[1].TargetType = TARGETTYPE_RANDOM;
ai->Spell[2].SpellId = SPELL_SUMMON_ELEMENTALS; ai->Spell[2].SpellId = SPELL_SUMMON_ELEMENTALS;
+3 -1
View File
@@ -971,7 +971,9 @@ void BattleGround::AddPlayer(Player *plr)
if(GetStatus() == STATUS_WAIT_JOIN) // not started yet 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->SetHealth(plr->GetMaxHealth());
plr->SetPower(POWER_MANA, plr->GetMaxPower(POWER_MANA)); plr->SetPower(POWER_MANA, plr->GetMaxPower(POWER_MANA));
+1 -1
View File
@@ -74,7 +74,7 @@ enum BattleGroundSpells
SPELL_SPIRIT_HEAL_CHANNEL = 22011, // Spirit Heal Channel SPELL_SPIRIT_HEAL_CHANNEL = 22011, // Spirit Heal Channel
SPELL_SPIRIT_HEAL = 22012, // Spirit Heal SPELL_SPIRIT_HEAL = 22012, // Spirit Heal
SPELL_RESURRECTION_VISUAL = 24171, // Resurrection Impact Visual 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_GOLD_FLAG = 32724,
SPELL_ALLIANCE_GREEN_FLAG = 32725, SPELL_ALLIANCE_GREEN_FLAG = 32725,
SPELL_HORDE_GOLD_FLAG = 35774, SPELL_HORDE_GOLD_FLAG = 35774,
+8 -8
View File
@@ -5698,14 +5698,14 @@ void Aura::PeriodicTick()
int32 drain_amount = m_target->GetPower(power) > pdamage ? pdamage : m_target->GetPower(power); int32 drain_amount = m_target->GetPower(power) > pdamage ? pdamage : m_target->GetPower(power);
//Viper sting and Drain Life take mana % amount from target, but not bigger than amount*2 of caster mana //Viper sting and Drain Life take mana % amount from target, but not bigger than amount*2 of caster mana
if ((m_spellProto->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellProto->SpellFamilyFlags[0]&0x10) if ((m_spellProto->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellProto->SpellFamilyFlags[0]&0x10)
|| (m_spellProto->SpellFamilyName==SPELLFAMILY_HUNTER && m_spellProto->SpellFamilyFlags[1]&0x80)) || (m_spellProto->SpellFamilyName==SPELLFAMILY_HUNTER && m_spellProto->SpellFamilyFlags[1]&0x80))
{ {
uint32 drain = m_target->GetMaxPower(power) * drain_amount /100; uint32 drain = m_target->GetMaxPower(power) * drain_amount /100;
if(drain > pCaster->GetMaxPower(power) * drain_amount / 50) if(drain > pCaster->GetMaxPower(power) * drain_amount / 50)
drain_amount = pCaster->GetMaxPower(power) * drain_amount / 50; drain_amount = pCaster->GetMaxPower(power) * drain_amount / 50;
else else
drain_amount = drain; drain_amount = drain;
} }
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4) // resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
+21 -24
View File
@@ -347,14 +347,6 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
} }
break; break;
} }
case 43648: //Electrical Storm
{
if(unitTarget && unitTarget->HasAura(44007, 0)) // Immune Aura
{
damage = 0;
}
break;
}
// percent from health with min // percent from health with min
case 25599: // Thundercrash case 25599: // Thundercrash
{ {
@@ -1230,7 +1222,7 @@ void Spell::EffectDummy(uint32 i)
m_caster->CastSpell(m_caster, 30452, true, NULL); m_caster->CastSpell(m_caster, 30452, true, NULL);
return; return;
} }
case 53341: case 53341:
case 53343: case 53343:
{ {
@@ -2525,13 +2517,6 @@ void Spell::SpellDamageHeal(uint32 /*i*/)
sLog.outError("Target(GUID:" I64FMTD ") has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID()); sLog.outError("Target(GUID:" I64FMTD ") has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID());
return; return;
} }
int idx = 0;
while(idx < 3)
{
if(targetAura->GetSpellProto()->EffectApplyAuraName[idx] == SPELL_AURA_PERIODIC_HEAL)
break;
idx++;
}
int32 tickheal = targetAura->GetModifier()->m_amount; int32 tickheal = targetAura->GetModifier()->m_amount;
if(Unit* auraCaster = targetAura->GetCaster()) if(Unit* auraCaster = targetAura->GetCaster())
@@ -2539,7 +2524,15 @@ void Spell::SpellDamageHeal(uint32 /*i*/)
//int32 tickheal = targetAura->GetSpellProto()->EffectBasePoints[idx] + 1; //int32 tickheal = targetAura->GetSpellProto()->EffectBasePoints[idx] + 1;
//It is said that talent bonus should not be included //It is said that talent bonus should not be included
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; addhealth += tickheal * tickcount;
unitTarget->RemoveAurasByCasterSpell(targetAura->GetId(), targetAura->GetCasterGUID()); unitTarget->RemoveAurasByCasterSpell(targetAura->GetId(), targetAura->GetCasterGUID());
@@ -2971,6 +2964,10 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
if(uint32 trapEntry = gameObjTarget->GetGOInfo()->goober.linkedTrapId) if(uint32 trapEntry = gameObjTarget->GetGOInfo()->goober.linkedTrapId)
gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster); gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster);
// activate GO scripts
Script->GOHello(player, gameObjTarget);
sWorld.ScriptsStart(sGameObjectScripts, gameObjTarget->GetDBTableGUIDLow(), player, gameObjTarget);
return; return;
case GAMEOBJECT_TYPE_CHEST: case GAMEOBJECT_TYPE_CHEST:
@@ -4766,13 +4763,13 @@ void Spell::EffectScriptEffect(uint32 effIndex)
unitTarget->HandleEmoteCommand(EMOTE_STATE_DANCE); unitTarget->HandleEmoteCommand(EMOTE_STATE_DANCE);
break; break;
} }
// Escape artist // Escape artist
case 20589: case 20589:
{ {
if(!unitTarget) if(!unitTarget)
return; return;
// It is said that removing effects by script should include dispel resist mods // It is said that removing effects by script should include dispel resist mods
unitTarget->RemoveSpellsCausingAuraWithDispel(SPELL_AURA_MOD_ROOT, this); unitTarget->RemoveSpellsCausingAuraWithDispel(SPELL_AURA_MOD_ROOT, this);
unitTarget->RemoveSpellsCausingAuraWithDispel(SPELL_AURA_MOD_DECREASE_SPEED, this); unitTarget->RemoveSpellsCausingAuraWithDispel(SPELL_AURA_MOD_DECREASE_SPEED, this);
} }
// Mirren's Drinking Hat // Mirren's Drinking Hat
+34 -8
View File
@@ -5485,14 +5485,14 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
triggered_spell_id = 56160; triggered_spell_id = 56160;
break; break;
} }
// Glyph of Dispel Magic // Glyph of Dispel Magic
case 55677: case 55677:
{ {
if(!target->IsFriendlyTo(this)) if(!target->IsFriendlyTo(this))
return false; return false;
basepoints0 = int32(target->GetMaxHealth() * triggerAmount / 100); basepoints0 = int32(target->GetMaxHealth() * triggerAmount / 100);
triggered_spell_id = 56131; triggered_spell_id = 56131;
break; break;
} }
// Oracle Healing Bonus ("Garments of the Oracle" set) // Oracle Healing Bonus ("Garments of the Oracle" set)
@@ -6330,6 +6330,30 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
} }
break; 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: default:
break; break;
} }
@@ -12302,6 +12326,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
// FORM_SPIRITOFREDEMPTION and related auras // FORM_SPIRITOFREDEMPTION and related auras
pVictim->CastSpell(pVictim,27827,true,NULL,*itr); pVictim->CastSpell(pVictim,27827,true,NULL,*itr);
pVictim->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // should not be attackable
SpiritOfRedemption = true; SpiritOfRedemption = true;
break; break;
} }
@@ -12312,6 +12337,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
{ {
DEBUG_LOG("SET JUST_DIED"); DEBUG_LOG("SET JUST_DIED");
pVictim->setDeathState(JUST_DIED); pVictim->setDeathState(JUST_DIED);
pVictim->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // reactive attackable flag
} }
// 10% durability loss on death // 10% durability loss on death