Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] This an item or NPC?

[DiscordArchive] This an item or NPC?

[DiscordArchive] This an item or NPC?

Pages (3): Previous 1 2 3 Next
rektbyfaith
Administrator
0
02-07-2025, 04:28 PM
#11
Archived author: Revision • Posted: 2025-02-07T16:28:01.795000+00:00
Original source

The SendTrainerList function could be modified to function like SendListInventory and I'm sure it wouldn't be rejected if a PR was created
rektbyfaith
02-07-2025, 04:28 PM #11

Archived author: Revision • Posted: 2025-02-07T16:28:01.795000+00:00
Original source

The SendTrainerList function could be modified to function like SendListInventory and I'm sure it wouldn't be rejected if a PR was created

rektbyfaith
Administrator
0
02-07-2025, 04:28 PM
#12
Archived author: OUTRAKE • Posted: 2025-02-07T16:28:22.857000+00:00
Original source

working for 4 hours on it and still cannot figure how
rektbyfaith
02-07-2025, 04:28 PM #12

Archived author: OUTRAKE • Posted: 2025-02-07T16:28:22.857000+00:00
Original source

working for 4 hours on it and still cannot figure how

rektbyfaith
Administrator
0
02-07-2025, 04:28 PM
#13
Archived author: Honey • Posted: 2025-02-07T16:28:35.401000+00:00
Original source

I'd check other cores first. There might be a mistake in the mod-eluna implementation.
rektbyfaith
02-07-2025, 04:28 PM #13

Archived author: Honey • Posted: 2025-02-07T16:28:35.401000+00:00
Original source

I'd check other cores first. There might be a mistake in the mod-eluna implementation.

rektbyfaith
Administrator
0
02-07-2025, 04:30 PM
#14
Archived author: OUTRAKE • Posted: 2025-02-07T16:30:45.483000+00:00
Original source

this could be an eluna solution but i get error function except to get creature and not uint32

```
player:SendTrainerList(npcID)


int SendTrainerList(lua_State* L, Player* player)
{
Creature* obj = Eluna::CHECKOBJ<Creature>(L, 2);
if (obj) {
player->GetSession()->SendTrainerList(obj->GET_GUID());
} else {
uint32 entry = Eluna::CHECKVAL<uint32>(L, 2, 0);
float x = player->GetPositionX(), y = player->GetPositionY(), z = player->GetPositionZ();
Creature* summonedObj = player->SummonCreature(entry, x, y, z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000);
player->GetSession()->SendTrainerList(summonedObj->GET_GUID());
}

return 0;
}
```
rektbyfaith
02-07-2025, 04:30 PM #14

Archived author: OUTRAKE • Posted: 2025-02-07T16:30:45.483000+00:00
Original source

this could be an eluna solution but i get error function except to get creature and not uint32

```
player:SendTrainerList(npcID)


int SendTrainerList(lua_State* L, Player* player)
{
Creature* obj = Eluna::CHECKOBJ<Creature>(L, 2);
if (obj) {
player->GetSession()->SendTrainerList(obj->GET_GUID());
} else {
uint32 entry = Eluna::CHECKVAL<uint32>(L, 2, 0);
float x = player->GetPositionX(), y = player->GetPositionY(), z = player->GetPositionZ();
Creature* summonedObj = player->SummonCreature(entry, x, y, z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000);
player->GetSession()->SendTrainerList(summonedObj->GET_GUID());
}

return 0;
}
```

rektbyfaith
Administrator
0
02-07-2025, 04:31 PM
#15
Archived author: OUTRAKE • Posted: 2025-02-07T16:31:26.878000+00:00
Original source

thats a method using spawn npc
rektbyfaith
02-07-2025, 04:31 PM #15

Archived author: OUTRAKE • Posted: 2025-02-07T16:31:26.878000+00:00
Original source

thats a method using spawn npc

rektbyfaith
Administrator
0
02-07-2025, 04:31 PM
#16
Archived author: OUTRAKE • Posted: 2025-02-07T16:31:35.458000+00:00
Original source

bad af
rektbyfaith
02-07-2025, 04:31 PM #16

Archived author: OUTRAKE • Posted: 2025-02-07T16:31:35.458000+00:00
Original source

bad af

rektbyfaith
Administrator
0
02-07-2025, 04:33 PM
#17
Archived author: OUTRAKE • Posted: 2025-02-07T16:33:49.532000+00:00
Original source

other method is to implement `SendExternalTrainerList` in core
```
WorldSession.h
void SendExternalTrainerList(uint32 trainerEntry = 0);

NPCHandler.cpp
void WorldSession::SendExternalTrainerList(uint32 trainerEntry)
{
}

```
rektbyfaith
02-07-2025, 04:33 PM #17

Archived author: OUTRAKE • Posted: 2025-02-07T16:33:49.532000+00:00
Original source

other method is to implement `SendExternalTrainerList` in core
```
WorldSession.h
void SendExternalTrainerList(uint32 trainerEntry = 0);

NPCHandler.cpp
void WorldSession::SendExternalTrainerList(uint32 trainerEntry)
{
}

```

rektbyfaith
Administrator
0
02-07-2025, 04:34 PM
#18
Archived author: OUTRAKE • Posted: 2025-02-07T16:34:08.378000+00:00
Original source

but idk how to convert entry to an object
rektbyfaith
02-07-2025, 04:34 PM #18

Archived author: OUTRAKE • Posted: 2025-02-07T16:34:08.378000+00:00
Original source

but idk how to convert entry to an object

rektbyfaith
Administrator
0
02-07-2025, 04:34 PM
#19
Archived author: OUTRAKE • Posted: 2025-02-07T16:34:26.021000+00:00
Original source

other than
```
// Creature* trainer = GetPlayer()->SummonCreature(trainerEntry, x, y, z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000);
// ObjectGuid trainerGuid = trainer->GetGUID();
```
rektbyfaith
02-07-2025, 04:34 PM #19

Archived author: OUTRAKE • Posted: 2025-02-07T16:34:26.021000+00:00
Original source

other than
```
// Creature* trainer = GetPlayer()->SummonCreature(trainerEntry, x, y, z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000);
// ObjectGuid trainerGuid = trainer->GetGUID();
```

rektbyfaith
Administrator
0
02-07-2025, 04:40 PM
#20
Archived author: OUTRAKE • Posted: 2025-02-07T16:40:07.681000+00:00
Original source

SendListInventory has this `SetCurrentVendor(vendorEntry);`
rektbyfaith
02-07-2025, 04:40 PM #20

Archived author: OUTRAKE • Posted: 2025-02-07T16:40:07.681000+00:00
Original source

SendListInventory has this `SetCurrentVendor(vendorEntry);`

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