Jump to content

Lynx3d

Members
  • Posts

    437
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Lynx3d

  1. #ifdef __GNUC__ >= 4.4 does not look like proper preprocessor syntax to me..."#ifdef" does not take expressions, only checks for existing definition. Nor do i think __GNUC__ defines minor versions. I think it evaluates to true for any GCC... You probably meant to check something like: #if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 4) But in my opinion the check is unnecessary anyway, just because older compilers include it implicitly doesn't mean it was ever meant to be by the C++ standard...just add the missing includes without exceptions.
  2. Ah...i think this quest would also require this: http://www.wowhead.com/?quest=11960 You're supposed to "pick up" Snowfall Glade Pups. Apparently they should be put in your inventory (as item obviously) by simply rightclicking them, wowhead says they are created by this spell: http://www.wowhead.com/?spell=46773
  3. I stand corrected, at least the top of the hierarchy has useful doxygen comments. But from there on it's basically reading the source code, even though all the crosslinks from doxygen greatly help with finding out what the code does, it is still a lot of work.
  4. Running Doxygen over the sources wouldn't be a bad idea for the beginning... However i wouldn't mind some extra documentation either...haven't seen a single doxygen comment yet.
  5. This is my try at implementing Sudden Death. Implemented for [7681]. I'm not sure it is "unhacky" enough. I couldn't really find any useful way to move code into an aura 262 implementation. diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index d8f6259..03c3bbd 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3694,8 +3694,12 @@ SpellCastResult Spell::CheckCast(bool strict) if(target != m_caster) { + // Execute: check override of target aura states by caster aura 262 (52437: Sudden Death) + uint32 TargetAuraState = m_spellInfo->TargetAuraState; + if (m_spellInfo->SpellIconID == 1648 && m_caster->HasAura(52437)) + TargetAuraState = 0; // target state requirements (apply to non-self only), to allow cast affects to self like Dirty Deeds - if(m_spellInfo->TargetAuraState && !target->HasAuraState(AuraState(m_spellInfo->TargetAuraState))) + if(TargetAuraState && !target->HasAuraState(AuraState(m_spellInfo->TargetAuraState))) return SPELL_FAILED_TARGET_AURASTATE; // Not allow casting on flying player @@ -4005,12 +4009,13 @@ SpellCastResult Spell::CheckCast(bool strict) { case SPELL_EFFECT_DUMMY: { - if(m_spellInfo->SpellIconID == 1648) // Execute + /* if(m_spellInfo->SpellIconID == 1648) // Execute { if(!m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetHealth() > m_targets.getUnitTarget()->GetMaxHealth()*0.2) return SPELL_FAILED_BAD_TARGETS; } - else if (m_spellInfo->Id == 51582) // Rocket Boots Engaged + else */ + if (m_spellInfo->Id == 51582) // Rocket Boots Engaged { if(m_caster->IsInWater()) return SPELL_FAILED_ONLY_ABOVEWATER; diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 13d1f03..c602259 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1216,7 +1216,23 @@ void Spell::EffectDummy(uint32 i) if(!unitTarget) return; - uint32 rage = m_caster->GetPower(POWER_RAGE); + int32 rageLasting = 0; + int32 rage = m_caster->GetPower(POWER_RAGE); + int32 currentRage = rage; + + // effect of Sudden Death ranks, independant of proc + if (m_caster->HasAura(29723)) rageLasting = 30; + else if (m_caster->HasAura(29725)) rageLasting = 70; + else if (m_caster->HasAura(29724)) rageLasting = 100; + // Sudden Death proc aura + bool hasAuraSD = m_caster->HasAura(52437); + if (hasAuraSD) + { + // max of 30 rage consumed, even if target is below 20% health (to the dismay of PvP players) + // spell rage cost already substracted (?) + rage = std::min(300 - m_powerCost, rage); + rageLasting = std::max(rageLasting, currentRage - rage); + } // Glyph of Execution bonus if (Aura *aura = m_caster->GetDummyAura(58367)) rage+=aura->GetModifier()->m_amount; @@ -1224,7 +1240,8 @@ void Spell::EffectDummy(uint32 i) int32 basePoints0 = damage+int32(rage * m_spellInfo->DmgMultiplier[i] + m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f); m_caster->CastCustomSpell(unitTarget, 20647, &basePoints0, NULL, NULL, true, 0); - m_caster->SetPower(POWER_RAGE,0); + m_caster->SetPower(POWER_RAGE,rageLasting); + if (hasAuraSD) m_caster->RemoveAurasDueToSpell(52437); return; } // Slam Notes: In Spell::CheckCast() i commented the original check for Execute out because i think it is redundant. All Execute spells require AuraState to be AURA_STATE_HEALTHLESS_20_PERCENT and in my tests (PvE only) it does abort the casting if the target has above 20% health, so why manually calculate percentage again? Instead, you need to override the targets AuraState requirement when Sudden Death buff is active. I'm not sure if a may use m_powerCost in Spell::EffectDummy() but it is needed to calculate the proper damage due to the 30 rage consume limitation. I tried to research as good as i can, but it would be nice of someone could confirm these assumptions: * The minimum rage remaining after execute is independent of the Sudden Death proc aura, it is a passive bonus to Execute. * If you would have less rage left than Sudden Death [rank] guarantees, you regain it, i.e. it does not affect damage dealt. * Sudden Death limitation of 30 rage consumed in total always applies when proc buff active, even if target is below 20% health which would allow normal Execute. Judging from the exensive whining about this i'm somewhat sure it is like this. * Sudden Death buff is consumed when Execute is used. The tooltip is not clear about this, but in youtube videos the buff never seemed to last the full 10s (hard to tell because of crappy quality) and i read at official forum it is consumed, but that poster was not sure either.
  6. Uhm why, what's wrong with Nightfall? I thought it was working as expected when i last tried (a few days ago)...though i didn't pay too much attention to this specific talent so i might have missed something. In any case, the nightfall auras are already there obviously, so if its broken it cannot be fixed by adding it again at this same code location
  7. I don't quite understand why you check __WORDSIZE when there's already all integer types defined in <stdint.h> which is already included anyway. Just use the intN_t defines for all platforms, that's why they very added in C99 after all... The only type coming out wrong was "typedef long int32;" anyway...and despite that i already have used the extractor successfully without changes on 64bit Linux, which somewhat puzzles me right now
  8. It gets mentioned about 5 times on the linked wowhead page that it's an instant heal, and is again clarified that health is not funneled while damage is absorbed. Also the heal can crit according to the comments...so apparently "simply" a secondary spell casted when you cast a Power Word:Shield on someone. But i don't have any first hand experience either...
  9. Check http://wiki.udbforums.org/index.php/Character_data on how to get PLAYER_BYTES with SQL. Getting the Bytes is pretty simple... skin: PLAYER_BYTES & 0xFF face: (PLAYER_BYTES & 0xFF00) >> 8 hairstyle: (PLAYER_BYTES & 0xFF0000) >> 16 haircolor: (PLAYER_BYTES & 0xFF000000) >> 24 No guarantee for correctness though...
  10. Since a hash funtion is a one way function, there is no way to reconstruct the input from the hash. Verifying the given password is simply done by creating the hash for it and compare it to the stored hash, the server does not need to know the actual password. If someone forgot his password you have to set a new one.
  11. Hm...not sure if it's a good idea to go that low-level for that anyway. POSIX way to check file existence/permissions would be access() from unistd.h...that would work nearly everywhere except Windows of course :rolleyes: #ifndef WIN32 bool FileExists( const char* FileName ) { if( access(FileName, F_OK) || access(FileName, R_OK) ) return false; return true; } #else bool FileExists( const char* FileName ) {...windows code...} That would be all to check for existence and read access. The actual reading seems to be part of libmpq, and if it fails to handle the file it seems to be caught in MPQArchive::MPQArchive() anyway...?
  12. Hm for me "ad" refuses to extract any DBC files and maps since the new map format when compiled on 64bit Ubuntu. Looks somehow like file extraction is screwed somewhere. I chose "Release" in cmake wizzard. I could swear it worked fine with the "old" version, a few commits before the new format. Now the output is merely: Map & DBC Extractor =================== Detected locale: enGB Opening ./Data/enGB/locale-enGB.MPQ Opening ./Data/enGB/patch-enGB.MPQ Opening ./Data/enGB/patch-enGB-2.MPQ Extracting dbc files... Extracted 0 DBC files Detected locale: deDE Opening ./Data/deDE/locale-deDE.MPQ Opening ./Data/deDE/patch-deDE.MPQ Opening ./Data/deDE/patch-deDE-2.MPQ Extracting dbc files... Extracted 0 DBC files Using locale: enGB Opening ./Data/enGB/locale-enGB.MPQ Opening ./Data/enGB/patch-enGB.MPQ Opening ./Data/enGB/patch-enGB-2.MPQ Opening ./Data/common.MPQ Opening ./Data/common-2.MPQ Opening ./Data/lichking.MPQ Opening ./Data/expansion.MPQ Opening ./Data/patch.MPQ Opening ./Data/patch-2.MPQ Extracting maps... Read Map.dbc file... Fatal error: Invalid Map.dbc file format! However, the precompiled ad.exe still worked fine (don't have 32bit libmpq shared lib for the precompiled linux binary, so back to wine...)
×
×
  • 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