Jump to content

Agiko

Members
  • Posts

    16
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by Agiko

  1. Well Here the case. If a player creates a ticket and a GM deletes it. WITHOUT relogging the player cannot create anymore tickets until he relogs.

    I fixed this by sending a SMSG_GMTICKET_DELETETICKET to the player in the HandleDelTicketCommand.

    It seems that SendGMTicketGetTicket(0x0A,0) wipes out the display of a active ticket but the client thinks it still has an active ticket.

    SO here there codes under HandleDelTicketCommand

    //notify player
           if(Player* pl = sObjectMgr.GetPlayer(MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER)))
           {
               pl->GetSession()->SendGMTicketGetTicket(0x0A, 0);
               PSendSysMessage(LANG_COMMAND_TICKETPLAYERDEL, GetNameLink(pl).c_str());
    
    
    ++         // SYN: Send Packet Ticket Delete 
    ++           WorldPacket data(SMSG_GMTICKET_DELETETICKET, 4);
    ++           data << uint32(9);
    ++       pl->GetSession()->SendPacket( &data );
           }
           else
               PSendSysMessage(LANG_COMMAND_TICKETDEL);
    

  2. This should do it..

    uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage)
    {
       uint32 newdamage = 0;
       float armor = pVictim->GetArmor();
    
       // Ignore enemy armor by SPELL_AURA_MOD_TARGET_RESISTANCE aura
       armor += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_TARGET_RESISTANCE, SPELL_SCHOOL_MASK_NORMAL);
    
    // Apply Player CR_ARMOR_PENETRATION rating and percent talents
       if (GetTypeId()==TYPEID_PLAYER)
    +   {
    +
    +        float maxArmorPen=0;
    +     if (getLevel()<60)
    +            maxArmorPen=400+85*pVictim->getLevel();
    +        else
    +            maxArmorPen=400+85*pVictim->getLevel()+4.5*85*(pVictim->getLevel()-59);
    +        // Cap armor penetration to this number
    +        maxArmorPen = std::min(((armor+maxArmorPen)/3),armor);
    +        // Figure out how much armor do we ignore
    +       float armorPen = maxArmorPen*((Player*)this)->GetArmorPenetrationPct() / 100.0f;
    +        // Got the value, apply it
    +        armor -= armorPen;
    +
    +   }
    -          armor *= 1.0f - ((Player*)this)->GetArmorPenetrationPct() / 100.0f;
    +        //armor *= 1.0f - ((Player*)this)->GetArmorPenetrationPct() / 100.0f;
    

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

    Fixes Armor penetration Cap

    * For which repository revision was the patch created?

    All Rev that supports 3.1.0 and greater

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

    Nope

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

    Me

    Armor Penetration is Incorrectly calaulated it was taking the entire armor of the victim, This is wrong.

    The correct way is

    If (level<60)

    C=400+85*targetlevel

    Else

    C=400+85*targetlevel+4.5*85*(targetlevel-59);

    CAP : (armor + C)/3.

    From the cap we get the % of armor pen and times by the rating and that how much armor can be ignored

    CAP*ArmorpenPct

    Fix

    uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage)
    {
       uint32 newdamage = 0;
       float armor = pVictim->GetArmor();
    
       // Ignore enemy armor by SPELL_AURA_MOD_TARGET_RESISTANCE aura
       armor += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_TARGET_RESISTANCE, SPELL_SCHOOL_MASK_NORMAL);
    
    // Apply Player CR_ARMOR_PENETRATION rating and percent talents
       if (GetTypeId()==TYPEID_PLAYER)
    +    {
    +
    +         float maxArmorPen=0;
    +     if (getLevel()<60)
    +            maxArmorPen=400+85*pVictim->getLevel();
    +        else
    +            maxArmorPen=400+85*pVictim->getLevel()+4.5*85*(pVictim->getLevel()-59);
    +        // Cap armor penetration to this number
    +        maxArmorPen = std::min(((armor+maxArmorPen)/3),armor);
    +        // Figure out how much armor do we ignore
    +       float armorPen = maxArmorPen*((Player*)this)->GetRatingBonusValue(CR_ARMOR_PENETRATION) / 100.0f;
    +        // Got the value, apply it
    +        armor -= armorPen;
    +
    +    }
    -          armor *= 1.0f - ((Player*)this)->GetArmorPenetrationPct() / 100.0f;
    +        //armor *= 1.0f - ((Player*)this)->GetArmorPenetrationPct() / 100.0f;
    
    

  4. on retail you cant interact with mobs in a different floor level (unreachable by melee range), any ranged attacks in that situation its just evaded, but that was on TBC, dunno now.

    That i could prove you wrong... Agro a mob on retail and jump off a higher ground to lower not in LOS of the mob. The mob will take the Standard Route down to reach you, therefore you can... There are also come cases where you can shoot a mob from higher ground which will cause them to path their way up.

  5. To fix the SoV Dot tick ... The damage is required to be scripted

    I did this in Aura::HandlePeriodicDamage and it works

    case SPELLFAMILY_PALADIN:
                   {
                       // Holy Vengeance / Blood Corruption[(0.013 * SPH + 0.025 * AP) * 5] 
                       if( m_spellProto->Id == 31803 || m_spellProto->Id == 53742)
                           m_modifier.m_amount += int32(((0.013 * (((Player*)caster)->GetBaseSpellPowerBonus()) + 0.025 * (caster->GetTotalAttackPowerValue(BASE_ATTACK))) * 5));
                   }
    

  6. I think it's the opcode, for example u send SMSG_CONTACT_LIST, and client responds with CMSG_CONTACT_LIST, but when u send SMSG_WARDEN_DATA it don't responds cuz client dont have the module?

    But if it does not have the module it would return a CMSG_WARDEN_DATA with a 0 ... But i dont get it at all

  7. I got a question...

    What exactly is send in SMSG_WARDEN_DATA 0x00? I send the client 0x00,MD5,Seed but they dont seem to reply back

    Last few days i was trying to implant this warden code into mangos, had some hard time clearing out the compilation errors, hardest error to clear was the linking error, took me a lot of time to find out that i should remove #define ZLIB_DLL from module.h :D other errors were more easy to remove, i may have implanted it not correctly and that causes the errors. So i finally start the server but it crashes instantly as someone try to log in :) i attach the debugger and looks like it crashes somewhere around:

       instance->module          = memalloc(ctx->modules->size);
    

    Guess because ctx->modules->size is not initialized but used? Prints size: 0 every time. Its really the last time i try to implant someone else code into mangos. Anyone else have tried to do it?

    I tried

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