DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • May 19, 2013, 05:23:46 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: Multiple buffs cause SU flags to be reset.  (Read 799 times)
0 Members and 1 Guest are viewing this topic.
Afkamm
Mod God
*****
Offline Offline

Posts: 1563

MarcTheSlayer


View Profile WWW
« on: February 19, 2011, 08:31:11 AM »

By reset I mean default, what it was originally.

The function calculate_buff_fields() in buffs.php puts $session['user']['superuser'] into a defined constant and of course once it has been defined then that's it until the end of the script run.

If you have more than 1 buff, they wont all pass through this function one after the other. Instead I've noticed that other code (modules) will often run in between and here lies the problem.

If the constant is defined with the first buff and then a module is run, a module which alters the ['superuser'] value, and then another buff goes through the function, the ['superuser'] value will default back to what it was originally.

Is this constant to stop buffs altering the ['superuser'] value?

Could something like this do the same,
Code:
<?php
//
// Line: 41
//
if ($value != $origstring && $value != 'superuser'){

Smiley
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
28 Guests, 1 User
Talisman
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search