--HG--
branch : trunk
This commit is contained in:
n0n4m3
2009-12-20 06:00:39 +01:00
4 changed files with 39 additions and 28 deletions
@@ -737,7 +737,7 @@ struct TRINITY_DLL_DECL mob_palehoof_orbAI : public ScriptedAI
{
if (type != POINT_MOTION_TYPE)
return;
if(id<0&&id>4)
if(id<0 || id>4)
return;
Creature *pNext;
switch(id)
@@ -40,24 +40,21 @@ struct TRINITY_DLL_DECL npc_drakuru_shacklesAI : public ScriptedAI
void Reset()
{
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
float x, y, z;
Rageclaw = NULL;
m_creature->GetClosePoint(x, y, z, m_creature->GetObjectSize()/3,0.1);
if (Unit* summon = m_creature->SummonCreature(NPC_RAGECLAW,x,y,z,0,TEMPSUMMON_DEAD_DESPAWN,1000))
DoActionOnRageclaw(true,summon);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
float x, y, z;
m_creature->GetClosePoint(x, y, z, m_creature->GetObjectSize() / 3, 0.1f);
if (Unit* summon = m_creature->SummonCreature(NPC_RAGECLAW, x, y, z,
0, TEMPSUMMON_DEAD_DESPAWN, 1000))
{
Rageclaw = summon;
LockRageclaw();
}
}
void DoActionOnRageclaw(bool bLocking, Unit* pWho)
{
if (!pWho)
return;
Rageclaw = pWho;
if (bLocking)
{
if (pWho)
void LockRageclaw()
{
m_creature->SetInFront(Rageclaw);
Rageclaw->SetInFront(m_creature);
@@ -65,28 +62,30 @@ struct TRINITY_DLL_DECL npc_drakuru_shacklesAI : public ScriptedAI
DoCast(Rageclaw, SPELL_LEFT_CHAIN, true);
DoCast(Rageclaw, SPELL_RIGHT_CHAIN, true);
}
}
else
void UnlockRageclaw(Unit* pWho)
{
if (!pWho)
return;
DoCast(Rageclaw, SPELL_FREE_RAGECLAW, true);
if (pWho->GetTypeId() == TYPEID_PLAYER)
CAST_PLR(pWho)->CastSpell(Rageclaw, SPELL_UNLOCK_SHACKLE, true);
m_creature->setDeathState(DEAD);
}
}
void SpellHit(Unit* pCaster, const SpellEntry* pSpell)
{
if (pSpell->Id == SPELL_UNLOCK_SHACKLE)
{
if (Rageclaw)
DoActionOnRageclaw(false, pCaster);
UnlockRageclaw(pCaster);
else
m_creature->setDeathState(JUST_DIED);
}
}
};
CreatureAI* GetAI_npc_drakuru_shackles(Creature* pCreature)
{
return new npc_drakuru_shacklesAI (pCreature);
+8 -1
View File
@@ -437,7 +437,14 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
damage = uint32(damage * (m_caster->GetTotalAttackPowerValue(BASE_ATTACK)) / 100);
// Shield Slam
else if(m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->Category == 1209)
{
damage += int32(m_caster->GetShieldBlockValue());
// Glyph of Shield Slam
if (m_caster->HasAura(58375))
m_caster->CastSpell(m_caster, 58374, true);
}
// Victory Rush
else if(m_spellInfo->SpellFamilyFlags[1] & 0x100)
{
@@ -611,7 +618,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
for (uint32 i = 0; i < doses; ++i)
unitTarget->RemoveAuraFromStack(spellId);
damage *= doses;
damage += int32(((Player*)m_caster)->GetTotalAttackPowerValue(BASE_ATTACK) * 0.03f * doses);
damage += int32(((Player*)m_caster)->GetTotalAttackPowerValue(BASE_ATTACK) * 0.09f * doses);
}
// Eviscerate and Envenom Bonus Damage (item set effect)
if (m_caster->HasAura(37169))
+5
View File
@@ -10278,6 +10278,11 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
TakenTotalMod *= (HealingWay->GetAmount() + 100.0f) / 100.0f;
}
// Tenacity increase healing % taken
if (AuraEffect const* Tenacity = pVictim->GetAuraEffect(58549, 0))
TakenTotalMod *= (Tenacity->GetAmount() + 100.0f) / 100.0f;
// Healing taken percent
float minval = pVictim->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT);
if (minval)