Jump to content

Johnny69

Inactive Member
  • Posts

    83
  • Joined

  • Last visited

  • Days Won

    5
  • Feedback

    0%

Posts posted by Johnny69

  1. First: I might understand why you replaced normal iterator type with auto but I don't understant why you replaced SAFE_DELETE macro with simple delete. You think who made that macro was stupid ?

    Second: Your crash might be cause actually by that m_strName because is never initialized with a value (in debug it is) , and we know what happen when a variable is not initiallized in c++ ?

  2. // Add this function prototype to public in item.h
    		void		ChangeAttributeValue();
    // Add this function in item_attribute.cpp or item.cpp
    void CItem::ChangeAttributeValue()
    {
    	int attrCount = GetAttributeCount();
    	if(attrCount == 0)
    		return;
    	
    	int iAttributeSet = GetAttributeSetIndex();
    	if (iAttributeSet < 0)
    		return;
    
    	for(int k = 0; k < attrCount; k++)
    	{
    		int attr_idx = GetAttributeType(k);
    		
    		const TItemAttrTable & r = g_map_itemAttr[attr_idx];
    		int nLevel = number(1, r.bMaxLevelBySet[iAttributeSet]);
    		long lVal = r.lValues[MIN(4, nLevel - 1)];
    		
    		if (lVal)
    			SetAttribute(k, attr_idx, lVal);
    	}
    }
    
    // In char_item.cpp just go to the item you want to be the changer and replace:
    item2->ChangeAttribute
    // With
    item2->ChangeAttributeValue();

     

    • Love 1
  3. 2 minutes ago, Caramelito said:

    Wait. He is going to show us how to automatically download and install chrome&set it as a default browser.

    @Johnny69 how? Is going to execute chrome.exe.

    If chrome is your default browser Is going to open chrome.

    Just change his line with that and test it, you will see.

  4. AddonValue does not exist, but AddonType:

    // item.h
    		short int		GetAddonType()		{ return m_pProto ? m_pProto->sAddonType : 0; }
    
    // questlua_item.cpp
    	int item_get_addon_type(lua_State* L)
    	{
    		CQuestManager& q = CQuestManager::instance();
    		LPITEM item = q.GetCurrentItem();
    
    		if (item)
    			lua_pushnumber(L, item->GetAddonType());
    		else
    			lua_pushnumber(L, 0);
    
    		return 1;
    	}
    
    // questlua_item.cpp
    			{ "get_addon_type",		item_get_addon_type },
    

     

    • Love 1
  5. I actualy have this "bug" but the damage is 0 without arrows.

    Is just one horse skill that use arrows (140) and you can use client check for arrows to fix it.

    // PythonPlayerSkill.cpp
    // Search:
    	if (!pSkillData->IsHorseSkill())
    	{
    		if (__CheckShortArrow(rkSkillInst, *pSkillData))
    			return false;
    
    		if (pSkillData->IsNeedBow())
    		{
    			if (!__HasEnoughArrow())
    				return false;
    		}
    	}
    // Replace with:
    	if (!pSkillData->IsHorseSkill() || pSkillData->dwSkillIndex == 140)
    	{
    		if (__CheckShortArrow(rkSkillInst, *pSkillData))
    			return false;
    
    		if (pSkillData->IsNeedBow())
    		{
    			if (!__HasEnoughArrow())
    				return false;
    		}
    	}

     

     

    • Love 1
×
×
  • 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.