mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-21 09:37:50 -05:00
Brought up to date with the private repository (feea4c7)
This commit is contained in:
1 parent
1aa738d692
commit
1b1df1ae48
7925 files changed
+2617237
-20
No files matched your search
@@ -0,0 +1,249 @@
|
||||
package achievement
|
||||
{
|
||||
import flash.display.MovieClip;
|
||||
import flash.display.Sprite;
|
||||
import loader.MediaHelper;
|
||||
import localization.LocalizationManager;
|
||||
|
||||
public class Achievement
|
||||
{
|
||||
|
||||
public static var GEMS_EARNED:int = 1;
|
||||
|
||||
public static var GEMS_SPENT:int = 2;
|
||||
|
||||
public static var SHOP_DEN_ITEM:int = 3;
|
||||
|
||||
public static var SHOP_ACCESSORY:int = 4;
|
||||
|
||||
public static var MAIL_SEND:int = 38;
|
||||
|
||||
public static var MAIL_GIFT:int = 39;
|
||||
|
||||
public static var BUDDY_ADDED:int = 40;
|
||||
|
||||
public static var MEMBER_NEW:int = 66;
|
||||
|
||||
public static var BASE_MEDAL_ID:int = 289;
|
||||
|
||||
public static var BASE_RIBBON_ID:int = 290;
|
||||
|
||||
public static var BASE_TROPHY_ID:int = 291;
|
||||
|
||||
private var _invId:int;
|
||||
|
||||
private var _baseImageMediaId:int;
|
||||
|
||||
private var _iconMediaId:int;
|
||||
|
||||
private var _name:String;
|
||||
|
||||
private var _descr:String;
|
||||
|
||||
private var _mediaText:String;
|
||||
|
||||
private var _nameId:int;
|
||||
|
||||
private var _baseImage:Sprite;
|
||||
|
||||
private var _baseImageHelper:MediaHelper;
|
||||
|
||||
private var _icon:Sprite;
|
||||
|
||||
private var _iconHelper:MediaHelper;
|
||||
|
||||
private var _baseImageReceived:Boolean;
|
||||
|
||||
private var _iconReceived:Boolean;
|
||||
|
||||
private var _isMyAchievement:Boolean;
|
||||
|
||||
private var _scalePercent:Number = 1;
|
||||
|
||||
private var _xPos:Number = 0;
|
||||
|
||||
private var _yPos:Number = 0;
|
||||
|
||||
public function Achievement()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function init(initInvId:int, initBaseMediaId:int, initIconMediaId:int, initNameId:int, initMediaText:String = "", initIsMyAchievement:Boolean = false) : void
|
||||
{
|
||||
var splitMediaText:Array = null;
|
||||
this._invId = initInvId;
|
||||
this._baseImageMediaId = initBaseMediaId;
|
||||
this._iconMediaId = initIconMediaId;
|
||||
this._nameId = initNameId;
|
||||
this._name = LocalizationManager.translateIdOnly(initNameId);
|
||||
if(initMediaText == "")
|
||||
{
|
||||
this._mediaText = initMediaText;
|
||||
}
|
||||
else
|
||||
{
|
||||
splitMediaText = initMediaText.split(",");
|
||||
if(splitMediaText.length > 1)
|
||||
{
|
||||
this._mediaText = Utility.convertNumberToString(int(splitMediaText.join("")));
|
||||
}
|
||||
else
|
||||
{
|
||||
this._mediaText = initMediaText;
|
||||
}
|
||||
}
|
||||
this._isMyAchievement = initIsMyAchievement;
|
||||
this._baseImage = new Sprite();
|
||||
this._baseImageHelper = new MediaHelper();
|
||||
this._baseImageHelper.init(this._baseImageMediaId,this.baseImageReceived);
|
||||
this._icon = new Sprite();
|
||||
this._iconHelper = new MediaHelper();
|
||||
this._iconHelper.init(this._iconMediaId,this.iconReceived);
|
||||
}
|
||||
|
||||
public function destroy() : void
|
||||
{
|
||||
if(Boolean(this._iconHelper))
|
||||
{
|
||||
this._iconHelper.destroy();
|
||||
}
|
||||
if(Boolean(this._baseImageHelper))
|
||||
{
|
||||
this._baseImageHelper.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
public function clone() : Achievement
|
||||
{
|
||||
var a:Achievement = null;
|
||||
a = new Achievement();
|
||||
a.init(this._invId,this._baseImageMediaId,this._iconMediaId,this._nameId,this._mediaText,this._isMyAchievement);
|
||||
return a;
|
||||
}
|
||||
|
||||
public function setScale(scalePercent:Number) : void
|
||||
{
|
||||
this._scalePercent = scalePercent;
|
||||
if(this._iconReceived && this._baseImageReceived)
|
||||
{
|
||||
this._baseImage.scaleX = this._scalePercent;
|
||||
this._baseImage.scaleY = this._scalePercent;
|
||||
}
|
||||
}
|
||||
|
||||
public function setPosition(xPos:Number, yPos:Number) : void
|
||||
{
|
||||
this._xPos = xPos;
|
||||
this._yPos = yPos;
|
||||
if(this._iconReceived && this._baseImageReceived)
|
||||
{
|
||||
this._baseImage.x = -this._baseImage.width * this._xPos;
|
||||
this._baseImage.y = -this._baseImage.height * this._yPos;
|
||||
}
|
||||
}
|
||||
|
||||
private function baseImageReceived(img:MovieClip) : void
|
||||
{
|
||||
var width:Number = NaN;
|
||||
if(Boolean(img))
|
||||
{
|
||||
img = MovieClip(img.getChildAt(0));
|
||||
this._baseImage.addChild(img);
|
||||
if(this._iconReceived)
|
||||
{
|
||||
img.itemBlock.addChild(this._icon);
|
||||
this.allImagesLoaded();
|
||||
}
|
||||
if(this._mediaText == "")
|
||||
{
|
||||
img.num.visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
img.num.txt.text = this._mediaText;
|
||||
width = Number(img.num.txt.textWidth);
|
||||
if(width > 15)
|
||||
{
|
||||
if(width > 25)
|
||||
{
|
||||
img.num.gotoAndStop(3);
|
||||
}
|
||||
else
|
||||
{
|
||||
img.num.gotoAndStop(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
this._baseImageHelper.destroy();
|
||||
this._baseImageHelper = null;
|
||||
this._baseImageReceived = true;
|
||||
}
|
||||
}
|
||||
|
||||
private function iconReceived(img:MovieClip) : void
|
||||
{
|
||||
if(Boolean(img))
|
||||
{
|
||||
this._icon.addChild(img);
|
||||
if(this._baseImageReceived)
|
||||
{
|
||||
MovieClip(this._baseImage.getChildAt(0)).itemBlock.addChild(this._icon);
|
||||
this.allImagesLoaded();
|
||||
}
|
||||
this._iconHelper.destroy();
|
||||
this._iconHelper = null;
|
||||
this._iconReceived = true;
|
||||
}
|
||||
}
|
||||
|
||||
private function allImagesLoaded() : void
|
||||
{
|
||||
var scale:Number = 0.9;
|
||||
if(this._isMyAchievement)
|
||||
{
|
||||
scale = 1;
|
||||
}
|
||||
this._baseImage.scaleX = scale * this._scalePercent;
|
||||
this._baseImage.scaleY = scale * this._scalePercent;
|
||||
this._baseImage.x = -this._baseImage.width * this._xPos;
|
||||
this._baseImage.y = -this._baseImage.height * this._yPos;
|
||||
}
|
||||
|
||||
public function get invId() : int
|
||||
{
|
||||
return this._invId;
|
||||
}
|
||||
|
||||
public function get baseImageMediaId() : int
|
||||
{
|
||||
return this._baseImageMediaId;
|
||||
}
|
||||
|
||||
public function get iconMediaId() : int
|
||||
{
|
||||
return this._iconMediaId;
|
||||
}
|
||||
|
||||
public function get name() : String
|
||||
{
|
||||
return this._name;
|
||||
}
|
||||
|
||||
public function get descr() : String
|
||||
{
|
||||
return this._descr;
|
||||
}
|
||||
|
||||
public function get mediaText() : String
|
||||
{
|
||||
return this._mediaText;
|
||||
}
|
||||
|
||||
public function get image() : Sprite
|
||||
{
|
||||
return this._baseImage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
package achievement
|
||||
{
|
||||
import flash.display.DisplayObjectContainer;
|
||||
import flash.display.MovieClip;
|
||||
import flash.display.Sprite;
|
||||
import flash.events.MouseEvent;
|
||||
import flash.events.TimerEvent;
|
||||
import flash.utils.Timer;
|
||||
import loader.MediaHelper;
|
||||
import localization.LocalizationManager;
|
||||
|
||||
public class AchievementManager
|
||||
{
|
||||
|
||||
private static var _newAchievements:Array;
|
||||
|
||||
private static var _finishedCallbacks:Array;
|
||||
|
||||
private static var _popupMediaHelper:MediaHelper;
|
||||
|
||||
private static var _achievementPopup:MovieClip;
|
||||
|
||||
private static var _achievementImg:Sprite;
|
||||
|
||||
private static var _popupDisplayTimer:Timer;
|
||||
|
||||
private static var _popupDelayTimer:Timer;
|
||||
|
||||
private static var _state:int;
|
||||
|
||||
private static var _fpsLayer:DisplayObjectContainer;
|
||||
|
||||
private static const ACHIEVEMENT_POPUP_MEDIA_ID:int = 2721;
|
||||
|
||||
private static const STATE_IDLE:int = 0;
|
||||
|
||||
private static const STATE_DISPLAYING:int = 1;
|
||||
|
||||
public function AchievementManager()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public static function init(initFpsLayer:DisplayObjectContainer) : void
|
||||
{
|
||||
_fpsLayer = initFpsLayer;
|
||||
_finishedCallbacks = [];
|
||||
_newAchievements = [];
|
||||
_popupDisplayTimer = new Timer(3000);
|
||||
_popupDelayTimer = new Timer(500);
|
||||
_state = STATE_IDLE;
|
||||
}
|
||||
|
||||
public static function destroy() : void
|
||||
{
|
||||
_newAchievements.splice(0,_newAchievements.length);
|
||||
_newAchievements = null;
|
||||
_finishedCallbacks.splice(0,_finishedCallbacks.length);
|
||||
_finishedCallbacks = null;
|
||||
if(Boolean(_popupDisplayTimer))
|
||||
{
|
||||
_popupDisplayTimer.stop();
|
||||
_popupDisplayTimer = null;
|
||||
}
|
||||
if(Boolean(_popupDelayTimer))
|
||||
{
|
||||
_popupDelayTimer.stop();
|
||||
_popupDelayTimer = null;
|
||||
}
|
||||
}
|
||||
|
||||
public static function hasAchievement() : Boolean
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function displayNewAchievements(finishedCallback:Function = null) : void
|
||||
{
|
||||
if(finishedCallback != null)
|
||||
{
|
||||
if(_finishedCallbacks.indexOf(finishedCallback) < 0 && _newAchievements.length > 0)
|
||||
{
|
||||
_finishedCallbacks.push(finishedCallback);
|
||||
}
|
||||
else
|
||||
{
|
||||
finishedCallback();
|
||||
}
|
||||
}
|
||||
if(_state == STATE_IDLE && _newAchievements.length > 0)
|
||||
{
|
||||
_state = STATE_DISPLAYING;
|
||||
displayNextAchievement();
|
||||
}
|
||||
}
|
||||
|
||||
private static function finishedDisplayingNewAchievements() : void
|
||||
{
|
||||
var length:int = int(_finishedCallbacks.length);
|
||||
for(var i:int = 0; i < length; i++)
|
||||
{
|
||||
_finishedCallbacks[i]();
|
||||
}
|
||||
_finishedCallbacks.splice(0,_finishedCallbacks.length);
|
||||
}
|
||||
|
||||
private static function displayNextAchievement() : void
|
||||
{
|
||||
var a:Achievement = _newAchievements[0];
|
||||
_achievementImg = a.image;
|
||||
a.setScale(2);
|
||||
a.setPosition(0.5,0.5);
|
||||
if(Boolean(_achievementPopup))
|
||||
{
|
||||
_achievementPopup.achievementWindow.itemBlock.addChild(_achievementImg);
|
||||
LocalizationManager.updateToFit(_achievementPopup.achievementWindow.acmtNameTxt,a.name,false,false);
|
||||
_fpsLayer.addChild(_achievementPopup);
|
||||
_achievementPopup.gotoAndPlay(1);
|
||||
_achievementPopup.achievementWindow.gotoAndPlay(1);
|
||||
AJAudio.playAchievementSound();
|
||||
_popupDisplayTimer.start();
|
||||
_popupDisplayTimer.addEventListener("timer",onDisplayTimerFinished,false,0,true);
|
||||
}
|
||||
else
|
||||
{
|
||||
_popupMediaHelper = new MediaHelper();
|
||||
_popupMediaHelper.init(ACHIEVEMENT_POPUP_MEDIA_ID,popupHelperCallback);
|
||||
}
|
||||
}
|
||||
|
||||
private static function onDisplayTimerFinished(e:TimerEvent) : void
|
||||
{
|
||||
_popupDisplayTimer.stop();
|
||||
_fpsLayer.removeChild(_achievementPopup);
|
||||
_achievementPopup.achievementWindow.itemBlock.removeChild(_achievementImg);
|
||||
_newAchievements.splice(0,1);
|
||||
if(_newAchievements.length > 0)
|
||||
{
|
||||
_popupDelayTimer.start();
|
||||
_popupDelayTimer.addEventListener("timer",onDelayTimerFinished,false,0,true);
|
||||
}
|
||||
else
|
||||
{
|
||||
_state = STATE_IDLE;
|
||||
finishedDisplayingNewAchievements();
|
||||
}
|
||||
}
|
||||
|
||||
private static function onDelayTimerFinished(e:TimerEvent) : void
|
||||
{
|
||||
_popupDelayTimer.stop();
|
||||
displayNextAchievement();
|
||||
}
|
||||
|
||||
private static function popupHelperCallback(img:MovieClip) : void
|
||||
{
|
||||
if(Boolean(img))
|
||||
{
|
||||
_achievementPopup = new MovieClip();
|
||||
_achievementPopup = img;
|
||||
_achievementPopup.visible = true;
|
||||
_achievementPopup.addEventListener(MouseEvent.MOUSE_DOWN,onPopupDown,false,0,true);
|
||||
_popupMediaHelper.destroy();
|
||||
_popupMediaHelper = null;
|
||||
displayNextAchievement();
|
||||
}
|
||||
}
|
||||
|
||||
private static function onPopupDown(m:MouseEvent) : void
|
||||
{
|
||||
m.stopPropagation();
|
||||
}
|
||||
|
||||
public static function addAchievement(a:Achievement) : void
|
||||
{
|
||||
if(Boolean(a))
|
||||
{
|
||||
_newAchievements.push(a);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,261 @@
|
||||
package achievement
|
||||
{
|
||||
import avatar.UserInfo;
|
||||
import com.sbi.client.SFEvent;
|
||||
|
||||
public class AchievementXtCommManager
|
||||
{
|
||||
|
||||
private static var _zaCallback:Function;
|
||||
|
||||
private static var _inMinigame:Function;
|
||||
|
||||
private static var _onUserVarsReceived:Function;
|
||||
|
||||
private static var _setGemBonusValues:Function;
|
||||
|
||||
private static var _bMyUserVarsReceived:Boolean;
|
||||
|
||||
private static var _zsCallbacks:Object;
|
||||
|
||||
public static const UV_JAMAA_JOURNAL_TIMESTAMP:int = 112;
|
||||
|
||||
public static const UV_JAMAA_JOURNAL_TIMESTAMP_STARTUP:int = 158;
|
||||
|
||||
public static const UV_BRADY_BARR_COUNT:int = 128;
|
||||
|
||||
public static const UV_TRADING:int = 129;
|
||||
|
||||
public static const UV_PET_COUNTER:int = 212;
|
||||
|
||||
public static const UV_DAILY_GEM_BONUS:int = 214;
|
||||
|
||||
public static const UV_AVT_VIEWABLE_FLAG:int = 287;
|
||||
|
||||
public static const UV_TIERNEY_THYS_COUNT:int = 297;
|
||||
|
||||
public static const UV_PET_INVENTORY_MAX:int = 338;
|
||||
|
||||
public static const UV_PET_VIEWABLE_FLAG:int = 342;
|
||||
|
||||
public static const UV_SETTINGS:int = 363;
|
||||
|
||||
public static const UV_PARTY_JB_ENTER:int = 366;
|
||||
|
||||
public static const UV_PARTY_JB_ENTER_BIT_ARRAY:Array = [27];
|
||||
|
||||
public static const UV_TUTORIALS:int = 379;
|
||||
|
||||
public static const ACHIEVEMENT_REQUEST_INTERVAL:int = 10000;
|
||||
|
||||
public function AchievementXtCommManager()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public static function init(inMingame:Function, onUserVarsReceived:Function, setGemBonusValues:Function) : void
|
||||
{
|
||||
_inMinigame = inMingame;
|
||||
_onUserVarsReceived = onUserVarsReceived;
|
||||
_setGemBonusValues = setGemBonusValues;
|
||||
_zsCallbacks = new Object();
|
||||
}
|
||||
|
||||
public static function destroy() : void
|
||||
{
|
||||
_zsCallbacks = null;
|
||||
}
|
||||
|
||||
public static function requestAchievements(userName:String, callback:Function = null) : void
|
||||
{
|
||||
var milliSecSinceLastRequestForThisUser:Number = NaN;
|
||||
var now:Number = NaN;
|
||||
var ui:UserInfo = gMainFrame.userInfo.getUserInfoByUserName(userName);
|
||||
if(Boolean(ui))
|
||||
{
|
||||
milliSecSinceLastRequestForThisUser = ui.getTimeOfLastAchievementRequest();
|
||||
now = new Date().getTime();
|
||||
if(now - milliSecSinceLastRequestForThisUser > ACHIEVEMENT_REQUEST_INTERVAL)
|
||||
{
|
||||
_zaCallback = callback;
|
||||
ui.setTimeOfLastAchievementRequest(now);
|
||||
if(milliSecSinceLastRequestForThisUser == 0)
|
||||
{
|
||||
gMainFrame.server.setXtObject_Str("za",[userName,-1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
gMainFrame.server.setXtObject_Str("za",[userName,int((now - milliSecSinceLastRequestForThisUser) / 1000)]);
|
||||
}
|
||||
}
|
||||
else if(callback != null)
|
||||
{
|
||||
callback(ui.achievements);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static function requestSetUserVar(userVarId:int, setValue:int, callback:Function = null, bitState:Boolean = true) : void
|
||||
{
|
||||
if(!gMainFrame.clientInfo.invisMode)
|
||||
{
|
||||
if(userVarId <= 0)
|
||||
{
|
||||
trace("ERROR: Illegal userVarId=" + userVarId);
|
||||
return;
|
||||
}
|
||||
if(callback != null)
|
||||
{
|
||||
_zsCallbacks[userVarId] = {
|
||||
"uv":userVarId,
|
||||
"c":callback
|
||||
};
|
||||
}
|
||||
gMainFrame.server.setXtObject_Str("zs",[userVarId,setValue,bitState ? 1 : 0]);
|
||||
}
|
||||
}
|
||||
|
||||
public static function requestAllUserVars() : void
|
||||
{
|
||||
gMainFrame.server.setXtObject_Str("zg",[]);
|
||||
}
|
||||
|
||||
public static function requestDeleteAllAchievementsAndUserVars() : void
|
||||
{
|
||||
gMainFrame.server.setXtObject_Str("zd",[]);
|
||||
}
|
||||
|
||||
public static function handleXtReply(evt:SFEvent) : void
|
||||
{
|
||||
var data:Object = evt.obj;
|
||||
switch(data[0])
|
||||
{
|
||||
case "za":
|
||||
getAchievementsResponse(data);
|
||||
break;
|
||||
case "zs":
|
||||
setUserVarResponse(data);
|
||||
break;
|
||||
case "zg":
|
||||
getUserVarsResponse(data);
|
||||
break;
|
||||
default:
|
||||
throw new Error("Did not expect ext cmd=" + data[0]);
|
||||
}
|
||||
}
|
||||
|
||||
private static function setUserVarResponse(data:Object) : void
|
||||
{
|
||||
var userVarDefId:int = 0;
|
||||
var shouldRequestAchievements:Boolean = false;
|
||||
var newAchievements:Array = null;
|
||||
var value:int = 0;
|
||||
var a:Achievement = null;
|
||||
var j:int = 2;
|
||||
var numUserVars:int = 1;
|
||||
for(var i:int = 0; i < numUserVars; i++)
|
||||
{
|
||||
userVarDefId = int(data[j++]);
|
||||
value = int(data[j++]);
|
||||
gMainFrame.userInfo.userVarCache.updateUserVar(userVarDefId,value);
|
||||
if(userVarDefId == UV_DAILY_GEM_BONUS)
|
||||
{
|
||||
_setGemBonusValues(value);
|
||||
}
|
||||
}
|
||||
var numAchievementsTriggered:int = int(data[j++]);
|
||||
if(numAchievementsTriggered > 0)
|
||||
{
|
||||
newAchievements = [];
|
||||
if(!gMainFrame.userInfo.playerUserInfo.achievements)
|
||||
{
|
||||
shouldRequestAchievements = true;
|
||||
}
|
||||
for(i = 0; i < numAchievementsTriggered; i++)
|
||||
{
|
||||
a = new Achievement();
|
||||
a.init(int(data[j++]),int(data[j++]),int(data[j++]),int(data[j++]),data[j++],true);
|
||||
newAchievements.unshift(a);
|
||||
AchievementManager.addAchievement(a.clone());
|
||||
}
|
||||
}
|
||||
if(shouldRequestAchievements)
|
||||
{
|
||||
requestAchievements(gMainFrame.userInfo.playerUserInfo.userName);
|
||||
}
|
||||
else if(Boolean(newAchievements))
|
||||
{
|
||||
for(i = 0; i < numAchievementsTriggered; i++)
|
||||
{
|
||||
gMainFrame.userInfo.playerUserInfo.achievements.unshift(newAchievements[i]);
|
||||
}
|
||||
}
|
||||
if(!_inMinigame())
|
||||
{
|
||||
AchievementManager.displayNewAchievements();
|
||||
}
|
||||
var callbackObj:Object = _zsCallbacks[userVarDefId];
|
||||
if(Boolean(callbackObj))
|
||||
{
|
||||
callbackObj.c(userVarDefId,value);
|
||||
}
|
||||
}
|
||||
|
||||
private static function getUserVarsResponse(data:Object) : void
|
||||
{
|
||||
var j:int = 2;
|
||||
var numUserVars:int = int(data[j++]);
|
||||
var userVars:Object = new Object();
|
||||
for(var i:int = 0; i < numUserVars; i++)
|
||||
{
|
||||
userVars[int(data[j++])] = {
|
||||
"type":int(data[j++]),
|
||||
"value":int(data[j++])
|
||||
};
|
||||
}
|
||||
gMainFrame.userInfo.userVarCache.playerUserVars = userVars;
|
||||
if(!_bMyUserVarsReceived)
|
||||
{
|
||||
_onUserVarsReceived();
|
||||
}
|
||||
}
|
||||
|
||||
private static function getAchievementsResponse(data:Object) : void
|
||||
{
|
||||
var aList:Array = null;
|
||||
var i:int = 0;
|
||||
var a:Achievement = null;
|
||||
var j:int = 2;
|
||||
var userName:String = data[j++];
|
||||
var numAchievements:int = int(data[j++]);
|
||||
var ui:UserInfo = gMainFrame.userInfo.getUserInfoByUserName(userName);
|
||||
if(numAchievements > 0)
|
||||
{
|
||||
aList = new Array(numAchievements);
|
||||
for(i = 0; i < numAchievements; i++)
|
||||
{
|
||||
a = new Achievement();
|
||||
a.init(int(data[j++]),int(data[j++]),int(data[j++]),int(data[j++]),data[j++],userName == gMainFrame.userInfo.playerUserInfo.userName);
|
||||
aList[i] = a;
|
||||
}
|
||||
aList.sortOn("invId",Array.NUMERIC | Array.DESCENDING);
|
||||
if(Boolean(ui))
|
||||
{
|
||||
ui.addAchievementsTolist(aList);
|
||||
}
|
||||
}
|
||||
if(_zaCallback != null)
|
||||
{
|
||||
if(userName == gMainFrame.userInfo.myUserName)
|
||||
{
|
||||
_zaCallback(Boolean(ui) ? ui.achievements : null);
|
||||
}
|
||||
else
|
||||
{
|
||||
_zaCallback(Boolean(ui) ? ui.achievements : null,numAchievements == -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user