diff --git a/PseuWoW.sln b/PseuWoW.sln
index 08a7754..055efb8 100644
--- a/PseuWoW.sln
+++ b/PseuWoW.sln
@@ -38,6 +38,7 @@ Global
Release = Release
Release - Fast FPU = Release - Fast FPU
Release - Fast FPU DebugInfo = Release - Fast FPU DebugInfo
+ Release - No console = Release - No console
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{EFFE60F4-DA39-41E8-9E53-E462000A2D91}.Debug.ActiveCfg = Debug|Win32
@@ -50,6 +51,8 @@ Global
{EFFE60F4-DA39-41E8-9E53-E462000A2D91}.Release - Fast FPU.Build.0 = Release|Win32
{EFFE60F4-DA39-41E8-9E53-E462000A2D91}.Release - Fast FPU DebugInfo.ActiveCfg = Release|Win32
{EFFE60F4-DA39-41E8-9E53-E462000A2D91}.Release - Fast FPU DebugInfo.Build.0 = Release|Win32
+ {EFFE60F4-DA39-41E8-9E53-E462000A2D91}.Release - No console.ActiveCfg = Release noconsole|Win32
+ {EFFE60F4-DA39-41E8-9E53-E462000A2D91}.Release - No console.Build.0 = Release noconsole|Win32
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug.ActiveCfg = Debug|Win32
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug.Build.0 = Debug|Win32
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Relase - Fast FPU.ActiveCfg = Release|Win32
@@ -60,6 +63,8 @@ Global
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release - Fast FPU.Build.0 = Release|Win32
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release - Fast FPU DebugInfo.ActiveCfg = Release|Win32
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release - Fast FPU DebugInfo.Build.0 = Release|Win32
+ {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release - No console.ActiveCfg = Release|Win32
+ {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release - No console.Build.0 = Release|Win32
{262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug.ActiveCfg = Debug|Win32
{262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug.Build.0 = Debug|Win32
{262199E8-EEDF-4700-A1D1-E9CC901CF480}.Relase - Fast FPU.ActiveCfg = Release|Win32
@@ -70,6 +75,8 @@ Global
{262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release - Fast FPU.Build.0 = Release|Win32
{262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release - Fast FPU DebugInfo.ActiveCfg = Release|Win32
{262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release - Fast FPU DebugInfo.Build.0 = Release|Win32
+ {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release - No console.ActiveCfg = Release|Win32
+ {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release - No console.Build.0 = Release|Win32
{F548FC51-24A4-45FF-A381-BEBC39F18270}.Debug.ActiveCfg = Debug|Win32
{F548FC51-24A4-45FF-A381-BEBC39F18270}.Debug.Build.0 = Debug|Win32
{F548FC51-24A4-45FF-A381-BEBC39F18270}.Relase - Fast FPU.ActiveCfg = Release|Win32
@@ -80,6 +87,8 @@ Global
{F548FC51-24A4-45FF-A381-BEBC39F18270}.Release - Fast FPU.Build.0 = Release|Win32
{F548FC51-24A4-45FF-A381-BEBC39F18270}.Release - Fast FPU DebugInfo.ActiveCfg = Release|Win32
{F548FC51-24A4-45FF-A381-BEBC39F18270}.Release - Fast FPU DebugInfo.Build.0 = Release|Win32
+ {F548FC51-24A4-45FF-A381-BEBC39F18270}.Release - No console.ActiveCfg = Release|Win32
+ {F548FC51-24A4-45FF-A381-BEBC39F18270}.Release - No console.Build.0 = Release|Win32
{EFFE60F4-DA39-41E8-9E53-E462000A2D91}.Debug.ActiveCfg = Debug|Win32
{EFFE60F4-DA39-41E8-9E53-E462000A2D91}.Debug.Build.0 = Debug|Win32
{EFFE60F4-DA39-41E8-9E53-E462000A2D91}.Relase - Fast FPU.ActiveCfg = Release|Win32
@@ -90,6 +99,8 @@ Global
{EFFE60F4-DA39-41E8-9E53-E462000A2D91}.Release - Fast FPU.Build.0 = Release|Win32
{EFFE60F4-DA39-41E8-9E53-E462000A2D91}.Release - Fast FPU DebugInfo.ActiveCfg = Release|Win32
{EFFE60F4-DA39-41E8-9E53-E462000A2D91}.Release - Fast FPU DebugInfo.Build.0 = Release|Win32
+ {EFFE60F4-DA39-41E8-9E53-E462000A2D91}.Release - No console.ActiveCfg = Release|Win32
+ {EFFE60F4-DA39-41E8-9E53-E462000A2D91}.Release - No console.Build.0 = Release|Win32
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug.ActiveCfg = Debug|Win32
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug.Build.0 = Debug|Win32
{E08E042A-6C45-411B-92BE-3CC31331019F}.Relase - Fast FPU.ActiveCfg = Release - Fast FPU|Win32
@@ -100,6 +111,8 @@ Global
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU.Build.0 = Release - Fast FPU|Win32
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU DebugInfo.ActiveCfg = Release - Fast FPU|Win32
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU DebugInfo.Build.0 = Release - Fast FPU|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - No console.ActiveCfg = Release|Win32
+ {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - No console.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
diff --git a/src/Client/PseuWoW.cpp b/src/Client/PseuWoW.cpp
index 347e657..b304b78 100644
--- a/src/Client/PseuWoW.cpp
+++ b/src/Client/PseuWoW.cpp
@@ -430,6 +430,11 @@ void PseuInstance::DeleteGUI(void)
_guithread = NULL;
if(GetScripts()->ScriptExists("_onguiclose"))
AddCliCommand("_onguiclose"); // since this func is called from another thread, use threadsafe variant via CLI
+
+ // if console mode is disabled in windows, closing the gui needs to close the app
+#if PLATFORM == PLATFORM_WIN32 && !defined(_CONSOLE)
+ this->Stop();
+#endif
}
bool PseuInstance::ConnectToRealm(void)
diff --git a/src/Client/World/WorldSession.cpp b/src/Client/World/WorldSession.cpp
index 008dce9..3603400 100644
--- a/src/Client/World/WorldSession.cpp
+++ b/src/Client/World/WorldSession.cpp
@@ -1166,13 +1166,13 @@ void WorldSession::_HandleForceSetSpeedOpcode(WorldPacket& recvPacket)
void WorldSession::_HandleTelePortAckOpcode(WorldPacket& recvPacket)
{
- uint32 unk32,time;
+ uint32 unk32,time, flags; // movement flags
uint64 guid;
- uint8 unk8;
+ uint16 unk16;
float x, y, z, o;
guid = recvPacket.GetPackedGuid();
- recvPacket >> unk32 >> unk32 >> unk8 >> time >> x >> y >> z >> o >> unk32;
+ recvPacket >> unk32 >> flags >> unk16 >> time >> x >> y >> z >> o >> unk32;
logdetail("Got teleported, data: x: %f, y: %f, z: %f, o: %f, guid: "I64FMT, x, y, z, o, guid);
@@ -1199,6 +1199,7 @@ void WorldSession::_HandleTelePortAckOpcode(WorldPacket& recvPacket)
Set.arg[2] = DefScriptTools::toString(y);
Set.arg[3] = DefScriptTools::toString(z);
Set.arg[4] = DefScriptTools::toString(o);
+ Set.arg[5] = DefScriptTools::toString(flags);
GetInstance()->GetScripts()->RunScriptIfExists("_onteleport");
}
}
diff --git a/src/Client/main.cpp b/src/Client/main.cpp
index 6030142..a508a34 100644
--- a/src/Client/main.cpp
+++ b/src/Client/main.cpp
@@ -78,6 +78,13 @@ void _new_handler(void)
throw;
}
+#if PLATFORM == PLATFORM_WIN32 && !defined(_CONSOLE)
+int CALLBACK WinMain( IN HINSTANCE hInstance, IN HINSTANCE hPrevInstance, IN LPSTR lpCmdLine, IN int nShowCmd)
+{
+ main(0, NULL);
+}
+#endif
+
int main(int argc, char* argv[])
{
try
diff --git a/src/PseuWoW.vcproj b/src/PseuWoW.vcproj
index 186a70c..bc9bdc8 100644
--- a/src/PseuWoW.vcproj
+++ b/src/PseuWoW.vcproj
@@ -149,6 +149,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -185,16 +257,6 @@
-
-
-
-
-
-
@@ -460,6 +522,12 @@
+
+
+
+