Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Wouldn't the norm be to update the position with the homebind values using the DB?

[DiscordArchive] Wouldn't the norm be to update the position with the homebind values using the DB?

[DiscordArchive] Wouldn't the norm be to update the position with the homebind values using the DB?

Pages (4): Previous 1 2 3 4 Next
rektbyfaith
Administrator
0
11-29-2023, 06:37 PM
#21
Archived author: Kitzunu • Posted: 2023-11-29T18:37:37.203000+00:00
Original source

now I am just working out some null crash
rektbyfaith
11-29-2023, 06:37 PM #21

Archived author: Kitzunu • Posted: 2023-11-29T18:37:37.203000+00:00
Original source

now I am just working out some null crash

rektbyfaith
Administrator
0
11-29-2023, 06:42 PM
#22
Archived author: Kitzunu • Posted: 2023-11-29T18:42:08.234000+00:00
Original source

stupid me putting variables wrong way around
rektbyfaith
11-29-2023, 06:42 PM #22

Archived author: Kitzunu • Posted: 2023-11-29T18:42:08.234000+00:00
Original source

stupid me putting variables wrong way around

rektbyfaith
Administrator
0
11-29-2023, 06:43 PM
#23
Archived author: Bench • Posted: 2023-11-29T18:43:06.475000+00:00
Original source

Goose of a silly variety
rektbyfaith
11-29-2023, 06:43 PM #23

Archived author: Bench • Posted: 2023-11-29T18:43:06.475000+00:00
Original source

Goose of a silly variety

rektbyfaith
Administrator
0
11-29-2023, 06:43 PM
#24
Archived author: Kitzunu • Posted: 2023-11-29T18:43:57.638000+00:00
Original source

didnt help, am I stupid or how do I add a string to another string
rektbyfaith
11-29-2023, 06:43 PM #24

Archived author: Kitzunu • Posted: 2023-11-29T18:43:57.638000+00:00
Original source

didnt help, am I stupid or how do I add a string to another string

rektbyfaith
Administrator
0
11-29-2023, 06:45 PM
#25
Archived author: Nyeriah • Posted: 2023-11-29T18:45:10.394000+00:00
Original source

Why would you need that to begin with
rektbyfaith
11-29-2023, 06:45 PM #25

Archived author: Nyeriah • Posted: 2023-11-29T18:45:10.394000+00:00
Original source

Why would you need that to begin with

rektbyfaith
Administrator
0
11-29-2023, 06:45 PM
#26
Archived author: Kitzunu • Posted: 2023-11-29T18:45:22.020000+00:00
Original source

not add my bad
rektbyfaith
11-29-2023, 06:45 PM #26

Archived author: Kitzunu • Posted: 2023-11-29T18:45:22.020000+00:00
Original source

not add my bad

rektbyfaith
Administrator
0
11-29-2023, 06:45 PM
#27
Archived author: Kitzunu • Posted: 2023-11-29T18:45:34.001000+00:00
Original source

basically what I am trying to do is str1 = str2
rektbyfaith
11-29-2023, 06:45 PM #27

Archived author: Kitzunu • Posted: 2023-11-29T18:45:34.001000+00:00
Original source

basically what I am trying to do is str1 = str2

rektbyfaith
Administrator
0
11-29-2023, 06:46 PM
#28
Archived author: Kitzunu • Posted: 2023-11-29T18:46:14.360000+00:00
Original source

trying to fix a fucked bug I managed to create with this
rektbyfaith
11-29-2023, 06:46 PM #28

Archived author: Kitzunu • Posted: 2023-11-29T18:46:14.360000+00:00
Original source

trying to fix a fucked bug I managed to create with this

rektbyfaith
Administrator
0
11-29-2023, 06:46 PM
#29
Archived author: Nyeriah • Posted: 2023-11-29T18:46:47.274000+00:00
Original source

Would need to see your code to be more helpful
rektbyfaith
11-29-2023, 06:46 PM #29

Archived author: Nyeriah • Posted: 2023-11-29T18:46:47.274000+00:00
Original source

Would need to see your code to be more helpful

rektbyfaith
Administrator
0
11-29-2023, 06:49 PM
#30
Archived author: Kitzunu • Posted: 2023-11-29T18:49:00.612000+00:00
Original source

```cpp
static bool HandleUnstuckCommand(ChatHandler* handler, Optional<std:Confusedtring> targetName, Optional<std:Confusedtring> location)
{
Player* player = handler->getSelectedPlayer();
if (!player && targetName)
{
player = ObjectAccessor::FindPlayerByName(*targetName);

if (!player)
{
ObjectGuid tGuid;
tGuid = sCharacterCache->GetCharacterGuidByName(*targetName);
if (!tGuid)
return false;

CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_HOMEBIND);
stmt->SetData(0, tGuid.GetCounter());
PreparedQueryResult res = CharacterDatabase.Query(stmt);
if (res)
{
Field* fields = res->Fetch();
WorldLocation loc(fields[0].Get<uint16>(), fields[2].Get<float>(), fields[3].Get<float>(), fields[4].Get<float>(), 0.0f);
uint32 zoneId = fields[1].Get<uint16>();

Player::SavePositionInDB(loc, zoneId, tGuid, nullptr);
return true;
}
}
}

if (targetName && !location)
location = targetName;
```
Basically everything works. Except when you have a selected target and the location arg is caught in targetName. (I have cut out the code unrelated to this)
rektbyfaith
11-29-2023, 06:49 PM #30

Archived author: Kitzunu • Posted: 2023-11-29T18:49:00.612000+00:00
Original source

```cpp
static bool HandleUnstuckCommand(ChatHandler* handler, Optional<std:Confusedtring> targetName, Optional<std:Confusedtring> location)
{
Player* player = handler->getSelectedPlayer();
if (!player && targetName)
{
player = ObjectAccessor::FindPlayerByName(*targetName);

if (!player)
{
ObjectGuid tGuid;
tGuid = sCharacterCache->GetCharacterGuidByName(*targetName);
if (!tGuid)
return false;

CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_HOMEBIND);
stmt->SetData(0, tGuid.GetCounter());
PreparedQueryResult res = CharacterDatabase.Query(stmt);
if (res)
{
Field* fields = res->Fetch();
WorldLocation loc(fields[0].Get<uint16>(), fields[2].Get<float>(), fields[3].Get<float>(), fields[4].Get<float>(), 0.0f);
uint32 zoneId = fields[1].Get<uint16>();

Player::SavePositionInDB(loc, zoneId, tGuid, nullptr);
return true;
}
}
}

if (targetName && !location)
location = targetName;
```
Basically everything works. Except when you have a selected target and the location arg is caught in targetName. (I have cut out the code unrelated to this)

Pages (4): Previous 1 2 3 4 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)