Jump to content

darkstalker

Members
  • Posts

    717
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by darkstalker

  1. i think it should difference the mob daze (getting hit from back) and the player daze
  2. this works for me: diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 582946a..e962486 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -256,7 +256,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleNoImmediateEffect, //203 SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE implemented in Unit::CalculateMeleeDamage and Unit::SpellCriticalDamageBonus &Aura::HandleNoImmediateEffect, //204 SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE implemented in Unit::CalculateMeleeDamage and Unit::SpellCriticalDamageBonus &Aura::HandleNoImmediateEffect, //205 SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_DAMAGE implemented in Unit::SpellCriticalDamageBonus - &Aura::HandleNULL, //206 SPELL_AURA_MOD_SPEED_MOUNTED + &Aura::HandleAuraModIncreaseFlightSpeed, //206 SPELL_AURA_MOD_SPEED_MOUNTED &Aura::HandleAuraModIncreaseFlightSpeed, //207 SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED &Aura::HandleAuraModIncreaseFlightSpeed, //208 SPELL_AURA_MOD_SPEED_FLIGHT, used only in spell: Flight Form (Passive) &Aura::HandleAuraModIncreaseFlightSpeed, //209 SPELL_AURA_MOD_FLIGHT_SPEED_ALWAYS diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a282c96..b06868d 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10023,7 +10023,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced) if (IsMounted()) // Use on mount auras main_speed_mod = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED); else // Use not mount (shapeshift for example) auras (should stack) - main_speed_mod = GetTotalAuraModifier(SPELL_AURA_MOD_SPEED_FLIGHT); + main_speed_mod = GetTotalAuraModifier(SPELL_AURA_MOD_SPEED_MOUNTED); stack_bonus = GetTotalAuraMultiplier(SPELL_AURA_MOD_FLIGHT_SPEED_ALWAYS); non_stack_bonus = (100.0 + GetMaxPositiveAuraModifier(SPELL_AURA_MOD_FLIGHT_SPEED_NOT_STACK))/100.0f; break;
  3. the patch doesnt work, more code needs to be updated. I've been doing some research about this Spells using aura 108 (SPELL_AURA_MOD_SPEED_FLIGHT) 48403 Crow Speed 54950 Swift Wings Spells using aura 106 (SPELL_AURA_MOD_SPEED_MOUNTED) 33948 Flight Form (Passive) 40121 Swift Flight Form (Passive) 43775 Flight 44140 Harpoon Surfing 44227 Gravity Lapse 44423 Soar 47433 Flight 48602 Flight ... (38 total) so seems that most flying spells got "changed" to the new aura, regardless of the "mounted" name on it all of them are flying stuff
  4. read the source and figure it out yourself
  5. once i managed to loot an item from corpse when it actually was rolled need by others
  6. find some unused spell and replace its implementation with what you want
  7. i talk about the guids already stored in char db, they can be really high, and all unused guids are lost atm. i can do this to generate 1 guid from DB SELECT l.guid + 1 AS start FROM item_instance AS l LEFT OUTER JOIN item_instance AS r ON l.guid + 1 = r.guid WHERE r.guid IS NULL LIMIT 1; but really dont know how it would be done correctly
  8. do you have one of those sql's around? maybe storing all the guids in a std::set and iterating it wouldnt be so cpu intensive.
  9. I think it would be nice to re-implement the guid generator so it re-uses unused guids. Currently the code just takes the max value from DB and starts adding from that: - from ObjectMgr::SetHighestGuids result = CharacterDatabase.Query( "SELECT MAX(guid) FROM item_instance" ); if( result ) { m_hiItemGuid = (*result)[0].GetUInt32()+1; delete result; } - from ObjectMgr::GenerateLowGuid case HIGHGUID_ITEM: if(m_hiItemGuid>=0xFFFFFFFE) { sLog.outError("Item guid overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } return m_hiItemGuid++; my item_instance maximum guid is over 3,4 billion, and don't even have that amount of items in db, so this might be a problem.
  10. patch for reflective shield (extractred from my old 3.1.3 svn and converted to git 8734, didnt test) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 582946a..f8da694 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -6378,7 +6378,7 @@ void Aura::PeriodicTick() if (isCrit) cleanDamage.hitOutCome = MELEE_HIT_CRIT; - pCaster->CalcAbsorbResist(m_target, GetSpellSchoolMask(GetSpellProto()), DOT, pdamage, &absorb, &resist); + pCaster->CalcAbsorbResist(m_target, GetSpellSchoolMask(GetSpellProto()), DOT, pdamage, &absorb, &resist, !(GetSpellProto()->AttributesEx2 & SPELL_ATTR_EX2_CANT_REFLECTED)); sLog.outDetail("PeriodicTick: %u (TypeId: %u) attacked %u (TypeId: %u) for %u dmg inflicted by %u abs is %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId(),absorb); @@ -6433,7 +6433,7 @@ void Aura::PeriodicTick() pdamage = pCaster->SpellDamageBonus(m_target, GetSpellProto(), pdamage, DOT, GetStackAmount()); - pCaster->CalcAbsorbResist(m_target, GetSpellSchoolMask(GetSpellProto()), DOT, pdamage, &absorb, &resist); + pCaster->CalcAbsorbResist(m_target, GetSpellSchoolMask(GetSpellProto()), DOT, pdamage, &absorb, &resist, !(GetSpellProto()->AttributesEx2 & SPELL_ATTR_EX2_CANT_REFLECTED)); if(m_target->GetHealth() < pdamage) pdamage = uint32(m_target->GetHealth()); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a282c96..4badad8 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1116,7 +1116,7 @@ void Unit::CalculateSpellDamage(SpellNonMeleeDamage *damageInfo, int32 damage, S } uint32 absorb_affected_damage = CalcNotIgnoreAbsorbDamage(damage,damageSchoolMask,spellInfo); - CalcAbsorbResist(pVictim, damageSchoolMask, SPELL_DIRECT_DAMAGE, absorb_affected_damage, &damageInfo->absorb, &damageInfo->resist); + CalcAbsorbResist(pVictim, damageSchoolMask, SPELL_DIRECT_DAMAGE, absorb_affected_damage, &damageInfo->absorb, &damageInfo->resist, !(spellInfo->AttributesEx2 & SPELL_ATTR_EX2_CANT_REFLECTED)); damage-= damageInfo->absorb + damageInfo->resist; } else @@ -1407,7 +1407,7 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da // Calculate absorb & resists uint32 absorb_affected_damage = CalcNotIgnoreAbsorbDamage(damageInfo->damage,damageInfo->damageSchoolMask); - CalcAbsorbResist(damageInfo->target, damageInfo->damageSchoolMask, DIRECT_DAMAGE, absorb_affected_damage, &damageInfo->absorb, &damageInfo->resist); + CalcAbsorbResist(damageInfo->target, damageInfo->damageSchoolMask, DIRECT_DAMAGE, absorb_affected_damage, &damageInfo->absorb, &damageInfo->resist, true); damageInfo->damage-=damageInfo->absorb + damageInfo->resist; if (damageInfo->absorb) { @@ -1627,7 +1627,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage) return (newdamage > 1) ? newdamage : 1; } -void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffectType damagetype, const uint32 damage, uint32 *absorb, uint32 *resist) +void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffectType damagetype, const uint32 damage, uint32 *absorb, uint32 *resist, bool canReflect) { if(!pVictim || !pVictim->isAlive() || !damage) return; @@ -1911,7 +1911,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe } // Cast back reflect damage spell - if (reflectSpell) + if (canReflect && reflectSpell) pVictim->CastCustomSpell(this, reflectSpell, &reflectDamage, NULL, NULL, true, NULL, reflectTriggeredBy); // absorb by mana cost diff --git a/src/game/Unit.h b/src/game/Unit.h index 95a0626..b98789b 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1461,7 +1461,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject // redefined in Creature uint32 CalcArmorReducedDamage(Unit* pVictim, const uint32 damage); - void CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEffectType damagetype, const uint32 damage, uint32 *absorb, uint32 *resist); + void CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEffectType damagetype, const uint32 damage, uint32 *absorb, uint32 *resist, bool canReflect = false); void UpdateSpeed(UnitMoveType mtype, bool forced); float GetSpeed( UnitMoveType mtype ) const;
  11. add some unitTarget->Getmap()->GetZoneId() check?
  12. use this instead REPLACE INTO spell_proc_event VALUES (56636, 1, 4, 32, 0, 0, 0, 0, 0, 0, 6), (56637, 1, 4, 32, 0, 0, 0, 0, 0, 0, 6), (56638, 1, 4, 32, 0, 0, 0, 0, 0, 0, 6);
  13. the sql file is truncated, and was in some utf16 format patch file had some ^M characters (windows line endings)
  14. i had a fix for reflective shield somewhere, need to find it and make git patch
  15. why not extract all fields from the data blob instead? never understood why we use that.
  16. mangos is more "complicated" but well designed, thats why its better ;> ascent based emus are full of hacks
  17. my implementation: void Spell::EffectCastButtons(uint32 i) { if (!unitTarget || m_caster->GetTypeId() != TYPEID_PLAYER) return; Player *p_caster = (Player*)m_caster; uint32 button_id = m_spellInfo->EffectMiscValue[i] + 132; uint32 n_buttons = m_spellInfo->EffectMiscValueB[i]; for (; n_buttons; n_buttons--, button_id++) { uint32 spell_id = p_caster->GetActionButtonSpell(button_id); if (!spell_id) continue; p_caster->CastSpell(unitTarget, spell_id, true); } } didnt have problems with cooldown or mana costs so omitted that part the sql for the trainer spells: -- Call of the Elements/Ancestors/Spirits trainer entries CREATE TEMPORARY TABLE new_spells ( spell mediumint(8) unsigned NOT NULL, spellcost int(10) unsigned NOT NULL default 7000, /* 70 silver */ reqskill smallint(5) unsigned NOT NULL default 0, reqskillvalue smallint(5) unsigned NOT NULL default 0, reqlevel tinyint(3) unsigned NOT NULL, PRIMARY KEY (spell) ); INSERT INTO new_spells (spell, reqlevel) VALUES (66842, 30), /* Call of the Elements */ (66843, 40), /* Call of the Ancestors */ (66844, 50); /* Call of the Spirits */ REPLACE INTO npc_trainer SELECT 986 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 3030 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 3031 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 3032 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 3066 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 3173 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 3344 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 3403 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 13417 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 17204 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 17212 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 17219 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 17519 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 17520 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 20407 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells; REPLACE INTO npc_trainer SELECT 23127 AS entry, spell, spellcost, reqskill, reqskillvalue, reqlevel FROM new_spells;
  18. * What bug does the patch fix? What features does the patch add? Fixes the problem that happens after deleting a spell from an action bar button and replacing it with another spell. The button gets flagged for deletion and that flag doesnt get removed after putting a new spell there, so any changes made get lost after the next player save. Usually happens after you respec and lose some spells from action bars, placing them again in their slots makes you lose them after relog. * For which repository revision was the patch created? 8719 * Is there a thread in the bug report section or at lighthouse? no * Who has been writing this patch? darkstalker diff --git a/src/game/Player.h b/src/game/Player.h index 5533110..4c9325d 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -161,7 +161,7 @@ struct ActionButton void SetActionAndType(uint32 action, ActionButtonType type) { uint32 newData = action | (uint32(type) << 24); - if (newData != packedData) + if (newData != packedData || uState == ACTIONBUTTON_DELETED) { packedData = newData; if (uState != ACTIONBUTTON_NEW)
  19. i have problems with this (implemented the function myself) uint32 GetActionButtonSpell(uint8 button) const { ActionButtonList::const_iterator ab = m_actionButtons.find(button); return ab != m_actionButtons.end() && ab->second.uState != ACTIONBUTTON_DELETED && ab->second.GetType() == ACTION_BUTTON_SPELL ? ab->second.GetAction() : 0; } got trouble getting the button after it has been "deleted" (select no totem), maybe the state change is incorrect
  20. The three spells have: Effect: 97 (unknown in mangos, wowhead labeled it as "summon critter") EffectMiscValue: 0 - 4 - 8 (the offset in the totem bar buttons) EffectMiscValueB: 4 (numer of totems to cast?) EffectSpellClassMaskA: 2 (meaningless) the only spell who have effect 97 as of 3.2.2 are this ones edit: the effect doesnt trigger because EffectImplicitTargetA[0] == 0, duno if its dbc or mangos fault.
  21. I'm looking into implementing the totem bar functionality of spells 66842 (Call of the Elements), 66843 (Call of the Ancestors), and 66844 (Call of the Spirits). All of them should place all 4 totems selected on actions bars at once. Anyone knows something about this? Never seen this working on retail so don't have an idea on how to properly implement it. What i've found so far: when changing a totem into the bar, this event occurs WORLD: Received CMSG_SET_ACTION_BUTTON BUTTON: 132 ACTION: 58704 TYPE: 0 MISC: Added Spell 58704 into button 132 Player '1' Added Action '58704' (type 0) to Button '132' The action bar swap seems to be handled by the client. Edit: collected all the action button ids Elements -> Fire: 132, Earth: 133, Water: 134, Air: 135 Ancestors -> Fire: 136, Earth: 137, Water: 138, Air: 139 Spirits -> Fire: 140, Earth: 141, Water: 142, Air: 143
  22. nice, really never noticed that overload wasnt proc'ing from chain before.
  23. instead of editing the DBC files, edit their copy in memory (what sSpellStore.LookupEntry returns, or others), but you need a non-const pointer to do that. Perform all the changes before world init.
  24. once i did something like: mkdir mangos; cd mangos #create an empty mangos dir, change to it git init git add . got commit -m 'initial commit' git remote add mangos <git_repository_here> git fetch mangos git merge <revision_hash_here>
  25. check the funcion definitions in Player.cpp, making it work by trial/error is very bad
×
×
  • 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