Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Seems to work, it just return 0 if no pet ^^ But how would I then load the pet using the guid, any i

[DiscordArchive] Seems to work, it just return 0 if no pet ^^ But how would I then load the pet using the guid, any i

[DiscordArchive] Seems to work, it just return 0 if no pet ^^ But how would I then load the pet using the guid, any i

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
05-04-2022, 04:36 PM
#1
Archived author: Grandold • Posted: 2022-05-04T16:36:08.022000+00:00
Original source

Seems to work, it just return 0 if no pet ^^ But how would I then load the pet using the guid, any idea what function would do that?
rektbyfaith
05-04-2022, 04:36 PM #1

Archived author: Grandold • Posted: 2022-05-04T16:36:08.022000+00:00
Original source

Seems to work, it just return 0 if no pet ^^ But how would I then load the pet using the guid, any idea what function would do that?

rektbyfaith
Administrator
0
05-04-2022, 04:41 PM
#2
Archived author: Honey • Posted: 2022-05-04T16:41:37.080000+00:00
Original source

Map:GetWorldObject(Guid)
rektbyfaith
05-04-2022, 04:41 PM #2

Archived author: Honey • Posted: 2022-05-04T16:41:37.080000+00:00
Original source

Map:GetWorldObject(Guid)

rektbyfaith
Administrator
0
05-04-2022, 04:41 PM
#3
Archived author: Grandold • Posted: 2022-05-04T16:41:54.111000+00:00
Original source

ahhh ty, would not have guessed its in map class Smile=
rektbyfaith
05-04-2022, 04:41 PM #3

Archived author: Grandold • Posted: 2022-05-04T16:41:54.111000+00:00
Original source

ahhh ty, would not have guessed its in map class Smile=

rektbyfaith
Administrator
0
05-04-2022, 04:47 PM
#4
Archived author: Grandold • Posted: 2022-05-04T16:47:23.313000+00:00
Original source

```
local petGUID = player:GetPetGUID()
if petGUID ~= 0 then
local pet = Map:GetWorldObject(petGUID)
print(pet:GetLevel())
end
``` gives error:
```
calling 'GetWorldObject' on bad self (bad argument : Map expected, got table)
```
rektbyfaith
05-04-2022, 04:47 PM #4

Archived author: Grandold • Posted: 2022-05-04T16:47:23.313000+00:00
Original source

```
local petGUID = player:GetPetGUID()
if petGUID ~= 0 then
local pet = Map:GetWorldObject(petGUID)
print(pet:GetLevel())
end
``` gives error:
```
calling 'GetWorldObject' on bad self (bad argument : Map expected, got table)
```

rektbyfaith
Administrator
0
05-04-2022, 04:51 PM
#5
Archived author: Grandold • Posted: 2022-05-04T16:51:48.756000+00:00
Original source

Aa I probably need to use instance of the map, but how would i get that then lol?
rektbyfaith
05-04-2022, 04:51 PM #5

Archived author: Grandold • Posted: 2022-05-04T16:51:48.756000+00:00
Original source

Aa I probably need to use instance of the map, but how would i get that then lol?

rektbyfaith
Administrator
0
05-04-2022, 04:52 PM
#6
Archived author: Honey • Posted: 2022-05-04T16:52:08.344000+00:00
Original source

You need to assign Map.
GetMapById() for example.
rektbyfaith
05-04-2022, 04:52 PM #6

Archived author: Honey • Posted: 2022-05-04T16:52:08.344000+00:00
Original source

You need to assign Map.
GetMapById() for example.

rektbyfaith
Administrator
0
05-04-2022, 04:52 PM
#7
Archived author: Honey • Posted: 2022-05-04T16:52:38.655000+00:00
Original source

Or you Pass the map object to the function.
rektbyfaith
05-04-2022, 04:52 PM #7

Archived author: Honey • Posted: 2022-05-04T16:52:38.655000+00:00
Original source

Or you Pass the map object to the function.

rektbyfaith
Administrator
0
05-04-2022, 04:53 PM
#8
Archived author: Honey • Posted: 2022-05-04T16:53:10.925000+00:00
Original source

The customworldboss lua does this
rektbyfaith
05-04-2022, 04:53 PM #8

Archived author: Honey • Posted: 2022-05-04T16:53:10.925000+00:00
Original source

The customworldboss lua does this

rektbyfaith
Administrator
0
05-04-2022, 04:53 PM
#9
Archived author: Grandold • Posted: 2022-05-04T16:53:20.169000+00:00
Original source

okay thanks, ill check that
rektbyfaith
05-04-2022, 04:53 PM #9

Archived author: Grandold • Posted: 2022-05-04T16:53:20.169000+00:00
Original source

okay thanks, ill check that

rektbyfaith
Administrator
0
05-04-2022, 04:55 PM
#10
Archived author: Grandold • Posted: 2022-05-04T16:55:51.165000+00:00
Original source

there the mapID is assigned in the config, but is it possible to get the "current" mapID where the player is atm? or how does that work hmmhmm
rektbyfaith
05-04-2022, 04:55 PM #10

Archived author: Grandold • Posted: 2022-05-04T16:55:51.165000+00:00
Original source

there the mapID is assigned in the config, but is it possible to get the "current" mapID where the player is atm? or how does that work hmmhmm

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