mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
* [sql/updates/2008_10_22_01_mangos_quest_template.sql] Implemented honor rewards from quests
This commit is contained in:
parent
6892cc3d2c
commit
406ac0abe5
8 changed files with 45 additions and 48 deletions
|
|
@ -1935,9 +1935,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
return;
|
||||
case 43873: // Headless Horseman Laugh
|
||||
if(caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
((Player*)caster)->PlaySound(11965, false);
|
||||
}
|
||||
return;
|
||||
case 46354: // Blood Elf Illusion
|
||||
if(caster)
|
||||
|
|
@ -2489,16 +2487,12 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
|||
{
|
||||
// remove other shapeshift before applying a new one
|
||||
if(m_target->m_ShapeShiftFormSpellId)
|
||||
{
|
||||
m_target->RemoveAurasDueToSpell(m_target->m_ShapeShiftFormSpellId,this);
|
||||
}
|
||||
|
||||
m_target->SetByteValue(UNIT_FIELD_BYTES_2, 3, form);
|
||||
|
||||
if(modelid > 0)
|
||||
{
|
||||
m_target->SetDisplayId(modelid);
|
||||
}
|
||||
|
||||
if(PowerType != POWER_MANA)
|
||||
{
|
||||
|
|
@ -2528,17 +2522,13 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
|||
{
|
||||
m_target->SetPower(POWER_ENERGY,0);
|
||||
if(urand(1,100) <= FurorChance)
|
||||
{
|
||||
m_target->CastSpell(m_target,17099,true,NULL,this);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_target->SetPower(POWER_RAGE,0);
|
||||
if(urand(1,100) <= FurorChance)
|
||||
{
|
||||
m_target->CastSpell(m_target,17057,true,NULL,this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -2930,9 +2920,7 @@ void Aura::HandleModPossess(bool apply, bool Real)
|
|||
m_target->SetCharmerGUID(0);
|
||||
|
||||
if(m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
((Player*)m_target)->setFactionForRace(m_target->getRace());
|
||||
}
|
||||
else if(m_target->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
CreatureInfo const *cinfo = ((Creature*)m_target)->GetCreatureInfo();
|
||||
|
|
@ -3039,9 +3027,7 @@ void Aura::HandleModCharm(bool apply, bool Real)
|
|||
m_target->SetCharmerGUID(0);
|
||||
|
||||
if(m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
((Player*)m_target)->setFactionForRace(m_target->getRace());
|
||||
}
|
||||
else
|
||||
{
|
||||
CreatureInfo const *cinfo = ((Creature*)m_target)->GetCreatureInfo();
|
||||
|
|
@ -3604,9 +3590,7 @@ void Aura::HandleModTaunt(bool apply, bool Real)
|
|||
return;
|
||||
|
||||
if(apply)
|
||||
{
|
||||
m_target->TauntApply(caster);
|
||||
}
|
||||
else
|
||||
{
|
||||
// When taunt aura fades out, mob will switch to previous target if current has less than 1.1 * secondthreat
|
||||
|
|
@ -4276,18 +4260,14 @@ void Aura::HandleAuraModBaseResistancePCT(bool apply, bool Real)
|
|||
{
|
||||
//pets only have base armor
|
||||
if(((Creature*)m_target)->isPet() && (m_modifier.m_miscvalue & SPELL_SCHOOL_MASK_NORMAL))
|
||||
{
|
||||
m_target->HandleStatModifier(UNIT_MOD_ARMOR, BASE_PCT, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL;x++)
|
||||
{
|
||||
if(m_modifier.m_miscvalue & int32(1<<x))
|
||||
{
|
||||
m_target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), BASE_PCT, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4365,9 +4345,7 @@ void Aura::HandleModPercentStat(bool apply, bool Real)
|
|||
for (int32 i = STAT_STRENGTH; i < MAX_STATS; ++i)
|
||||
{
|
||||
if(m_modifier.m_miscvalue == i || m_modifier.m_miscvalue == -1)
|
||||
{
|
||||
m_target->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), BASE_PCT, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5282,9 +5260,7 @@ void Aura::HandleAuraEmpathy(bool apply, bool Real)
|
|||
|
||||
CreatureInfo const * ci = objmgr.GetCreatureTemplate(m_target->GetEntry());
|
||||
if(ci && ci->type == CREATURE_TYPE_BEAST)
|
||||
{
|
||||
m_target->ApplyModUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_SPECIALINFO, apply);
|
||||
}
|
||||
}
|
||||
|
||||
void Aura::HandleAuraUntrackable(bool apply, bool Real)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue