Jump to content
Sign in to follow this  
-TÜRK-

[C++] Fix -32K HP After warp.

Recommended Posts

Open game/src/char.cpp 

 

Search for this SetHP(t->hp); function and change with this function SetHP(GetMaxHP());

Search for this SetSP(t->sp); function and change with this function SetSP(GetMaxSP());

 

That's all. 

  • Love 8

Share this post


Link to post

Well you could also fix and the correct way and change the type from short to to long in some packets between db cache and game ...

Share this post


Link to post

Better way solve the problem:

 

1. Open tables.h

2. change

    short       hp;
    short       sp;

to

    long       hp;
    long       sp;

Should work.

 

Kind Regards,

Crysis

 

  • Love 5

Share this post


Link to post

create diff is no easy.. becouse there are no empty byte for write thisfunction or change type of string.

 

Sorry for my bad english.

Share this post


Link to post

well you could use code caves by removing unneeded stuff 

Share this post


Link to post

not working, i lost every time when i login about 50% of hp..

 

pls help..

 

 

Share this post


Link to post

You can also use the 'old' way, with a quest:

quest hp_bug_fix begin
	state start begin
		when login begin
			affect.add_collect(apply.HP_REGEN, 500000, 5)
			affect.add_collect(apply.SP_REGEN, 500000, 5)
		end
	end
end
  • Love 1

Share this post


Link to post

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
Sign in to follow this  
  • Recently Browsing   0 members

    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.