mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-13 16:34:23 -05:00
switchmods fixed session vars, saved to db in d2config class. Need to test d2s editor with modifyBit() function. need to fix app.js uniqueitems editor required fields on misc/weapons/armor
This commit is contained in:
@@ -77,4 +77,9 @@ function strtobits(string $str): string {
|
||||
|
||||
function swapEndianness($hex) {
|
||||
return implode('', array_reverse(str_split($hex, 2)));
|
||||
}
|
||||
|
||||
|
||||
function modifyBit(int $n, int $p, bool $b){
|
||||
return ($b ? ($n | (1 << $p)) : ($n & ~(1 << $p)) );
|
||||
}
|
Reference in New Issue
Block a user