Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

47 linhas
1.4 KiB

  1. define([
  2. ], function (
  3. ) {
  4. return {
  5. allowedCpn: function (msg) {
  6. var allowed = {
  7. player: ['performAction', 'queueAction', 'move'],
  8. auth: ['login', 'register', 'play', 'getCharacterList', 'getCharacter', 'deleteCharacter', 'getSkins', 'createCharacter', 'getCustomChannels'],
  9. social: ['chat', 'getInvite', 'acceptInvite', 'declineInvite', 'removeFromParty', 'leaveParty']
  10. };
  11. var valid = ((allowed[msg.cpn]) && (allowed[msg.cpn].indexOf(msg.method) > -1));
  12. if (!valid)
  13. return false;
  14. if (!msg.data.cpn)
  15. return true;
  16. var secondaryAllowed = {
  17. dialogue: ['talk'],
  18. gatherer: ['gather'],
  19. quests: ['complete'],
  20. inventory: ['combineStacks', 'splitStack', 'activateMtx', 'useItem', 'moveItem', 'enchantItem', 'getEnchantMaterials', 'learnAbility', 'unlearnAbility', 'dropItem', 'destroyItem', 'salvageItem', 'stashItem', 'mailItem'],
  21. equipment: ['equip', 'unequip'],
  22. stash: ['withdraw'],
  23. trade: ['buySell'],
  24. door: ['lock', 'unlock'],
  25. wardrobe: ['open', 'apply']
  26. };
  27. return ((secondaryAllowed[msg.data.cpn]) && (secondaryAllowed[msg.data.cpn].indexOf(msg.data.method) > -1));
  28. },
  29. allowedGlobal: function (msg) {
  30. var allowed = {
  31. clientConfig: ['getResourcesList'],
  32. leaderboard: ['requestList'],
  33. cons: ['unzone']
  34. };
  35. return ((allowed[msg.module]) && (allowed[msg.module].indexOf(msg.method) > -1));
  36. }
  37. };
  38. });