Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] i write a function used in registcreatureevent on event 1, means onentercombat.it doesn't work on cr

[DiscordArchive] i write a function used in registcreatureevent on event 1, means onentercombat.it doesn't work on cr

[DiscordArchive] i write a function used in registcreatureevent on event 1, means onentercombat.it doesn't work on cr

rektbyfaith
Administrator
0
05-11-2022, 06:43 AM
#1
Archived author: BetaYi • Posted: 2022-05-11T06:43:58.753000+00:00
Original source

i write a function used in registcreatureevent on event 1, means onentercombat.it doesn't work on creature inside of instance but works fine with same creatureentry that spawnd outside instance , seems like just the registered event was removed while enter combat , does anyone know the reason? and how to excuse the custome function on enter combat in instance?
rektbyfaith
05-11-2022, 06:43 AM #1

Archived author: BetaYi • Posted: 2022-05-11T06:43:58.753000+00:00
Original source

i write a function used in registcreatureevent on event 1, means onentercombat.it doesn't work on creature inside of instance but works fine with same creatureentry that spawnd outside instance , seems like just the registered event was removed while enter combat , does anyone know the reason? and how to excuse the custome function on enter combat in instance?

rektbyfaith
Administrator
0
05-11-2022, 06:48 AM
#2
Archived author: Foe • Posted: 2022-05-11T06:48:30.737000+00:00
Original source

The instance script probably overrides the creature ai with a c++ script, a creature cannot have both a Lua and a c++ ai/script attached
rektbyfaith
05-11-2022, 06:48 AM #2

Archived author: Foe • Posted: 2022-05-11T06:48:30.737000+00:00
Original source

The instance script probably overrides the creature ai with a c++ script, a creature cannot have both a Lua and a c++ ai/script attached

rektbyfaith
Administrator
0
05-11-2022, 06:49 AM
#3
Archived author: Foe • Posted: 2022-05-11T06:49:01.549000+00:00
Original source

So either script the creature in c++, or script the instance entirely in Lua
rektbyfaith
05-11-2022, 06:49 AM #3

Archived author: Foe • Posted: 2022-05-11T06:49:01.549000+00:00
Original source

So either script the creature in c++, or script the instance entirely in Lua

rektbyfaith
Administrator
0
05-11-2022, 06:51 AM
#4
Archived author: Honey • Posted: 2022-05-11T06:51:17.788000+00:00
Original source

Try Clearing all active instace IDs. If the creature existed, it can lead to unexpected results.
If in doubt, restart the server until you know the conditions when it works.
rektbyfaith
05-11-2022, 06:51 AM #4

Archived author: Honey • Posted: 2022-05-11T06:51:17.788000+00:00
Original source

Try Clearing all active instace IDs. If the creature existed, it can lead to unexpected results.
If in doubt, restart the server until you know the conditions when it works.

rektbyfaith
Administrator
0
05-11-2022, 07:01 AM
#5
Archived author: BetaYi • Posted: 2022-05-11T07:01:22.677000+00:00
Original source

but the function regist on event leave combat was worked fine , the lua api work s override the c++ source function,right? so they should be worked with a list?
rektbyfaith
05-11-2022, 07:01 AM #5

Archived author: BetaYi • Posted: 2022-05-11T07:01:22.677000+00:00
Original source

but the function regist on event leave combat was worked fine , the lua api work s override the c++ source function,right? so they should be worked with a list?

rektbyfaith
Administrator
0
05-11-2022, 07:02 AM
#6
Archived author: Honey • Posted: 2022-05-11T07:02:36.651000+00:00
Original source

It does Override SAI but only after a respawn. Not sure with cpp
rektbyfaith
05-11-2022, 07:02 AM #6

Archived author: Honey • Posted: 2022-05-11T07:02:36.651000+00:00
Original source

It does Override SAI but only after a respawn. Not sure with cpp

rektbyfaith
Administrator
0
05-11-2022, 07:09 AM
#7
Archived author: BetaYi • Posted: 2022-05-11T07:09:33.154000+00:00
Original source

well,it means creature sai event was conflict with lua api on same event? and sai event will be selected only if exist ?
rektbyfaith
05-11-2022, 07:09 AM #7

Archived author: BetaYi • Posted: 2022-05-11T07:09:33.154000+00:00
Original source

well,it means creature sai event was conflict with lua api on same event? and sai event will be selected only if exist ?

rektbyfaith
Administrator
0
05-11-2022, 07:17 AM
#8
Archived author: Honey • Posted: 2022-05-11T07:17:56.967000+00:00
Original source

There are probably a Lot of people more experienced with this. But my experience is, that a single `RegisterCreatureEvent` for that entry removes any existing SAI and only leaves Lua.
rektbyfaith
05-11-2022, 07:17 AM #8

Archived author: Honey • Posted: 2022-05-11T07:17:56.967000+00:00
Original source

There are probably a Lot of people more experienced with this. But my experience is, that a single `RegisterCreatureEvent` for that entry removes any existing SAI and only leaves Lua.

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