Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Would you be able to lead me in the direction to add a tooltip to an item?

[DiscordArchive] Would you be able to lead me in the direction to add a tooltip to an item?

[DiscordArchive] Would you be able to lead me in the direction to add a tooltip to an item?

rektbyfaith
Administrator
0
10-12-2023, 06:53 PM
#1
Archived author: syco • Posted: 2023-10-12T18:53:11.408000+00:00
Original source

Would you be able to lead me in the direction to add a tooltip to an item?
rektbyfaith
10-12-2023, 06:53 PM #1

Archived author: syco • Posted: 2023-10-12T18:53:11.408000+00:00
Original source

Would you be able to lead me in the direction to add a tooltip to an item?

rektbyfaith
Administrator
0
10-12-2023, 06:55 PM
#2
Archived author: Honey • Posted: 2023-10-12T18:55:04.039000+00:00
Original source

I haven't trid, but that sounds like a dbc related subject.
rektbyfaith
10-12-2023, 06:55 PM #2

Archived author: Honey • Posted: 2023-10-12T18:55:04.039000+00:00
Original source

I haven't trid, but that sounds like a dbc related subject.

rektbyfaith
Administrator
0
10-12-2023, 06:55 PM
#3
Archived author: Honey • Posted: 2023-10-12T18:55:39.343000+00:00
Original source

Yeah or that. Good one!
rektbyfaith
10-12-2023, 06:55 PM #3

Archived author: Honey • Posted: 2023-10-12T18:55:39.343000+00:00
Original source

Yeah or that. Good one!

rektbyfaith
Administrator
0
10-12-2023, 08:34 PM
#4
Archived author: iThorgrim • Posted: 2023-10-12T20:34:28.907000+00:00
Original source

Thanks again for this <@175631911450836993>, so I made a little script to just trigger when the unit is a player and it suits me just fine!
```lua
PlayerEvents = {}
function RegisterCustomPlayerEvent(event, callback)
if not PlayerEvents[event] then
PlayerEvents[event] = {}
end

table.insert(PlayerEvents[event], callback)
end

function TriggerPlayerEvent(event, player, aura)
if not PlayerEvents[event] then
return
end

for _, callback in ipairs(PlayerEvents[event]) do
callback(player, aura)
end
end

function OnUnitEvent(event, unit, aura)
if ( not unit ) then return end

local player = unit:ToPlayer()
if ( not player ) then return end

TriggerPlayerEvent(1, player, aura)
end

RegisterUnitEvent(1, OnUnitEvent)
```
rektbyfaith
10-12-2023, 08:34 PM #4

Archived author: iThorgrim • Posted: 2023-10-12T20:34:28.907000+00:00
Original source

Thanks again for this <@175631911450836993>, so I made a little script to just trigger when the unit is a player and it suits me just fine!
```lua
PlayerEvents = {}
function RegisterCustomPlayerEvent(event, callback)
if not PlayerEvents[event] then
PlayerEvents[event] = {}
end

table.insert(PlayerEvents[event], callback)
end

function TriggerPlayerEvent(event, player, aura)
if not PlayerEvents[event] then
return
end

for _, callback in ipairs(PlayerEvents[event]) do
callback(player, aura)
end
end

function OnUnitEvent(event, unit, aura)
if ( not unit ) then return end

local player = unit:ToPlayer()
if ( not player ) then return end

TriggerPlayerEvent(1, player, aura)
end

RegisterUnitEvent(1, OnUnitEvent)
```

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