Jump to content
×
×
  • Create New...
  • 0

[PROBLEM]Lose Health After Unmound When Pet Summoned


Runah

Question

  • Answers 14
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

14 answers to this question

Recommended Posts

  • 0
  • Premium

"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

  • 0

ou :D

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 by Morphe
Link to comment
Share on other sites

  • 0
  • Premium

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

  • 0

This solve all problems.

 

 

ou :D

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 by Morphe
Link to comment
Share on other sites

  • 0

 

This solve all problems.

 

 

ou :D

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

  • 0

 

 

This solve all problems.

 

 

ou :D

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 :D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

Terms of Use / Privacy Policy / Guidelines / 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.