Premium Runah 19 Posted April 6, 2015 Premium Share Posted April 6, 2015 Hi guys, like title says, it's simples, when pet is summoned and i unride from horse ou mount, just lose the health that pet gives... I hope you guys can help me, With the best regards, Runah A new project is coming up very soon. Stay tunned. Metin2dev Topic Nexus2 Facebook Nexus2 Discord Link to comment Share on other sites More sharing options...
Premium Runah 19 Posted April 6, 2015 Author Premium Share Posted April 6, 2015 Let me explain better with an example: I have 10k health, i summon pet (pet gives 3k health) - Stay with 13k / max 13k hp I mount the horse (all fine) - stay with 13k / max 13k hp I unmount / unride - Stay with 10k / max 13k hp... A new project is coming up very soon. Stay tunned. Metin2dev Topic Nexus2 Facebook Nexus2 Discord Link to comment Share on other sites More sharing options...
Premium Runah 19 Posted April 7, 2015 Author Premium Share Posted April 7, 2015 I know that oficials are like that, but that's a bug and the problem is that players spend to much elixir (%) and potions because of that bug... Thx by the way, hope you can help me. A new project is coming up very soon. Stay tunned. Metin2dev Topic Nexus2 Facebook Nexus2 Discord Link to comment Share on other sites More sharing options...
Premium V0iĐ 114 Posted April 7, 2015 Premium Share Posted April 7, 2015 Try this noob solution: questlua_pc.cpp: Find this: int pc_unmount(lua_State* L) and add this: ch->SetHP(GetMaxHP()); so if you unmount, then get max hp! Link to comment Share on other sites More sharing options...
Premium Runah 19 Posted April 7, 2015 Author Premium Share Posted April 7, 2015 Bug that's a problem, because if he is farming or attacking moob and lose health they just down and up the horse and get MaxHP... A new project is coming up very soon. Stay tunned. Metin2dev Topic Nexus2 Facebook Nexus2 Discord Link to comment Share on other sites More sharing options...
Premium V0iĐ 114 Posted April 7, 2015 Premium Share Posted April 7, 2015 "problem is that players spend to much elixir (%) and potions because of that bug..." The last idea for me: int pc_unmount(lua_State* L) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); int iHp = ch->GetHP(); ch->RemoveAffect(AFFECT_MOUNT); ch->RemoveAffect(AFFECT_MOUNT_BONUS); ch->SetHP(iHp); if (ch->IsHorseRiding()) ch->StopRiding(); return 0; } Link to comment Share on other sites More sharing options...
Premium Runah 19 Posted April 7, 2015 Author Premium Share Posted April 7, 2015 Didn't work, but thank you anyway! A new project is coming up very soon. Stay tunned. Metin2dev Topic Nexus2 Facebook Nexus2 Discord Link to comment Share on other sites More sharing options...
Morphe 158 Posted April 7, 2015 Share Posted April 7, 2015 I test what you say and i haven't this bug. How much HP decrease when you stop riding? Link to comment Share on other sites More sharing options...
Morphe 158 Posted April 7, 2015 Share Posted April 7, 2015 (edited) ou char.cpp In function CHARACTER::ComputePoints() Search: if (iMaxHP != GetMaxHP()) { SetRealPoint(POINT_MAX_HP, iMaxHP); // 기본HP를 RealPoint에 저장해 놓는다. } PointChange(POINT_MAX_HP, 0); if (iMaxSP != GetMaxSP()) { SetRealPoint(POINT_MAX_SP, iMaxSP); // 기본SP를 RealPoint에 저장해 놓는다. } PointChange(POINT_MAX_SP, 0); if (GetHP() > GetMaxHP()) PointChange(POINT_HP, GetMaxHP() - GetHP()); if (GetSP() > GetMaxSP()) PointChange(POINT_SP, GetMaxSP() - GetSP()); Copy this and remove. After replace before UpdatePacket(); Good Luck. Edited April 7, 2015 by Morphe Link to comment Share on other sites More sharing options...
Premium Juice 518 Posted April 7, 2015 Premium Share Posted April 7, 2015 The Problem is that when you unride a horse/mount, all your stats will be "reloaded". This bug is caust because the "affect" table in mysql is not part of the function which is "reloading" the players stats. For fixing this you simply just have to add the affect table to the function, or making the new hp you current max hp. This kind of Bug also happends if you: Use some skills (Like Dash) Unride a horse/mount Teleport The most irritating thing is that it happen when you use some skills, this is not good for PvP and the additional hp you get from Quests arent helping. I have a fixed core but i cant share it whit you since u buyed it myself. You should ask a developer here for help, maybe he will do it for free. I am not so good in C++ so that i could help you myself, i am sorry. Link to comment Share on other sites More sharing options...
Premium Juice 518 Posted April 7, 2015 Premium Share Posted April 7, 2015 - Double post because of internet. - Please delete >.< Link to comment Share on other sites More sharing options...
Morphe 158 Posted April 7, 2015 Share Posted April 7, 2015 (edited) This solve all problems. ou char.cpp In function CHARACTER::ComputePoints() Search: if (iMaxHP != GetMaxHP()) { SetRealPoint(POINT_MAX_HP, iMaxHP); // 기본HP를 RealPoint에 저장해 놓는다. } PointChange(POINT_MAX_HP, 0); if (iMaxSP != GetMaxSP()) { SetRealPoint(POINT_MAX_SP, iMaxSP); // 기본SP를 RealPoint에 저장해 놓는다. } PointChange(POINT_MAX_SP, 0); if (GetHP() > GetMaxHP()) PointChange(POINT_HP, GetMaxHP() - GetHP()); if (GetSP() > GetMaxSP()) PointChange(POINT_SP, GetMaxSP() - GetSP()); Copy this and remove. After replace before UpdatePacket(); Edited April 7, 2015 by Morphe Link to comment Share on other sites More sharing options...
Adrian1428 31 Posted April 7, 2015 Share Posted April 7, 2015 This solve all problems. ou char.cpp In function CHARACTER::ComputePoints() Search: if (iMaxHP != GetMaxHP()) { SetRealPoint(POINT_MAX_HP, iMaxHP); // 기본HP를 RealPoint에 저장해 놓는다. } PointChange(POINT_MAX_HP, 0); if (iMaxSP != GetMaxSP()) { SetRealPoint(POINT_MAX_SP, iMaxSP); // 기본SP를 RealPoint에 저장해 놓는다. } PointChange(POINT_MAX_SP, 0); if (GetHP() > GetMaxHP()) PointChange(POINT_HP, GetMaxHP() - GetHP()); if (GetSP() > GetMaxSP()) PointChange(POINT_SP, GetMaxSP() - GetSP()); Copy this and remove. After replace before UpdatePacket(); I try this a long tine ago and I have big problems with player hp after mount/unmount , hp has increased to all players. edit: I try only with if (GetHP() > GetMaxHP()) PointChange(POINT_HP, GetMaxHP() - GetHP()); if (GetSP() > GetMaxSP()) PointChange(POINT_SP, GetMaxSP() - GetSP()); Link to comment Share on other sites More sharing options...
Morphe 158 Posted April 7, 2015 Share Posted April 7, 2015 This solve all problems. ou char.cpp In function CHARACTER::ComputePoints() Search: if (iMaxHP != GetMaxHP()) { SetRealPoint(POINT_MAX_HP, iMaxHP); // 기본HP를 RealPoint에 저장해 놓는다. } PointChange(POINT_MAX_HP, 0); if (iMaxSP != GetMaxSP()) { SetRealPoint(POINT_MAX_SP, iMaxSP); // 기본SP를 RealPoint에 저장해 놓는다. } PointChange(POINT_MAX_SP, 0); if (GetHP() > GetMaxHP()) PointChange(POINT_HP, GetMaxHP() - GetHP()); if (GetSP() > GetMaxSP()) PointChange(POINT_SP, GetMaxSP() - GetSP()); Copy this and remove. After replace before UpdatePacket(); I try this a long tine ago and I have big problems with player hp after mount/unmount , hp has increased to all players. edit: I try only with if (GetHP() > GetMaxHP()) PointChange(POINT_HP, GetMaxHP() - GetHP()); if (GetSP() > GetMaxSP()) PointChange(POINT_SP, GetMaxSP() - GetSP()); I havent problem Link to comment Share on other sites More sharing options...
Premium Solution Runah 19 Posted April 9, 2015 Author Premium Solution Share Posted April 9, 2015 Solved, actually i was refreshing status after get HP, that's the problem. (my fail) #Close A new project is coming up very soon. Stay tunned. Metin2dev Topic Nexus2 Facebook Nexus2 Discord Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now