Jump to content

[BUG]Horse restart after login


Recommended Posts

Hi guys, I'm trying to solve a bug since a lot of days ago, but I can't do it, one person in this forum has had the same problem but he can solve it in this post



The horse dies when I relog, change map, etc. Here you have a video which explain the problem

Here is the syserr after the login
http://pastebin.com/wFYqdkK5

 

Source: Mainline Released

I look over all the horse functions but I can't find the error, anyone has had the same problem or know how to solve it? Regards.

Link to comment
Share on other sites

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

Go into "char_horse.cpp"

Search for "if (GetHorseHealth() <= 0)" in Line ~185

And use a Chat Funktion to check whether this function is triggered.

If yes. Somewhere the HorseHealt() will be Change <= 0

 

Greatz

Firstly, thanks for your reply, I add

		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Horse Info"));
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Level: %d"),GetHorseLevel());
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Health: %d"),GetHorseHealth());
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Max Health: %d"),GetHorseMaxHealth());
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Stamina: %d"),GetHorseStamina());
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Max Stamina: %d"),GetHorseMaxStamina());

behind the

void CHARACTER::HorseSummon(bool bSummon, bool bFromFar, DWORD dwVnum, const char* pPetName)
{
	if ( bSummon )
	{

When I summon the horse, If it's revived, it has hp and stamina, but when I warp/relog the hp and stamina falls down.

 

I've looking for the side where the stamina/hp is saved/load but I can't find any error.

 

Thanks for your time, regards.

Link to comment
Share on other sites

Maybe it doesn't save it correct in Database?...

Revieve your Horse. Close the Server and watch in "player.player" at horse_hp & horse_stamina.

 

Is it set to 0 or less then something went wrong by saving the values.

 

Greatz

 

Sorry for the delay, and thanks for your answer.

 

I did it before anything, now (after restart the server) in the db, the horse_hp is 286 and horse_stamina is 4, the horse_level is 0 but when I log in is 21(in the character page).

 

After I login, the horse_hp has decreased to 21, the horse was dead when I entered, the horse_level continues being 0.

 

#Edit

After I revive the horse, the horse_hp and horse_stamina cotinues in 21/4, the horse_level its 0 too.

 

Thanks for your time, regards.

Link to comment
Share on other sites

  • Premium

@Benhero says good thing, something doesn't show up. Did you checked the horse_level is initialized? You know, this is extraordinary bug, and you must do this while you changing something in source. Good practice is making backup of files (if you want some batch script just tell) because you can easily check what you do wrong.

 

 

Anyway, i tell you what you must do.

1. Check how horse_stamina binding to your horse from database to last function which give this information to client. Check everything, every function, every variable, just as i said, everything. (in this way you'll learn how this made, i recommend to you to use rubber duck debugging (if you don't know what is this - http://en.wikipedia.org/wiki/Rubber_duck_debugging )

2. Repeat this steps but with horse_level, check everything. you figure out what's wrong, but this take some time.

 

 

Sorry, there isn't easy way to figure out, nobody without your source don't want to help you, someone can help you via TeamViewer of course but... cost, you know how it works. Even better is to figure out by yourself because you can learn something :)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 24

      Experimental Renderer

    2. 11

      Multi Language System

    3. 0

      [FREE DESIGN] Interface + Logo + Discord Banner and Avatar

    4. 4

      Feeding game source to LLM

    5. 0

      Quest 6/7 Problem

    6. 5

      Effect weapons

    7. 0

      [C++] Fix Core Downer Using Negative Number in GM Codes

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

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.