[DiscordArchive] <@179207761555488769> care to share your code?
[DiscordArchive] <@179207761555488769> care to share your code?
Archived author: Natrist • Posted: 2023-10-22T14:51:04.040000+00:00
Original source
<@179207761555488769> care to share your code?
Archived author: MadBits • Posted: 2023-10-22T14:51:27.734000+00:00
Original source
Sure thing, one second
Archived author: MadBits • Posted: 2023-10-22T14:52:10.657000+00:00
Original source
` case TYPEID_PLAYER:
{
float destX, destY, destZ, destO;
obj->m_movementInfo.transport.pos.GetPosition(destX, destY, destZ, destO);
if (newMapId == 485)
{
newMapId = 13;
destX = 51;
destY = 28;
destZ = 0;
destO = 0;
}
// obj->ToPlayer()->GetSession()->SendBroadcastMessage("Teleport triggered");
TransportBase::CalculatePassengerPosition(destX, destY, destZ, &destO, x, y, z, o);
if (!obj->ToPlayer()->TeleportTo(newMapId, destX, destY, destZ, destO, TELE_TO_NOT_LEAVE_TRANSPORT))
_passengers.erase(obj);
}
break;`
Archived author: MadBits • Posted: 2023-10-22T14:52:37.908000+00:00
Original source
Basically what I'm trying to do is whenever the newMapId matches the mapId of northrend, I want to set the new coordinates to Gadgetzan
Archived author: MadBits • Posted: 2023-10-22T14:53:11.703000+00:00
Original source
The coordinates are currently erronated as I can't seem to get the Z coordinates and the orientation (which I guess is dest0)
Archived author: MadBits • Posted: 2023-10-22T14:53:28.960000+00:00
Original source
Nonetheless first I am trying to at least manage to somehow print the values in my chat
Archived author: MadBits • Posted: 2023-10-22T14:54:19.688000+00:00
Original source
Gotta mention its the first time ever coding in any emulator, so bear with me because I am lacking lots of basics.
Archived author: MadBits • Posted: 2023-10-22T14:54:38.282000+00:00
Original source
And I am poor in C++ as well, never really worked with it.
Archived author: Natrist • Posted: 2023-10-22T14:54:57.150000+00:00
Original source
Ah, I see.
Archived author: MadBits • Posted: 2023-10-22T14:55:10.931000+00:00
Original source
Now, I did notice SendBroadcastMessage doesn't exist anywhere in the WorldSession (I guess that's whats called, gave up on searching)