mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Update rpg status probability
This commit is contained in:
parent
69fe9a2d81
commit
f26cebb518
@ -424,7 +424,7 @@ void PlayerbotFactory::Randomize(bool incremental)
|
|||||||
bot->SetHealth(bot->GetMaxHealth());
|
bot->SetHealth(bot->GetMaxHealth());
|
||||||
bot->SetPower(POWER_MANA, bot->GetMaxPower(POWER_MANA));
|
bot->SetPower(POWER_MANA, bot->GetMaxPower(POWER_MANA));
|
||||||
bot->SaveToDB(false, false);
|
bot->SaveToDB(false, false);
|
||||||
LOG_INFO("playerbots", "Initialization Done.");
|
// LOG_INFO("playerbots", "Initialization Done.");
|
||||||
if (pmo)
|
if (pmo)
|
||||||
pmo->finish();
|
pmo->finish();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@ bool NewRpgStatusUpdateAction::Execute(Event event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// IDLE -> GO_INNKEEPER
|
// IDLE -> GO_INNKEEPER
|
||||||
if (bot->GetLevel() >= 6 && roll <= 55)
|
else if (bot->GetLevel() >= 6 && roll <= 50)
|
||||||
{
|
{
|
||||||
WorldPosition pos = SelectRandomInnKeeperPos();
|
WorldPosition pos = SelectRandomInnKeeperPos();
|
||||||
if (pos != WorldPosition() && bot->GetExactDist(pos) > 50.0f)
|
if (pos != WorldPosition() && bot->GetExactDist(pos) > 50.0f)
|
||||||
@ -56,7 +56,7 @@ bool NewRpgStatusUpdateAction::Execute(Event event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// IDLE -> GO_GRIND
|
// IDLE -> GO_GRIND
|
||||||
if (roll <= 90)
|
else if (roll <= 90)
|
||||||
{
|
{
|
||||||
WorldPosition pos = SelectRandomGrindPos();
|
WorldPosition pos = SelectRandomGrindPos();
|
||||||
if (pos != WorldPosition())
|
if (pos != WorldPosition())
|
||||||
@ -167,7 +167,7 @@ WorldPosition NewRpgStatusUpdateAction::SelectRandomGrindPos()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
WorldPosition dest;
|
WorldPosition dest;
|
||||||
if (urand(1, 100) <= 75 && !hi_prepared_locs.empty())
|
if (urand(1, 100) <= 50 && !hi_prepared_locs.empty())
|
||||||
{
|
{
|
||||||
uint32 idx = urand(0, hi_prepared_locs.size() - 1);
|
uint32 idx = urand(0, hi_prepared_locs.size() - 1);
|
||||||
dest = hi_prepared_locs[idx];
|
dest = hi_prepared_locs[idx];
|
||||||
|
|||||||
@ -24,7 +24,7 @@ protected:
|
|||||||
// const int32 setGrindInterval = 5 * 60 * 1000;
|
// const int32 setGrindInterval = 5 * 60 * 1000;
|
||||||
// const int32 setNpcInterval = 1 * 60 * 1000;
|
// const int32 setNpcInterval = 1 * 60 * 1000;
|
||||||
const int32 statusNearNpcDuration = 5 * 60 * 1000;
|
const int32 statusNearNpcDuration = 5 * 60 * 1000;
|
||||||
const int32 statusNearRandomDuration = 3 * 60 * 1000;
|
const int32 statusNearRandomDuration = 5 * 60 * 1000;
|
||||||
const int32 statusRestDuration = 2 * 60 * 1000;
|
const int32 statusRestDuration = 2 * 60 * 1000;
|
||||||
WorldPosition SelectRandomGrindPos();
|
WorldPosition SelectRandomGrindPos();
|
||||||
WorldPosition SelectRandomInnKeeperPos();
|
WorldPosition SelectRandomInnKeeperPos();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user