Go Back   RunUO - Ultima Online Emulation > RunUO > Core Modifications > Subsystems

Subsystems This forum is for modifications to the various subystem code of RunUO

Reply
 
Thread Tools Display Modes
Old 06-30-2005, 06:58 AM   #1 (permalink)
Forum Novice
 
Join Date: Aug 2003
Posts: 124
Send a message via ICQ to pinco
Default Small fix for CanBeDamaged function

The canbedamaged function never control if the mobile is alive or not.

You can found the standard function in mobile.cs at line 4900 about...:
Code:
 
public virtual bool CanBeDamaged()
{
return !m_Blessed;
}
overwrite the function with this new one:

Code:
 
public virtual bool CanBeDamaged()
{
return !m_Blessed && Alive;
}
recompile and the bug is solve
pinco is offline   Reply With Quote
Old 06-30-2005, 04:20 PM   #2 (permalink)
Forum Novice
 
Join Date: Aug 2003
Posts: 124
Send a message via ICQ to pinco
Default

I didn't like the overwrite if I can change the original...
pinco is offline   Reply With Quote
Old 06-30-2005, 04:23 PM   #3 (permalink)
Forum Expert
 
Greystar's Avatar
 
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
Default

Quote:
Originally Posted by pinco
I didn't like the overwrite if I can change the original...
I just responded the way I did since a modified core can prevent you from getting support, that is all. I don't care personally either way...
__________________
Quote:
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Killable Guards (GS Version)
Just a Simple Staff Tool
You can leave me messages.
Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else."
Greystar is offline   Reply With Quote
Old 06-30-2005, 05:01 PM   #4 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by pinco
I didn't like the overwrite if I can change the original...
But there is NO reason to modify the core when you can avoid it.
Phantom is offline   Reply With Quote
Old 07-01-2005, 05:42 AM   #5 (permalink)
Forum Novice
 
Join Date: Aug 2003
Posts: 124
Send a message via ICQ to pinco
Default

lol my core is completely modified :P
pinco is offline   Reply With Quote
Old 07-01-2005, 12:49 PM   #6 (permalink)
Forum Expert
 
Join Date: Feb 2005
Location: Houston, TX
Age: 20
Posts: 313
Send a message via ICQ to autumntwilight Send a message via AIM to autumntwilight Send a message via MSN to autumntwilight Send a message via Yahoo to autumntwilight
Default

you do know it should be public virtual bool... not publicvirtualbool lol
autumntwilight is offline   Reply With Quote
Old 07-01-2005, 05:18 PM   #7 (permalink)
Forum Novice
 
Join Date: Aug 2003
Posts: 124
Send a message via ICQ to pinco
Default

I know, but in the copy & past the space was trimmed -.-
pinco is offline   Reply With Quote
Old 07-01-2005, 09:55 PM   #8 (permalink)
Forum Expert
 
Shadow1980's Avatar
 
Join Date: Mar 2005
Location: York, UK
Age: 28
Posts: 708
Default

Quote:
Originally Posted by pinco
I know, but in the copy & past the space was trimmed -.-
So you post a core change, imo a quite significant thing to do, and you don't even put down correct code.
It doesn't take all that much work to put the spaces back in...

I have to agree with Greystar / Phantom as well, why would you bother making a core change if you really don't have to??
Shadow1980 is offline   Reply With Quote
Old 07-02-2005, 04:26 AM   #9 (permalink)
Forum Novice
 
Join Date: Aug 2003
Posts: 124
Send a message via ICQ to pinco
Default

1) I have corrected the post
2) I dont told you to do the modding, if you like it, do it, else do everything you want, we are in a free cuntry
3) I dont read posting limitation in this forum, if you dislike my suggestions I take for myself, no problem, I gain nothing to post here.
pinco is offline   Reply With Quote
Old 07-02-2005, 10:01 AM   #10 (permalink)
psz
UO Gamers: Demise Administrator
 
psz's Avatar
 
Join Date: Oct 2002
Location: Swamp
Age: 29
Posts: 10,819
Default

This forum is for discussing and posting core changes. That's what he did.
__________________
psz
Demise' Creator (Retired)
The RunUO.com Forum Moderator Team
Former Official RunUO Scripter (Retired)
Websites:
My 360 Blog
My Gaming Site(Old Link)
My Gaming Site(New Link)
psz is offline   Reply With Quote
Old 07-02-2005, 10:10 AM   #11 (permalink)
Forum Expert
 
Shadow1980's Avatar
 
Join Date: Mar 2005
Location: York, UK
Age: 28
Posts: 708
Default

Quote:
Originally Posted by pinco
1) I have corrected the post
2) I dont told you to do the modding, if you like it, do it, else do everything you want, we are in a free cuntry
3) I dont read posting limitation in this forum, if you dislike my suggestions I take for myself, no problem, I gain nothing to post here.
1) Good job.
2) I never said you shouldn't post the change, but when you do it's good to get it right.
3) Que?

Quote:
Originally Posted by psz
This forum is for discussing and posting core changes. That's what he did.
And we discussed it as well. I don't see the problem.

The only reason I replied is because I dislike it when people post a "fix" that can have a rather significant impact on somebodies files, and then don't even post correct code.
I know, people should be able to spot this themselves but we all know there are plenty of poeple here who only download/use other people their changes and files and who know practically nothing about RunUO or coding. Even though I personally think those people don't really belong in the community, we have to give them a chance to start somewhere and provide them with clear and accurate information. Nothing is worse then learning from incorrect code.
Just my 2 cents.
Shadow1980 is offline   Reply With Quote
Old 07-02-2005, 09:47 PM   #12 (permalink)
psz
UO Gamers: Demise Administrator
 
psz's Avatar
 
Join Date: Oct 2002
Location: Swamp
Age: 29
Posts: 10,819
Default

Incorrect code is a problem, yes.

As for severely impacting the code, that's kinda what the forum is for ;-> If someone's reading this forum, they are already editing the core most likely.
__________________
psz
Demise' Creator (Retired)
The RunUO.com Forum Moderator Team
Former Official RunUO Scripter (Retired)
Websites:
My 360 Blog
My Gaming Site(Old Link)
My Gaming Site(New Link)
psz is offline   Reply With Quote
Old 07-03-2005, 12:19 AM   #13 (permalink)
Administrator
 
Zippy's Avatar
 
Join Date: Aug 2002
Location: Baltimore, MD
Age: 25
Posts: 4,870
Default

Lets everyone try to be nice, mmk?
__________________
Zippy, Razor Creator and RunUO Core Developer
The RunUO Software Team

"Intuition, like a flash of lightning, lasts only for a second. It generally comes when one is tormented by a difficult decipherment and when one reviews in his mind the fruitless experiments already tried. Suddenly the light breaks through and one finds after a few minutes what previous days of labor were unable to reveal."
~The Cryptonomicon

Zippy is offline   Reply With Quote
Old 07-16-2005, 04:00 AM   #14 (permalink)
Forum Expert
 
Join Date: Jul 2005
Location: Istanbul/Turkey
Age: 27
Posts: 425
Default

i think it is more "appropriate" to do it in the core logically..
if you are so afraid to modify it, why even does this forum exist
noobie is offline   Reply With Quote
Old 07-16-2005, 12:28 PM   #15 (permalink)
Forum Expert
 
Ohms_Law's Avatar
 
Join Date: Sep 2004
Age: 37
Posts: 1,006
Default

quit trolling
Ohms_Law is offline   Reply With Quote
Old 02-24-2006, 12:43 PM   #16 (permalink)
Newbie
 
Join Date: Dec 2004
Location: UK
Age: 44
Posts: 10
Send a message via Yahoo to jpmythic
Cool

I know this is an Old Post, but I thought I'd mention that in AOS.cs:

Code:
		public static int Damage( Mobile m, Mobile from, int damage, int phys, int fire, int cold, int pois, int nrgy, bool keepAlive )
		{
			if ( m == null || m.Deleted || !m.Alive || damage <= 0 )
				return 0;
It does a basic check for Alive status on general Damage types.
BUT, changing it in BaseCreatures.cs can affect the majority of them, and then you can overide in the few others that Create Mobiles from Base Mobile.cs

Otherwise, you can just do it in the Core or Create your OWN Mobile.cs that
Inherets from Mobile.cs and takes the Place of Mobile.cs for the Other Files.
Altho I think this has been discussed many times before.

'my two cents worth'
jpmythic is offline   Reply With Quote
Old 02-24-2006, 09:30 PM   #17 (permalink)
 
Join Date: Oct 2002
Age: 23
Posts: 4,689
Default

The reason why this was not put into the core is just for that reason. Maybe someone wants to make a dead mobile which can be damaged.... I dunno why, but just maybe. It is NOT a bug because the check is in AOS.cs like you stated, where if the CanBeDamaged function fails, the Alive check will correct it once they are attempted to be damaged.

mobile.Damage() -> Aos.Damage, so there is no reason for this modification at all.
XxSP1DERxX is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5