[DiscordArchive] I tried that SQL code and unfortunately it didn't work because the creature table doesn't have an "e
[DiscordArchive] I tried that SQL code and unfortunately it didn't work because the creature table doesn't have an "e
Archived author: ritzmenardi • Posted: 2023-06-11T18:43:46.350000+00:00
Original source
I tried that SQL code and unfortunately it didn't work because the creature table doesn't have an "entry" column. So I was comparing the two tables and I don't think they share any columns at all? I can't figure out how they're related at all, SQL wise. Is there another table inbetween or something that links them?
Archived author: Foe • Posted: 2023-06-11T18:44:34.968000+00:00
Original source
The creature table has the same entry id as the creature template table, if not the core wouldn't know what template data to assign per spawn
Archived author: Foe • Posted: 2023-06-11T18:44:44.610000+00:00
Original source
Might be named differently, but they're 1:1
Archived author: ritzmenardi • Posted: 2023-06-11T18:45:21.387000+00:00
Original source
Interesting, what happens when there's multiple instantiations of the same unit in the map? Does it create multiple entries in the creature table with the same entry ID?
Archived author: ritzmenardi • Posted: 2023-06-11T18:45:51.895000+00:00
Original source
MariaDB [acore_world]> show columns in creature
-> ;
+-----------------+----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+----------------------+------+-----+---------+----------------+
| guid | int(10) unsigned | NO | PRI | NULL | auto_increment |
| id1 | int(10) unsigned | NO | MUL | 0 | |
| id2 | int(10) unsigned | NO | | 0 | |
| id3 | int(10) unsigned | NO | | 0 | |
| map | smallint(5) unsigned | NO | MUL | 0 | |
| zoneId | smallint(5) unsigned | NO | | 0 | |
| areaId | smallint(5) unsigned | NO | | 0 | |
| spawnMask | tinyint(3) unsigned | NO | | 1 | |
| phaseMask | int(10) unsigned | NO | | 1 | |
| equipment_id | tinyint(4) | NO | | 0 | |
| position_x | float | NO | | 0 | |
| position_y | float | NO | | 0 | |
| position_z | float | NO | | 0 | |
| orientation | float | NO | | 0 | |
| spawntimesecs | int(10) unsigned | NO | | 120 | |
| wander_distance | float | NO | | 0 | |
| currentwaypoint | int(10) unsigned | NO | | 0 | |
Archived author: ritzmenardi • Posted: 2023-06-11T18:45:52.875000+00:00
Original source
| curhealth | int(10) unsigned | NO | | 1 | |
| curmana | int(10) unsigned | NO | | 0 | |
| MovementType | tinyint(3) unsigned | NO | | 0 | |
| npcflag | int(10) unsigned | NO | | 0 | |
| unit_flags | int(10) unsigned | NO | | 0 | |
| dynamicflags | int(10) unsigned | NO | | 0 | |
| ScriptName | char(64) | YES | | | |
| VerifiedBuild | int(11) | YES | | NULL | |
+-----------------+----------------------+------+-----+---------+----------------+
25 rows in set (0.002 sec)
Archived author: Foe • Posted: 2023-06-11T18:45:53.568000+00:00
Original source
id1
The Main ID of the template that is used when instantiating this creature.
id2
The Secondary ID of the template that is used when instantiating this creature.
id3
The Third ID of the template that is used when instantiating this creature.
Archived author: Foe • Posted: 2023-06-11T18:46:16.839000+00:00
Original source
The entry id is identical yes, each spawn has a unique guid
Archived author: ritzmenardi • Posted: 2023-06-11T18:47:13.835000+00:00
Original source
I see, thank you! I'll see if I can get it working
Archived author: ritzmenardi • Posted: 2023-06-11T18:47:42.853000+00:00
Original source
So what are id2 and id3 for?