ReleaseBots Rev 2171
Is anyone else having trouble compiling bots with this rev?
This line in bots.cpp: Code:
min_hit = min_hit * (100 + itembonuses.MinDamageModifier + spellbonuses.MinDamageModifier) / 100; Code:
bot.cpp(7696): error C2110: '+' : cannot add two pointers My affected files are unmodified revisions (including mob.h and .cpp) The properties referenced are arrays and I don't know the proper index position(s) to add to fix this... (Is it suppose to sum the array?) Adding the array index corrects this error, but I just don't know what the appropriate context is... |
Looking at how it's used in attack.cpp, it appears you use skillinuse as the index. I'd have to look at it a little bit more in depth tonight, but it should be an easy fix. I'll have to look over the other changes to see if there's anything else that needs to be changed for bots.
|
I got it too.
|
That fix appears to work..no errors, no failure on zone build.
Here is the line (7696 in bots.cpp): Code:
min_hit = min_hit * (100 + itembonuses.MinDamageModifier[skillinuse] + spellbonuses.MinDamageModifier[skillinuse]) / 100; Hopefully that is the intended use..thanks B_C!! (That was the only error that came up for me on this revision..and if I had looked up a few more lines of code, I would have seen that defined...) |
For this revision I implemented the skill index to this effect, which it naturally uses.
I added this function for doing the calculations. Code:
sint16 Mob::GetMeleeMinDamageMod_SE(int16 skill) Code:
min_damage += min_damage * GetMeleeMinDamageMod_SE(skill) / 100; |
I have this fixed as Kayen suggested on my local server, but also merged in most of his other changes that affected bots (special skills, attack speed, etc.) I hope to have it tested and committed this weekend. Until then, you can use his suggested fix to get it to compile and run.
|
I'm going to have to check my code over again. My bots were bashing and kicking for 2-3k damage. Everything else looks good though. :roll:
|
EDIT - Nevermind
|
Make sure your code for DoSpecialAttackDamage has all the fields put in. Else, your kick/bash will be 2-3k.
I had that error in one of my revisions where it looked like this, which is bad cause it uses ReuseTime for min damage. causing what you describe. Code:
DoSpecialAttackDamage(ca_target, KICK, dmg, ReuseTime); Code:
DoSpecialAttackDamage(ca_target, KICK, dmg, 1,-1, ReuseTime); GM Storm Haven |
Thanks for the heads up. I set up some debugging last night but didn't have time to actually test. I'll check that call and hopefully get it committed.
|
This should be fixed in Rev 2175.
|
All times are GMT -4. The time now is 04:34 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.