Help - 4.3.4 Profession Tinkers

[COLOR=rgb(51,51,51)]Dear TrinityCore staff & members of TC forum.

[COLOR=rgb(51,51,51)]I remember an old issue on 4.3.4 TC where all of the tinkers on for example engineering were bugged, nitro boosts not reacting/working, synapse springs not working and so on that were fixed in 2013, my guess would be around October 2013, maybe before that.

[COLOR=rgb(51,51,51)]But I can simply not find the commit with the fix, I’ve been looking everywhere, would anyone be able to link it to me / find it to me / give me some information on it, if you have any?

You may wonder, why, why not just download the core and ignore it?

Well I’m learning c++ and I’ve been trying to fix this issue for a long time, I could surely just ignore it and move on, but that way I wont improve and wont see how it’s handled / fixed, which is why I want to know some more information / find the commit fix so I can improve in that field as well.

[COLOR=rgb(51,51,51)]-- A simillar issue can get found on here http://www.trinitycore.org/f/topic/9299-cataclysm-profession-engineering-help/ difference is just that I want to do this to learn and improve while he needed it for his core.

[COLOR=rgb(51,51,51)]Thanks for understanding & thanks in advance!

Best Regards,

[COLOR=rgb(51,51,51)]Dishy.

Well, I do not know what fixed and that it was broken in the first place but since you are so keen on learning you could use git bisect with a “bad” and “good” revision to find what fixed it.

Hi Nay, thanks for your reply.

Could you tell me more about that? I’m not really sure how that works, even though it would of course be nice with a post giving information about it, it would also be great finding it out on my own that way, honestly I don’t care as long as I find the commit.

I have been trying to use git extension - browse, searching for dates, commits, messages etc etc but still no luck.

Therefor I would really appreciate every single post that may help regarding this.

http://webchick.net/node/99

http://git-scm.com/docs/git-bisect

Since you want to know when something got fixed, you probably want to swap “good” and “bad” (since git bisect is towards to finding commits that introduce a bug)

Thanks for contributing, Nay, however this is honestly very confusing for me.

It wouldn’t be possible for you trying to give it a try finding the commit through bisect? You’re surely way more experienced than I am with it, if you’re too busy I respect and understand that.

I’ll continue try to get this to work, but I doubt that I’ll be able to use it, hoping that anyone else has something that may be able to help me regarding this fix/problem.

I have no time; each build would take 30 mins at least to compile and then I would need to fire up the server multiple times and see if the issue is fixed or not.

Don’t changes in the DB also make this hard to do, since you would need to make sure the DB matches with each tested revision?

Alright, I understand and respect that. I just hope[COLOR=rgb(40,40,40)] that anyone else has something that may be able to help me regarding this fix/problem then.

[COLOR=rgb(40,40,40)]@Paradox,

[COLOR=rgb(40,40,40)]That shouldn’t really make any difference, also I’m almost sure this is a core only fix, however I’m not sure of course, as I can’t find the damn commit.

Yep, but that’s solvable with a couple of scripts to rebuild the databases every new compile.

When you are talking about a fix that could have been added a year ago, there will be major changes in the way the DB operates that will not allow the core to start at all, if you try to run a core that old with a current DB…

Oh yeah, of course, but as Nay say, that shouldn’t be the biggest issue.

Preferable method would of course be if someone knew the commit link / fix.

[COLOR=rgb(40,40,40)]Is anyone else having something that may be able to help me regarding this fix/problem?

Bumping the topic, in hope anyone has a solution.

You are still trying to find the commit that fixed and still didn’t bother with git bisect? Damn.

I’ve tried finding it with git bisect already but no luck as I didn’t manage to succes/complete and find it.

Thanks for your post & interest though.

Does anyone possibly know this?

Got the same bug…

I have no idea how to fix it :confused:

Any Idea?

This may help.

[CODE]void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8 cast_count, uint32 glyphIndex)
{

  • ItemTemplate const* proto = item->GetTemplate();
  • // special learning case
  • if (proto->Spells[0].SpellId == 483 || proto->Spells[0].SpellId == 55884)
  • {
  •    uint32 learn_spell_id = proto->Spells[0].SpellId;
    
  •    uint32 learning_spell_id = proto->Spells[1].SpellId;
    
  •    SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(learn_spell_id);
    
  •    if (!spellInfo)
    
  •    {
    
  •        sLog->outError(LOG_FILTER_PLAYER, "Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring ", proto->ItemId, learn_spell_id);
    
  •        SendEquipError(EQUIP_ERR_INTERNAL_BAG_ERROR, item, NULL);
    
  •        return;
    
  •    }
    
  •    Spell* spell = new Spell(this, spellInfo, TRIGGERED_NONE);
    
  •    spell->m_CastItem = item;
    
  •    spell->m_cast_count = cast_count;                   //set count of casts
    
  •    spell->SetSpellValue(SPELLVALUE_BASE_POINT0, learning_spell_id);
    
  •    spell->prepare(&targets);
    
  •    return;
    
  • }
  • // use triggered flag only for items with many spell casts and for not first cast
  • uint8 count = 0;
  • // item spells casted at use
  • for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
  • {
  •    _Spell const& spellData = proto->Spells[i];
    
  • ItemTemplate const* proto = item->GetTemplate();
  • // special learning case
  • if (proto->Spells[0].SpellId == 483 || proto->Spells[0].SpellId == 55884)
  • {
  •    uint32 learn_spell_id = proto->Spells[0].SpellId;
    
  •    uint32 learning_spell_id = proto->Spells[1].SpellId;
    
  •    // no spell
    
  •    if (!spellData.SpellId)
    
  •        continue;
    
  •    SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(learn_spell_id);
    
  •    if (!spellInfo)
    
  •    {
    
  •        sLog->outError(LOG_FILTER_PLAYER, "Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring ", proto->ItemId, learn_spell_id);
    
  •        SendEquipError(EQUIP_ERR_INTERNAL_BAG_ERROR, item, NULL);
    
  •        return;
    
  •    }
    
  •    // wrong triggering type
    
  •    if (spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_USE)
    
  •        continue;
    
  •    Spell* spell = new Spell(this, spellInfo, TRIGGERED_NONE);
    
  •    spell->m_CastItem = item;
    
  •    spell->m_cast_count = cast_count;                   //set count of casts
    
  •    spell->SetSpellValue(SPELLVALUE_BASE_POINT0, learning_spell_id);
    
  •    spell->prepare(&targets);
    
  •    return;
    
  • }
  •    SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellData.SpellId);
    
  •    if (!spellInfo)
    
  •    {
    
  •        sLog->outError(LOG_FILTER_PLAYER, "Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring", proto->ItemId, spellData.SpellId);
    
  •        continue;
    
  •    }
    
  • // use triggered flag only for items with many spell casts and for not first cast
  • uint8 count = 0;
  •    Spell* spell = new Spell(this, spellInfo, (count > 0) ? TRIGGERED_FULL_MASK : TRIGGERED_NONE);
    
  •    spell->m_CastItem = item;
    
  •    spell->m_cast_count = cast_count;                   // set count of casts
    
  •    spell->m_glyphIndex = glyphIndex;                   // glyph index
    
  •    spell->prepare(&targets);
    
  • // item spells cast at use
  • for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
  • {
  •    _Spell const& spellData = proto->Spells[i];
    
  •    ++count;
    
  • }
  •    // no spell
    
  •    if (!spellData.SpellId)
    
  •        continue;
    
  • // Item enchantments spells casted at use
  • for (uint8 e_slot = 0; e_slot < MAX_ENCHANTMENT_SLOT; ++e_slot)
  • {
  •    if (e_slot > PRISMATIC_ENCHANTMENT_SLOT || e_slot < PROP_ENCHANTMENT_SLOT_0)    // not holding enchantment id
    
  •        continue;
    
  •    // wrong triggering type
    
  •    if (spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_USE)
    
  •        continue;
    
  •    uint32 enchant_id = item->GetEnchantmentId(EnchantmentSlot(e_slot));
    
  •    SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
    
  •    if (!pEnchant)
    
  •        continue;
    
  •    for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s)
    
  •    {
    
  •        if (pEnchant->type[s] != ITEM_ENCHANTMENT_TYPE_USE_SPELL)
    
  •            continue;
    
  •    SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellData.SpellId);
    
  •    if (!spellInfo)
    
  •    {
    
  •        sLog->outError(LOG_FILTER_PLAYER, "Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring", proto->ItemId, spellData.SpellId);
    
  •        continue;
    
  •    }
    
  •        SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]);
    
  •        if (!spellInfo)
    
  •        {
    
  •            sLog->outError(LOG_FILTER_PLAYER, "Player::CastItemUseSpell Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]);
    
  •            continue;
    
  •        }
    
  •    Spell* spell = new Spell(this, spellInfo, (count > 0) ? TRIGGERED_FULL_MASK : TRIGGERED_NONE);
    
  •    spell->m_CastItem = item;
    
  •    spell->m_cast_count = cast_count;                   // set count of casts
    
  •    spell->m_glyphIndex = glyphIndex;                   // glyph index
    
  •    spell->prepare(&targets);
    
  •        Spell* spell = new Spell(this, spellInfo, (count > 0) ? TRIGGERED_FULL_MASK : TRIGGERED_NONE);
    
  •        spell->m_CastItem = item;
    
  •        spell->m_cast_count = cast_count;               // set count of casts
    
  •        spell->m_glyphIndex = glyphIndex;               // glyph index
    
  •        spell->prepare(&targets);
    
  •    ++count;
    
  • }
  •        ++count;
    
  •    }
    
  • }
  • // Item enchantments spells cast at use

  • for (uint8 e_slot = 0; e_slot < MAX_ENCHANTMENT_SLOT; ++e_slot)

  • {

  •    if (e_slot > PRISMATIC_ENCHANTMENT_SLOT && e_slot < PROP_ENCHANTMENT_SLOT_0)    // not holding enchantment id
    
  •        continue;
    
  •    uint32 enchant_id = item->GetEnchantmentId(EnchantmentSlot(e_slot));
    
  •    SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
    
  •    if (!pEnchant)
    
  •        continue;
    
  •    for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s)
    
  •    {
    
  •        if (pEnchant->type[s] != ITEM_ENCHANTMENT_TYPE_USE_SPELL)
    
  •            continue;
    
  •        SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]);
    
  •        if (!spellInfo)
    
  •        {
    
  •            sLog->outError(LOG_FILTER_PLAYER, "Player::CastItemUseSpell Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]);
    
  •            continue;
    
  •        }
    
  •        Spell* spell = new Spell(this, spellInfo, (count > 0) ? TRIGGERED_FULL_MASK : TRIGGERED_NONE);
    
  •        spell->m_CastItem = item;
    
  •        spell->m_cast_count = cast_count;               // set count of casts
    
  •        spell->m_glyphIndex = glyphIndex;               // glyph index
    
  •        spell->prepare(&targets);
    
  •        ++count;
    
  •    }
    
  • }
    }

void Player::_RemoveAllItemMods()
{
sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, “_RemoveAllItemMods start.”);
@@ -23496,30 +23497,36 @@ void Player::SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint3

void Player::ApplyEquipCooldown(Item* pItem)
{

  • if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_PROTO_FLAG_NO_EQUIP_COOLDOWN))
  •    return;
    
  • if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_PROTO_FLAG_NO_EQUIP_COOLDOWN))
  •    return;
    
  • for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
  • {
  •    _Spell const& spellData = pItem->GetTemplate()->Spells[i];
    
  • for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
  • {
  •    _Spell const& spellData = pItem->GetTemplate()->Spells[i];
    
  •    // no spell
    
  •    if (!spellData.SpellId)
    
  •        continue;
    
  •    // no spell
    
  •    if (!spellData.SpellId)
    
  •        continue;
    
  •    // wrong triggering type (note: ITEM_SPELLTRIGGER_ON_NO_DELAY_USE not have cooldown)
    
  •    if (spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_USE)
    
  •        continue;
    
  •    // wrong triggering type (note: ITEM_SPELLTRIGGER_ON_NO_DELAY_USE not have cooldown)
    
  •    if (spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_USE)
    
  •        continue;
    
  •    AddSpellCooldown(spellData.SpellId, pItem->GetEntry(), time(NULL) + 30);
    
  •    // Don't replace longer cooldowns by equip cooldown if we have any.
    
  •    SpellCooldowns::iterator itr = m_spellCooldowns.find(spellData.SpellId);
    
  •    if (itr != m_spellCooldowns.end() && itr->second.itemid == pItem->GetEntry() && itr->second.end > time(NULL) + 30)
    
  •        continue;
    
  •    WorldPacket data(SMSG_ITEM_COOLDOWN, 12);
    
  •    data << pItem->GetGUID();
    
  •    data << uint32(spellData.SpellId);
    
  •    GetSession()->SendPacket(&data);
    
  • }
  •    AddSpellCooldown(spellData.SpellId, pItem->GetEntry(), time(NULL) + 30);
    
  •    WorldPacket data(SMSG_ITEM_COOLDOWN, 12);
    
  •    data << pItem->GetGUID();
    
  •    data << uint32(spellData.SpellId);
    
  •    GetSession()->SendPacket(&data);
    
  • }
    }

void Player::resetSpells(bool myClassOnly)
{
// not need after this call
[/CODE]