Announcement

Collapse

Forum Rules

  • No flaming or derogatory remarks, directly or through insinuation.
  • No discussion, sharing or referencing illegal software such as hacks, keygen, cracks and pirated software.
  • No offensive contents, including but not limited to, racism, gore or pornography.
  • No excessive spam/meme, i.e. copious one liners in a short period of time, typing with all caps or posting meme responses (text/image).
  • No trolling, including but not limited to, flame incitation, user provocation or false information distribution.
  • No link spamming or signature advertisements for content not specific to Dota 2.
  • No Dota 2 key requests, sell, trade etc.
  • You may not create multiple accounts for any purpose, including ban evasion, unless expressly permitted by a moderator.

  • Please search before posting. One thread per issue. Do not create another thread if there is an existing one already.
  • Before posting anything, make sure you check out all sticky threads (e.g., this). Do not create new threads about closed ones.
  • It is extremely important that you post in correct forum section.

  • Balance discussion only in Misc.
  • All art related (such as hero model) feedbacks go to Art Feedback Forum.
  • All matchmaking feedback should go here: Matchmaking Feedback
  • All report/low priority issues should go here: Commend/Report/Ban Feedback
  • No specific workshop item feedback. These should go to workshop page of that item.
  • When posting in non-bugs section (such as this), use [Bugs], [Discussion] or [Suggestion] prefix in your thread name.



In case you object some action by a moderator, please contact him directly through PM and explain your concerns politely. If you are still unable to resolve the issue, contact an administrator. Do not drag these issues in public.



All rules are meant to augment common sense, please use them when not conflicted with aforementioned policies.
See more
See less

[Bug] Selling an item from your stash removes a "multiple" modifier it shouldn't

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Bug] Selling an item from your stash removes a "multiple" modifier it shouldn't

    Hello! I have an item with a modifier that has "Passive" "1" and "Attributes" "MODIFIER_ATTRIBUTE_MULTIPLE". Therefore, for every copy of the item I have in my hero's inventory, the hero gets one instance of this modifier on him.

    If I have a copy of that item in my stash and one or more of that same item in my inventory, selling the one in my stash removes one of the modifiers from my hero's modifier bar, even though that item in my stash wasn't providing a modifier to me. By repeatedly selling the same item in my stash, I can be six-slotted with that item but not have any of the modifiers they are supposed to provide.

    Here's an example:

    I quickly remade Gloves of Haste using the code below:

    Code:
    	"item_gloves_of_haste_rook"
    	{
    		// General
    		//-------------------------------------------------------------------------------------------------------------
    		"BaseClass"						"item_datadriven"
    		"ID"							"322"														// unique ID number for this item.  Do not change this once established or it will invalidate collected stats.
    		"AbilityBehavior"				"DOTA_ABILITY_BEHAVIOR_PASSIVE"
    		"Model"							"models/props_gameplay/red_box.vmdl" 
    		"Effect"						"particles/generic_gameplay/dropped_item.vpcf"
    		"AbilityTextureName"			"gloves_of_haste_rook"
    		
    		// Item Info
    		//-------------------------------------------------------------------------------------------------------------
    		"ItemCost"						"500"
    		"ItemShopTags"					"attack_speed"
    		"ItemQuality"					"component"
    		"ItemAliases"					"gloves of haste"
    		
    		"ItemKillable"					"1" 
    		"ItemSellable"					"1"
    		"ItemPurchasable"				"1"
    		"ItemDroppable"					"1"
    		"ItemShareability"				"ITEM_NOT_SHAREABLE"
    		"ItemStackable"					"0"
    		"ItemPermanent"					"0"
    		"ItemDisassembleRule"			"DOTA_ITEM_DISASSEMBLE_NEVER"
    
    		"SideShop"						"1" 
    		"SecretShop"					"0"
    		
    		// Special	
    		//-------------------------------------------------------------------------------------------------------------
    		"AbilitySpecial"  //Update derived items if these values are altered.
    		{
    			"01"
    			{
    				"var_type"				"FIELD_INTEGER"
    				"bonus_attack_speed"	"15"
    			}
    		}
    		
    		"Modifiers"
    		{
    			"item_gloves_of_haste_rook_modifier"
    			{
    				"Passive"			"1"
    				"IsHidden"			"0"
    				"IsBuff"			"0"
    				"IsDebuff"			"0"
    				"IsPurgable"		"0"
    				"Attributes" 		"MODIFIER_ATTRIBUTE_MULTIPLE"
    				
    				"Properties"
    				{
    					"MODIFIER_PROPERTY_ATTACKSPEED_BONUS_CONSTANT"		"%bonus_attack_speed"
    				}
    			}
    		}
    	}

    As you can see below, each Gloves of Haste I have provides one modifier for my hero.



    I move one to my stash and am left with two modifiers, like you would expect.



    Then I delete the Gloves of Haste that is in my stash, and I am left with only one modifier despite having two Gloves of Hastes still in my inventory.



    I'm pretty sure this is a bug, so I wanted to report it. Let me know if you have any questions!

  • #2
    Both moving an item to your stash from your inventory and selling an item in your stash trigger the item's "OnUnequip" event. This also has to be a bug; the event should not trigger when you sell the item from your stash.

    Comment

    Working...
    X