Jump to content

thenecromancer

Members
  • Posts

    110
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by thenecromancer

  1. 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;
               }

  2. 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);
       }

  3. Should be HandleNULL.

    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

  4. well even if you send the smsg_mirrorimage_data the npcs still are called MirrorImage (or whatever they are called) although they take on appearance of player.

    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.

  5.     &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?

×
×
  • 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