SunWellCore icon indicating copy to clipboard operation
SunWellCore copied to clipboard

Hunter pet's not saved.

Open ghost opened this issue 8 years ago • 27 comments

Hi friends, there was a rather strange problem. On the Linux operating system hunter pets are not saved, but viduos everything works perfectly. Tested and debug and complete log database is not something strange had not noticed. Those who met such a problem?

ghost avatar May 03 '16 20:05 ghost

yes,i met the problem too.

szhxjt1334 avatar May 04 '16 04:05 szhxjt1334

I rewitre the pet save with TC code and solve the problem.

szhxjt1334 avatar May 04 '16 04:05 szhxjt1334

If you compare the save function from TC and in Sunwell, you can see a lot of difference. If you rewrite the Pets under TC it will hook a lot of changes.

ghost avatar May 04 '16 06:05 ghost

Must be an error somewhere, I don't believe that would be Sunwell used Windows and never seen this error. We have in the function is specified parametre at the end of the code, and they bring me in confusion.

ghost avatar May 04 '16 06:05 ghost

The problem is where to ask you to just load the data from the database does not occur.

ghost avatar May 05 '16 06:05 ghost

@DevQuad yes,pet loading has some bug.

szhxjt1334 avatar May 05 '16 11:05 szhxjt1334

Any idea?

ghost avatar May 06 '16 13:05 ghost

my frend run on a linux server and the pet works just ok. so I think it's the mysql 's problem.

szhxjt1334 avatar May 07 '16 06:05 szhxjt1334

Do you hear yourself? The problem Mysql not talk nonsense.

ghost avatar May 07 '16 07:05 ghost

but true on linux hunter pet work Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux

Dude100 avatar May 07 '16 08:05 Dude100

You are using Mysql or MariaDB?

ghost avatar May 07 '16 08:05 ghost

Mysql

Dude100 avatar May 07 '16 08:05 Dude100

It's very strange, Centos and use MariaDB and the kernel does not want to load data from the kernel .

ghost avatar May 07 '16 08:05 ghost

IDK for Centos i work only on Debian

Dude100 avatar May 07 '16 08:05 Dude100

Who has what flag CFLAG CXXFLAG you collect?

ghost avatar May 07 '16 11:05 ghost

nothing special cmake .. -DCMAKE_INSTALL_PREFIX=/home/user/server

Dude100 avatar May 07 '16 11:05 Dude100

How do you debug on the core was collected, if not banal flag -gdb3?

ghost avatar May 07 '16 11:05 ghost

apt-get install gdb cmake .. -DCMAKE_INSTALL_PREFIX=/home/user/server -DWITH_COREDEBUG=1

Dude100 avatar May 07 '16 11:05 Dude100

@Dude100 You could not give its full configuration?

ghost avatar May 11 '16 15:05 ghost

Any idea? Don't work for me(

ghost avatar Jun 08 '16 17:06 ghost

ok i fixed it.

src\server\game\Entities\Pet

@@ -111,6 +111,7 @@ void Pet::RemoveFromWorld()

 bool Pet::LoadPetFromDB(Player* owner, uint8 asynchLoadType, uint32 petentry, uint32 petnumber, bool current, AsynchPetSummon* info)
 { 
+    bool m_loading = true;

    // we are loading pet at that moment
    if (owner->IsSpectator() || owner->GetPet() || !owner->IsInWorld() || !owner->FindMap())
        return false;
... ...
@@ -121,6 +122,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint8 asynchLoadType, uint32 petentry, ui

     uint32 ownerid = owner->GetGUIDLow();
     PreparedStatement* stmt;
+    PreparedQueryResult result;

     if (petnumber)
     {
... ...
@@ -161,6 +163,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint8 asynchLoadType, uint32 petentry, ui
    owner->GetSession()->_loadPetFromDBFirstCallback.SetSecondParam(info);
    owner->GetSession()->_loadPetFromDBFirstCallback.SetFutureResult(CharacterDatabase.AsyncQuery(stmt));
    return true;
+    m_loading = false;
 }

 void Pet::SavePetToDB(PetSaveMode mode, bool logout)

lellonicole avatar Jun 30 '16 18:06 lellonicole

Now I do not understand. One problem write mysql others that all is well.

ghost avatar Jun 30 '16 18:06 ghost

Add my fix and pet works fine

lellonicole avatar Jun 30 '16 19:06 lellonicole

Don't work for me. OC Centos.

ghost avatar Jul 03 '16 17:07 ghost

@lellonicole This is not a complete code Changes did not play a role

boom8866 avatar Jul 05 '16 05:07 boom8866

Am I edinsvennoe people with this problem?

ghost avatar Jul 13 '16 10:07 ghost

the code from @lellonicole is useless - maybe he didnt post the whole thing...

I';ve tested by merging all the code from teh different async pieces (that are not really async by the way...) into the LoadPetFromDB function and I can get it to work - it basically becomes exactly the same as the TC one. Still weird that on linux doesnt work...

mik1893 avatar Aug 15 '16 17:08 mik1893