Source-X icon indicating copy to clipboard operation
Source-X copied to clipboard

Type t_ore force to change dispid base on amount

Open raydienull opened this issue 10 months ago • 3 comments

Update somehow so that the server does not force the ID of objects that are of type t_ore

	// sometimes the diff graphics for the types are not in the client.
	if ( IsType(IT_ORE) )
	{
		static const ITEMID_TYPE sm_Item_Ore[] =
		{
			ITEMID_ORE_1,
			ITEMID_ORE_1,
			ITEMID_ORE_2,
			ITEMID_ORE_3
		};
		SetDispID( ( GetAmount() >= ARRAY_COUNT(sm_Item_Ore)) ? ITEMID_ORE_4 : sm_Item_Ore[GetAmount()] );
	}

raydienull avatar Mar 24 '25 10:03 raydienull

One solution is create a new flag in ini that enable/disable this. Making the server admin to change this behavior in scripts

raydienull avatar Mar 24 '25 10:03 raydienull

Or, what about doing this via the t_ore typedef script? One could customize both dispid and the ore amount needed to change the dispid

cbnolok avatar Mar 24 '25 14:03 cbnolok

Or, what about doing this via the t_ore typedef script? One could customize both dispid and the ore amount needed to change the dispid

The problem of this, is we need some way to know in the script side when amount of item is change. For now, i think dont exist any trigger with this way right?

raydienull avatar Mar 24 '25 14:03 raydienull