Jump to content

darkstalker

Members
  • Posts

    717
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by darkstalker

  1. this seems to solve the problem (hack?)

    diff --git a/src/game/Object.cpp b/src/game/Object.cpp
    index 489cbbb..415c3fd 100644
    --- a/src/game/Object.cpp
    +++ b/src/game/Object.cpp
    @@ -763,6 +763,9 @@ void Object::_SetUpdateBits(UpdateMask *updateMask, Player* /*target*/) const
            if(m_uint32Values_mirror[index]!= m_uint32Values[index])
                updateMask->SetBit(index);
        }
    +    // always update this field to prevent problems with shapeshifting
    +    if (GetTypeId() == TYPEID_PLAYER)
    +        updateMask->SetBit(UNIT_FIELD_BYTES_2);
    }
    
    void Object::_SetCreateBits(UpdateMask *updateMask, Player* /*target*/) const

    seems that some update values are lost when applied too fast.

  2. Every Man for Himself has wrong data on dbc:

    AttributesEx 163840 SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY | SPELL_ATTR_EX_UNK17

    AttributesEx5 393224 SPELL_ATTR_EX5_USABLE_WHILE_STUNNED | SPELL_ATTR_EX5_USABLE_WHILE_FEARED | SPELL_ATTR_EX5_USABLE_WHILE_CONFUSED

    Effect0 6 SPELL_EFFECT_APPLY_AURA

    EffectApplyAuraName0 77 SPELL_AURA_MECHANIC_IMMUNITY

    EffectMiscValue0 1 MECHANIC_CHARM

    it just removes mechanic charm, not whats listed in the tooltip (same as 42292 "PvP Trinket").

    So a better "fix" would be:

    diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
    index 57d689d..b97b762 100644
    --- a/src/game/Spell.cpp
    +++ b/src/game/Spell.cpp
    @@ -5660,7 +5660,8 @@ SpellCastResult Spell::CheckCasterAuras() const
                    dispel_immune |= GetDispellMask(DispelType(m_spellInfo->EffectMiscValue[i]));
            }
            // immune movement impairment and loss of control
    -        if (m_spellInfo->Id == 42292)                       // PvP Trinket
    +        if (m_spellInfo->Id == 42292 ||                     // PvP Trinket
    +            m_spellInfo->Id == 59752)                       // Every Man for Himself
                mechanic_immune = IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
        }
    

  3. you can use an sql to pack your item guids:

    -- Generate a new guid
    ALTER TABLE item_instance ADD COLUMN guid_new INT(11) UNSIGNED AUTO_INCREMENT UNIQUE AFTER guid/*, AUTO_INCREMENT = 1000*/;
    
    -- Item data field
    UPDATE item_instance SET data = CONCAT(guid_new, ' ', RIGHT(data, LENGTH(data)-LENGTH(SUBSTRING_INDEX(data, ' ', 1))-1));
    
    -- auctionhouse
    UPDATE auctionhouse AS ah, item_instance AS it SET ah.itemguid = it.guid_new WHERE ah.itemguid = it.guid;
    
    -- character_gifts
    UPDATE character_gifts AS cg, item_instance AS it SET cg.item_guid = it.guid_new WHERE cg.item_guid = it.guid;
    
    -- character_inventory
    UPDATE character_inventory AS ci, item_instance AS it SET ci.bag = it.guid_new WHERE ci.bag = it.guid;
    UPDATE character_inventory AS ci, item_instance AS it SET ci.item = it.guid_new WHERE ci.item = it.guid;
    
    -- guild_bank_item
    UPDATE guild_bank_item AS gb, item_instance AS it SET gb.item_guid = it.guid_new WHERE gb.item_guid = it.guid;
    
    -- mail_items
    UPDATE mail_items AS mi, item_instance AS it SET mi.item_guid = it.guid_new WHERE mi.item_guid = it.guid;
    
    -- petition
    UPDATE petition AS p, item_instance AS it SET p.petitionguid = it.guid_new WHERE p.petitionguid = it.guid;
    
    -- petition_sign
    UPDATE petition_sign AS ps, item_instance AS it SET ps.petitionguid = it.guid_new WHERE ps.petitionguid = it.guid;
    
    -- Put the new guid in place
    UPDATE item_instance SET guid = guid_new;
    ALTER TABLE item_instance DROP COLUMN guid_new;
    

    this is a bit old so might need update for newer mangos versions

  4. how do i specify the name of the compiler executable and compiler flags? (linux)

    edit:

    Found out the options for that: CMAKE_C_FLAGS, CMAKE_CXX_FLAGS, CMAKE_C_COMPILER, CMAKE_CXX_COMPILER

    Also CMAKE_BUILD_TYPE sets extra flags, like "-DCMAKE_BUILD_TYPE=RelWithDebInfo" sets flags "-O2 -g"

    Note that release mode sets "-O3", which is generally unsafe and can produce crashing binaries.

    There are some other details, like cmake somewhats requires PREFIX directory to be writable, so if you run cmake as normal user and point to a global directory (like /usr/local or /opt) configuration will fail. Autoconf didn't have problems with this. This is what is normally done when you compile as regular user and install as root.

    Another issue is that compile fails while running make with multiple jobs (make -j4), seems that attempts compiling things alongside configuring ACE library, which ends failing (dependency rules missing?). This leads to massive compiling time increase due to being forced to use 1 job at once.

  5. If you're trying to detect WPE client-side, you're doing it wrong.

    Even if you could detect it, you've still forgotten the first rule of client-server security: the client is in the hands of the enemy. Nothing can be done client-side to 100% prevent all hacking as long as the hacker has access to the client and the machine running it. Only through good server-side checks and protections can you be completely secure.

    TL;DR: If you spend all your time chasing WPE signatures and drivers instead of fixing the hacks in mangos, you're wasting your time.

    That's true for server side bugs, but not everything is implemented there. Things like player movement are implemented client-side, so there is where checks should be done.

  6. * What bug does the patch fix? What features does the patch add?

    Implements spell attribute Ex3 0x00040000 (now named SPELL_ATTR_EX3_CANT_MISS) that seems to mark negative spells that must not miss, like paladin judgement and other "strikes" triggered effects, some quest kill credit spells (like 14792 that started this research), Self buffs with target enemy (savage roar, slice & dice), and other stuff.

    * For which repository revision was the patch created?

    11297

    * Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

    none afaik

    * Who has been writing this patch? Please include either forum user names or email addresses.

    darkstalker

    diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
    index 75d23b4..691265d 100644
    --- a/src/game/SharedDefines.h
    +++ b/src/game/SharedDefines.h
    @@ -348,7 +348,7 @@ const uint32 ItemQualityColors[MAX_ITEM_QUALITY] = {
    #define SPELL_ATTR_EX3_UNK15                      0x00008000            // 15 Auto Shoot, Shoot, Throw,  - this is autoshot flag
    #define SPELL_ATTR_EX3_UNK16                      0x00010000            // 16 no triggers effects that trigger on casting a spell??
    #define SPELL_ATTR_EX3_NO_INITIAL_AGGRO           0x00020000            // 17 Causes no aggro if not missed
    -#define SPELL_ATTR_EX3_UNK18                      0x00040000            // 18
    +#define SPELL_ATTR_EX3_CANT_MISS                  0x00040000            // 18
    #define SPELL_ATTR_EX3_UNK19                      0x00080000            // 19
    #define SPELL_ATTR_EX3_DEATH_PERSISTENT           0x00100000            // 20 Death persistent spells
    #define SPELL_ATTR_EX3_UNK21                      0x00200000            // 21
    diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
    index b6957d0..2e0265e 100644
    --- a/src/game/Unit.cpp
    +++ b/src/game/Unit.cpp
    @@ -2961,7 +2961,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
    
        uint32 missChance = uint32(MeleeSpellMissChance(pVictim, attType, fullSkillDiff, spell)*100.0f);
        // Roll miss
    -    uint32 tmp = missChance;
    +    uint32 tmp = spell->AttributesEx3 & SPELL_ATTR_EX3_CANT_MISS ? 0 : missChance;
        if (roll < tmp)
            return SPELL_MISS_MISS;
    
    @@ -3138,7 +3138,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit *pVictim, SpellEntry const *spell)
        if (HitChance <  100) HitChance =  100;
        if (HitChance > 10000) HitChance = 10000;
    
    -    int32 tmp = 10000 - HitChance;
    +    int32 tmp = spell->AttributesEx3 & SPELL_ATTR_EX3_CANT_MISS ? 0 : 10000 - HitChance;
    
        int32 rand = irand(0,10000);
    
    

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