From 6c63596be0b3b599b5c11f0f5a53a90abc550cb6 Mon Sep 17 00:00:00 2001 From: _manuel_ Date: Wed, 27 Jan 2010 14:50:42 -0300 Subject: Re-add event support for type 10 (goober) GOs. By Biglad --HG-- branch : trunk --- src/game/SpellEffects.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index ed85d0767c5..30997ae50b7 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3289,7 +3289,14 @@ void Spell::SendLoot(uint64 guid, LootType loottype) gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster); return; - case GAMEOBJECT_TYPE_GOOBER: + case GAMEOBJECT_TYPE_GOOBER: + // goober_scripts can be triggered if the player don't have the quest + if (gameObjTarget->GetGOInfo()->goober.eventId) + { + sLog.outDebug("Goober ScriptStart id %u for GO %u",gameObjTarget->GetGOInfo()->goober.eventId,gameObjTarget->GetDBTableGUIDLow()); + player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->goober.eventId, player, gameObjTarget); + gameObjTarget->EventInform(gameObjTarget->GetGOInfo()->goober.eventId); + } gameObjTarget->Use(m_caster); return; @@ -3746,7 +3753,7 @@ void Spell::EffectDispel(uint32 i) } bool dispel_charges = aura->GetSpellProto()->AttributesEx7 & SPELL_ATTR_EX7_DISPEL_CHARGES; - + for (uint8 i = dispel_charges ? aura->GetCharges() : aura->GetStackAmount(); i; --i) dispel_list.push_back(aura); } @@ -3867,7 +3874,7 @@ void Spell::EffectPickPocket(uint32 /*i*/) // victim have to be alive and humanoid or undead if (unitTarget->isAlive() && (unitTarget->GetCreatureTypeMask() &CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) != 0) - ((Player*)m_caster)->SendLoot(unitTarget->GetGUID(),LOOT_PICKPOCKETING); + ((Player*)m_caster)->SendLoot(unitTarget->GetGUID(),LOOT_PICKPOCKETING); } void Spell::EffectAddFarsight(uint32 i) @@ -6605,7 +6612,7 @@ void Spell::EffectQuestComplete(uint32 i) if (m_caster->GetTypeId() == TYPEID_PLAYER) pPlayer = (Player*)m_caster; - else if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER) + else if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER) pPlayer = (Player*)unitTarget; else return; @@ -7176,7 +7183,7 @@ void Spell::EffectStealBeneficialBuff(uint32 i) continue; bool dispel_charges = aura->GetSpellProto()->AttributesEx7 & SPELL_ATTR_EX7_DISPEL_CHARGES; - + for (uint8 i = dispel_charges ? aura->GetCharges() : aura->GetStackAmount(); i; --i) steal_list.push_back(aura); } -- cgit v1.2.3 From 3e73c5cc777faed2cbfb7784526721ebe0e913a7 Mon Sep 17 00:00:00 2001 From: _manuel_ Date: Wed, 27 Jan 2010 14:56:14 -0300 Subject: Implemented fix for Spirit Wolf (feral spirit talent). By Gyullo --HG-- branch : trunk --- src/game/Pet.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index b5a42b2101f..dd201a7a064 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -886,7 +886,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) if (GetEntry() == 29264) { float apbonus=0.35f; - + // Glyph of Feral Spirit if (AuraEffect *aurEff = m_owner->GetAuraEffect(63271, 0)) apbonus += aurEff->GetAmount() / 100.0f; @@ -976,6 +976,25 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel / 2)); break; } + case 29264: // Feral Spirit + { + if (!pInfo) + SetCreateHealth(30*petlevel); + + float dmg_multiplier = 0.3f; + if (HasAura(63271)) // Glyph of Feral Spirit + dmg_multiplier = 0.6f; + + + SetBonusDamage(int32(m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier)); + + SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE,float((petlevel * 4 - petlevel) + (m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier))); + SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE,float((petlevel * 4 + petlevel) + (m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier))); + + SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, float(m_owner->GetArmor()) * 0.35f); // Bonus Armor (35% of player armor) + SetModifierValue(UNIT_MOD_STAT_STAMINA, BASE_VALUE,float(m_owner->GetStat(STAT_STAMINA)) * 0.3f); // Bonus Stamina (30% of player stamina) + break; + } case 31216: // Mirror Image { SetBonusDamage(int32(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FROST) * 0.33f)); @@ -1260,7 +1279,7 @@ void Pet::_SaveAuras() CharacterDatabase.PExecute("INSERT INTO pet_aura (guid,caster_guid,spell,effect_mask,recalculate_mask,stackcount,amount0,amount1,amount2,base_amount0,base_amount1,base_amount2,maxduration,remaintime,remaincharges) " "VALUES ('%u', '" UI64FMTD "', '%u', '%u', '%u', '%u', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%u')", - m_charmInfo->GetPetNumber(), itr->second->GetCasterGUID(), itr->second->GetId(), effMask, recalculateMask, + m_charmInfo->GetPetNumber(), itr->second->GetCasterGUID(), itr->second->GetId(), effMask, recalculateMask, itr->second->GetStackAmount(), damage[0], damage[1], damage[2], baseDamage[0], baseDamage[1], baseDamage[2], itr->second->GetMaxDuration(), itr->second->GetDuration(),itr->second->GetCharges()); } -- cgit v1.2.3 From 0711119de54091d84ab1ccc65656783394bda3b2 Mon Sep 17 00:00:00 2001 From: _manuel_ Date: Wed, 27 Jan 2010 15:15:49 -0300 Subject: Removed tabs. Closed issue 397 and 171. --HG-- branch : trunk --- src/game/Pet.cpp | 3 +-- src/game/SpellEffects.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index dd201a7a064..5bb5be55908 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -981,11 +981,10 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) if (!pInfo) SetCreateHealth(30*petlevel); - float dmg_multiplier = 0.3f; + float dmg_multiplier = 0.3f; if (HasAura(63271)) // Glyph of Feral Spirit dmg_multiplier = 0.6f; - SetBonusDamage(int32(m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier)); SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE,float((petlevel * 4 - petlevel) + (m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier))); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 30997ae50b7..86339274962 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3289,14 +3289,14 @@ void Spell::SendLoot(uint64 guid, LootType loottype) gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster); return; - case GAMEOBJECT_TYPE_GOOBER: - // goober_scripts can be triggered if the player don't have the quest + case GAMEOBJECT_TYPE_GOOBER: + // goober_scripts can be triggered if the player don't have the quest if (gameObjTarget->GetGOInfo()->goober.eventId) - { - sLog.outDebug("Goober ScriptStart id %u for GO %u",gameObjTarget->GetGOInfo()->goober.eventId,gameObjTarget->GetDBTableGUIDLow()); - player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->goober.eventId, player, gameObjTarget); - gameObjTarget->EventInform(gameObjTarget->GetGOInfo()->goober.eventId); - } + { + sLog.outDebug("Goober ScriptStart id %u for GO %u",gameObjTarget->GetGOInfo()->goober.eventId,gameObjTarget->GetDBTableGUIDLow()); + player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->goober.eventId, player, gameObjTarget); + gameObjTarget->EventInform(gameObjTarget->GetGOInfo()->goober.eventId); + } gameObjTarget->Use(m_caster); return; -- cgit v1.2.3