Jump to content

[help] permanent morph


Guest Tareld
 Share

Recommended Posts

Hello,

I m currently working with a 3.1.3 server.

MaNGOS/0.14.0 (* * Revision 8296) for Linux_x64 (little-endian)

ScriptDev2 (for MaNGOS 8190+) Revision [1294] 2009-08-02 14:27:08 (Unix)

UDB 0.11.5 (382) for MaNGOS 8280 with SD2 SQL for rev. 1280

ACID 3.0.0 - Full Release for Mangos

and we've a problem with this command :

.debug mod 67 #creature_displayid

Before the update, with a 3.0.9 server,

MaNGOS/0.13.0 (* * Revision 7694 - *) for Unix (little-endian)

ACID 0.0.8 Mangos - Full Release for SD2 905+Revision [1017] 2009-04-21 11:18:13 (Unix)

UDB 0.11.0 (371) for MaNGOS 7681 with SD2 SQL for rev. 1012

ACID 0.0.9 - Full Release for Mangos 7673+

this was changed the field 67 of character's data (`characters`.`characters`) and permited a permanent morph.

Now, (3.1.3) the character's data are rewritted on the disconnection or / and are overrided on reconnection. So we re blocked about this possibility. May we need to customize the core ? Or did we miss something ?

Link to comment
Share on other sites

The branch ?

Hmm, the data aren't rewritted on the disconnection, but on the character's window, when the ids ve to be display.

I fund the function void Player::InitDisplayIds()

in player.cpp, at line 17207, but i mn't really good for programming...

Link to comment
Share on other sites

  • 7 months later...
Ok, i tryed it, and worked fine.

But an other edit was simpler : disable the call in the " Player::LoadFromDB "

sorry to bump this thread but i got to exact same spot, however im not very good with c++ and cant find this, first of all which cpp, second of all is that all of the code to disable or is it more (fairly sure its more) i could find multiple codes in player.cpp which had that and neither (from what i could see) had any "call"

i tried pm tareld but he is no longer active on forum and this didnt reply

anyone who fixed without a full rollback, which code exactly to disable for it to be possible again?

if you preffer, pm me otherwise just reply here

+rep for answer, thx

Link to comment
Share on other sites

  • 8 months later...
Ok, i tryed it, and worked fine.

But an other edit was simpler : disable the call in the " Player::LoadFromDB "

sorry to bump this thread but i got to exact same spot, however im not very good with c++ and cant find this, first of all which cpp, second of all is that all of the code to disable or is it more (fairly sure its more) i could find multiple codes in player.cpp which had that and neither (from what i could see) had any "call"

i tried pm tareld but he is no longer active on forum and this didnt reply

anyone who fixed without a full rollback, which code exactly to disable for it to be possible again?

if you preffer, pm me otherwise just reply here

+rep for answer, thx

Well just make a new function like that:

void Player::InitDisplayIdsAlt()
{
   PlayerInfo const *info = sObjectMgr.GetPlayerInfo(getRace(), getClass());
   if(!info)
   {
       sLog.outError("Player %u has incorrect race/class pair. Can't init display ids.", GetGUIDLow());
       return;
   }

   // reset scale before reapply auras
   SetObjectScale(DEFAULT_OBJECT_SCALE);

   uint8 gender = getGender();
   switch(gender)
   {
       case GENDER_FEMALE:
           SetDisplayId(GetNativeDisplayId()); // Get the current native ID and set it as model
           break;
       case GENDER_MALE:
           SetDisplayId(GetNativeDisplayId()); // Get the current native ID and set it as model
           break;
       default:
           sLog.outError("Invalid gender %u for player",gender);
           return;
   }
}

Replace "InitDisplayIds();" in the LoadFromDB function with "InitDisplayIdsAlt();" and the native ID will stay. Temporary models will be still overwritten :)

Link to comment
Share on other sites

 Share

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