ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/ipo.ext
(Generate patch)

Comparing deliantra/server/ext/ipo.ext (file contents):
Revision 1.8 by root, Sun Aug 12 05:59:24 2007 UTC vs.
Revision 1.10 by root, Thu Sep 27 01:21:26 2007 UTC

185 $who->reply ($npc, "Here is your $cmd"); 185 $who->reply ($npc, "Here is your $cmd");
186 } 186 }
187 187
188 } elsif ($cmd eq 'receive') { 188 } elsif ($cmd eq 'receive') {
189 cf::async { 189 cf::async {
190 $Coro::current->{desc} = "ipo receive";
191
190 my $storage = cf::map::find ("/planes/IPO_storage"); 192 my $storage = cf::map::find ("/planes/IPO_storage");
191 unless ($storage) { 193 unless ($storage) {
192 $who->reply ($npc, "Sorry, our package delivery service is currently in strike. Please come back later."); 194 $who->reply ($npc, "Sorry, our package delivery service is currently in strike. Please come back later.");
193 return 1; 195 return 1;
194 } 196 }
197 $storage->load;
195 198
196 my $plname = $who->name; 199 my $plname = $who->name;
197 my $cnt; 200 my $cnt;
198 for ($storage->at (2, 2)) { 201 for ($storage->at (2, 2)) {
199 if ($_->name () =~ /^\S+ F: \S+ T: \Q$plname\E$/) { 202 if ($_->name () =~ /^\S+ F: \S+ T: \Q$plname\E$/) {
214 $who->reply ($npc, "Send to who?"); 217 $who->reply ($npc, "Send to who?");
215 return 1; 218 return 1;
216 } 219 }
217 220
218 cf::async { 221 cf::async {
222 $Coro::current->{desc} = "ipo send";
223
219 my $storage = cf::map::find ("/planes/IPO_storage"); 224 my $storage = cf::map::find ("/planes/IPO_storage");
220 unless ($storage) { 225 unless ($storage) {
221 $who->reply ($npc, "Sorry, our package delivery service is currently in strike. Please come back later."); 226 $who->reply ($npc, "Sorry, our package delivery service is currently in strike. Please come back later.");
222 return 1; 227 return 1;
223 } 228 }
229 $storage->load;
224 230
225 my $cnt; 231 my $cnt;
226 for ($who->inv) { 232 for ($who->inv) {
227 if ($_->name () =~ /^(bag|package|carton) T: \Q$arguments\E F: (\S+)$/) { 233 if ($_->name () =~ /^(bag|package|carton) T: \Q$arguments\E F: (\S+)$/) {
228 $_->name ("$1 F: $2 T: $arguments"); 234 $_->name ("$1 F: $2 T: $arguments");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines