Bot issue latest compile...
Regardless of what is attempted on a fresh compile of latest svn repo.
Level 1 Berserker Bot crashes zone on attacking.. Have tested with weapon without weapon. What not. All other bots work fine but as soon as a level 1 Berserker Bot is in group and player attacks. Crash. Tested on level 15 character and using a Berserker bot works fine. Any more information I can offer please let me know and where I can find it. Thanks. |
I haven't followed it back to the database yet, but a shot in the dark says this is a problem...
[bots.cpp::DoClassAttacks()] Code:
if(skill_to_use == FRENZY) If anyone can look this up, the 'FRENZY' skill id is 74..I'm not near a database atm... here is the reference code for 'MaxSkill': Code:
uint16 SharedDatabase::GetSkillCap(int8 Class_, SkillType Skill, int8 Level) { Trackye: try leveling to 2(..3..4...) and see if this bot still crashes zone. |
I'll have to take a look. The code is basically a copy of Client:: DoClassAttacks, with a call to database.GetSkillCap(class_, skillid, level), so I'm not sure what would be different.
Code:
int16 Bot::MaxSkill(SkillType skillid, int16 class_, int16 level) const { |
After thinking about it, I can see how it differs from a client. Clients will only call this when the person uses a hotkey or something, so they would already have to have the skill, MaxSkill would never return 0. It may be an issue if they are charmed or something and call if while under AI control, but there aren't many times when a lvl 1 will be charmed. If that would even work.
I'll try to get a commit in soon to fix this. A simple check to see if MaxSkill > 0 before assigning the skill mod should suffice, although then you'd have to declare skill mod before assigning to it.. Something like: Code:
if(skill_to_use == FRENZY) |
Is it possible that it is due to the fact that Berserkers do not attain Frenzy until level 6? Maybe there should be some sort of a level check there?
|
Yeah, but instead of hard coding a level check (which would work), a better solution would be to just check the skill level, since many custom servers may change the level classes receive certain skills. Just make sure they actually have at least a skill of 1 before using that line to set the skillmod.
|
I'll see what I can get from it tonight... I see what you're talking about though. The only difference I saw was where you initiated the timers.
If I run across something definitive, I'll post back. |
To update this Bad_captain. The crashes did indeed stop once the bot was level 6+. Also i input your code into my core and it stopped the pre level 6 crashes as well.
|
Thanks. I'll try to get this is as soon as I can.
|
All times are GMT -4. The time now is 02:01 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.