--HG--
branch : trunk
This commit is contained in:
Blaymoira committed 2009-03-14 19:35:04 +01:00
commit 04a42413bf
12 files changed
+127 -47

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
INSERT INTO `spell_linked_spell` VALUES (61847, 61848, 2, 'Aspect of te dragonhawk');
INSERT INTO `spell_linked_spell` VALUES (61846, 61848, 2, 'Aspect of te dragonhawk');
-- Glyph of Aspect of the Monkey
REPLACE INTO `spell_proc_event` VALUES (13163, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000010, 0.000000, 0.000000, 0);
REPLACE INTO `spell_proc_event` VALUES (61848, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000010, 0.000000, 0.000000, 0);
+4
View File
@@ -0,0 +1,4 @@
DELETE FROM spell_proc_event where entry IN (31124, 31126);
INSERT INTO spell_proc_event () VALUES
(31124, 0, 8, 16777222, 0, 0, 0, 0, 0),
(31126, 0, 8, 16777222, 0, 0, 0, 0, 0);
+2 -1
View File
@@ -79,6 +79,7 @@ INSTALL(FILES
1825_world.sql
1828_world.sql
1857_world.sql
1881_world.sql
1884_world.sql
1886_world.sql
1895_world.sql
DESTINATION share/trinity/sql/updates)
+3 -3
View File
@@ -290,6 +290,9 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
if(!m_respawnradius && m_defaultMovementType==RANDOM_MOTION_TYPE)
m_defaultMovementType = IDLE_MOTION_TYPE;
for(int i=0; i < CREATURE_MAX_SPELLS; ++i)
m_spells[i] = GetCreatureInfo()->spells[i];
return true;
}
@@ -345,9 +348,6 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data )
SetPvP(true);
}
for(int i=0; i < CREATURE_MAX_SPELLS; ++i)
m_spells[i] = GetCreatureInfo()->spells[i];
// HACK: trigger creature is always not selectable
if(isTrigger())
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+5
View File
@@ -27,6 +27,11 @@ void PassiveAI::UpdateAI(const uint32)
EnterEvadeMode();
}
void PossessedAI::AttackStart(Unit *target)
{
me->Attack(target, true);
}
void PossessedAI::UpdateAI(const uint32 diff)
{
if(me->getVictim())
+1
View File
@@ -41,6 +41,7 @@ class TRINITY_DLL_DECL PossessedAI : public PassiveAI
public:
PossessedAI(Creature *c) : PassiveAI(c) {}
void AttackStart(Unit *target);
void UpdateAI(const uint32);
void EnterEvadeMode() {}
+33 -12
View File
@@ -17367,6 +17367,38 @@ void Player::PossessSpellInitialize()
GetSession()->SendPacket(&data);
}
void Player::VehicleSpellInitialize()
{
Unit* charm = GetCharm();
if(!charm || charm->GetTypeId() != TYPEID_UNIT)
return;
WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*10+1+1);
data << uint64(charm->GetGUID());
data << uint32(0x00000000);
data << uint32(0x00000000);
data << uint32(0x00000101);
for(uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
uint32 spellId = ((Creature*)charm)->m_spells[i];
if(IsPassiveSpell(spellId))
{
charm->CastSpell(charm, spellId, true);
data << uint16(0) << uint8(0) << uint8(i+8);
}
else
data << uint16(spellId) << uint8(0) << uint8(i+8);
}
for(uint32 i = CREATURE_MAX_SPELLS; i < 10; ++i)
data << uint16(0) << uint8(0) << uint8(i+8);
data << uint8(0);
data << uint8(0);
GetSession()->SendPacket(&data);
}
void Player::CharmSpellInitialize()
{
Unit* charm = GetCharm();
@@ -20302,18 +20334,7 @@ void Player::EnterVehicle(Vehicle *vehicle)
data << uint32(0); // fall time
GetSession()->SendPacket(&data);
data.Initialize(SMSG_PET_SPELLS, 8+4+4+4+4*10+1+1);
data << uint64(vehicle->GetGUID());
data << uint32(0x00000000);
data << uint32(0x00000000);
data << uint32(0x00000101);
for(uint32 i = 0; i < 10; ++i)
data << uint16(0) << uint8(0) << uint8(i+8);
data << uint8(0);
data << uint8(0);
GetSession()->SendPacket(&data);
VehicleSpellInitialize();
}
void Player::ExitVehicle(Vehicle *vehicle)
+1
View File
@@ -1454,6 +1454,7 @@ class TRINITY_DLL_SPEC Player : public Unit
void PetSpellInitialize();
void CharmSpellInitialize();
void PossessSpellInitialize();
void VehicleSpellInitialize();
bool HasSpell(uint32 spell) const;
bool HasActiveSpell(uint32 spell) const; // show in spellbook
TrainerSpellState GetTrainerSpellState(TrainerSpell const* trainer_spell) const;
+1 -1
View File
@@ -3381,7 +3381,7 @@ void Spell::TakeRunePower()
}
// you can gain some runic power when use runes
float rp = src->runePowerGain;;
float rp = src->runePowerGain;
rp *= sWorld.getRate(RATE_POWER_RUNICPOWER_INCOME);
plr->ModifyPower(POWER_RUNIC_POWER, (int32)rp);
}
+41 -5
View File
@@ -433,7 +433,12 @@ m_updated(false), m_isRemovedOnShapeLost(true), m_in_use(false)
sLog.outDebug("Aura: construct Spellid : %u, Aura : %u Duration : %d Target : %d Damage : %d", m_spellProto->Id, m_spellProto->EffectApplyAuraName[eff], m_maxduration, m_spellProto->EffectImplicitTargetA[eff],damage);
m_effIndex = eff;
SetModifier(AuraType(m_spellProto->EffectApplyAuraName[eff]), damage, m_spellProto->EffectAmplitude[eff], m_spellProto->EffectMiscValue[eff]);
int32 periodicTime = m_spellProto->EffectAmplitude[eff];
//apply casting time mods for channeled spells
if (caster && IsChanneledSpell(m_spellProto))
caster->ModSpellCastTime(m_spellProto, periodicTime);
SetModifier(AuraType(m_spellProto->EffectApplyAuraName[eff]), damage,periodicTime , m_spellProto->EffectMiscValue[eff]);
// Apply periodic time mod
if(modOwner && m_modifier.periodictime)
@@ -2234,6 +2239,25 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
return;
}
// Glyph of Aspect of the Monkey
if(m_spellProto->Id==56833)
{
if(apply)
{
// Reduce backfire damage (dot damage) from Shadow Word: Death
SpellModifier *mod = new SpellModifier;
mod->op = SPELLMOD_CHANCE_OF_SUCCESS;
mod->value = 100;
mod->type = SPELLMOD_FLAT;
mod->spellId = GetId();
mod->mask[2] = 8192;
mod->mask[1] = 0x00000000;
mod->mask[0] = 524288;
m_spellmod = mod;
}
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
return;
}
break;
}
case SPELLFAMILY_SHAMAN:
@@ -5663,6 +5687,9 @@ void Aura::PeriodicTick()
if(m_target != pCaster && GetSpellProto()->SpellVisual[0]==163 && !pCaster->isAlive())
return;
if(m_duration ==-1 && m_target->GetHealth()==m_target->GetMaxHealth())
return;
// ignore non positive values (can be result apply spellmods to aura damage
//uint32 amount = GetModifierValuePerStack() > 0 ? GetModifierValuePerStack() : 0;
uint32 pdamage = GetModifier()->m_amount > 0 ? GetModifier()->m_amount : 0;
@@ -5853,7 +5880,7 @@ void Aura::PeriodicTick()
case SPELL_AURA_OBS_MOD_ENERGY:
{
if(m_modifier.m_miscvalue < 0)
break;
return;
Powers power;
if (m_modifier.m_miscvalue == POWER_ALL)
@@ -5862,7 +5889,10 @@ void Aura::PeriodicTick()
power = Powers(m_modifier.m_miscvalue);
if(m_target->GetMaxPower(power) == 0)
break;
return;
if(m_duration ==-1 && m_target->GetPower(power)==m_target->GetMaxPower(power))
return;
uint32 amount = m_modifier.m_amount * m_target->GetMaxPower(power) /100;
sLog.outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u",
@@ -5888,12 +5918,15 @@ void Aura::PeriodicTick()
{
// ignore non positive values (can be result apply spellmods to aura damage
if(m_modifier.m_amount < 0 || m_modifier.m_miscvalue >= MAX_POWERS)
break;
return;
Powers power = Powers(m_modifier.m_miscvalue);
if(m_target->GetMaxPower(power) == 0)
break;
return;
if(m_duration ==-1 && m_target->GetPower(power)==m_target->GetMaxPower(power))
return;
uint32 amount = m_modifier.m_amount;
@@ -5933,6 +5966,9 @@ void Aura::PeriodicTick()
if(!m_target->isAlive() || m_target->getPowerType() != powerType)
return;
if(m_duration ==-1 && m_target->GetPower(powerType)==m_target->GetMaxPower(powerType))
return;
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
if (powerType == POWER_MANA && m_target->GetTypeId() == TYPEID_PLAYER)
pdamage -= ((Player*)m_target)->GetSpellCritDamageReduction(pdamage);
+5 -3
View File
@@ -378,7 +378,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
return SPELL_STING;
// only hunter aspects have this
if( spellInfo->SpellFamilyFlags[1] & 0x00440000 || spellInfo->SpellFamilyFlags[0] & 0x00380000 || spellInfo->SpellFamilyFlags[2] & 0x00003010)
if( spellInfo->SpellFamilyFlags[1] & 0x00440000 || spellInfo->SpellFamilyFlags[0] & 0x00380000 || spellInfo->SpellFamilyFlags[2] & 0x00001010)
return SPELL_ASPECT;
if( spellInfo->SpellFamilyFlags[2] & 0x00000002 )
@@ -521,7 +521,6 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex, bool deep)
switch(spellId)
{
case 23333: case 23335: case 34976: // BG spell
case 30482: case 43045: case 43046: // Molten armor expection need find the real bug
return true;
case 28441: // not positive dummy spell
case 37675: // Chaos Blast
@@ -702,7 +701,10 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex, bool deep)
if(spellproto->AttributesEx & SPELL_ATTR_EX_NEGATIVE)
return false;
if (!deep && spellproto->EffectTriggerSpell[effIndex] && !IsPositiveSpell(spellproto->EffectTriggerSpell[effIndex], true))
if (!deep && spellproto->EffectTriggerSpell[effIndex]
&& !spellproto->procFlags
&& IsPositiveTarget(spellproto->EffectImplicitTargetA[effIndex],spellproto->EffectImplicitTargetB[effIndex])
&& !IsPositiveSpell(spellproto->EffectTriggerSpell[effIndex], true))
return false;
// ok, positive
+25 -22
View File
@@ -483,7 +483,7 @@ void Unit::RemoveAuraTypeByCaster(AuraType auraType, uint64 casterGUID)
{
if (auraType >= TOTAL_AURAS) return;
AuraList::iterator iter, next;
for(iter = m_modAuras[auraType].begin(); iter != m_modAuras[auraType].end(); ++iter)
for(iter = m_modAuras[auraType].begin(); iter != m_modAuras[auraType].end(); iter = next)
{
next = iter;
++next;
@@ -3981,6 +3981,8 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
SpellSpecific spellId_spec = GetSpellSpecific(spellId);
//bool linked = spellmgr.GetSpellCustomAttr(spellId) & SPELL_ATTR_CU_LINK_AURA? true : false;
AuraMap::iterator i,next;
for (i = m_Auras.begin(); i != m_Auras.end(); i = next)
{
@@ -4017,11 +4019,29 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
if (i_spellProto->EffectTriggerSpell[j] == spellProto->Id)
is_triggered_by_spell = true;
if (is_triggered_by_spell)
continue;
for(int j = 0; j < 3; ++j)
if (i_spellProto->EffectTriggerSpell[j] == spellProto->Id)
is_triggered_by_spell = true;
// check if they can stack
bool sameCaster = Aur->GetCasterGUID() == (*i).second->GetCasterGUID();
/*// Dont remove by stack with linked auras
// Not needed for now
if(sameCaster && linked)
{
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(spellId + SPELL_LINK_AURA))
for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
if(*itr>0 && *itr==i_spellId)
{
is_triggered_by_spell=true;
break;
}
}*/
if (is_triggered_by_spell)
continue;
if(!spellmgr.IsNoStackSpellDueToSpell(spellId, i_spellId, sameCaster))
continue;
@@ -8715,16 +8735,11 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
{
// Damage Done from spell damage bonus
int32 CastingTime = !IsChanneledSpell(spellProto) ? GetSpellCastTime(spellProto) : GetSpellDuration(spellProto);
if (IsChanneledSpell(spellProto))
ModSpellCastTime(spellProto, CastingTime);
// Damage over Time spells bonus calculation
float DotFactor = 1.0f;
if(damagetype == DOT)
{
int32 DotDuration = GetSpellDuration(spellProto);
//apply casting time mods for channeled spells
if (IsChanneledSpell(spellProto))
ModSpellCastTime(spellProto, DotDuration);
// 200% limit
if(DotDuration > 0)
{
@@ -9211,16 +9226,11 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
{
// Damage Done from spell damage bonus
int32 CastingTime = !IsChanneledSpell(spellProto) ? GetSpellCastTime(spellProto) : GetSpellDuration(spellProto);
if (IsChanneledSpell(spellProto))
ModSpellCastTime(spellProto, CastingTime);
// Damage over Time spells bonus calculation
float DotFactor = 1.0f;
if(damagetype == DOT)
{
int32 DotDuration = GetSpellDuration(spellProto);
//apply casting time mods for channeled spells
if (IsChanneledSpell(spellProto))
ModSpellCastTime(spellProto, DotDuration);
// 200% limit
if(DotDuration > 0)
{
@@ -11425,20 +11435,13 @@ void CharmInfo::InitPossessCreateSpells()
InitEmptyActionBar();
if(m_unit->GetTypeId() == TYPEID_UNIT)
{
/*for(uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
for(uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
uint32 spellid = ((Creature*)m_unit)->m_spells[i];
if(IsPassiveSpell(spellid))
m_unit->CastSpell(m_unit, spellid, true);
else
AddSpellToAB(0, spellid, ACT_CAST);
}*/
for(uint32 x = 0; x < CREATURE_MAX_SPELLS; ++x)
{
if (IsPassiveSpell(((Creature*)m_unit)->m_spells[x]))
m_unit->CastSpell(m_unit, ((Creature*)m_unit)->m_spells[x], true);
else
AddSpellToAB(0, ((Creature*)m_unit)->m_spells[x], ACT_PASSIVE);
AddSpellToAB(0, spellid, ACT_DISABLED);
}
}
}