Open GoogleCodeExporter opened 8 years ago
By niyo:
confirmed
Original comment by stfxm...@gmail.com
on 30 Dec 2010 at 3:35
By pdx15:
confirm
Original comment by stfxm...@gmail.com
on 30 Dec 2010 at 3:35
By lukaasm:
due to core, flametongue can be only hack fixed in TBC
# HG changeset patch
# User lukaasm
# Date 1269010918 -3600
# Branch trunk
fix flametongue weapon & totem
diff -r 69b781d3a243 -r 46e6b90167fe src/game/Player.cpp
--- a/src/game/Player.cpp Thu Mar 18 22:57:19 2010 +0100
+++ b/src/game/Player.cpp Fri Mar 19 16:01:58 2010 +0100
@@ -7300,8 +7300,23 @@
if(!pEnchant) continue;
for (int s = 0; s < 3; ++s)
{
+ uint32 spell_id = 0;
if(pEnchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
- continue;
+ {
+ // Flametongue Weapon support
+ switch(pEnchant->ID)
+ {
+ case 3: spell_id = 8026; break; // Rank1
+ case 4: spell_id = 8028; break; // Rank2
+ case 5: spell_id = 8029; break; // Rank3
+ case 523: spell_id = 10445; break; // Rank4
+ case 1665: spell_id = 16343; break; // Rank5
+ case 1666: spell_id = 16344; break; // Rank6
+ case 2634: spell_id = 25488; break; // Rank7
+ default:
+ continue;
+ }
+ }
SpellEnchantProcEntry const* entry = spellmgr.GetSpellEnchantProcEvent(enchant_id);
if (entry && entry->procEx)
@@ -7317,14 +7332,17 @@
continue;
}
- SpellEntry const *spellInfo =
sSpellStore.LookupEntry(pEnchant->spellid[s]);
+ if(!spell_id)
+ spell_id = pEnchant->spellid[s];
+
+ SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell_id);
if (!spellInfo)
{
- sLog.outError("Player::CastItemCombatSpell Enchant %i, cast
unknown spell %i", pEnchant->ID, pEnchant->spellid[s]);
- continue;
- }
-
- // do not allow proc windfury totem from yellow attacks
+ sLog.outError("Player::CastItemCombatSpell Enchant %i, cast
unknown spell %i", pEnchant->ID, spell_id);
+ continue;
+ }
+
+ // do not allow proc windfury totem from yellow attacks
if(spell && spellInfo->SpellFamilyName == SPELLFAMILY_SHAMAN && spellInfo->SpellFamilyFlags & 0x200000000LL)
return;
@@ -7343,14 +7361,14 @@
chance = entry->customChance;
// Apply spell mods
-
ApplySpellMod(pEnchant->spellid[s],SPELLMOD_CHANCE_OF_SUCCESS,chance);
+ ApplySpellMod(spell_id,SPELLMOD_CHANCE_OF_SUCCESS,chance);
if (roll_chance_f(chance))
{
- if(IsPositiveSpell(pEnchant->spellid[s]))
- CastSpell(this, pEnchant->spellid[s], true, item);
+ if(IsPositiveSpell(spell_id))
+ CastSpell(this, spell_id, true, item);
else
- CastSpell(target, pEnchant->spellid[s], true, item);
+ CastSpell(target, spell_id, true, item);
}
}
}
@@ -11963,7 +11981,7 @@
uint32 enchant_display_type = pEnchant->type[s];
uint32 enchant_amount = pEnchant->amount[s];
uint32 enchant_spell_id = pEnchant->spellid[s];
-
+
switch(enchant_display_type)
{
case ITEM_ENCHANTMENT_TYPE_NONE:
@@ -11982,6 +12000,10 @@
case ITEM_ENCHANTMENT_TYPE_EQUIP_SPELL:
if(enchant_spell_id)
{
+ SpellEntry const *temp =
sSpellStore.LookupEntry(enchant_spell_id);
+ if(!temp)
+ break;
+
if(apply)
{
int32 basepoints = 0;
diff -r 69b781d3a243 -r 46e6b90167fe src/game/SpellEffects.cpp
--- a/src/game/SpellEffects.cpp Thu Mar 18 22:57:19 2010 +0100
+++ b/src/game/SpellEffects.cpp Fri Mar 19 16:01:58 2010 +0100
@@ -1842,6 +1842,32 @@
}
break;
case SPELLFAMILY_SHAMAN:
+
+ // Flametongue Weapon Proc
+ if(m_spellInfo->SpellFamilyFlags & 0x200000)
+ {
+ if(m_caster->GetTypeId() != TYPEID_PLAYER)
+ return;
+
+ bool mainhand = false;
+
+ if(m_CastItem && m_CastItem->GetSlot() ==
EQUIPMENT_SLOT_MAINHAND)
+ mainhand = true;
+
+ bp =
((Player*)m_caster)->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FIRE) *0.1;
+ bp += m_caster->GetAttackTime(mainhand ? BASE_ATTACK :
OFF_ATTACK) * (m_spellInfo->EffectBasePoints[0]+1) / 100000;
+ spell_id = 10444;
+ break;
+ }
+
+ // Flametongue Totem Proc
+ if(m_spellInfo->SpellFamilyFlags & 0x400000000)
+ {
+ bp = m_caster->GetAttackTime(BASE_ATTACK) *
(m_spellInfo->EffectBasePoints[0]+1) / 100000;
+ spell_id = 16368;
+ break;
+ }
+
//Shaman Rockbiter Weapon
if (m_spellInfo->SpellFamilyFlags == 0x400000)
{
Original comment by stfxm...@gmail.com
on 30 Dec 2010 at 3:35
By stfx:
what kind of system is required which allows us to fix it properly and does
such a system exist on TC2?
Original comment by stfxm...@gmail.com
on 30 Dec 2010 at 3:35
By lukaasm:
it's not core itself related but spell machanics used in tbc, in wotlk blizz
changed them to use passive aura to proc spells like windfury.
Original comment by stfxm...@gmail.com
on 30 Dec 2010 at 3:35
By oneb1t:
its maybe exist on my repo try to find it there...
Original comment by stfxm...@gmail.com
on 30 Dec 2010 at 3:35
By pdx15:
UP!
and oneb1t - I have not found a fix at you ))
Original comment by stfxm...@gmail.com
on 30 Dec 2010 at 3:35
By pdx15:
http://www.trinitycore.org/forum/project.php?issueid=3625
Original comment by stfxm...@gmail.com
on 30 Dec 2010 at 3:35
Original comment by stfxm...@gmail.com
on 30 Dec 2010 at 5:55
Original issue reported on code.google.com by
stfxm...@gmail.com
on 30 Dec 2010 at 3:35