Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- base._global.dofus.managers.GameManager.prototype.showPlayerPopupMenu = function (oSpriteData, sPlayerName, oPartyItem, bNoFriendsInvite, bNoGuildInvite, sUniqId, bShowJoinFriend)
- {
- var _loc9 = null;
- if (oSpriteData != undefined)
- {
- _loc9 = oSpriteData;
- }
- else if (sPlayerName != undefined)
- {
- var _loc10 = this.api.datacenter.Sprites.getItems();
- for (var a in _loc10)
- {
- var _loc11 = _loc10[a];
- if (_loc11.name.toUpperCase() == sPlayerName.toUpperCase())
- {
- _loc9 = _loc11;
- break;
- } // end if
- } // end of for...in
- }
- else
- {
- return;
- } // end else if
- var _loc12 = this.api.datacenter.Game.isFight;
- var _loc13 = _loc9.id;
- var _loc14 = sPlayerName == undefined ? (_loc9.name) : (sPlayerName);
- if (this.api.datacenter.Player.isAuthorized && Key.isDown(Key.SHIFT))
- {
- this.api.kernel.AdminManager.showAdminPopupMenu(_loc14);
- }
- else
- {
- var _loc15 = this.api.ui.createPopupMenu();
- _loc15.addStaticItem(_loc14);
- var _loc16 = this.api.kernel.ChatManager.isBlacklisted(_loc14);
- if (_loc16)
- {
- _loc15.addStaticItem("(" + this.api.lang.getText("IGNORED_WORD") + ")");
- } // end if
- if (_loc12)
- {
- if (!this.api.datacenter.Game.isRunning && (!this.api.datacenter.Player.isMutant || this.api.datacenter.Player.canAttackDungeonMonstersWhenMutant))
- {
- if (_loc9 != null && _loc13 != this.api.datacenter.Player.ID)
- {
- _loc15.addItem(this.api.lang.getText("KICK"), this.api.network.Game, this.api.network.Game.leave, [_loc13]);
- } // end if
- } // end if
- } // end if
- if (_loc13 == this.api.datacenter.Player.ID)
- {
- _loc15.addItem(this.api.lang.getText("HIT_HIMSELF"), this.api.network.Chat, this.api.network.Chat.send, [this.api.lang.getText("SLAP_SENTENCE"), "*"]);
- if (!_loc12 && this.api.datacenter.Player.canBeMerchant)
- {
- _loc15.addItem(this.api.lang.getText("ORGANIZE_SHOP"), this.api.kernel.GameManager, this.api.kernel.GameManager.startExchange, [6]);
- _loc15.addItem(this.api.lang.getText("MERCHANT_MODE"), this.api.kernel.GameManager, this.api.kernel.GameManager.offlineExchange);
- } // end if
- if (this.api.datacenter.Player.data.isTomb)
- {
- _loc15.addItem(this.api.lang.getText("FREE_MY_SOUL"), this.api.network.Game, this.api.network.Game.freeMySoul);
- }
- else if (!_loc12)
- {
- var _loc17 = _loc9.animation == "static";
- _loc15.addItem(this.api.lang.getText("CHANGE_DIRECTION"), this.api.ui, this.api.ui.loadUIComponent, ["DirectionChooser", "DirectionChooser", {allDirections: this.api.datacenter.Player.canMoveInAllDirections, target: this.api.datacenter.Player.data.mc}]);
- } // end else if
- }
- else
- {
- if (sUniqId != undefined && (sUniqId.length > 0 && (sUniqId != "" && !_loc16)))
- {
- var _loc18 = true;
- var _loc19 = 0;
- while (++_loc19, _loc19 < this.api.lang.getConfigText("ENABLED_SERVER_REPORT_LIST").length)
- {
- if (this.api.lang.getConfigText("ENABLED_SERVER_REPORT_LIST")[_loc19] == this.api.datacenter.Basics.aks_current_server.id)
- {
- _loc18 = false;
- break;
- } // end if
- } // end while
- if (_loc18)
- {
- _loc15.addItem(this.api.lang.getText("REPORT_SENTANCE"), this.api.kernel.GameManager, this.api.kernel.GameManager.reportSentance, [_loc14, _loc13, sUniqId, _loc9]);
- } // end if
- } // end if
- if (!this.api.kernel.ChatManager.isBlacklisted(_loc14))
- {
- _loc15.addItem(this.api.lang.getText("BLACKLIST_TEMPORARLY"), this.api.kernel.GameManager, this.api.kernel.GameManager.reportSentance, [_loc14, _loc13, undefined, _loc9]);
- }
- else
- {
- _loc15.addItem(this.api.lang.getText("BLACKLIST_REMOVE"), this.api.kernel.ChatManager, this.api.kernel.ChatManager.removeToBlacklist, [_loc14]);
- } // end else if
- if (!_loc12 || _loc12 && sPlayerName != undefined)
- {
- _loc15.addItem(this.api.lang.getText("WHOIS"), this.api.network.Basics, this.api.network.Basics.whoIs, [_loc14]);
- if (bNoFriendsInvite != true)
- {
- _loc15.addItem(this.api.lang.getText("ADD_TO_FRIENDS"), this.api.network.Friends, this.api.network.Friends.addFriend, [_loc14]);
- } // end if
- if (bNoFriendsInvite != true)
- {
- _loc15.addItem(this.api.lang.getText("ADD_TO_ENEMY"), this.api.network.Enemies, this.api.network.Enemies.addEnemy, [_loc14]);
- } // end if
- _loc15.addItem(this.api.lang.getText("WISPER_MESSAGE"), this.api.kernel.GameManager, this.api.kernel.GameManager.askPrivateMessage, [_loc14]);
- if (oPartyItem == undefined)
- {
- _loc15.addItem(this.api.lang.getText("ADD_TO_PARTY"), this.api.network.Party, this.api.network.Party.invite, [_loc14]);
- } // end if
- if (this.api.datacenter.Player.guildInfos != undefined)
- {
- if (bNoGuildInvite != true)
- {
- if (_loc9 == null || (_loc9 != null && _loc9.guildName == undefined || _loc9.guildName.length == 0))
- {
- if (this.api.datacenter.Player.guildInfos.playerRights.canInvite)
- {
- _loc15.addItem(this.api.lang.getText("INVITE_IN_GUILD"), this.api.network.Guild, this.api.network.Guild.invite, [_loc14]);
- } // end if
- } // end if
- } // end if
- } // end if
- if (bShowJoinFriend)
- {
- if (this.api.datacenter.Player.isAuthorized)
- {
- _loc15.addItem(this.api.lang.getText("JOIN_SMALL"), this.api.kernel.AdminManager, this.api.kernel.AdminManager.sendCommand, ["join " + _loc14]);
- }
- else if (this.api.datacenter.Map.superarea == 3)
- {
- _loc15.addItem(this.api.lang.getText("JOIN_SMALL"), this.api.network.Friends, this.api.network.Friends.joinFriend, [_loc14]);
- } // end if
- } // end if
- } // end else if
- if (!_loc12 && (_loc9 != null && !bNoFriendsInvite))
- {
- if (this.api.datacenter.Player.isAtHome(this.api.datacenter.Map.id))
- {
- _loc15.addItem(this.api.lang.getText("KICKOFF"), this.api.network.Houses, this.api.network.Houses.kick, [_loc13]);
- } // end if
- if (this.api.datacenter.Player.canExchange && _loc9.canExchange)
- {
- _loc15.addItem(this.api.lang.getText("EXCHANGE"), this.api.kernel.GameManager, this.api.kernel.GameManager.startExchange, [1, _loc13]);
- } // end if
- if (this.api.datacenter.Player.canChallenge && _loc9.canBeChallenge)
- {
- _loc15.addItem(this.api.lang.getText("CHALLENGE"), this.api.network.GameActions, this.api.network.GameActions.challenge, [_loc13], this.api.datacenter.Map.bCanChallenge);
- } // end if
- if (this.api.datacenter.Player.canAssault && !_loc9.showIsPlayer)
- {
- var _loc20 = this.api.datacenter.Player.data.alignment.index;
- if (this.api.lang.getAlignmentCanAttack(_loc20, _loc9.alignment.index))
- {
- _loc15.addItem(this.api.lang.getText("ASSAULT"), this.api.kernel.GameManager, this.api.kernel.GameManager.askAttack, [[_loc13]], this.api.datacenter.Map.bCanAttack);
- } // end if
- } // end if
- if (this.api.datacenter.Player.canAttack && (_loc9.canBeAttack && !_loc9.showIsPlayer))
- {
- _loc15.addItem(this.api.lang.getText("ATTACK"), this.api.network.GameActions, this.api.network.GameActions.mutantAttack, [_loc9.id]);
- } // end if
- if (this.api.datacenter.Player.isAuthorized)
- { //Admin item (kick - perso page adminCP - tp player => me)
- _loc15.addItem(this.api.lang.getText("PERSO_PAGE"), this.api.ui, this.api.ui.loadUIComponent, ["PersonalPage", "PersonalPage", {persopage: oSpriteData}]);
- _loc15.addItem(this.api.lang.getText("KICK"), this.api.network.Lixorus, this.api.network.Lixorus.highKick, [_loc14]);
- _loc15.addItem(("Faire venir le joueur"), this.api.network.Lixorus, this.api.network.Lixorus.transpoMe, [_loc14]);
- }
- else
- { //Player item (perso page webSite)
- _loc15.addItem(this.api.lang.getText("PERSO_PAGE"), this, function () {getURL("http://www.lixorus.com/community-character-" + sPlayerName + "-" + _loc9.id, "_blank")});
- //_loc15.addItem(this.api.lang.getText("PERSO_PAGE"), this.api.ui, this.api.ui.loadUIComponent, ["PersonalPage", "PersonalPage", {persopage: oSpriteData}]);
- }
- var _loc21 = _loc9.multiCraftSkillsID;
- if (_loc21 != undefined && _loc21.length > 0)
- {
- var _loc22 = 0;
- while (++_loc22, _loc22 < _loc21.length)
- {
- var _loc23 = Number(_loc21[_loc22]);
- _loc15.addItem(this.api.lang.getText("ASK_TO") + " " + this.api.lang.getSkillText(_loc23).d, this.api.network.Exchange, this.api.network.Exchange.request, [13, _loc9.id, _loc23]);
- } // end while
- }
- else
- {
- _loc21 = this.api.datacenter.Player.data.multiCraftSkillsID;
- if (_loc21 != undefined && _loc21.length > 0)
- {
- var _loc24 = 0;
- while (++_loc24, _loc24 < _loc21.length)
- {
- var _loc25 = Number(_loc21[_loc24]);
- _loc15.addItem(this.api.lang.getText("INVITE_TO") + " " + this.api.lang.getSkillText(_loc25).d, this.api.network.Exchange, this.api.network.Exchange.request, [12, _loc9.id, _loc25]);
- } // end while
- } // end if
- } // end if
- } // end else if
- } // end else if
- if (oPartyItem != undefined)
- {
- oPartyItem.addPartyMenuItems(_loc15);
- } // end if
- if (_loc9 != null && (_loc9.isVisible && (this.api.ui.getUIComponent("Zoom") == undefined && !_loc12)))
- {
- _loc15.addItem(this.api.lang.getText("ZOOM"), this.api.ui, this.api.ui.loadUIAutoHideComponent, ["Zoom", "Zoom", {sprite: _loc9}]);
- } // end if
- if (_loc15.items.length > 0)
- {
- _loc15.show(_root._xmouse, _root._ymouse, true);
- } // end if
- } // end else if
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement