Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Feature Requests

Development::Feature Requests Post suggestions/feature requests here.

Reply
 
Thread Tools Display Modes
  #1  
Old 11-29-2008, 10:09 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

It looks like we will need to change this as well:

effects.cpp
Code:
void EntityList::AEAttack(Mob *attacker, float dist, int Hand, int count) {
//Dook- Will need tweaking, currently no pets or players or horses 
	LinkedListIterator<Mob*> iterator(mob_list); 
	Mob *curmob; 
	
	float dist2 = dist * dist;
	
	int hit = 0;
	
	for(iterator.Reset(); iterator.MoreElements(); iterator.Advance()) { 
		curmob = iterator.GetData(); 
		if(curmob->IsNPC()
			&& curmob != attacker //this is not needed unless NPCs can use this
			&&(attacker->IsAttackAllowed(curmob))
			&& curmob->GetRace() != 216 /* dont attack horses */
			&& (curmob->DistNoRoot(*attacker) <= dist2)
		) {
			attacker->Attack(curmob, Hand); 
			hit++;
			if(count != 0 && hit >= count)
				return;
		}
	}    
}
I think we can just change that line to this:
Code:
&& curmob->GetRace() != 216 && curmob->GetRace() != 472 /* dont attack horses */
This is to keep AEs from hitting mounts. I will look through for more possible issues. After further testing, all seems well accept for the slowest mounts aren't moving. They are set to 0.75 speed, so maybe that has something to do with it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 11-30-2008, 08:17 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

There are still 2 issues holding me back from being able to get this added to SVN. The first issue is that the 0.75 speed mounts don't move at all. It almost seems like it is setting the speed to 0 for some reason. It worked fine for the old way horses were done, but doesn't seem to work in the new way.

The second issue is that if you #cast the spell, the mount summons almost instantly, but if you try to use the actual bridles, it delays the spell for a while. The mount does still cast, but it takes probably 5 or 10 seconds after the spell finishes casting before the mount actually gets summoned. I am not sure what is causing this extra cast time yet. It almost seems like the displayed cast time and actual cast time settings for the bridles are not the same times. But, checking the items show that they are.

If anyone wants to check this out and/or maybe give a little help, it would be appreciated. I think this is mostly done. Other than those 2 issues, the rest seems to work great.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 11-30-2008, 04:25 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Why did you not just store mountspeed as a float? Why do this extra work when you could just do:

Code:
npc_type->runspeed = atof(row[3])
Here's an explanation of what's going wrong with your runspeed by doing it this way:
Code:
npc_type->runspeed = mountspeed / 100;

if it's 125:
npc_type->runspeed = 125 / 100;
npc_type->runspeed = 1

if it's 100:
npc_type->runspeed = 100 / 100; 
npc_type->runspeed = 1

if it's 75:
npc_type->runspeed = 75 / 100;
npc_type->runspeed = 0
None of them are floats and ints will not do any rounding for you if it comes up with a partial during a divide it is dropped. Unless you cast the variables to float first you're not going to get anywhere.

Also there's no reason to assign temp variables to hold the information from db as you don't do anything else with it, you're plugging it straight into the NPCType. Waste of time and memory however small it may be.

Last edited by KLS; 12-01-2008 at 12:33 AM..
Reply With Quote
  #4  
Old 11-30-2008, 07:13 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Thanks KLS. I originally had it set as a float and it was still having the same problem for some reason, which is why I tried changing it to just be an int16. I will set it all back as a float again and rewrite the code like you suggested since it doesn't need variables. Maybe I was just missing something when I set it as a float before.

That should resolve that issue hopefully. Then, I will just need to figure out why clickie items for horses seem to have some long extra delay.

Editing the code in the post above, but I will need to test it later tonight before I know if it helped or not.

EDIT: LMAO, I just figured out why the float I set before wasn't working. It is because I was using atoi and not atof. I didn't really know what they meant until I looked at your suggestion again and noticed you had atof. I thought about it a sec and realized that the last letter must mean float, as apposed to int from the last letter of atoi. LOL, I really should start reading up on how to code in C++ instead of just learning from examples like that :P

Any clue why the bridles would have such a delayed casting? Maybe it is just an issue with my test server. I will have to try some other item clickies and see what happens.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 12-01-2008 at 04:09 AM..
Reply With Quote
  #5  
Old 11-30-2008, 09:25 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Nothing I see there should cause delayed casting. Maybe if the mysql server was so lagged that it took a long time per query but odds are you'd notice other things too in that case. Like startup or looting lag.
Reply With Quote
  #6  
Old 11-30-2008, 10:45 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Since I am trying it on my test server, it may be some other custom code I am have been trying on it that is causing the extra cast time for mounts from clickies. When I use #cast, it works instantly, so it shouldn't be database delay.

If I get this tested and confirm that it all works perfectly, does anyone have any issues with me adding this to the SVN? I will add the required SQL as well, which will include the full mount table. The only mounts that work in Titanium are Horses, Drogmors and Mechboars, so all of the other ones in the table are mostly just placeholders for later expansions. I put in some global races other than horses for the mounts that can't be used in Titanium. They don't work as mounts, but they don't have models anyway, so I don't think it will be an issue.

Also, I seem to remember certain mounts being slightly faster than the fastest purchasable ones. I thought the knights' AA mount was one of the fastest, but maybe it is the same speed as the ornate ones. At least these will be really easy to change and tweak with the new table

Thanks again for the insight, KLS. One more thing done on the list
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #7  
Old 11-30-2008, 11:33 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

I have no problem with it being added assuming you fix what I told ya!
Reply With Quote
Reply

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

Forum Jump

   

All times are GMT -4. The time now is 09:06 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3