Henrybk

ProgressBar bug fix 2.0

Jul 3rd, 2015
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.94 KB | None | 0 0
  1. Index: Receive.pm
  2. ===================================================================
  3. --- Receive.pm  (revision 8977)
  4. +++ Receive.pm  (working copy)
  5. @@ -2049,4 +2049,21 @@
  6.     }
  7.  }
  8.  
  9. +sub progress_bar {
  10. +   my($self, $args) = @_;
  11. +   message TF("Progress bar loading (time: %d).\n", $args->{time}), 'info';
  12. +   $taskManager->add(
  13. +       new Task::Chained(tasks => [new Task::Wait(seconds => $args->{time}),
  14. +       new Task::Function(function => sub {
  15. +            $messageSender->sendProgress();
  16. +            message TF("Progress bar finished.\n"), 'info';
  17. +            $_[0]->setDone;
  18. +       })]));
  19. +}
  20. +
  21. +sub progress_bar_stop {
  22. +   my($self, $args) = @_;
  23. +   message TF("Progress bar finished.\n", 'info');
  24. +}
  25. +
  26.  1;
  27. Index: Receive/kRO/Sakexe_0.pm
  28. ===================================================================
  29. --- Receive/kRO/Sakexe_0.pm (revision 8977)
  30. +++ Receive/kRO/Sakexe_0.pm (working copy)
  31. @@ -352,6 +352,8 @@
  32.         '08D1' => ['unequip_item', 'v2 C', [qw(index type success)]],
  33.         '08D2' => ['high_jump', 'a4 v2', [qw(ID x y)]], # 10
  34.         '0977' => ['monster_hp_info', 'a4 V V', [qw(ID hp hp_max)]],
  35. +       '02F0' => ['progress_bar', 'V2', [qw(color time)]],
  36. +       '02F2' => ['progress_bar_stop'],
  37.     };
  38.  
  39.     # Item RECORD Struct's
  40. @@ -6437,6 +6438,7 @@
  41.  sub character_block_info {
  42.     #TODO
  43.  }
  44. +
  45.  1;
  46.  
  47.  =pod
  48. Index: Receive/ServerType0.pm
  49. ===================================================================
  50. --- Receive/ServerType0.pm  (revision 8977)
  51. +++ Receive/ServerType0.pm  (working copy)
  52. @@ -7228,23 +7228,6 @@
  53.     }
  54.  }
  55.  
  56. -sub progress_bar {
  57. -   my($self, $args) = @_;
  58. -   message TF("Progress bar loading (time: %d).\n", $args->{time}), 'info';
  59. -   $taskManager->add(
  60. -       new Task::Chained(tasks => [new Task::Wait(seconds => $args->{time}),
  61. -       new Task::Function(function => sub {
  62. -            $messageSender->sendProgress();
  63. -            message TF("Progress bar finished.\n"), 'info';
  64. -            $_[0]->setDone;
  65. -       })]));
  66. -}
  67. -
  68. -sub progress_bar_stop {
  69. -   my($self, $args) = @_;
  70. -   message TF("Progress bar finished.\n", 'info');
  71. -}
  72. -
  73.  sub open_buying_store { #0x810
  74.     my($self, $args) = @_;
  75.     my $amount = $args->{amount};
  76. Index: Send.pm
  77. ===================================================================
  78. --- Send.pm (revision 8977)
  79. +++ Send.pm (working copy)
  80. @@ -1185,4 +1185,11 @@
  81.     debug "Sent Equip: $index Type: $type\n" , 2;
  82.  }
  83.  
  84. +sub sendProgress {
  85. +   my ($self) = @_;
  86. +   my $msg = pack("C*", 0xf1, 0x02);
  87. +   $self->sendToServer($msg);
  88. +   debug "Sent Progress Bar Finish\n", "sendPacket", 2;
  89. +}
  90. +
  91.  1;
  92. \ No newline at end of file
  93. Index: Send/ServerType0.pm
  94. ===================================================================
  95. --- Send/ServerType0.pm (revision 8977)
  96. +++ Send/ServerType0.pm (working copy)
  97. @@ -1243,13 +1243,6 @@
  98.     $self->sendToServer($msg);
  99.  }
  100.  
  101. -sub sendProgress {
  102. -   my ($self) = @_;
  103. -   my $msg = pack("C*", 0xf1, 0x02);
  104. -   $self->sendToServer($msg);
  105. -   debug "Sent Progress Bar Finish\n", "sendPacket", 2;
  106. -}
  107. -
  108.  # 0x0204,18
  109.  
  110.  1;
  111. \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment