mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
Fix for bot load buffs instrument mod. More tweaks to bot movement hack
This commit is contained in:
parent
b0ad9524bc
commit
1999982e6a
29
zone/bot.cpp
29
zone/bot.cpp
@ -2299,7 +2299,6 @@ void Bot::AI_Process() {
|
|||||||
float newZ = 0;
|
float newZ = 0;
|
||||||
FaceTarget(GetTarget());
|
FaceTarget(GetTarget());
|
||||||
if (PlotPositionAroundTarget(this, newX, newY, newZ)) {
|
if (PlotPositionAroundTarget(this, newX, newY, newZ)) {
|
||||||
Emote("steps back from %s", GetTarget()->GetCleanName());
|
|
||||||
CalculateNewPosition2(newX, newY, newZ, GetRunspeed());
|
CalculateNewPosition2(newX, newY, newZ, GetRunspeed());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2493,24 +2492,28 @@ void Bot::AI_Process() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(AI_movement_timer->Check()) {
|
else if(AI_movement_timer->Check()) {
|
||||||
|
// something is wrong with bot movement spell bonuses - based on logging..
|
||||||
|
// ..this code won't need to be so complex once fixed...
|
||||||
int speed = GetRunspeed();
|
int speed = GetRunspeed();
|
||||||
if (cur_dist < GetFollowDistance() + 1000) {
|
if (cur_dist < GetFollowDistance() + 2000) {
|
||||||
speed = GetWalkspeed();
|
speed = GetWalkspeed();
|
||||||
}
|
}
|
||||||
else if (cur_dist >= GetFollowDistance() + 8000) {
|
else if (cur_dist >= GetFollowDistance() + 10000) { // 100
|
||||||
auto leader = follow;
|
if (cur_dist >= 22500) { // 150
|
||||||
while (leader->GetFollowID()) {
|
auto leader = follow;
|
||||||
leader = entity_list.GetMob(leader->GetFollowID());
|
while (leader->GetFollowID()) {
|
||||||
if (!leader || leader == this)
|
leader = entity_list.GetMob(leader->GetFollowID());
|
||||||
break;
|
if (!leader || leader == this)
|
||||||
|
break;
|
||||||
|
if (leader->GetRunspeed() > speed)
|
||||||
|
speed = leader->GetRunspeed();
|
||||||
|
if (leader->IsClient())
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (leader && leader != this && leader->GetRunspeed() > speed)
|
speed = (float)speed * (1.0f + ((float)speed * 0.03125f)); // 1/32 - special bot sprint mod
|
||||||
speed = leader->GetRunspeed();
|
|
||||||
speed = (float)speed * 1.8f; // special bot sprint mod
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// this needs work..
|
|
||||||
// could probably eliminate the sprint mod with the correct logic
|
|
||||||
if (cur_dist > GetFollowDistance()) {
|
if (cur_dist > GetFollowDistance()) {
|
||||||
CalculateNewPosition2(follow->GetX(), follow->GetY(), follow->GetZ(), speed);
|
CalculateNewPosition2(follow->GetX(), follow->GetY(), follow->GetZ(), speed);
|
||||||
if (rest_timer.Enabled())
|
if (rest_timer.Enabled())
|
||||||
|
|||||||
@ -617,7 +617,8 @@ bool BotDatabase::LoadBuffs(Bot* bot_inst)
|
|||||||
" `caston_x`,"
|
" `caston_x`,"
|
||||||
" `caston_y`,"
|
" `caston_y`,"
|
||||||
" `caston_z`,"
|
" `caston_z`,"
|
||||||
" `extra_di_chance`"
|
" `extra_di_chance`,"
|
||||||
|
" `instrument_mod`"
|
||||||
" FROM `bot_buffs`"
|
" FROM `bot_buffs`"
|
||||||
" WHERE `bot_id` = '%u'",
|
" WHERE `bot_id` = '%u'",
|
||||||
bot_inst->GetBotID()
|
bot_inst->GetBotID()
|
||||||
@ -657,6 +658,7 @@ bool BotDatabase::LoadBuffs(Bot* bot_inst)
|
|||||||
bot_buffs[buff_count].caston_y = atoi(row[14]);
|
bot_buffs[buff_count].caston_y = atoi(row[14]);
|
||||||
bot_buffs[buff_count].caston_z = atoi(row[15]);
|
bot_buffs[buff_count].caston_z = atoi(row[15]);
|
||||||
bot_buffs[buff_count].ExtraDIChance = atoi(row[16]);
|
bot_buffs[buff_count].ExtraDIChance = atoi(row[16]);
|
||||||
|
bot_buffs[buff_count].instrument_mod = atoi(row[17]);
|
||||||
bot_buffs[buff_count].casterid = 0;
|
bot_buffs[buff_count].casterid = 0;
|
||||||
++buff_count;
|
++buff_count;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user