Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] If I wanted to transfer a character to a different account, would it be enough to edit the account i

[DiscordArchive] If I wanted to transfer a character to a different account, would it be enough to edit the account i

[DiscordArchive] If I wanted to transfer a character to a different account, would it be enough to edit the account i

rektbyfaith
Administrator
0
01-12-2025, 12:42 PM
#1
Archived author: Tosty • Posted: 2025-01-12T12:42:53.164000+00:00
Original source

If I wanted to transfer a character to a different account, would it be enough to edit the account id in the characters table? Or is there perhaps a GM command for that, that I didn't find?
rektbyfaith
01-12-2025, 12:42 PM #1

Archived author: Tosty • Posted: 2025-01-12T12:42:53.164000+00:00
Original source

If I wanted to transfer a character to a different account, would it be enough to edit the account id in the characters table? Or is there perhaps a GM command for that, that I didn't find?

rektbyfaith
Administrator
0
01-12-2025, 12:47 PM
#2
Archived author: Piggymorph • Posted: 2025-01-12T12:47:16.248000+00:00
Original source

thanks for the pointers, I'll look into how I'm building the mesh, it's basically code from cmangos at the moment
the coordinates I'm sending are quite small (less than 10-20 generally, so quite close to [0,0,0]) so I think that part is fine, but I don't recall seeing something like setting the origin -- maybe that's the magic sauce
I'll also look at the dungeon meshes
rektbyfaith
01-12-2025, 12:47 PM #2

Archived author: Piggymorph • Posted: 2025-01-12T12:47:16.248000+00:00
Original source

thanks for the pointers, I'll look into how I'm building the mesh, it's basically code from cmangos at the moment
the coordinates I'm sending are quite small (less than 10-20 generally, so quite close to [0,0,0]) so I think that part is fine, but I don't recall seeing something like setting the origin -- maybe that's the magic sauce
I'll also look at the dungeon meshes

rektbyfaith
Administrator
0
01-12-2025, 12:48 PM
#3
Archived author: Piggymorph • Posted: 2025-01-12T12:48:51.409000+00:00
Original source

that repo is also a godsend, ty vm to all of you
rektbyfaith
01-12-2025, 12:48 PM #3

Archived author: Piggymorph • Posted: 2025-01-12T12:48:51.409000+00:00
Original source

that repo is also a godsend, ty vm to all of you

rektbyfaith
Administrator
0
01-12-2025, 01:10 PM
#4
Archived author: RichSteini • Posted: 2025-01-12T13:10:30.526000+00:00
Original source

This is what I do. It's written from a C# class library, but the principles when you do it in C++ are the same. Main takeaway: You see that the origin of normal continents are adjusted by Utility.Origin, whereas this is not the case for dungeons and transports.
```C#
public static class Utility
{
public static float[] Origin = new[] { -17066.666f, 0, -17066.666f };
}

Map map = Map.FromMPQName(continent);
if (map != null && map.MapType == MapType.WDTOnlyType || continent.Contains("Transport"))
{
string dungeonPath = GetDungeonPath();
byte[] data = File.ReadAllBytes(_meshPath + "\\" + dungeonPath);
status = _mesh.Initialize(data);
AddMemoryPressure(data.LongLength);
IsDungeon = true;
}
else // 20bits 28bits
status = _mesh.Initialize(1048576, 2048*Division*Division, Utility.Origin, Utility.TileSize/Division, Utility.TileSize/Division);
```
This is how the Initialize in the layer is defined:
```C++
DetourStatus Initialize(array<unsigned char>^ data)
{
unsigned char* copy = new unsigned char[data->Length];
Marshal::Copy(data, 0, (IntPtr)copy, data->Length);
return (DetourStatus)_mesh->init(copy, data->Length, DT_TILE_FREE_DATA);
}

DetourStatus Initialize(int maxPolys, int maxTiles, array<float>^ orig, float tileHeight, float tileWidth)
{
dtNavMeshParams params;
params.maxPolys = maxPolys;
params.maxTiles = maxTiles;
params.orig[0] = orig[0];
params.orig[1] = orig[1];
params.orig[2] = orig[2];
params.tileHeight = tileHeight;
params.tileWidth = tileWidth;
return (DetourStatus)_mesh->init(&params);
}
```
rektbyfaith
01-12-2025, 01:10 PM #4

Archived author: RichSteini • Posted: 2025-01-12T13:10:30.526000+00:00
Original source

This is what I do. It's written from a C# class library, but the principles when you do it in C++ are the same. Main takeaway: You see that the origin of normal continents are adjusted by Utility.Origin, whereas this is not the case for dungeons and transports.
```C#
public static class Utility
{
public static float[] Origin = new[] { -17066.666f, 0, -17066.666f };
}

Map map = Map.FromMPQName(continent);
if (map != null && map.MapType == MapType.WDTOnlyType || continent.Contains("Transport"))
{
string dungeonPath = GetDungeonPath();
byte[] data = File.ReadAllBytes(_meshPath + "\\" + dungeonPath);
status = _mesh.Initialize(data);
AddMemoryPressure(data.LongLength);
IsDungeon = true;
}
else // 20bits 28bits
status = _mesh.Initialize(1048576, 2048*Division*Division, Utility.Origin, Utility.TileSize/Division, Utility.TileSize/Division);
```
This is how the Initialize in the layer is defined:
```C++
DetourStatus Initialize(array<unsigned char>^ data)
{
unsigned char* copy = new unsigned char[data->Length];
Marshal::Copy(data, 0, (IntPtr)copy, data->Length);
return (DetourStatus)_mesh->init(copy, data->Length, DT_TILE_FREE_DATA);
}

DetourStatus Initialize(int maxPolys, int maxTiles, array<float>^ orig, float tileHeight, float tileWidth)
{
dtNavMeshParams params;
params.maxPolys = maxPolys;
params.maxTiles = maxTiles;
params.orig[0] = orig[0];
params.orig[1] = orig[1];
params.orig[2] = orig[2];
params.tileHeight = tileHeight;
params.tileWidth = tileWidth;
return (DetourStatus)_mesh->init(&params);
}
```

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)