opendarkeden / server

38 stars 30 forks source link

INSERT INTO SkillSave #98

Closed Supacek closed 1 year ago

Supacek commented 1 year ago

CGLearnSkill(SkillType:53,DomainType:ENCHANT) Stmt::EQ real Query Error Stmt [INSERT INTO SkillSave (OwnerID , SkillType , SkillLevel , SkillExp , Delay , CastingTime , NextTime) VALUES ( 'testaura', 53, 0, 1, 10, -671035464, 1668015660 )] Out of range value for column 'CastingTime' at row 1

2022.11.09-18:40:59:685 : virtual void SkillSlot::create(const string&) : SQLQueryException : Out of range value for column 'CastingTime' at row 1 Result Statement::executeQuery(char, ...) Result* Statement::executeQuery()

Supacek commented 1 year ago

someone can check i dont have time now:/

xDezossAx commented 1 year ago

I edited the insert of skillslot.cpp to force it to insert unsigned int so the values are not negative, after I did that I had no more problems.

pStmt->executeQuery( "INSERT INTO SkillSave (OwnerID , SkillType , SkillLevel , SkillExp , Delay , CastingTime , NextTime) VALUES ( '%s', %d, %d, %d, %d, %u, %d )" , OwnerID.c_str(), m_SkillType, m_ExpLevel, m_Exp, m_Interval, (uint)m_CastingTime, m_runTime.tv_sec );

Supacek commented 1 year ago

ye its OK its working @tiancaiamao u can fix that in /server/gameserver/skill/skillslot.cpp

tiancaiamao commented 1 year ago

Please leave the issue open if it's not fixed on the master branch. I'll verify it and try to fix, thanks. @Supacek