Jump to content

thenecromancer

Members
  • Posts

    110
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by thenecromancer

  1. It's done weird, go figure! (they said that spells to proc from blocked/absorbed attacks are flagged or something like that) By the way, this makes my eyes bleed...
  2. You should prevent some unsafe stuff. For example Unit:ProcDamageAndSpell() should better do nothing if this->isInMap(pVictim) is not true (eg. both units are not in same map). (looking at those not-quite-useful debugs this might be your case)
  3. By the way, was not always rage 10x higher than displayed value? (eg. 10 rage returns as 100 in GetPower(POWER_RAGE)...)
  4. that's 0x800000 plus maybe some zeros before 8 depending on formating...
  5. As that target can be both friendly or unfriendly unit, I'd be quite a good question to ask why you do that hack...
  6. By the way, what's so hard about using spell Ids of spells created to do offhand damage, yaknow... Here is my dummy proc handler, it should be working for mangos as well if you add correct procflags // Threat of Thassarian if (dummySpell->SpellIconID == 2023) { // Must Dual Wield if (!procSpell || !haveOffhandWeapon()) return false; // Chance as basepoints for dummy aura if (!roll_chance_i(triggerAmount)) return false; switch (procSpell->Id) { // Obliterate case 49020: // Rank 1 triggered_spell_id = 66198; break; case 51423: // Rank 2 triggered_spell_id = 66972; break; case 51424: // Rank 3 triggered_spell_id = 66973; break; case 51425: // Rank 4 triggered_spell_id = 66974; break; // Frost Strike case 49143: // Rank 1 triggered_spell_id = 66196; break; case 51416: // Rank 2 triggered_spell_id = 66958; break; case 51417: // Rank 3 triggered_spell_id = 66959; break; case 51418: // Rank 4 triggered_spell_id = 66960; break; case 51419: // Rank 5 triggered_spell_id = 66961; break; case 51420: // Rank 6 triggered_spell_id = 66962; break; // Plague Strike case 45462: // Rank 1 triggered_spell_id = 66216; break; case 49917: // Rank 2 triggered_spell_id = 66988; break; case 49918: // Rank 3 triggered_spell_id = 66989; break; case 49919: // Rank 4 triggered_spell_id = 66990; break; case 49920: // Rank 5 triggered_spell_id = 66991; break; case 49921: // Rank 6 triggered_spell_id = 66992; break; // Death Strike case 49998: // Rank 1 triggered_spell_id = 66188; break; case 49999: // Rank 2 triggered_spell_id = 66950; break; case 45463: // Rank 3 triggered_spell_id = 66951; break; case 49923: // Rank 4 triggered_spell_id = 66952; break; case 49924: // Rank 5 triggered_spell_id = 66953; break; // Rune Strike case 56815: triggered_spell_id = 66217; break; // Blood Strike case 45902: // Rank 1 triggered_spell_id = 66215; break; case 49926: // Rank 2 triggered_spell_id = 66975; break; case 49927: // Rank 3 triggered_spell_id = 66976; break; case 49928: // Rank 4 triggered_spell_id = 66977; break; case 49929: // Rank 5 triggered_spell_id = 66978; break; case 49930: // Rank 6 triggered_spell_id = 66979; break; default: return false; } break; }
  7. This is NPC script and it does not belong in MaNGOS
  8. Just add owner's weapon as virtual item for that npc, however choosing displayID might be tricky, and it has to be unattackable and so... EDIT:, pretty much the most of the script you need, and whoa, MaNGOS has only dummy script library so it does not belong in here void Reset() { Unit * owner = m_creature->GetOwner(); if (!owner || owner->GetTypeId() != TYPEID_PLAYER) return; // Cannot be Selected or Attacked m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); // Add visible weapon if (Item const * item = ((Player *)owner)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND)) m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, item->GetProto()->ItemId); // Add stats scaling int32 damageDone=owner->CalculateDamage(BASE_ATTACK, false, true); // might be average damage instead ? int32 meleeSpeed=owner->m_modAttackSpeedPct[bASE_ATTACK]; m_creature->CastCustomSpell(m_creature, 51906, &damageDone, &meleeSpeed, NULL, true); // Visual Glow m_creature->CastSpell(m_creature, 53160, true); // Start Chasing victim if (uint64 guid = ((Player*)owner)->GetSelection()) if (Unit *target = m_creature->GetUnit(*owner,guid)) if (!target->IsFriendlyTo(owner) && m_creature->canAttack(target,true)) m_creature->Attack(target,true); }
  9. It has to have a handler recalulating speed, so you are still wrong and OP right ( he was just lazy to write his own, because it would be a duplicate of HandleAuraModIncreaseSpeed
  10. You should stop suggesting, before actually knowing what you are doing. EDIT: To explain it a little more, OP has his patch in order, you need to update current speed (that's what the handler does), otherwise applying/unapplying form will have no effect on existing snares. Also changing to HandleNULL would make server ignore that aura effect completly
  11. With all these spells really needing this we maybe should check just for spellfamily flag and name combinations ( if there is no flag )
  12. Why you just don't modify send fields instead? ( in update packet )
  13. 49028 do not proc from autoattacks, I'm wondering where did you get information that it should proc from them?
  14. By the way, player vehicles ( multipassager mounts) are done quite differently, If you have any questions I might be able to answer them ( I'm now testing code, and things look quite promising...)
  15. EDITED: It was not a patch for MaNGOS at first, TC do not handle mana cost and cooldowns for triggered spells
  16. Don't know what you are doing, but I have weapons and offhands cloned correctly ( and AI is ok as well ) Anyway try to give them that aura, if they change name...
  17. As there is small bug in TC2 ( so I can achieve getting images without it ), names appear same as caster's when they have aura 58836. There is no flag/byte set there, only weapons coppied, so I think that client does it automaticly.
  18. &Spell::EffectCastButtons, // 97 SPELL_EFFECT_CAST_BUTTONS void Spell::EffectCastButtons(uint32 i) { if (m_caster->GetTypeId() != TYPEID_PLAYER) return; Player *pl=(Player*)m_caster; for(int button = (132+m_spellInfo->EffectMiscValue[i]); button < (132+m_spellInfo->EffectMiscValue[i]+4); ++button) { uint32 spellId = pl->GetActionSpell(button); // Cast Totem in this slot if (spellId) { SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); if(!spellInfo) continue; if (pl->HasSpellCooldown(spellId)) continue; uint32 cost = CalculatePowerCost(spellInfo, m_caster, GetSpellSchoolMask(spellInfo)); if (m_caster->GetPower(Powers(spellInfo->powerType)) < cost) break; m_caster->CastSpell(m_caster, spellId, true); m_caster->ModifyPower(Powers(spellInfo->powerType), -(int32)cost); pl->AddSpellAndCategoryCooldowns(spellInfo, 0); } } } Dunno if it is compatibile with mangos, and you should be able to add definition to a header, right?
  19. His crash is unrelated to the patch, and AFAIK it happens if somebody has wrong playerbytes ( for exaple facial hair that don't exist for his race/gender combo )
  20. JFWIW, you need to change that PVP bytefield added to every player each time mangos spawns them ( guess it should be somewhere there ) That is the only way to have full interaction like trade and so AFAIK..
  21. Can you please report that client has more aura types than spell_work supports ? I'm not sure if it is still possible to catch him here, and well, I have problems with mainly language and Cyrillic alphabet :-/
  22. DiSlord have just released new version, thread can be closed, thanks
×
×
  • 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