small bug

Archive of posts related to former distro versions. Be aware that posts here do not refer to the current distro and may not work.
Locked
DeiviD
Expert Poster
Posts: 79
Joined: Mon Jun 19, 2006 4:48 pm

small bug

Post by DeiviD »

running on

Code: Select all

POL097-2006-07-28 Coregina (VS.NET 2003)
compiled on Jul 28 2006 22:34:07
most recent distro - not sure if this is an core issue but im guessing its not

this is what happens:
Image

notice the damage i deal is displayed in the upper left corner... i couldnt find out what causes it, but happens when im attacking more than one creature...
DeiviD
Expert Poster
Posts: 79
Joined: Mon Jun 19, 2006 4:48 pm

Post by DeiviD »

oh wait

mongbats die with a single hit, so theyre prolly die'ing before the data is send, then you send it above an unexisting thing's head...

how to fix it:

on :damage:damage.inc you just change this:

Code: Select all

function ApplyDamageEX(mobile, amount, type:=DMG_FORCED, source:=0)
	amount := CInt(amount);
	amount := CalcDamageAmount(mobile, amount, type);

	if ( amount == error )
		return 0;
	elseif ( amount < 0 )
		HealDamage(mobile, Abs(amount));
	else
		if ( source )
			SetLastDamageInfo(mobile, amount, type, source);
			SetScriptController(source);
		endif
		ApplyDamage(mobile, amount);
	endif

	var settings := DMG_GetSettingsCfgElem("Settings");
	if ( settings.DisplayDamage )
		DisplayDamage(mobile, amount, source);
	endif

	return amount;
endfunction
into this:

Code: Select all

function ApplyDamageEX(mobile, amount, type:=DMG_FORCED, source:=0)
	amount := CInt(amount);
	amount := CalcDamageAmount(mobile, amount, type);

	var settings := DMG_GetSettingsCfgElem("Settings");
	if ( settings.DisplayDamage )
		DisplayDamage(mobile, amount, source);
	endif

	if ( amount == error )
		return 0;
	elseif ( amount < 0 )
		HealDamage(mobile, Abs(amount));
	else
		if ( source )
			SetLastDamageInfo(mobile, amount, type, source);
			SetScriptController(source);
		endif
		ApplyDamage(mobile, amount);
	endif

	return amount;
endfunction

how can i submit some kinda thing like this into the distro? (aka how do i help?)
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

Fixed (finally)
Locked