Jump to content

[Help] Gameobject (gob add)


Guest Atømic

Recommended Posts

Français :

Bonjour,

J'ai fait des recherches pour modifier la commande .gobject add afin d'y ajouté une colone dans la table 'gameobject', en effet j'aimerais ajouté le nom du personnage qui à spawn.. sa serais bien pratique.

J'ai fait une dizaine de test, mais c'est complex dans le code source c++, sa aurait été une requête sql basique sa m'aurais pas poser de problèmes.

Voilà, j'espère avoir été assez clair sur l'aide requis.

English :

Hello,

I need add colone in table 'gameobject' for add name personnage spawn gameobject..

Sorry my english :(

Link to comment
Share on other sites

I translate in English cause my stupid compatriot clearly didn't pay attention in school :P

Hello,

I've made some research to know how to modify .gobject add command so that it saves the name of the character that spawned it.

I've made some tests, but I'm not a good C++ programmer, a simple SQL request would have been easier for me.

I hope I've been clear enough

I'll answer him in english and french (obviously he won't understand the english answer ^^)

French:

Voici quelques infos :

- Crée un nouveau champ dans gameobjct, creator de type UNSIGNED INT(10)

- Fichier Level2.cpp, fonction HandleGameobjectAddCommand : juste avant pGameObj->SaveToDB, il faut définir le créateur du gameobject. Tu n'as qu'à utiliser : pGameObj->SetOwnerGUID(chr->GetGUID());

- Fichier GameObject.cpp, fonction SaveToDB. Tu devrais voir la requête qui insère le gobject dans la BDD : INSERT INTO gameobject VALUES ...

- A la fin de cette requête il faut que tu rajoutes le créateur du gameobject :

<< uint64(GetOwnerGUID()) << ")";

English :

A few tips

- Create a new field in gameobject, creator UNSIGNED INT(10)

- File Level2.cpp, function HandleGameobjectAddCommand : just before pGameObj->SaveToDB, you must define the go's creator. You may use: pGameObj->SetOwnerGUID(chr->GetGUID());

- File GameObject.cpp, function SaveToDB. You should see the SQL request that insert the go in DB : INSERT INTO gameobject VALUES ...

- At the end of this request you must add the go's creator :

<< uint64(GetOwnerGUID()) << ")";

Link to comment
Share on other sites

I translate in English cause my stupid compatriot clearly didn't pay attention in school :P

I'll answer him in english and french (obviously he won't understand the english answer ^^)

French:

Voici quelques infos :

- Crée un nouveau champ dans gameobjct, creator de type UNSIGNED INT(10)

- Fichier Level2.cpp, fonction HandleGameobjectAddCommand : juste avant pGameObj->SaveToDB, il faut définir le créateur du gameobject. Tu n'as qu'à utiliser : pGameObj->SetOwnerGUID(chr->GetGUID());

- Fichier GameObject.cpp, fonction SaveToDB. Tu devrais voir la requête qui insère le gobject dans la BDD : INSERT INTO gameobject VALUES ...

- A la fin de cette requête il faut que tu rajoutes le créateur du gameobject :

<< uint64(GetOwnerGUID()) << ")";

English :

A few tips

- Create a new field in gameobject, creator UNSIGNED INT(10)

- File Level2.cpp, function HandleGameobjectAddCommand : just before pGameObj->SaveToDB, you must define the go's creator. You may use: pGameObj->SetOwnerGUID(chr->GetGUID());

- File GameObject.cpp, function SaveToDB. You should see the SQL request that insert the go in DB : INSERT INTO gameobject VALUES ...

- At the end of this request you must add the go's creator :

<< uint64(GetOwnerGUID()) << ")";

Merci, je vais aller tester tous sa.

Link to comment
Share on other sites

Maybe it's due to the respawn time because after rebbot Go seems to be visible.check the respawn time .

For another solution in GoCreature there is :

Player* _player = m_session->GetPlayer();

From that i think it shouldn't be hard to get the player GUID

Don't be afraid to insult me if i'm saying a lot of bullshit :)

Link to comment
Share on other sites

  • 1 month later...
Maybe it's due to the respawn time because after rebbot Go seems to be visible.check the respawn time .

For another solution in GoCreature there is :

Player* _player = m_session->GetPlayer();

From that i think it shouldn't be hard to get the player GUID

Don't be afraid to insult me if i'm saying a lot of bullshit :)

The creature no problemes, just Gameobject object need .gm on for look visual :(

PS : Need small up :(

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use