Jump to content

aerione

Members
  • Posts

    14
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by aerione

  1. Here's the current command i use for it:

    usage: .castall <spellid>

    bool ChatHandler::HandleCastAllCommand(const char* args)
    {
       if(!*args)
           return false;
    
       uint32 spell_id = extractSpellIdFromLink((char*)args);
       if(!spell_id)
           return false;
    
       SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell_id);
       if(!spellInfo)
           return false;
    
       if(!SpellMgr::IsSpellValid(spellInfo,m_session->GetPlayer()))
       {
           PSendSysMessage(LANG_COMMAND_SPELL_BROKEN,spell_id);
           SetSentErrorMessage(true);
           return false;
       }
    
    
       HashMapHolder<Player>::MapType &m = HashMapHolder<Player>::GetContainer();
       HashMapHolder<Player>::MapType::const_iterator itr = m.begin();
       for(; itr != m.end(); ++itr)
       {
           if ( (!m_session || itr->second->IsVisibleGloballyFor(m_session->GetPlayer())) )
           {
               itr->second->CastSpell(itr->second, spell_id, true);
           }
       }
    
       return true;
    }
    

  2. I use this code atm for Death Grip:

    +            // Death Grip
    +            if( m_spellInfo->SpellFamilyFlags & 0x02000000LL )
    +            {
    +                if(!unitTarget || !m_caster)
    +                    return;
    +
    +                // unitTarget is Creature
    +                if(unitTarget->GetTypeId()!=TYPEID_PLAYER)
    +                {
    +            float x = m_caster->GetPositionX();
    +            float y = m_caster->GetPositionY(); 
    +            float z = m_caster->GetPositionZ()+1;
    +            float orientation = unitTarget->GetOrientation();
    +            unitTarget->SendMonsterMove(x,y,z,orientation,MOVEMENTFLAG_JUMPING,1);
    +                }
    +                else
    +                {   // unitTarget is Player
    +                    float vsin = sin(unitTarget->GetAngle(m_caster));
    +                    float vcos = cos(unitTarget->GetAngle(m_caster));
    +
    +                    WorldPacket data(SMSG_MOVE_KNOCK_BACK, (8+4+4+4+4+4));
    +                    data.append(unitTarget->GetPackGUID());
    +                    data << uint32(0);                                      // Sequence
    +                    data << float(vcos);                                    // x direction
    +                    data << float(vsin);                                    // y direction
    +                                                                        // Horizontal speed
    +                    data << float(damage ? damage : unitTarget->GetDistance2d(m_caster));
    +                    data << float(-10.0);                                   // Z Movement speed
    +
    +                    ((Player*)unitTarget)->GetSession()->SendPacket(&data);
    +                }
    +                m_caster->CastSpell(unitTarget,51399,true);    //Taunt
    +                return;
    +            }
    

    Same method for getting creatures, but it uses a knockback effect (only reverse) for players

  3. Using CreatureRelocation seems to switch your movement to the creature.

    If you try moving, you are actually moving the creature you Death Gripped.

    Also, you'll need to add the taunt part of the spell (a seperate spell) at the end of the code. The actual spells players have are dummies for all effects.

  4. You could add code in Player::UpdateZone(uint32 newZone) (in player.cpp)

    something like:

    if( !isGameMaster() && ( GetMap() ==571 && (newZone != 495 || newZone != 3537)))
    {
        ChatHandler(_player).PSendSysMessage(LANG_BEZ_PRYC);  
        RemoveSpellCooldown(7355); // remove hearthstone cooldown, just incase it is on cooldown
        CastSpell(this, 7355, true);   // cast hearthstone (triggered, so it is instant)
    }
    

  5. Did you try with or without the talent?

    Also, the corpse has to be targetted for the spell to not consume the Corpse Dust, so you could use

    if( unitTarget && unitTarget->isDead() && unitTarget->GetCreatureType()==CREATURE_TYPE_HUMANOID )

    for the check.

    Ressing a player as a ghoul wouldn't work now without mind control working tho :(

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