You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
475 B

  1. define([
  2. 'js/system/client',
  3. 'js/system/events',
  4. 'ui/factory'
  5. ], function (
  6. client,
  7. events,
  8. factory
  9. ) {
  10. return {
  11. type: 'dialogue',
  12. init: function () {
  13. },
  14. talk: function (target) {
  15. client.request({
  16. cpn: 'player',
  17. method: 'performAction',
  18. data: {
  19. cpn: 'dialogue',
  20. method: 'talk',
  21. data: {
  22. target: target.id
  23. }
  24. }
  25. });
  26. },
  27. extend: function (blueprint) {
  28. events.emit('onGetTalk', blueprint.state);
  29. }
  30. };
  31. });