Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wish for additional SAI functions that are only available in C++ #29937

Open
Krutok opened this issue Apr 23, 2024 · 8 comments
Open

Wish for additional SAI functions that are only available in C++ #29937

Krutok opened this issue Apr 23, 2024 · 8 comments

Comments

@Krutok
Copy link

Krutok commented Apr 23, 2024

Description

I would like the function to also be able to specify the rotation with the GO Summon function. So far it is only reserved for C++, which makes it impossible for people who design events with SAI to have GOs spawn correctly with the correct rotation.

Screenshot 2024-04-22 152628

Expected behaviour

In C++ there is the possibility to also specify the rotation of the game objects. Here is an example that I discovered by chance:

if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_5, 7855.11f, -1406.839f, 1538.42f, 1.151916f, QuaternionData(0.f, 0.f, 0.5446386f, 0.8386708f), 0s))

Unfortunately, the necessary entries are missing in SAI and you can only specify the xyzo coordinates.

Steps to reproduce the problem

It cannot be reproduced because the necessary database fields are not available and the feature is missing in the SAI script. See my screenshot above.

Screenshot 2024-04-22 152816

Needs more 4 fields in the database.

Branch

3.3.5

TC rev. hash/commit

TrinityCore rev. c8ca12cdf762+ 2024-04-07 13:17:08 +0200 (release branch) (Unix, RelWithDebInfo, Static)
eba78de

Operating system

Debian 11

Custom changes

Trickerer NPC Bots

@github-actions github-actions bot added Branch-3.3.5a Invalid-IncompleteData/OrNotTrinityCore Reporter deleted parts or all template or he is using a 3rd party unsupported core. labels Apr 23, 2024
@Aokromes Aokromes removed the Invalid-IncompleteData/OrNotTrinityCore Reporter deleted parts or all template or he is using a 3rd party unsupported core. label Apr 24, 2024
@Nyr97
Copy link
Contributor

Nyr97 commented Apr 27, 2024

It would require implementing 4 additional columns just for this feature and as far as I am aware, that's not a common thing to do with very specific features.

@Krutok
Copy link
Author

Krutok commented Apr 27, 2024

It would require implementing 4 additional columns just for this feature and as far as I am aware, that's not a common thing to do with very specific features.

Yes, but this function is needed to specifically display objects in the game. Because I don't want to incorporate everything into my maps, as they should only be spawned specifically for events or quests.

@Krutok
Copy link
Author

Krutok commented Jun 3, 2024

Furthermore, you cannot permanently install m2 in WMOs, so it only works as a GameObject and therefore this function is very helpful.

@funjoker
Copy link
Member

funjoker commented Jun 3, 2024

https://trinitycore.info/database/335/world/smart_scripts

You can enable a spawn position from gameobject table with Action 70 (SMART_ACTION_ENABLE_TEMP_GOBJ)
These gameobjects can have rotation and static position.

It's the -spawnid gameobjects :)

@funjoker
Copy link
Member

funjoker commented Jun 3, 2024

tho you can't have them multiple times <.<

@Krutok
Copy link
Author

Krutok commented Jun 3, 2024

https://trinitycore.info/database/335/world/smart_scripts

You can enable a spawn position from gameobject table with Action 70 (SMART_ACTION_ENABLE_TEMP_GOBJ) These gameobjects can have rotation and static position.

It's the -spawnid gameobjects :)

@funjoker

How exactly is that supposed to work? If I understand correctly, you have to let the game object spawn in the place where you want it, because with the method I can only specify the game object + the GUID, which means the object must already be spawned on the map.

@meji46
Copy link
Member

meji46 commented Jun 3, 2024

-- Spawn (negative spawntimesecs)
-- Using a negative value will result in the object starting out by being "despawned" until a script will spawn it
-- It will then despawn after the amount of time specified here has passed
SELECT * FROM `gameobject` WHERE `id`=190736 AND `guid`=16964;

-- SAI (creature respawns the GO)
SELECT * FROM `smart_scripts` WHERE `action_type`=70 AND `target_param2`=190736;

@Krutok
Copy link
Author

Krutok commented Jun 3, 2024

Yes, thank you, that will help me for the event I have planned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants