Jump to content

[alt.fix in 7325] Mana/Energy/Rune Regen for Old 3.0.3 Chars

Auntie Mangos

Recommended Posts

Edit: Oops, title should be fix "for pre-3.0.3" chars.

What bug does the patch fix? What features does the patch add?

This fixes the DB error in characters table that causes old characters' clients to not exhibit the new regen system. Newer characters have this flag when created. It does not implement the fix in the core; it only makes it so the client receives the correct regen flag.

Somewhere after update to 3.0.3, a line "SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER);" was added to the create player method in player.cpp. There was never a corresponding sql update to give this flag to characters created before then, though.

For which repository revision was the patch created?

Tested on 7264.

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.


Who has been writing this patch? Please include either forum user names or email addresses.


delimiter //
CREATE FUNCTION fix_regen (datastring longtext) RETURNS longtext
   declare i int default 0;
   declare back longtext default datastring;
   declare front longtext default "";
   while i < 59 do
       set front = concat(front, substring(back, 1, instr(back, " ")));
       set back = substring(back, instr(back, " ") + 1);
       set i = i+1;
   end while;
   set back = substring(back, instr(back, " ") + 1);
   return concat(front,"2048 ",back);
delimiter ;

Update characters set data = fix_regen(`data`);

Link to comment
Share on other sites

  • 39 years later...
Note: In patch 3.0.3 energy regeneration became a smooth regeneration. This means that instead of regenerating chunks of 20 energy every tick, you now regenerate 1 energy every decisecond (ie every one tenth of a second).

This fix is needed, if someone needs a video (I don't know why) that prooves the new regen rate send me a pm.

Link to comment
Share on other sites

I noticed with new energy regen, talents like Adrenaline Rush, Vitality are still regenerating with old fashoned way

The core still does regeneration the old way, this only adds the regenerate flag for the clients. Really, for now, this only helps with DK runes not refreshing on their own for some DKs.

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

on your char sheet it's show like smooth regen(dunno for u but i am using xperl addon) but when u are in raid group.And when u are casting some spell and u have minimum mana for that spell u can't cast it u have to w8 1 sec or 2 to get enough mana to cast it.

Link to comment
Share on other sites

  • 2 weeks later...
This topic is now closed to further replies.
  • Create New...

Important Information

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