SunWellCore
SunWellCore copied to clipboard
Hunter pet's not saved.
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?
yes,i met the problem too.
I rewitre the pet save with TC code and solve the problem.
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.
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.
The problem is where to ask you to just load the data from the database does not occur.
@DevQuad yes,pet loading has some bug.
Any idea?
my frend run on a linux server and the pet works just ok. so I think it's the mysql 's problem.
Do you hear yourself? The problem Mysql not talk nonsense.
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
You are using Mysql or MariaDB?
Mysql
It's very strange, Centos and use MariaDB and the kernel does not want to load data from the kernel .
IDK for Centos i work only on Debian
Who has what flag CFLAG CXXFLAG you collect?
nothing special cmake .. -DCMAKE_INSTALL_PREFIX=/home/user/server
How do you debug on the core was collected, if not banal flag -gdb3?
apt-get install gdb cmake .. -DCMAKE_INSTALL_PREFIX=/home/user/server -DWITH_COREDEBUG=1
@Dude100 You could not give its full configuration?
Any idea? Don't work for me(
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)
Now I do not understand. One problem write mysql others that all is well.
Add my fix and pet works fine
Don't work for me. OC Centos.
@lellonicole This is not a complete code Changes did not play a role
Am I edinsvennoe people with this problem?
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...