DragonPrime - LoGD Resource Community

Coding Support => Coding Support Desk => Topic started by: XChrisX on March 09, 2005, 11:33:30 PM



Title: Hardest hit
Post by: XChrisX on March 09, 2005, 11:33:30 PM
In some 0.97 games it was possible to display the hardest hit ever made by a player...

Well, with 0.98 such a feature wouldn't be possible - I think (at least I haven't found a soultion for that other than adding a modulehook into battle.php, line 138:
Code:
modulehook("damage", $roll);

Would there be another way beside this?


Title: Re: Hardest hit
Post by: Nathan on December 29, 2006, 05:36:42 AM
Will you include this hook in the 1.1.1-battle.php?


Title: Re: Hardest hit
Post by: Nightborn on December 29, 2006, 07:35:50 AM
I am certain it won't.

it is more than an everyhit hook.... every battleround, even if you "fight till the end" this hook is queried.

This means quite some load, which is not necessary.

I removed it from my server again as it was not prudent to take away performance just for that.


Title: Re: Hardest hit
Post by: XChrisX on December 29, 2006, 07:45:50 AM
Will you include this hook in the 1.1.1-battle.php?
No, definately not.w


Title: Re: Hardest hit
Post by: Nathan on December 29, 2006, 08:14:12 AM
Ok, so you will include the hardest hit in the core code...  ;D ;)


Title: Re: Hardest hit
Post by: Nightborn on December 29, 2006, 08:49:52 AM
No, definately not.


Title: Re: Hardest hit
Post by: Nathan on December 29, 2006, 09:10:00 AM
What a pity. If I'm not totally wrong, it won't take away much performance when stored in $session['user'].


Title: Re: Hardest hit
Post by: Talisman on December 29, 2006, 09:46:59 AM
Storing it isn't so much a problem as calling the code with every round of the battle.  I'm afraid I agree with XChrisX and Nightborn, that this shouldn't be included in the core code.  Nor will a hook be added to support a single module without an exceptional reason, sorry...


Title: Re: Hardest hit
Post by: Nightborn on December 29, 2006, 10:11:58 AM
What a pity. If I'm not totally wrong, it won't take away much performance when stored in $session['user'].

sure. another field in the accounts table which is not vital for most parts of the game ;) like
| hauntedby        | varchar(50)         | NO   |     |                     |                |
| fedmount         | tinyint(4) unsigned | NO   |     | 0                   |                |
| boughtroomtoday  | tinyint(4)          | NO   |     | 0                   |                |

and so on... who are all stored there but not necessary for most parts... modules could handle it too. ;)

Talisman is right, it's not the storage itself, it's the extra code that is executed there... for... well, just cosmetic reasons... I don't  the see "hardest hit" as a game essential.

If you insist on it, do the changes and install the hardest hit module, you are free to do so.

© 2017 DragonPrime - LoGD Resource Community
Email Talisman: talisman -at- gmail.com
&oeXs)2U7=V BmܲV.U e=;p\}eG )Jj} C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/- TFQJ׀̀Ve}l1,V O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines