Instantly share code, notes, and snippets.
Created
February 27, 2020 12:16
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save theultramage/bfc6f3a4124101a828242d67b2634345 to your computer and use it in GitHub Desktop.
All relevant code differences between Gemcraft Labyrinth v1.22 GS and v1.23 GS premium free
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -u -r v1.22 GS/scripts/com/giab/games/gcl/gs/ctrl/CtrlMainMenu.as v1.23 GS free/scripts/com/giab/games/gcl/gs/ctrl/CtrlMainMenu.as | |
--- v1.22 GS/scripts/com/giab/games/gcl/gs/ctrl/CtrlMainMenu.as 2020-02-27 12:53:26.712763200 +0100 | |
+++ v1.23 GS free/scripts/com/giab/games/gcl/gs/ctrl/CtrlMainMenu.as 2020-02-27 12:49:50.447801000 +0100 | |
@@ -12,7 +12,6 @@ | |
import flash.filters.GlowFilter; | |
import flash.net.URLRequest; | |
import flash.net.navigateToURL; | |
- import gamersafe.GamerSafe; | |
public class CtrlMainMenu | |
{ | |
@@ -226,10 +225,6 @@ | |
public function initiate() : void | |
{ | |
- if(this.main.gamerSafe == null) | |
- { | |
- this.main.gamerSafe = new GamerSafe(this.main); | |
- } | |
this.main.timeUntilCheckPremium = 20; | |
this.main.timeUntilLoad = 20; | |
this.screenStatus = ScreenStatus.APPEARING; | |
@@ -262,7 +257,6 @@ | |
this.screenStep++; | |
if(this.screenStep == 1) | |
{ | |
- this.main.gamerSafe.showStatusBar(); | |
} | |
this.mc.mcTitle.y = EasingStrong.easeOut(this.screenStep,30 - 430,430,14); | |
this.mc.btnStartGame.y = EasingStrong.easeOut(this.screenStep - 0,760,-312,11); | |
@@ -286,7 +280,6 @@ | |
this.screenStep++; | |
if(this.screenStep == 1) | |
{ | |
- this.main.gamerSafe.showStatusBar(); | |
} | |
this.mc.mcTitle.y = EasingStrong.easeIn(this.screenStep,30,-430,14); | |
this.mc.btnStartGame.y = EasingStrong.easeIn(this.screenStep - 0,760 - 312,312,11); | |
@@ -301,9 +294,8 @@ | |
this.mc.mcBottomTexts.y = EasingStrong.easeIn(this.screenStep,580,300,8); | |
if(this.screenStep > 16) | |
{ | |
- this.main.gamerSafe.hideStatusBar(); | |
this.screenStep = 0; | |
- this.screenStatus == ScreenStatus.IDLE; | |
+ this.screenStatus = ScreenStatus.IDLE; | |
this.main.switchScreenVisibility(); | |
} | |
} | |
diff -u -r v1.22 GS/scripts/com/giab/games/gcl/gs/ctrl/CtrlStorage.as v1.23 GS free/scripts/com/giab/games/gcl/gs/ctrl/CtrlStorage.as | |
--- v1.22 GS/scripts/com/giab/games/gcl/gs/ctrl/CtrlStorage.as 2020-02-27 12:53:27.146318200 +0100 | |
+++ v1.23 GS free/scripts/com/giab/games/gcl/gs/ctrl/CtrlStorage.as 2020-02-27 12:49:50.323285200 +0100 | |
@@ -19,7 +19,6 @@ | |
import flash.system.Security; | |
import flash.system.SecurityPanel; | |
import flash.text.TextFieldAutoSize; | |
- import gamersafe.GamerSafeConstants; | |
public class CtrlStorage | |
{ | |
@@ -552,80 +551,19 @@ | |
public function submitScore() : void | |
{ | |
- this.main.gamerSafe.showScoreSubmit(uint(1 + this.main.calculator.calculateLevelFromXp(this.main.player.getXp())),""); | |
} | |
public function buyPremiumEdition() : void | |
{ | |
- if(this.main.gamerSafe.loggedIn != true) | |
- { | |
- this.main.wantsToPurchaseAfterlogin = true; | |
- this.main.gamerSafe.showLogin(); | |
- } | |
- else | |
- { | |
- if(this.main.premiumStatus != PremiumStatus.BASIC) | |
- { | |
- return; | |
- } | |
- this.main.gamerSafe.purchaseItemInterface(GamerSafeConstants.ITEM_PREMIUM_EDITION); | |
- } | |
} | |
public function checkPremium() : void | |
{ | |
- if(this.main.currentScreen != ScreenId.MAINMENU) | |
- { | |
- this.main.timeUntilCheckPremium = -1; | |
- } | |
- var _loc1_:String = PremiumStatus.BASIC; | |
- if(this.main.gamerSafe.loggedIn) | |
- { | |
- if(this.main.gamerSafe.hasItem(GamerSafeConstants.ITEM_PREMIUM_EDITION)) | |
- { | |
- _loc1_ = PremiumStatus.PREMIUM; | |
- } | |
- } | |
- if(_loc1_ != this.main.premiumStatus) | |
- { | |
- if(_loc1_ == PremiumStatus.BASIC) | |
- { | |
- this.setPremiumStatus(0); | |
- } | |
- else | |
- { | |
- this.setPremiumStatus(2); | |
- } | |
- } | |
} | |
public function setPremiumStatus(param1:Number) : void | |
{ | |
- if(param1 == 2) | |
- { | |
- this.main.premiumStatus = PremiumStatus.PREMIUM; | |
- this.main.sndPremiumEdition.play(); | |
- if(this.waitingForServerType == WAITINGFORSERVER_PREMIUM) | |
- { | |
- this.showStorageStatusPanel(PNL_PURCHASE_OUTCOME_SUCCESS); | |
- } | |
- } | |
- else if(param1 == 1) | |
- { | |
- this.main.premiumStatus = PremiumStatus.PENDING; | |
- if(this.waitingForServerType == WAITINGFORSERVER_PREMIUM) | |
- { | |
- this.showStorageStatusPanel(PNL_PURCHASE_OUTCOME_PENDING); | |
- } | |
- } | |
- else | |
- { | |
- this.main.premiumStatus = PremiumStatus.BASIC; | |
- if(this.waitingForServerType == WAITINGFORSERVER_PREMIUM) | |
- { | |
- this.showStorageStatusPanel(PNL_PURCHASE_OUTCOME_FAILED); | |
- } | |
- } | |
+ this.main.premiumStatus = PremiumStatus.PREMIUM; | |
this.setPremiumMarkerVisibility(); | |
if(this.main.currentScreen == ScreenId.SELECTOR) | |
{ | |
@@ -728,79 +666,8 @@ | |
public function loadSlotsFromServer() : void | |
{ | |
- var vArr:Array = null; | |
- var vErrorCaught:Boolean = false; | |
- var vPlayer:Player = null; | |
- if(this.main.gamerSafe.loggedIn != true) | |
- { | |
- this.loadedSlotsServer = [null,null,null]; | |
- this.loadResultsServer = [LOADRESULT_SERVER_NOTLOGGEDIN,LOADRESULT_SERVER_NOTLOGGEDIN,LOADRESULT_SERVER_NOTLOGGEDIN]; | |
- } | |
- else | |
- { | |
- this.main.loadedSlotStrings = ["","",""]; | |
- vArr = this.main.gamerSafe.savedGame.split(","); | |
- this.main.loadedSlotStrings[0] = vArr[0] == null?"":vArr[0]; | |
- this.main.loadedSlotStrings[1] = vArr[1] == null?"":vArr[1]; | |
- this.main.loadedSlotStrings[2] = vArr[2] == null?"":vArr[2]; | |
- vErrorCaught = false; | |
- vPlayer = new Player(); | |
- try | |
- { | |
- vPlayer.populateFromString(this.main.loadedSlotStrings[0]); | |
- } | |
- catch(vE:Error) | |
- { | |
- vErrorCaught = true; | |
- } | |
- if(vErrorCaught) | |
- { | |
- this.loadResultsServer[0] = LOADRESULT_SERVER_ERROR; | |
- } | |
- else | |
- { | |
- this.loadedSlotsServer[0] = vPlayer; | |
- this.loadResultsServer[0] = LOADRESULT_SERVER_OK; | |
- } | |
- vErrorCaught = false; | |
- vPlayer = new Player(); | |
- try | |
- { | |
- vPlayer.populateFromString(this.main.loadedSlotStrings[1]); | |
- } | |
- catch(vE:Error) | |
- { | |
- vErrorCaught = true; | |
- } | |
- if(vErrorCaught) | |
- { | |
- this.loadResultsServer[1] = LOADRESULT_SERVER_ERROR; | |
- } | |
- else | |
- { | |
- this.loadedSlotsServer[1] = vPlayer; | |
- this.loadResultsServer[1] = LOADRESULT_SERVER_OK; | |
- } | |
- vErrorCaught = false; | |
- vPlayer = new Player(); | |
- try | |
- { | |
- vPlayer.populateFromString(this.main.loadedSlotStrings[2]); | |
- } | |
- catch(vE:Error) | |
- { | |
- vErrorCaught = true; | |
- } | |
- if(vErrorCaught) | |
- { | |
- this.loadResultsServer[2] = LOADRESULT_SERVER_ERROR; | |
- } | |
- else | |
- { | |
- this.loadedSlotsServer[2] = vPlayer; | |
- this.loadResultsServer[2] = LOADRESULT_SERVER_OK; | |
- } | |
- } | |
+ this.loadedSlotsServer = [null,null,null]; | |
+ this.loadResultsServer = [LOADRESULT_SERVER_NOTLOGGEDIN,LOADRESULT_SERVER_NOTLOGGEDIN,LOADRESULT_SERVER_NOTLOGGEDIN]; | |
} | |
public function syncLoadedSlots() : void | |
@@ -1264,16 +1131,8 @@ | |
public function saveSlotToServer() : void | |
{ | |
- if(this.main.gamerSafe.loggedIn != true) | |
- { | |
- this.saveResultServer = SAVERESULT_SERVER_NOTLOGGEDIN; | |
- this.finalizeSaveSlot(); | |
- } | |
- else | |
- { | |
- this.main.loadedSlotStrings[this.activeSlotNum] = this.playerCloneToSave.toString(); | |
- this.main.gamerSafe.setSavedGame(this.main.loadedSlotStrings[0] + "," + this.main.loadedSlotStrings[1] + "," + this.main.loadedSlotStrings[2]); | |
- } | |
+ this.saveResultServer = SAVERESULT_SERVER_NOTLOGGEDIN; | |
+ this.finalizeSaveSlot(); | |
} | |
public function callbackSaveSlotToServer(param1:Object) : void | |
diff -u -r v1.22 GS/scripts/com/giab/games/gcl/gs/ingame/IngameEnding.as v1.23 GS free/scripts/com/giab/games/gcl/gs/ingame/IngameEnding.as | |
--- v1.22 GS/scripts/com/giab/games/gcl/gs/ingame/IngameEnding.as 2020-02-27 12:53:31.122823200 +0100 | |
+++ v1.23 GS free/scripts/com/giab/games/gcl/gs/ingame/IngameEnding.as 2020-02-27 12:49:54.707842000 +0100 | |
@@ -26,7 +26,6 @@ | |
import flash.events.KeyboardEvent; | |
import flash.events.MouseEvent; | |
import flash.filters.DropShadowFilter; | |
- import gamersafe.GamerSafeConstants; | |
public class IngameEnding | |
{ | |
@@ -619,34 +618,6 @@ | |
_loc11_.tutorPanelStatuses[TutorialId.REPLAYING_STAGES] = true; | |
} | |
this.core.main.ctrlStorage.saveGameData(); | |
- if(_loc11_.careerBadges[BadgeIdCareer.WIN_20_BATTLES]) | |
- { | |
- this.core.main.gamerSafe.bestowAchievement(GamerSafeConstants.ACHIEVEMENT_NO_TURNING_BACK_NOW); | |
- } | |
- if(_loc11_.careerBadges[BadgeIdCareer.BEAT_EPIC_STAGE_1]) | |
- { | |
- this.core.main.gamerSafe.bestowAchievement(GamerSafeConstants.ACHIEVEMENT_WHOS_THERE); | |
- } | |
- if(_loc11_.careerBadges[BadgeIdCareer.BEAT_FINAL_STAGE]) | |
- { | |
- this.core.main.gamerSafe.bestowAchievement(GamerSafeConstants.ACHIEVEMENT_CRAFTED_AGAIN); | |
- } | |
- if(_loc11_.careerBadges[BadgeIdCareer.BEAT_WAVE_30_ON_ANY_STAGE]) | |
- { | |
- this.core.main.gamerSafe.bestowAchievement(GamerSafeConstants.ACHIEVEMENT_KEEP_THE_WAVES_COMING); | |
- } | |
- if(_loc11_.careerBadges[BadgeIdCareer.SPEND_3K_MANA_ON_GEMS_POISON]) | |
- { | |
- this.core.main.gamerSafe.bestowAchievement(GamerSafeConstants.ACHIEVEMENT_VENOM); | |
- } | |
- if(_loc11_.careerBadges[BadgeIdCareer.KILL_12_APPARITIONS]) | |
- { | |
- this.core.main.gamerSafe.bestowAchievement(GamerSafeConstants.ACHIEVEMENT_SLAY_THE_SPIRITS); | |
- } | |
- if(_loc11_.careerBadges[BadgeIdCareer.HARVEST_8K_MANA_FROM_SHARDS]) | |
- { | |
- this.core.main.gamerSafe.bestowAchievement(GamerSafeConstants.ACHIEVEMENT_THE_GATHERING); | |
- } | |
} | |
public function renderOutcomeVictoryFinalState() : void | |
diff -u -r v1.22 GS/scripts/com/giab/games/gcl/gs/Main.as v1.23 GS free/scripts/com/giab/games/gcl/gs/Main.as | |
--- v1.22 GS/scripts/com/giab/games/gcl/gs/Main.as 2020-02-27 12:53:44.045964200 +0100 | |
+++ v1.23 GS free/scripts/com/giab/games/gcl/gs/Main.as 2020-02-27 12:50:01.141659000 +0100 | |
@@ -1,6 +1,5 @@ | |
package com.giab.games.gcl.gs | |
{ | |
- import Playtomic.Log; | |
import com.giab.common.abstract.MovieClipExt; | |
import com.giab.common.abstract.SpriteExt; | |
import com.giab.common.easing.EasingBack; | |
@@ -165,7 +164,6 @@ | |
import flash.ui.ContextMenu; | |
import flash.ui.ContextMenuItem; | |
import flash.utils.getTimer; | |
- import gamersafe.GamerSafe; | |
public class Main extends MovieClipExt | |
{ | |
@@ -507,8 +505,6 @@ | |
public var wantsToSubmitScoreAfterlogin:Boolean; | |
- public var gamerSafe:GamerSafe; | |
- | |
public var loadedSlotStrings:Array; | |
public function Main() | |
@@ -566,7 +562,6 @@ | |
this.startTime = getTimer(); | |
this.isLoaded = false; | |
this.addChild(this.mcPreloader); | |
- Log.View(2034,"2a26cf1955044a85",root.loaderInfo.loaderURL); | |
} | |
public function ioErrorHandler(param1:Event) : void | |
@@ -758,6 +753,7 @@ | |
this.ctrlStorage.setPremiumMarkerVisibility(); | |
this.tabEnabled = false; | |
this.tabChildren = false; | |
+ this.ctrlStorage.setPremiumStatus(2); | |
} | |
public function ehStartupKeyDown(param1:KeyboardEvent) : void | |
@@ -777,14 +773,6 @@ | |
if(this.timeUntilSubmitScore < 1) | |
{ | |
this.timeUntilSubmitScore = -1; | |
- if(this.gamerSafe.loggedIn) | |
- { | |
- this.ctrlStorage.submitScore(); | |
- } | |
- else | |
- { | |
- this.timeUntilSubmitScore = 20; | |
- } | |
} | |
} | |
if(this.timeUntilLoad > 0) | |
@@ -811,17 +799,6 @@ | |
if(this.timeUntilPurchaseStart < 1) | |
{ | |
this.timeUntilPurchaseStart = -1; | |
- if(this.gamerSafe.loggedIn) | |
- { | |
- if(this.premiumStatus == PremiumStatus.BASIC) | |
- { | |
- this.ctrlStorage.buyPremiumEdition(); | |
- } | |
- } | |
- else | |
- { | |
- this.timeUntilPurchaseStart = 20; | |
- } | |
} | |
} | |
if(this.cntInfoPanel.numChildren > 0) | |
diff -u -r v1.22 GS/scripts/com/giab/games/gcl/gs/selector/SelectorCore.as v1.23 GS free/scripts/com/giab/games/gcl/gs/selector/SelectorCore.as | |
--- v1.22 GS/scripts/com/giab/games/gcl/gs/selector/SelectorCore.as 2020-02-27 12:53:37.676155400 +0100 | |
+++ v1.23 GS free/scripts/com/giab/games/gcl/gs/selector/SelectorCore.as 2020-02-27 12:49:57.827738200 +0100 | |
@@ -292,7 +292,6 @@ | |
this.screenStep++; | |
if(this.screenStep == 2) | |
{ | |
- this.main.gamerSafe.showStatusBar(); | |
} | |
if(this.screenStep < 15) | |
{ | |
@@ -345,7 +344,6 @@ | |
this.screenStep++; | |
if(this.screenStep == 2) | |
{ | |
- this.main.gamerSafe.hideStatusBar(); | |
} | |
if(this.screenStep < 15) | |
{ | |
@@ -530,7 +528,6 @@ | |
private function doEnterFrameSkillsToIngame() : void | |
{ | |
- this.main.gamerSafe.hideStatusBar(); | |
this.main.nextScreen = ScreenId.INGAME; | |
this.main.switchScreenVisibility(); | |
this.main.cntScreens.mcPreparingScene.tf.text = "Entering field " + this.controller.getStageLabel(this.selectedStage.id) + "..."; | |
Only in v1.22 GS/scripts: gamersafe | |
Only in v1.22 GS/scripts: Playtomic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment