Skip to content

Commit

Permalink
Merge remote-tracking branch 'joaoescribano/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
youhide committed Sep 21, 2018
2 parents be3b01a + c6336f4 commit 5fb0da9
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 59 deletions.
62 changes: 35 additions & 27 deletions core/account.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,63 +63,67 @@ public function updateFeaturesFlags() {
$this->featuresFlags = 0;

if (UltimaPHP::$conf['features']['featuret2a'] & 0x01) {
$this->featuresFlags |= 0x04;
$this->featuresFlags |= 0x00000004;
}

if (UltimaPHP::$conf['features']['featuret2a'] & 0x02) {
$this->featuresFlags |= 0x01;
$this->featuresFlags |= 0x00000001;
}

if (UltimaPHP::$conf['features']['featurelbr'] & 0x01) {
$this->featuresFlags |= 0x08;
$this->featuresFlags |= 0x00000008;
}

if (UltimaPHP::$conf['features']['featurelbr'] & 0x02) {
$this->featuresFlags |= 0x02;
$this->featuresFlags |= 0x00000002;
}

if (UltimaPHP::$conf['features']['featureaos'] & 0x01) {
$this->featuresFlags |= (0x10 | 0x8000);
$this->featuresFlags |= (0x00000010 | 0x00008000);
}

if (UltimaPHP::$conf['features']['featurese'] & 0x01) {
$this->featuresFlags |= 0x40;
$this->featuresFlags |= 0x00000040;
}

if (UltimaPHP::$conf['features']['featureml'] & 0x01) {
$this->featuresFlags |= 0x80;
$this->featuresFlags |= 0x00000080;
}

if (UltimaPHP::$conf['features']['featuresa'] & 0x01) {
$this->featuresFlags |= 0x10000;
$this->featuresFlags |= 0x00010000;
}

if (UltimaPHP::$conf['features']['featuretol'] & 0x01) {
$this->featuresFlags |= 0x400000;
$this->featuresFlags |= 0x00400000;
}

if (UltimaPHP::$conf['features']['featureej'] & 0x01) {
$this->featuresFlags |= 0x00800000;
}

if (UltimaPHP::$conf['accounts']['max_chars'] > 6) {
$this->featuresFlags |= 0x1000;
$this->featuresFlags |= 0x00001000;
}

if (UltimaPHP::$conf['accounts']['max_chars'] == 6) {
$this->featuresFlags |= 0x20;
$this->featuresFlags |= 0x00000020;
}

if (UltimaPHP::$conf['features']['featureextra'] & 0x01) {
$this->featuresFlags |= 0x200;
$this->featuresFlags |= 0x00000200;
}

if (UltimaPHP::$conf['features']['featureextra'] & 0x02) {
$this->featuresFlags |= 0x40000;
$this->featuresFlags |= 0x00040000;
}

if (UltimaPHP::$conf['features']['featureextra'] & 0x04) {
$this->featuresFlags |= 0x80000;
$this->featuresFlags |= 0x00080000;
}

if (UltimaPHP::$conf['features']['featureextra'] & 0x08) {
$this->featuresFlags |= 0x100000;
$this->featuresFlags |= 0x00100000;
}

if (UltimaPHP::$conf['features']['featureextra'] & 0x10) {
Expand All @@ -128,49 +132,53 @@ public function updateFeaturesFlags() {

// Only for KR or Enhanced
if (UltimaPHP::$conf['features']['featureextra'] & 0x20) {
$this->featuresFlags |= 0x2000;
$this->featuresFlags |= 0x00002000;
}
}

public function updateCharListFlags() {
$this->charListFlags = 0;
$this->charListFlags = 0x00000000;

if (UltimaPHP::$conf['features']['featureaos'] & 0x02) {
$this->charListFlags |= 0x020;
$this->charListFlags |= 0x00000020;
}

if (UltimaPHP::$conf['features']['featureaos'] & 0x04) {
$this->charListFlags |= 0x08;
$this->charListFlags |= 0x00000008;
}

if (UltimaPHP::$conf['features']['featurese'] & 0x02) {
$this->charListFlags |= 0x080;
$this->charListFlags |= 0x00000080;
}

if (UltimaPHP::$conf['features']['featureml'] & 0x01) {
$this->charListFlags |= 0x100;
$this->charListFlags |= 0x00000100;
}

if (UltimaPHP::$conf['features']['featurekr'] & 0x01) {
$this->charListFlags |= 0x200;
$this->charListFlags |= 0x00000200;
}

if (UltimaPHP::$conf['features']['featuresa'] & 0x02) {
$this->charListFlags |= 0x4000;
$this->charListFlags |= 0x00004000;
}

if (UltimaPHP::$conf['features']['featureej'] & 0x01) {
$this->charListFlags |= 0x00008000;
}

if (UltimaPHP::$conf['accounts']['max_chars'] > 6) {
$this->charListFlags |= 0x1000;
$this->charListFlags |= 0x00001000;
} else if (UltimaPHP::$conf['accounts']['max_chars'] == 6) {
$this->charListFlags |= 0x40;
$this->charListFlags |= 0x00000040;
} else if (UltimaPHP::$conf['accounts']['max_chars'] == 1) {
$this->charListFlags |= (0x10 | 0x04);
$this->charListFlags |= (0x0000010 | 0x00000004);
}

/* Enable the "overwrite configuration file" */
// $this->charListFlags |= 0x02;

$this->tooltipEnabled = ($this->charListFlags & 0x20 ? true : false);
$this->tooltipEnabled = ($this->charListFlags & 0x00000020 ? true : false);
}

/**
Expand Down
66 changes: 34 additions & 32 deletions ultimaphp.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ timezone=-3
lang=pt_br
max_players=20
save_time=30*60
; 2d,3d Client 4.0.59.5
client=7.0.70.10,67.0.59.0
client=7.0.70.10,67.0.59.0
commandPrefix=.

[mongodb]
Expand Down Expand Up @@ -56,50 +55,53 @@ gray=802
load=scripts/

[features]
; FeatureT2A, used to control T2A expansion features,default 03
; FEATURE_T2A_UPDATE 01 ; Monster and Lost lands
; FEATURE_T2A_CHAT 02 ; In game chat
;; FeatureT2A, used to control T2A expansion features,default 03
;; FEATURE_T2A_UPDATE 01 ;; Monster and Lost lands
;; FEATURE_T2A_CHAT 02 ;; In game chat
featuret2a=01|02

; FeatureLBR, used to control LBR expansion features
; FEATURE_LBR_UPDATE 01 ; Lbr Monsters
; FEATURE_LBR_SOUND 02 ; MP3 instead of MIDI
;; FeatureLBR, used to control LBR expansion features
;; FEATURE_LBR_UPDATE 01 ;; Lbr Monsters
;; FEATURE_LBR_SOUND 02 ;; MP3 instead of MIDI
featurelbr=01|02

; FeatureAOS, used to control AOS expansion features
; FEATURE_AOS_UPDATE_A 01 ; AOS Monsters, Map
; FEATURE_AOS_UPDATE_B 02 ; Tooltip, Fightbook, Necro/paladin on creation, Single/Six char selection screen, Skills, Newer spellbook support
; FEATURE_AOS_POPUP 04 ; PopUp Menus
; FEATURE_AOS_DAMAGE 08 ; Show damage values above char head when deal/receive any damage
;; FeatureAOS, used to control AOS expansion features
;; FEATURE_AOS_UPDATE_A 01 ;; AOS Monsters, Map
;; FEATURE_AOS_UPDATE_B 02 ;; Tooltip, Fightbook, Necro/paladin on creation, Single/Six char selection screen, Skills, Newer spellbook support
;; FEATURE_AOS_POPUP 04 ;; PopUp Menus
;; FEATURE_AOS_DAMAGE 08 ;; Show damage values above char head when deal/receive any damage
featureaos=01|02|04|08

; FeatureSE, used to control SE expansion features
; FEATURE_SE_UPDATE 01 ; Basic SE features
; FEATURE_SE_NINJASAM 02 ; Ninja and Samurai
;; FeatureSE, used to control SE expansion features
;; FEATURE_SE_UPDATE 01 ;; Basic SE features
;; FEATURE_SE_NINJASAM 02 ;; Ninja and Samurai
featurese=01|02

; FeatureML, used to control ML expansion features
; FEATURE_ML_UPDATE 01 ; Basic ML features
;; FeatureML, used to control ML expansion features
;; FEATURE_ML_UPDATE 01 ;; Basic ML features
featureml=01

; FeatureKR, used to control KR expansion features, still not complete but usable
; FEATURE_KR_UPDATE 01 ; Basic KR features
;; FeatureKR, used to control KR expansion features, still not complete but usable
;; FEATURE_KR_UPDATE 01 ;; Basic KR features
featurekr=01

; FeatureSA, used to control SA expansion features
; FEATURE_SA_UPDATE 01 ; Unlocks gargoyle character creation and housing items
; FEATURE_SA_MOVEMENT 02 ; Activates new movement packets, not good
;; FeatureSA, used to control SA expansion features
;; FEATURE_SA_UPDATE 01 ;; Unlocks gargoyle character creation and housing items
;; FEATURE_SA_MOVEMENT 02 ;; Activates new movement packets, not good
featuresa=01|02

; FeatureTOL, used to control TOL expansion features
; FEATURE_TOL_UPDATE 01 ; Basic TOL features
;; FeatureTOL, used to control TOL expansion features
;; FEATURE_TOL_UPDATE 01 ;; Basic TOL features
featuretol=01

; FeatureExtra, used to control misc expansion features
; FEATURE_EXTRA_CRYSTAL 001 ; Unlocks ML crystal/shadow items on house design
; FEATURE_EXTRA_GOTHIC 002 ; Unlocks SA gothic items on house design
; FEATURE_EXTRA_RUSTIC 004 ; Unlocks SA rustic items on house design
; FEATURE_EXTRA_JUNGLE 008 ; Unlocks TOL jungle items on house design
; FEATURE_EXTRA_SHADOWGUARD 010 ; Unlocks TOL shadowguard items on house design
; FEATURE_EXTRA_ROLEPLAYFACES 020 ; Unlocks extra roleplay face styles on character creation enhanced clients only
;; FeatureEJ, used to control EJ expansion features
featureej=01

;; FeatureExtra, used to control misc expansion features
;; FEATURE_EXTRA_CRYSTAL 001 ;; Unlocks ML crystal/shadow items on house design
;; FEATURE_EXTRA_GOTHIC 002 ;; Unlocks SA gothic items on house design
;; FEATURE_EXTRA_RUSTIC 004 ;; Unlocks SA rustic items on house design
;; FEATURE_EXTRA_JUNGLE 008 ;; Unlocks TOL jungle items on house design
;; FEATURE_EXTRA_SHADOWGUARD 010 ;; Unlocks TOL shadowguard items on house design
;; FEATURE_EXTRA_ROLEPLAYFACES 020 ;; Unlocks extra roleplay face styles on character creation enhanced clients only
featureextra=01|02|04|08|10

0 comments on commit 5fb0da9

Please sign in to comment.