Merge branch 'master' into auras

This commit is contained in:
Michael Cook (mackal) 2017-07-16 12:39:06 -04:00
commit fb208657ea
4 changed files with 32 additions and 8 deletions

View File

@ -449,17 +449,36 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app) {
return false;
}
cle->SetOnline();
if(minilogin){
cle->SetOnline();
WorldConfig::DisableStats();
Log(Logs::General, Logs::World_Server, "MiniLogin Account #%d",cle->AccountID());
}
else {
if (!is_player_zoning) {
Log(Logs::General, Logs::World_Server,
"Account (%s) Logging in :: LSID: %d ", cle->AccountName(), cle->LSID());
else if (!is_player_zoning) {
// Track who is in and who is out of the game
char *inout= (char *) "";
if (cle->GetOnline() == CLE_Status_Never){
// Desktop -> Char Select
inout = (char *) "In";
}
else {
// Game -> Char Select
inout=(char *) "Out";
}
// Always at Char select at this point.
// Either from a fresh client launch or coming back from the game.
// Exiting the game entirely does not come through here.
// Could use a Logging Out Completely message somewhere.
cle->SetOnline(CLE_Status_CharSelect);
Log(Logs::General, Logs::World_Server,
"Account (%s) Logging(%s) to character select :: LSID: %d ",
cle->AccountName(), inout, cle->LSID());
}
else {
cle->SetOnline();
}
const WorldConfig *Config=WorldConfig::get();
@ -1021,6 +1040,7 @@ bool Client::HandlePacket(const EQApplicationPacket *app) {
}
case OP_WorldLogout:
{
// I don't see this getting executed on logout
eqs->Close();
cle->SetOnline(CLE_Status_Offline); //allows this player to log in again without an ip restriction.
return false;

View File

@ -50,6 +50,7 @@ public:
inline const char* LSName() const { return plsname; }
inline int16 WorldAdmin() const { return pworldadmin; }
inline const char* GetLSKey() const { return plskey; }
inline const int8 GetOnline() const { return pOnline; }
// Account stuff
inline uint32 AccountID() const { return paccountid; }

View File

@ -1001,7 +1001,7 @@ void Mob::AI_Process() {
if (this->GetTarget()) {
/* If we are engaged, moving and following client, let's look for best Z more often */
float target_distance = DistanceNoZ(this->GetPosition(), this->GetTarget()->GetPosition());
if (target_distance >= 50) {
if (target_distance >= 25) {
this->FixZ();
}
else if (!this->CheckLosFN(this->GetTarget())) {
@ -1573,6 +1573,8 @@ void NPC::AI_DoMovement() {
SetHeading(m_CurrentWayPoint.w);
}
this->FixZ();
SendPosition();
//kick off event_waypoint arrive

View File

@ -849,6 +849,7 @@ void Mob::FixZ() {
{
/* Any more than 5 in the offset makes NPC's hop/snap to ceiling in small corridors */
float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 5);
new_z += (this->GetSize() / 1.55);
auto duration = timer.elapsed();
@ -864,7 +865,7 @@ void Mob::FixZ() {
duration
);
if ((new_z > -2000) && std::abs(m_Position.z - new_z) < 35) {
if ((new_z > -2000) && new_z != -999999) {
if (RuleB(Map, MobZVisualDebug))
this->SendAppearanceEffect(78, 0, 0, 0, 0);