[03:14] <_Zaphod_> okay, waht fiends of item_template are wdb and what aren't? it's clear that scriptname is not, but i'm not sure about the others.
[03:14] <%Nayd> there's a wdb fields page on the wiki
[03:14] * LimitServ sets mode: +l 80
[03:14] <_Zaphod_> there's a certain Jewellcrafting recipe for cutting black diamonds...
[03:14] * Kinzcool is now known as kinzcool
[03:15] <_Zaphod_> ani'm notsure i the correct way to make it work is to script the Prismatic Black Diamond, or to put a special case in core for the recipe.
[03:15] <%Nayd> script the spell, not the item
[03:16] <_Zaphod_> but the spell has no script effect.
[03:16] <%Nayd> spell id?
[03:16] <_Zaphod_> it creates a prismatic black diamond.
[03:17] <_Zaphod_> http://www.wowhead.com/spell=62941
[03:17] <_Zaphod_> but instead of that item, you get a different cut gem instead.
[03:18] <_Zaphod_> so it seems that the item needs to expire instantly, and be replaced by the itemscript.
[03:18] <_Zaphod_> but if duration i a wdb field...
[03:19] <_Zaphod_> you see the confusion, now?
[03:20] <%Nayd> spell_loot_template
[03:20] <%Nayd> table
[03:21] <%Nayd> https://github.com/TrinityCore/TrinityCore/blob/master/src/server/game/Spells/SpellEffects.cpp#L1729
[03:21] <%Nayd> // remove reagent
[03:21] <%Nayd> // create some random items
[03:21] <%Nayd> that's what you are looking for
[03:22] <%Nayd> now, please, add the loot info to table spell_loot_template
[03:22] <%Nayd> entry 62941
[03:22] <%Nayd> and post the fix on the tracker
[03:27] <+KPsN04> WPP: Nay master * re64f073 / WowPacketParser/Parsing/Handler.cs : Fix a compiler error (Delegate.GetMethodInfo() only exists in C# 4.5, not C# 4.0) - http://git.io/g5hhuQ
[03:29] <_Zaphod_> well now i need to get some accurate loot info. :)
[03:29] <%Nayd> I'de follow this
[03:29] <%Nayd> http://www.wowhead.com/item=45054#comments:id=1695380
[03:31] <%Nayd> 23%, 23%, 23%, 23%, 8% ?
[03:31] <%Nayd> oh wait, there's yellow too
[03:31] <%Nayd> 20%, 20%, 20%, 20%, 5%, 5%
[03:32] <%Nayd> and I don't know how to count
[03:44] <_Zaphod_> ERROR spell_loot_template entry 62941 isn't spell id (random item crating) and thus useless.
[03:44] <%Nayd> lies!
[03:44] <_Zaphod_> that's what my core told me.
[03:44] <%Nayd> (by the core)
[03:44] <%Nayd> ye
[03:45] <_Zaphod_> so it will work anyway? :)
[03:45] <%Nayd> probably not
[03:45] <%Nayd> you are using Trinity?
[03:46] <_Zaphod_> yeah.
[03:46] <%Nayd> I can't find the error message
[03:46] <_Zaphod_> mayeb we need an override?
[03:46] <_Zaphod_> hmm. lemme find it.
[03:47] <%Nayd> spell id (random item creating)
[03:47] <%Nayd> crating != creating :)
[03:48] <_Zaphod_> so commenting out line 52 is a fix?
[03:48] <%Nayd> not a proper fix
[03:49] <_Zaphod_> no thatowuldt' work..
[03:49] <%Nayd> problem is in
[03:49] <%Nayd> bool SpellInfo::IsLootCrafting() const
[03:49] <%Nayd> {
[03:49] <%Nayd> return (Effects[0].Effect == SPELL_EFFECT_CREATE_RANDOM_ITEM ||
[03:49] <%Nayd> (Effects[0].Effect == SPELL_EFFECT_CREATE_ITEM_2 &&
[03:49] <%Nayd> (TotemCategory[0] != 0 || Effects[0].ItemType == 0)));
[03:49] <%Nayd> }
[03:50] <%Nayd> Effects[0].ItemType == 0
[03:50] <%Nayd> fails on that
[03:50] <%Nayd> it's not zero, it's the pristine black diamond
[03:50] <%Nayd> which makes perfect sense
[03:53] <_Zaphod_> yet you never recieve that diamond.
[03:53] <%Nayd> https://github.com/TrinityCore/TrinityCore/commit/45e750148a256333b49dae7b2725eb815ba4089d
[03:53] <%Nayd> old shit...
[03:54] <_Zaphod_> and there can only be one validation contition like that, huh?
[03:59] <_Zaphod_> okay. problemmust be in LoadLootTemplates_Spell() right?
[03:59] <%Nayd> yeah, because that also calls IsLootCrafting
[04:00] <%Nayd> this code wasn't changed since mangos times
[04:00] <%Nayd> and I just checked, they still do the same exact checks
[04:02] <%Nayd> spell 59502 Darkmoon Card
[04:02] <%Nayd> does the exact same thing
[04:02] <%Nayd> and has loot in spell_loot_template
[04:02] <%Nayd> how doesn't that error?
[04:02] <_Zaphod_> it doesn't.
[04:02] <%Nayd> yes, why?
[04:03] <%Nayd> what am I missing...
[04:04] <_Zaphod_> wait a minute.. i'm gonna check something..
[04:05] <_Zaphod_> nope, that uses groulid 1 as well, so that's not it.
[04:06] <_Zaphod_> time to check the dbc.
[04:07] <%Nayd> darkmoon spell
[04:07] <%Nayd> http://paste2.org/p/2816296
[04:07] <%Nayd> prismatic
[04:07] <%Nayd> http://paste2.org/p/2816298
[04:07] <%Nayd> same exact thing, EffectMiscValueA and EffectItemType change
[04:09] <%Nayd> silly SpellWork
[04:09] <%Nayd> it's incomplete
[04:10] <%Nayd> Darkmoon has TotemCategory1 = 121
[04:10] <%Nayd> Prismatic has TotemCategory1 = 0
[04:10] <%Nayd> [03:49] <%Nayd> (TotemCategory[0] != 0 || Effects[0].ItemType == 0)));
[04:10] <%Nayd> condition will be true for 1st spell
[04:10] <%Nayd> however
[04:10] <%Nayd> Darkmoon has Totem1 = 0
[04:11] <%Nayd> Prismatic has Totem1 = 20824
[04:15] <_Zaphod_> so fix is ((TotemCategory[0] != 0) || (Totem[0] != 0) || Effects[0].ItemType == 0)));
[04:15] <%Nayd> that's what I am thinking
[04:16] <_Zaphod_> testing.
[04:17] <%Nayd> wait a second..
[04:17] <%Nayd> there are spells to create the items
[04:18] <_Zaphod_> ye sthere are.
[04:18] <_Zaphod_> the standard crating spells
[04:18] <%Nayd> they all have the same Totem1
[04:18] <_Zaphod_> but that's not relevant.
[04:19] <%Nayd> 72 spells
[04:19] <%Nayd> what does Totem1 mean?
[04:19] <_Zaphod_> all i care is if this bypasses the DB error.
[04:19] <%Nayd> siigh
[04:19] <%Nayd> wrong mindset is wrong
[04:23] <_Zaphod_> what about those 72 spells?
[04:23] <_Zaphod_> as i said, the gems that the prismatic diamond turns into are also normally craftable.
[04:24] <_Zaphod_> it turns into a level 60 red, blue or yellow gem.
[04:24] <%Nayd> you will likely break those 72 spells if you do
[04:24] <%Nayd> [04:15] <_Zaphod_> so fix is ((TotemCategory[0] != 0) || (Totem[0] != 0) || Effects[0].ItemType == 0)));
[04:24] <_Zaphod_> of green rarity.
[04:25] <_Zaphod_> hmm.
[04:26] <%Nayd> mind fuck..
[04:26] <_Zaphod_> so those 72 spells have totemcagegory[0] of 0, and totem[0]of not zero?
[04:27] <%Nayd> exactly
[04:27] <%Nayd> and same effect
[04:27] <%Nayd> 157
[04:27] <_Zaphod_> so we need a bitmask on totem[0]?
[04:28] <%Nayd> it's not a flag
[04:29] <_Zaphod_> well clearly it's not a spell.
[04:31] <_Zaphod_> or an npc, or an item, oragameobject.
[04:31] <%Nayd> what ya talkin about?
[04:31] <_Zaphod_> i just crosschecked 20824
[04:31] <_Zaphod_> Prismatic has Totem1 = 20824
[04:31] <%Nayd> oh those
[04:31] <%Nayd> I don't know either
[04:31] <%Nayd> internal blizz ids
[04:31] <_Zaphod_> so trying to figure out what's so special about that number.
[04:31] <%Nayd> same for MiscValue
[04:32] <_Zaphod_> so what's miscvalue for prismatic and darkmoon?
[04:33] <%Nayd> 26876
[04:33] <%Nayd> 26663
[04:33] <_Zaphod_> and for those other 72 item creation spells?
[04:33] <%Nayd> different values
[04:33] <%Nayd> around 20k-ish
[04:34] <_Zaphod_> anything else have totem1=20824 at all?
[04:34] <%Nayd> all of the 72 spells
[04:34] <%Nayd> + Prismatic
[04:34] <_Zaphod_> link me one of the spells. :)
[04:35] <%Nayd> 53831
[04:36] <_Zaphod_> so correct to script in the item itself after all?!?!
[04:36] <%Nayd> nein
[04:36] <%Nayd> http://paste2.org/p/2816360
[04:36] <%Nayd> can Prismatic generate any of those?
[04:37] <%Nayd> scroll right for spell name
[04:37] <_Zaphod_> it only generates red, blue, and yellowgreen 60s i believe.
[04:38] <_Zaphod_> i made a list of nine of them.
[04:39] <%Nayd> can't that 9 be boosted to 72?
[04:40] <_Zaphod_> only the single +6 and +9 pure color gems have ever been reported.
[04:41] <_Zaphod_> in fact people are saying the yellows don't showup at all.
[04:42] <_Zaphod_> even though the recipe suggest they should.
[04:42] <+KPsN04> WPP: Nay master * r920986c / (3 files in 3 dirs): Fix previous commit. Compiler is a lier - http://git.io/4ECmZA
[04:43] <_Zaphod_> "Cuts a black diamond into a red, blue or yellow gemstone of similar quality. The type of gem is not known until the gem is cut."
[04:44] <_Zaphod_> meaning a red, blue, or yellow item level 60 uncommn.
[04:47] <_Zaphod_> screw it, i'm specialcasing the spell id.
[04:47] <%Nayd> no, wait 1 minute
[04:48] <_Zaphod_> i'll fix it right later. :)
[04:48] <_Zaphod_> it does NOT draw from that full pool of 72 spells.
[04:48] <%Nayd> yeh, got it
[04:49] <_Zaphod_> i've came up with9 that fit the description.