Jump to content

Vectors

Inactive Member
  • Posts

    19
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Vectors

  1. self.TestButton = ui.Button()
    self.TestButton.SetParent(self)
    self.TestButton.SetPosition(20, 13)
    self.TestButton.SetUpVisual("d:/ymir work/ui/public/Test_button_01.sub")
    self.TestButton.SetOverVisual("d:/ymir work/ui/public/Test_button_02.sub")
    self.TestButton.SetDownVisual("d:/ymir work/ui/public/Test_button_03.sub")
    self.TestButton.SetToolTipText(locale.Test, 0, - 23)
    self.TestButton.SetEvent(ui.__mem_func__(self.Test))
    self.TestButton.Show()
     

     

     

    def Test(self):
          self.close

     

     

    so much simpler

     

  2. In the functions CItem::EquipTo and CItem::Unequip (in item.cpp)
    SET_BIT(dwImmuneFlag, m_pOwner->GetWear(i)->m_pProto->dwImmuneFlag);
    Replace with:
    SET_BIT(dwImmuneFlag, m_pOwner->GetWear(i)->GetRealImmuneFlag());
    Then add the function referred up there to item.cpp:
    DWORD CItem::GetRealImmuneFlag() 
    {
        DWORD dwImmuneFlag = m_pProto->dwImmuneFlag;
        for (int i = 0; i < ITEM_ATTRIBUTE_MAX_NUM; ++i)
        {
            if (GetAttributeType(i))
            {
                const TPlayerItemAttribute& ia = GetAttribute(i);
     
                if (ia.bType == APPLY_IMMUNE_STUN && !IS_SET(dwImmuneFlag, IMMUNE_STUN))
                    SET_BIT(dwImmuneFlag, IMMUNE_STUN);
                else if (ia.bType == APPLY_IMMUNE_FALL && !IS_SET(dwImmuneFlag, IMMUNE_FALL))
                    SET_BIT(dwImmuneFlag, IMMUNE_FALL);
                else if (ia.bType == APPLY_IMMUNE_SLOW && !IS_SET(dwImmuneFlag, IMMUNE_SLOW))
                    SET_BIT(dwImmuneFlag, IMMUNE_SLOW);
            }
        }
     
        return dwImmuneFlag;
    }
     
    As a new function, it also needs to have an entry on item.h, so find:
    long        GetLimitValue(DWORD idx) const { return m_pProto ? m_pProto->aLimits[idx].lValue : 0;    }
     
    And add afterwards:
    DWORD        GetRealImmuneFlag();

     

     

     

    Vectors (:

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.