Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/development' into repacker
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Apr 30, 2024
2 parents c4809a5 + 657d4f5 commit d21226d
Show file tree
Hide file tree
Showing 9 changed files with 287 additions and 14 deletions.
276 changes: 276 additions & 0 deletions sql/migrations/20240430043145_world.sql

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/game/Objects/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6504,7 +6504,7 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
float const old_z = GetPositionZ();
float const old_r = GetOrientation();
bool const positionChanged = teleport || old_x != x || old_y != y || old_z != z;
bool const hasMovingFlags = m_movementInfo.HasMovementFlag(MOVEFLAG_MASK_MOVING);
bool const hasMovingFlags = m_movementInfo.HasMovementFlag(MOVEFLAG_MASK_XZ);

if (positionChanged || hasMovingFlags || old_r != orientation)
{
Expand Down
3 changes: 3 additions & 0 deletions src/mangosd/CliRunnable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,8 @@ void CliRunnable::operator()()
sWorld.QueueCliCommand(new CliCommandHolder(0, SEC_CONSOLE, nullptr, command.c_str(), &utf8print, &commandFinished));
}
}
#ifndef WIN32
free(command_str);
#endif
}
}
2 changes: 1 addition & 1 deletion src/mangosd/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ extern int main(int argc, char **argv)

// and run the 'Master'
// TODO: Why do we need this 'Master'? Can't all of this be in the Main as for Realmd?
return sMaster.Run();
return sMaster.Run(serviceDaemonMode);

// at sMaster return function exist with codes
// 0 - normal shutdown
Expand Down
4 changes: 2 additions & 2 deletions src/mangosd/Master.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Master::~Master()
}

// Main function
int Master::Run()
int Master::Run(char serviceDaemonMode = '\0')
{
// worldd PID file creation
std::string pidfile = sConfig.GetStringDefault("PidFile", "");
Expand Down Expand Up @@ -210,7 +210,7 @@ int Master::Run()
#ifdef WIN32
if (sConfig.GetBoolDefault("Console.Enable", true) && (m_ServiceStatus == -1)/* need disable console in service mode*/)
#else
if (sConfig.GetBoolDefault("Console.Enable", true))
if (sConfig.GetBoolDefault("Console.Enable", true) && !serviceDaemonMode)
#endif
{
// Launch CliRunnable thread
Expand Down
2 changes: 1 addition & 1 deletion src/mangosd/Master.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Master
public:
Master();
~Master();
int Run();
int Run(char serviceDaemonMode);
static volatile uint32 m_masterLoopCounter;
static volatile bool m_handleSigvSignals;
static void SigvSignalHandler();
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/eastern_kingdoms/westfall/deadmines/deadmines.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ enum

/** Doors which need to be opened automatically once the boss before died */
GO_DOOR1 = 13965,
GO_DOOR2 = 17153,
GO_DOOR3 = 26182,
GO_DOOR2 = 16400,
GO_DOOR3 = 16399,

GUN_POWDER_EVENT = 5000,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ struct instance_deadmines : public ScriptedInstance
m_uiDoor1GUID = pGo->GetGUID();
if (pGo->GetEntry() == GO_DOOR2 && pGo->GetPositionX() > -291.0f && pGo->GetPositionX() < -290.0f)
m_uiDoor2GUID = pGo->GetGUID();
if (pGo->GetEntry() == GO_DOOR2 && pGo->GetPositionX() > -169.0f && pGo->GetPositionX() < -168.0f)
if (pGo->GetEntry() == GO_DOOR3 && pGo->GetPositionX() > -169.0f && pGo->GetPositionX() < -168.0f)
m_uiDoor3GUID = pGo->GetGUID();

if (pGo->GetEntry() == GO_DMF_CHEST)
Expand Down
6 changes: 0 additions & 6 deletions src/shared/PosixDaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,9 @@ void startDaemon(uint32_t timeout)
exit(EXIT_FAILURE);
}

if ((chdir("/")) < 0)
{
exit(EXIT_FAILURE);
}

close(STDIN_FILENO);
close(STDOUT_FILENO);
close(STDERR_FILENO);

}

void stopDaemon()
Expand Down

0 comments on commit d21226d

Please sign in to comment.