Jump to content

[Help] Gameobject (gob add)


Recommended Posts

Posted

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 :(

Posted

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()) << ")";

Posted

I had some related idea to add a new collumn to creature, go, and a few templates to add a note when they were last seen, but some DB was the opinion that this comment field would only be used for personal petty problems (ielook how important I am) ..

Would fit good to this idea however

Posted
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.

Posted

English :

Have problem : The gameobject need .gm on for look visual..

Français :

J'ai un problème : Le gameobject spawn on as besoin du .gm on, pour voir le visuel .. sauf après un reboot.

C'est assez bizzard du fait qu'on ajouté juste 2 lignes de code :S

Posted

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 :)

  • 1 month later...
Posted
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 :(

×
×
  • 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