Jump to content

Lynx3d

Members
  • Posts

    437
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Lynx3d

  1. D'oh...yes i accidentally added the exception to Totems check instead of TotemsCategory. Fixed now. http://github.com/Lynx3d/mangos/commits/vellums
  2. For those still unable to apply a patch, i finally setup a github repository with my version: http://github.com/Lynx3d/mangos/tree/vellums Hope i didn't mess up...
  3. Could you give bit more useful information? Which patch does not work in which way? I'm pretty sure mine applies and compiles with with [8799], just tried again. I'd really like some feedback. @darkstalker: Aren't you getting skillups in enchanting when using a scroll with your patch?
  4. Hm originally i wanted to tweak the patch a bit, but it pretty much ended up in a rewrite. The stuff in CheckCast() should be in CheckItems() in my opinion, at least there is already similar checks, and the IsFitToSpellRequirements() call seems completely redundant to me, it is already called in CheckItems(). Also, the way the vellum is taken as reagent looked strange to me, i'm not sure if you didn't make a too many assumptions here. I only delete item when really enchanting a vellum. Finally, i noticed that i got skillups in enchanting when using a scroll, so i added a check there. I think that's about it, if anyone has an idea what you still could improve, let me know, but this is the first time i have the feeling i wrote a hack-free patch diff --git a/src/game/Item.cpp b/src/game/Item.cpp index 00bbe88..60180e4 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -751,6 +751,15 @@ bool Item::IsFitToSpellRequirements(SpellEntry const* spellInfo) const { ItemPrototype const* proto = GetProto(); + // Enchant spells have only effect[0] + if(proto->IsVellum() && spellInfo->Effect[0] == SPELL_EFFECT_ENCHANT_ITEM && spellInfo->EffectItemType[0]) + { + if ((proto->SubClass == ITEM_SUBCLASS_WEAPON_ENCHANTMENT && spellInfo->EquippedItemClass == ITEM_CLASS_WEAPON) || + (proto->SubClass == ITEM_SUBCLASS_ARMOR_ENCHANTMENT && spellInfo->EquippedItemClass == ITEM_CLASS_ARMOR)) + return true; + } + // Vellum enchant case should ignore everything below + if (spellInfo->EquippedItemClass != -1) // -1 == any item class { if(spellInfo->EquippedItemClass != int32(proto->Class)) diff --git a/src/game/ItemPrototype.h b/src/game/ItemPrototype.h index cae4fd3..70fcfb6 100644 --- a/src/game/ItemPrototype.h +++ b/src/game/ItemPrototype.h @@ -632,6 +632,10 @@ struct ItemPrototype bool IsPotion() const { return Class==ITEM_CLASS_CONSUMABLE && SubClass==ITEM_SUBCLASS_POTION; } bool IsConjuredConsumable() const { return Class == ITEM_CLASS_CONSUMABLE && (Flags & ITEM_FLAGS_CONJURED); } + bool IsVellum() const + { + return (Class == ITEM_CLASS_TRADE_GOODS && (1 << ITEM_SUBCLASS_ARMOR_ENCHANTMENT | 1 << ITEM_SUBCLASS_WEAPON_ENCHANTMENT) & (1<<SubClass)); + } }; struct ItemLocale diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 954fffb..b369c6d 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3720,6 +3720,10 @@ void Spell::TakeReagents() if (p_caster->CanNoReagentCast(m_spellInfo)) return; + // Scroll case, reagents already taken on scroll creation; scoll itself destroyed in TakeCastItem() + if(m_CastItem && m_CastItem->GetProto()->Flags & ITEM_FLAGS_ENCHANT_SCROLL) + return; + for(uint32 x = 0; x < 8; ++x) { if(m_spellInfo->Reagent[x] <= 0) @@ -5195,6 +5199,8 @@ SpellCastResult Spell::CheckItems() return SPELL_CAST_OK; Player* p_caster = (Player*)m_caster; + bool isScrollItem = false; + bool isVellumTarget = false; // cast item checks if(m_CastItem) @@ -5207,6 +5213,8 @@ SpellCastResult Spell::CheckItems() if(!proto) return SPELL_FAILED_ITEM_NOT_READY; + if(proto->Flags & ITEM_FLAGS_ENCHANT_SCROLL) isScrollItem = true; + for (int i = 0; i < 5; ++i) if (proto->Spells[i].SpellCharges) if(m_CastItem->GetSpellCharges(i) == 0) @@ -5273,8 +5281,13 @@ SpellCastResult Spell::CheckItems() if(!m_targets.getItemTarget()) return SPELL_FAILED_ITEM_GONE; + isVellumTarget = m_targets.getItemTarget()->GetProto()->IsVellum(); if(!m_targets.getItemTarget()->IsFitToSpellRequirements(m_spellInfo)) return SPELL_FAILED_EQUIPPED_ITEM_CLASS; + + // Do not enchant vellum with scroll + if(isVellumTarget && isScrollItem) + return SPELL_FAILED_BAD_TARGETS; } // if not item target then required item must be equipped else @@ -5305,8 +5318,9 @@ SpellCastResult Spell::CheckItems() focusObject = ok; // game object found in range } - // check reagents (ignore triggered spells with reagents processed by original spell) and special reagent ignore case. - if (!m_IsTriggeredSpell && !p_caster->CanNoReagentCast(m_spellInfo)) + // check reagents (ignore triggered spells with reagents processed by original spell) and special reagent ignore case, + // including enchanted scrolls + if (!m_IsTriggeredSpell && !p_caster->CanNoReagentCast(m_spellInfo) && !isScrollItem) { for(uint32 i = 0; i < 8; ++i) { @@ -5340,17 +5354,22 @@ SpellCastResult Spell::CheckItems() // check totem-item requirements (items presence in inventory) uint32 totems = 2; - for(int i = 0; i < 2 ; ++i) + // scrolls don't need tools to apply enchant, unlike normal enchant spell that is also used to create scrolls + if(isScrollItem) totems = 0; + else { - if(m_spellInfo->Totem[i] != 0) + for(int i = 0; i < 2 ; ++i) { - if( p_caster->HasItemCount(m_spellInfo->Totem[i], 1) ) + if(m_spellInfo->Totem[i] != 0) { - totems -= 1; - continue; - } - }else - totems -= 1; + if( p_caster->HasItemCount(m_spellInfo->Totem[i], 1) ) + { + totems -= 1; + continue; + } + }else + totems -= 1; + } } if(totems != 0) return SPELL_FAILED_TOTEMS; //0x7C @@ -5401,6 +5420,17 @@ SpellCastResult Spell::CheckItems() if( targetItem->GetProto()->ItemLevel < m_spellInfo->baseLevel ) return SPELL_FAILED_LOWLEVEL; + // Check if we can store a new scroll, enchanting vellum has implicit SPELL_EFFECT_CREATE_ITEM + if(isVellumTarget && m_spellInfo->EffectItemType[i]) + { + ItemPosCountVec dest; + uint8 msg = p_caster->CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, m_spellInfo->EffectItemType[i], 1 ); + if(msg != EQUIP_ERR_OK) + { + p_caster->SendEquipError( msg, NULL, NULL ); + return SPELL_FAILED_DONT_REPORT; + } + } // Not allow enchant in trade slot for some enchant type if( targetItem->GetOwner() != m_caster ) { @@ -5410,6 +5440,9 @@ SpellCastResult Spell::CheckItems() return SPELL_FAILED_ERROR; if (pEnchant->slot & ENCHANTMENT_CAN_SOULBOUND) return SPELL_FAILED_NOT_TRADEABLE; + // cannot replace vellum with scroll in trade slot + if (isVellumTarget) + return SPELL_FAILED_BAD_TARGETS; } break; } diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 16170da..4a173a6 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3945,11 +3945,6 @@ void Spell::EffectEnchantItemPerm(uint32 effect_idx) if (!itemTarget) return; - Player* p_caster = (Player*)m_caster; - - // not grow at item use at item case - p_caster->UpdateCraftSkill(m_spellInfo->Id); - uint32 enchant_id = m_spellInfo->EffectMiscValue[effect_idx]; if (!enchant_id) return; @@ -3963,6 +3958,25 @@ void Spell::EffectEnchantItemPerm(uint32 effect_idx) if (!item_owner) return; + Player* p_caster = (Player*)m_caster; + + // Enchanting a vellum requires special handling, as it creates a new item + // instead of modifying an existing one. + ItemPrototype const* targetProto = itemTarget->GetProto(); + if(targetProto->IsVellum() && m_spellInfo->EffectItemType[effect_idx]) + { + unitTarget = m_caster; + DoCreateItem(effect_idx,m_spellInfo->EffectItemType[effect_idx]); + // Vellum target case: Target becomes additional reagent, new scroll item created instead in Spell::EffectEnchantItemPerm() + // cannot already delete in TakeReagents() unfortunately + p_caster->DestroyItemCount(targetProto->ItemId, 1, true); + return; + } + + // not grow at item use at item case, using scrolls does not increase enchanting skill! + if (!(m_CastItem && m_CastItem->GetProto()->Flags & ITEM_FLAGS_ENCHANT_SCROLL)) + p_caster->UpdateCraftSkill(m_spellInfo->Id); + if (item_owner!=p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE) ) { sLog.outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)", > patch file < -edit- deleting the vellum in TakeReagents() was a bad idea, because it happens before executing spell effects...updated patch.
  5. By using git properly, maybe? Sound like you're having uncommited changes, that of course prevents any merging attempts...
  6. I think this is a bad idea (on a 32bit platform at least): (arenaRating << 32) It will not automatically be promoted to 64bit, and the behaviour of a shift that is larger or equal to the promoted width of the left operand is undefined. Research suggest that usually "<< 32" is equal to doing nothing, but it really can result in anything on 32bit values. Cast it to uint64 before shifting (and hope no one uses VS2005 without SP1, accidently found that while googling...)
  7. Okay after a few brain near-meltdowns i managed to hack something together to proc Frostbite and FoF together. But it's almost as hacky as that hardcoded package to enable charge in the client diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index ac5f15d..b864577 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10489,6 +10489,17 @@ int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_inde (spellProto->Effect[effect_index] != SPELL_EFFECT_APPLY_AURA || spellProto->EffectApplyAuraName[effect_index] != SPELL_AURA_MOD_DECREASE_SPEED)) value = int32(value*0.25f*exp(getLevel()*(70-spellProto->spellLevel)/1000.0f)); + // Frostbite trigger aura: if Fingers of Frost is active, it has saved a roll: + if(spellProto->EffectTriggerSpell[effect_index] == 12494) + { + sLog.outDebug("CalculateSpellDamage: called for 12494 (Frostbite), chance is: %u", value); + if(m_lastAuraProcRoll >=0) //override independent trigger + { + sLog.outDebug("CalculateSpellDamage: saved roll from FoF is: %f", m_lastAuraProcRoll); + return value > m_lastAuraProcRoll ? 100 : 0; + } + sLog.outDebug("CalculateSpellDamage: no saved roll for 12494 (Frostbite)"); + } return value; } @@ -11499,6 +11510,9 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag RemoveSpellList removedSpells; ProcTriggeredList procTriggered; + // reset saved roll from Fingers of Frost: + sLog.outDebug("resetting m_lastAuraProcRoll to -1.0"); + m_lastAuraProcRoll = -1.0f; // Fill procTriggered list for(AuraMap::const_iterator itr = GetAuras().begin(); itr!= GetAuras().end(); ++itr) { @@ -12434,6 +12448,13 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura* aura, SpellEntry con modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_CHANCE_OF_SUCCESS,chance); modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_FREQUENCY_OF_SUCCESS,chance); } + // Fingers of Frost: save roll for re-use in Frostbite trigger + if(aura->GetSpellProto()->EffectTriggerSpell[aura->GetEffIndex()] == 44544) + { + sLog.outDebug("Fingers of Frost: saving roll; triggered by %u", aura->GetId()); + m_lastAuraProcRoll = rand_chance(); + return chance > m_lastAuraProcRoll; + } return roll_chance_f(chance); } diff --git a/src/game/Unit.h b/src/game/Unit.h index b481c37..75ffcd4 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1588,6 +1588,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject uint32 m_reactiveTimer[MAX_REACTIVE]; uint32 m_regenTimer; uint32 m_lastManaUseTimer; + float m_lastAuraProcRoll; private: bool IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura* aura, SpellEntry const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const*& spellProcEvent ); I only tested with frostbolts so far though, thinking about how FoF works with Improved Blizzard cause some of the brain-stalls...and i'd bet my left arm that Blizz's trigger code works substantially different (see lack of shatter-combo "exploit" in MaNGOS).
  8. No those (apparently) wrong flags only make Brain Freeze trigger incorrectly from some spells, specifically Blizzard without Improved Blizzard, and Frost/Ice Armor when the chill effect does not trigger... Frostbite has: EffectSpellClassMaskA[0]: 1049120, EffectSpellClassMaskA[1]: 4096 I already wondered why i got so many Fireball! procs sometimes...
  9. Darn i think my idea doesn't work...Frostbite is rolled for in Spell::finish() while FoF is rolled for in Unit::IsTriggeredAtSpellProcEvent(), i don't see any way to pull these two together -edit- btw, where did you get the SpellFamilyMask0 values for the SQL query from? Because Frostbite has a different mask...but both should proc on chill effects.
  10. *scratches head* i am not sure if this code piece makes sense...since both will be triggered you can't just make one trigger the other one too... My idea would've been to make Unit::IsTriggeredAtSpellProcEvent() return the chance rather than already roll for it, so Unit::ProcDamageAndSpellFor() can group Frostbite and Fingers of Frost in one random roll.
  11. "for the most part" is the point here IMHO..."silent" changes break tools in subtle ways, I also favour keeping things clear by renaming to new meaning.
  12. Yea i was really wondering if i am that spastic lately to randomly drag off action buttons without noticing. Not sure if it's really this bug, but certain buttons just disappeared now and then, but not every login i think...pretty bad if it's one of those emergency buttons where you only notice it when you need it... *bites the dust*
  13. No, from what i understand, they just use the same random number to proc. That means if you have frostbite and fof both at max rank, they will always proc together, with 15% chance. If you for example have both at rank one (5% and 7% respectively) the result is a 2% chance that only fof will proc and a 5% chance that both proc, frostbite will never proc alone in this case because it's the same roll but frostbite has lower proc chance. So fully skilled, on a single target you're forced to waste one fof charge while your target really is frozen. Seems blizzard mainly wanted to buff boss fights with fof.
  14. *bumps own thread from forgotten depts*... Alright, i finally updated it to 3.2.x (updated first post), agility required per dodge percent was increased by 15% by patch 3.2.0. Also fixed a bug, base dodge chance has been missing. I tried to replicate a profile from wowarmory.com, a feral druid. Unfortunately the tooltips with enchants/gemming were not loading, so i had to guess a bit. Anyway, current MaNGOS gave me 12.64% dodge chance, wowarmory stated 19.25% and with my patch i reached 19.51%. That's not perfect but a lot closer than before. One remaining problem is the exact calculation of the bonus agility (the green value in the mouse-over info in character screen) in some cases, it seems the base agility and gear/buff bonus agility should be equally affected by talents like Survival of the Fittest (increases all stats by 6%), but currently the bonus value does not get multiplied with it, so you get the x% of all agility fully accounted to your base agility and the character screen is wrong, but i use those values for my calculations. Probably the reason why my result is a tad high (besides limited precision of researched values from elitisjerks) because a larger fraction should be affected by diminishing returns. Anyway, i'd love to see some comparison with retail characters...currently MaNGOS is just waaaay off.
  15. Oh well the questions themselves were not difficult to me, the difficult part was figuring out what google (or babelfish) translation is trying to tell you...it's like putting all unique words into a dice cup, shake good and hope you get something that looks like a complete sentence Anyway, that patch linked by salja does not load vehicle.dbc from what i can tell...all converted to DB tables.
  16. I don't think that's correct for 3.2.2, UpdateFields.h says: PLAYER_FIELD_ARENA_CURRENCY = UNIT_END + 0x0450 Expanding further gives 0x6 + 0x8E + 0x0450 = 0x4E4 In decimal that's 1252, not 1247 Not sure if the -47 is correct, i'm too lazy to do the maths for you In any case, make a backup because if you made a mistake you can lose some field values...
  17. ASSERT is a macro that does a bit more before calling the standard C asssert(). And did you really ask why asserts are needed?? For exactly those situations like you experienced: Finding the cause of fatal errors and stop the program, rather than letting it happily crash later at a random position where you can only guess why it crashed, and hope it didn't cause too much fatal data corruption on its way... Btw, assertions are not just magically "skipped in release mode" since there is no universal definition of that, C assert is defined to do nothing when NDEBUG is defined. But seriously, i doubt you really want to disable them especially when they stop your program...
  18. Since for some strange reason the vmap_assebler.exe through wine needs 12h+, i decided to find out why it didn't work as 64bit linux binary. Turns out the reason is that it reads the memory dumps from 32bit systems, but doesn't write it 32bit compatible, so i implemented this. Might not be the prettiest solution, but remains compatibility with existing vmaps. Tested with [8622] on 64bit Ubuntu >patch file< diff --git a/src/shared/vmap/ModelContainer.cpp b/src/shared/vmap/ModelContainer.cpp index ff4f935..8c07482 100644 --- a/src/shared/vmap/ModelContainer.cpp +++ b/src/shared/vmap/ModelContainer.cpp @@ -227,10 +227,15 @@ namespace VMAP if(result && fwrite(getTriangles(),sizeof(TriangleBox),getNTriangles(),wf) != getNTriangles()) result = false; if(result && fwrite("SUBM",4,1,wf) != 1) result = false; - size = sizeof(unsigned int)+ sizeof(SubModel)*iNSubModel; + size = sizeof(unsigned int) + SubModel::DumpSize*iNSubModel; if(result && fwrite(&size,4,1,wf) != 1) result = false; if(result && fwrite(&iNSubModel,sizeof(unsigned int),1,wf) != 1) result = false; - if(result && fwrite(iSubModel,sizeof(SubModel),iNSubModel,wf) != iNSubModel) result = false; + for(int i=0; i<iNSubModel; ++i) + { + uint8 triBuff[subModel::DumpSize]; + iSubModel[i].putToBinBlock(triBuff); + if(result && fwrite(triBuff,SubModel::DumpSize,1,wf) != 1) result = false; + } fclose(wf); } @@ -303,7 +308,7 @@ namespace VMAP { for(unsigned int i=0;i<iNSubModel && result; ++i) { - unsigned char readBuffer[52]; // this is the size of SubModel on 32 bit systems + unsigned char readBuffer[subModel::DumpSize]; // this equals the size of SubModel on 32 bit systems if(fread(readBuffer,sizeof(readBuffer),1,rf) != 1) result = false; iSubModel[i].initFromBinBlock(readBuffer); iSubModel[i].setTriangleArray(getTriangles()); diff --git a/src/shared/vmap/SubModel.cpp b/src/shared/vmap/SubModel.cpp index 17ca10f..d937878 100644 --- a/src/shared/vmap/SubModel.cpp +++ b/src/shared/vmap/SubModel.cpp @@ -17,6 +17,7 @@ */ #include "SubModel.h" +#include <cstring> #ifdef _ASSEMBLER_DEBUG extern FILE *::g_df; @@ -52,6 +53,8 @@ namespace VMAP //========================================================== //========================================================== //========================================================== + const unsigned int SubModel::DumpSize; + SubModel::SubModel(unsigned int pNTriangles, TriangleBox *pTriangles, unsigned int pTrianglesPos, unsigned int pNNodes, TreeNode *pTreeNodes, unsigned int pNodesPos) : BaseModel(pNNodes, pTreeNodes, pNTriangles, pTriangles) { @@ -111,6 +114,13 @@ namespace VMAP iHasInternalMemAlloc = *((bool *) (((char *) pBinBlock) + BP_iHasInternalMemAlloc)); iBox = *((ShortBox *) (((char *) pBinBlock) + BP_iBox)); } + + void SubModel::PutToBinBlock(void *pBinBlock) + { + // pointers of SubModel are redundant, but existing format expects 2*32bit (8 Bytes) + memcpy(pBinBlock, "\\0\\0\\0\\0\\0\\0\\0\\0",8); + memcpy((uint8*)pBinBlock+8, &this->iNTriangles,52-8); + } //========================================================== diff --git a/src/shared/vmap/SubModel.h b/src/shared/vmap/SubModel.h index eff1403..7747711 100644 --- a/src/shared/vmap/SubModel.h +++ b/src/shared/vmap/SubModel.h @@ -54,6 +54,7 @@ namespace VMAP ~SubModel(void); //Gets a 50 byte binary block void initFromBinBlock(void *pBinBlock); + void putToBinBlock(void *pBinBlock); void fillRenderArray(G3D::Array<TriangleBox> &pArray, const TreeNode* pTreeNode); @@ -92,6 +93,7 @@ namespace VMAP void intersectRay(const G3D::Ray& ray, RayCallback& intersectCallback, float& distance, bool pStopAtFirstHit, bool intersectCallbackIsFast = false); bool operator==(const SubModel& pSm2) const; unsigned int hashCode() const { return BaseModel::getNTriangles(); } + static const unsigned int dumpSize = 52; }; unsigned int hashCode(const SubModel& pSm); Notes: * while it is completely redundant to dump the BaseModel pointers which cause the incompatibility in the first place, i decided to not change the format so your existing vmaps should work. For more sophisticated dumping, SubModel::initFromBinBlock(), SubModel::PutToBinBlock() and SubModel::DumpSize of SubModel have to be changed only. * vmaps are still endian specific, vmaps from PPC will not work on Intel architectures and vice versa For compiling vmap_assembler i used this simple SCons script after compiling MaNGOS in objdir (as suggested by the guides): import os env = Environment(ENV=os.environ, CPPPATH = ['.', '../../src/shared/vmap', '../../dep/include/g3dlite']) env.Program(target = 'vmap_assembler', source = ['vmap_assembler.cpp'], LIBS = ['mangosvmaps','g3dlite'], LIBPATH = ['../../objdir/src/shared/vmap','../../objdir/dep/src/g3dlite']) Now the only thing left is the vmap_extractor...it's slow too but not quite that slow as the assembler was.
  19. That it is safe to use on 64bit systems? Besides just being easier to use (less code) and probably better tested, especially with WoW .mpq files... Not to mention, counter the mockery of the author Btw. I still feel stupid now, because I should've rather invested a few minutes in compiling the vmap_assembler for linux first. Now takes ~12minutes instead of 12 hours with wine :eek: I *knew* >90% system time usage was not a good sign...whatever the reason is. - edit - cheered too soon, apparently the vmaps it produced are rubbish, despite their file size looking fine. DBCs however work fine.
  20. Since those vmaps took well over 12h (wonder if that's normal...or some wine penalty) i did try to port the extractor to the latest libmpq. And i think i succeeded. Required many changes in mpq_libmpq.h/.cpp, but i could remove much more code than i had to write. If someone is interested, i'll share it, but i only updated the cmake stuff, so someone would have to help with VS project files. And i don't know why the original author (who is that anyway?) changed libmpq to C++ sources, it's a C library.
  21. So you mean it's kind of insecure anyway? Hm how old are those libmq files in extractor sources? Changelog of libmq 0.4.0 says: "added support for 64-bit architectures and removed any stupid pointer to int arithmetics." Might consider upgrading them, maybe i'll have a look at that too. Those vmaps probably still keep my 'puter occupied for some hours anyway... -edit- *rofl* you gotta read this:
  22. New client, same problem again, dbc/map extractor screws up on 64bit linux. I would really appreciate if people accept that "long" IS NOT meant to be equivalent to 32bit since decades... Since loadlib.h even includes stdint.h i beg to actually use it and finally end this mess: diff --git a/contrib/extractor/ad b/contrib/extractor/ad index 564ecea..ba86320 100755 Binary files a/contrib/extractor/ad and b/contrib/extractor/ad differ diff --git a/contrib/extractor/loadlib/loadlib.h b/contrib/extractor/loadlib/loadlib.h index 6acfd10..0bfa367 100644 --- a/contrib/extractor/loadlib/loadlib.h +++ b/contrib/extractor/loadlib/loadlib.h @@ -16,13 +16,13 @@ typedef unsigned char uint8; #include <linux/types.h> #endif typedef int64_t int64; -typedef long int32; -typedef short int16; -typedef char int8; +typedef int32_t int32; +typedef int16_t int16; +typedef int8_t int8; typedef uint64_t uint64; -typedef unsigned long uint32; -typedef unsigned short uint16; -typedef unsigned char uint8; +typedef uint32_t uint32; +typedef uint16_t uint16; +typedef uint8_t uint8; #endif #define FILE_FORMAT_VERSION 18
  23. Are you Chuck Norris? You just roundhouse-bumped the forum :blink:
  24. About the aura charges, i'm really no expert but after reading some code, it looks like Clearcasting etc. works through the SpellModifier that gets setup in Aura::HandleAddModifier. When all charges in the modifier are used (by applying it to the spell casted) the aura gets removed in Spell::finish() by calling RemoveSpellMods() which in turn calls RemoveAurasDueToSpell(). However Fingers of Frost does not modify any of the spells attributes like casting time, mana cost, damage etc...so no idea how to handle that, i can't think of a spell aura with dummy effect and charges that works right now...anyone? -edit- Fingers of Frost does not specify an amount of charges in Spell.dbc either, while Clearcasting has one charge, but that's easy to set in code...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use