-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathTown Houses
1785 lines (1384 loc) · 52.2 KB
/
Town Houses
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Knive's Town Houses.
I've converted most (99%) of the arrays to use List<>, converted many foreach statements to use Linq, among hundreds of other edits to tidy this age old system up.
Original credit to the original author (in the title), I just wanted to archive a cleaner copy.
============
Forum Discussion:
Tresdni submitted a new resource:
Knive's Town Houses 2.1 - Majorly Cleaned Up - Optimized for .NET 4.0
Knive's Town Houses.
*Do not replace your Knive's Town Houses if already serialized. This is not made to replace your existing system, as serialize has changed heavily.*
I've converted most (99%) of the arrays to use List<>, converted many foreach statements to use Linq, among hundreds of other edits to tidy this age old system up.
Original credit to the original author (in the title), I just wanted to archive a cleaner copy.
Click to expand...
Read more about this resource...
Last edited: Nov 29, 2014
Tresdni, Nov 29, 2014
Edit
History
Delete
Warn
Report
#1
+ Quote
Reply
Winner Winner x 4 Like Like x 3 List
Undo Rating
Dragon Slayer
Breezy
Dragon Slayer
Grandmaster Member
awesome job :) I use this system glad to see it cleaned up.. you should update knives chat system it uses the old email method
Dragon Slayer, Nov 29, 2014
Edit
Delete
IP
Warn
Report
#2
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Tasanar
Tasanar
Super Contributor
What exactly does Linq do?
Tasanar, Nov 29, 2014
Edit
Delete
IP
Warn
Report
#3
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Dragon Slayer
Breezy
Dragon Slayer
Grandmaster Member
this for linq
http://msdn.microsoft.com/en-us/library/bb308959.aspx
hey I got a load error all I did was drop them in
ssaid warning no serialize method and no deserioalize method
Dragon Slayer, Nov 29, 2014
Edit
History
Delete
IP
Warn
Report
#4
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Tresdni
Paranoid
Tresdni
Illustrious Member
JustUO Developer
It lets you perform queries on lists and arrays, and other data. It looks similar to SQL queries.
Tresdni, Nov 29, 2014
Edit
Delete
IP
Warn
Report
#5
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Tresdni
Paranoid
Tresdni
Illustrious Member
JustUO Developer
Hmm, more specifically? I can fix it up :)
Tresdni, Nov 29, 2014
Edit
Delete
IP
Warn
Report
#6
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Tasanar
Tasanar
Super Contributor
Ah ok so ill be rough to convert RunUO to use it in just this instance?
Tasanar, Nov 29, 2014
Edit
Delete
IP
Warn
Report
#7
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Tresdni
Paranoid
Tresdni
Illustrious Member
JustUO Developer
I'm guessing you replaced the old one that was already serialized with this one? This isn't a direct replacement, since there were arrays serialized, I had to change the serialize/deserialize method on some as lists.
Tresdni, Nov 29, 2014
Edit
Delete
IP
Warn
Report
#8
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Tresdni
Paranoid
Tresdni
Illustrious Member
JustUO Developer
You don't have to update RunUO at all to use Linq, it's built into .NET 4.0.
Tresdni, Nov 29, 2014
Edit
Delete
IP
Warn
Report
#9
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Tasanar
Tasanar
Super Contributor
Ah ok I have tried in the past to take a few scripts from here but I got errors with the RunUO.exe in response to Linq
Tasanar, Nov 29, 2014
Edit
Delete
IP
Warn
Report
#10
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Dragon Slayer
Breezy
Dragon Slayer
Grandmaster Member
well I just started a my test server fresh I droped it in and I found out where it was missing
in your
RUOverison.cs was missing them at the end
Code:
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
}
Dragon Slayer, Nov 29, 2014
Edit
Delete
IP
Warn
Report
#11
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Tresdni
Paranoid
Tresdni
Illustrious Member
JustUO Developer
Works fine on mine, those are redundant, they are just calling base methods.
Tresdni, Nov 29, 2014
Edit
Delete
IP
Warn
Report
#12
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Dragon Slayer
Breezy
Dragon Slayer
Grandmaster Member
well server was compiling just seen the warnings lol
Dragon Slayer, Nov 29, 2014
Edit
Delete
IP
Warn
Report
#13
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Dragon Slayer
Breezy
Dragon Slayer
Grandmaster Member
I think its safe for you to remove support for old runuo as this just going to support JustUO any way right? I been doing that to old scripts that still have support for old versions... I just removed them just to be working with justuo
Dragon Slayer, Nov 29, 2014
Edit
History
Delete
IP
Warn
Report
#14
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Tresdni
Paranoid
Tresdni
Illustrious Member
JustUO Developer
I did remove most of the support, may have missed a few though, it's a lot of code :p
Tresdni, Nov 29, 2014
Edit
Delete
IP
Warn
Report
#15
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Tresdni
Paranoid
Tresdni
Illustrious Member
JustUO Developer
Tresdni updated Knive's Town Houses 2.1 - Majorly Cleaned Up with a new update entry:
Added back redundant serialize overrides to ease your minds.
Added back the redundant serialize and deserialize overrides to ease your minds :)
Again, do not replace your existing system with this, it's made for a fresh install of Knive's Town Houses. Serialization was heavily modified for Lists instead of arrays.
Read the rest of this update entry...
Tresdni, Nov 29, 2014
Edit
Delete
Warn
Report
#16
+ Quote
Reply
Funny Funny x 1 List
Undo Rating
zerodowned
Spaced
zerodowned
Administrator
Moderator
JustUO Developer
Gold Star Member
Et Cetera, Et Cetera
does this require houses to be frozen ?
or can you just build a house by hand and make it a town house? ( i'm guessing this system creates a rectangle and zones it as a house area that then recognizes house commands )
//avatar art used with permission by julien148
C# tutorials - http://www.playuo.org/emu/index.php?threads/c-tutorials.236/
BB Codes for posts - http://www.playuo.org/emu/index.php?help/bb-codes
My Stuff on Github
zerodowned, Dec 25, 2014
Edit
Delete
IP
Report
#17
+ Quote
Reply
Tresdni
Paranoid
Tresdni
Illustrious Member
JustUO Developer
It is mostly for static buildings that aren't being used, but I've also used it with addons and it worked just fine. I wouldn't build a house piece by piece, it would add up to major lag down the road.
Tresdni, Dec 25, 2014
Edit
Delete
IP
Warn
Report
#18
+ Quote
Reply
Agree Agree x 1 List
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Dian
Devilish
Dian
Administrator
zerodowned said: ↑
does this require houses to be frozen ?
or can you just build a house by hand and make it a town house? ( i'm guessing this system creates a rectangle and zones it as a house area that then recognizes house commands )
This system pretty well works off of the region you create for it. It doesnt care what building is or is not within the boundary's or how they are built/placed :)
One thing though, make sure you have any doors (etc) placed prior to creating the house region, so they are recognized as house doors. If you add them afterwards, they will not have the security setting ability and what not.
Dian, Dec 25, 2014
Edit
Delete
IP
Report
#19
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
jamesreg1973
jamesreg1973
Illustrious Member
I have a question just to make sure I am right on this.
On the edit to base house it says to replace this method with this code
Code:
public virtual bool IsInside( Point3D p, int height )
{
Sector sector = Map.GetSector( p );
foreach( BaseMulti m in sector.Multis )
{
if ( m != this
&& m is Knives.TownHouses.TownHouse
&& ((Knives.TownHouses.TownHouse)m).ForSaleSign is Knives.TownHouses.RentalContract
&& ((Knives.TownHouses.TownHouse)m).IsInside( p, height ) )
return false;
}
return Region.Contains( p );
}
This is what my method looks like in my househouse.cs
Code:
public virtual bool IsInside(Point3D p, int height)
{
if (this.Deleted)
return false;
MultiComponentList mcl = this.Components;
int x = p.X - (this.X + mcl.Min.X);
int y = p.Y - (this.Y + mcl.Min.Y);
if (x < 0 || x >= mcl.Width || y < 0 || y >= mcl.Height)
return false;
if (this is HouseFoundation && y < (mcl.Height - 1) && p.Z >= this.Z)
return true;
StaticTile[] tiles = mcl.Tiles[x][y];
for (int j = 0; j < tiles.Length; ++j)
{
StaticTile tile = tiles[j];
int id = tile.ID & TileData.MaxItemValue;
ItemData data = TileData.ItemTable[id];
// Slanted roofs do not count; they overhang blocking south and east sides of the multi
if ((data.Flags & TileFlag.Roof) != 0)
continue;
// Signs and signposts are not considered part of the multi
if ((id >= 0xB95 && id <= 0xC0E) || (id >= 0xC43 && id <= 0xC44))
continue;
int tileZ = tile.Z + this.Z;
if (p.Z == tileZ || (p.Z + height) > tileZ)
return true;
}
return false;
}
Would I need to replace every bit of that? Just wanted to make sure as if there were changes from when the townhouse script was created and the current basehouse.cs we have now that none of that is needed?
jamesreg1973, Jan 27, 2015
Edit
Delete
IP
Warn
Report
#20
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Dian
Devilish
Dian
Administrator
Yes, you are correct. Replace the entire method with the one provided. I have been using this same change for years, and both TownHouse and Deeded Houses still seem to work just fine.
I also was uncertain, as it would seem that the deeded houses would be effected with some problem, but they are both fine.
Dian, Jan 27, 2015
Edit
Delete
IP
Report
#21
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
jamesreg1973
jamesreg1973
Illustrious Member
I hate asking stupid questions but I looked at all that and was like im not so sure about replacing all that. Thank you ask townhouse features are a major thing I want to play with. Have you ever had any problems with the amount of townhouses used in game? Ideally I would like to replace much of the NPC vendor shops in towns and make them rentable Vendor shops to Players can the system handle this much load based on your experiences.
jamesreg1973, Jan 27, 2015
Edit
Delete
IP
Warn
Report
#22
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Ravenwolfe
Fine
Ravenwolfe
Administrator
Staff Member
JustUO Developer
Should take less memory than having the same number of houses. It's basically a region checking thing so it doesnt even add to the number of items like having the same number of player houses would.
Ravenwolfe, Jan 27, 2015
Edit
History
Delete
IP
Report
#23
+ Quote
Reply
Like Like x 1 List
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
jamesreg1973
jamesreg1973
Illustrious Member
This compiles just fine but in all the shard loading text I have this message going on
Warning: Knives.TownHouses.VersionHouse
- No Serialize() method
- No Deserialize() method
jamesreg1973, Jan 27, 2015
Edit
Delete
IP
Warn
Report
#24
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
jamesreg1973
jamesreg1973
Illustrious Member
jamesreg1973 said: ↑
This compiles just fine but in all the shard loading text I have this message going on
Warning: Knives.TownHouses.VersionHouse
- No Serialize() method
- No Deserialize() method
I also get this same message with the server rebirth rares script
I am using the most current version of JustUO and the version of townhouses on this thread fresh installs
That's VNC being over cautious, you can safely ignore that. There is no reason to have a serial/deserial method. If it bothers you to see the warning, you can add an empty deserial/serial method to those scripts and it will go away.
Ravenwolfe, Jan 27, 2015
Edit
History
Delete
IP
Report
#26
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Dian
Devilish
Dian
Administrator
*oops, didnt notice Ravenwolfe's post :p *
Yea, that script has no Serialization method, as it states. You can add one to it..
It will remove that warning, though its not needed according to Tresdni.. He says its redundant. I added it too though.
In RUOVersions.cs file,
Code:
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
}
Or if you need entire script to be certain where..
Code:
#region References
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Commands;
using Server.Multis;
#endregion
#if (RunUO_2_RC1)
using Server.Commands;
#endif
namespace Knives.TownHouses
{
public class RUOVersion
{
private static readonly Hashtable s_Commands = new Hashtable();
public static void AddCommand(string com, AccessLevel acc, TownHouseCommandHandler cch)
{
s_Commands[com.ToLower()] = cch;
CommandSystem.Register(com, acc, OnCommand);
}
private static void OnCommand(CommandEventArgs e)
{
if (s_Commands[e.Command.ToLower()] == null)
{
return;
}
((TownHouseCommandHandler) s_Commands[e.Command.ToLower()])(new CommandInfo(e.Mobile, e.Command, e.ArgString,
e.Arguments));
}
public static void UpdateRegion(TownHouseSign sign)
{
if (sign.House == null)
{
return;
}
sign.House.UpdateRegion();
Rectangle3D rect = new Rectangle3D(Point3D.Zero, Point3D.Zero);
for (int i = 0; i < sign.House.Region.Area.Length; ++i)
{
rect = sign.House.Region.Area[i];
rect = new Rectangle3D(
new Point3D(rect.Start.X - sign.House.X, rect.Start.Y - sign.House.Y, sign.MinZ),
new Point3D(rect.End.X - sign.House.X, rect.End.Y - sign.House.Y, sign.MaxZ));
sign.House.Region.Area[i] = rect;
}
sign.House.Region.Unregister();
sign.House.Region.Register();
sign.House.Region.GoLocation = sign.BanLoc;
}
public static bool RegionContains(Region region, Mobile m)
{
return region.GetMobiles().Contains(m);
}
public static IEnumerable<Rectangle3D> RegionArea(Region region)
{
return region.Area;
}
}
public class VersionHouse : BaseHouse
{
protected VersionHouse(int id, Mobile m, int locks, int secures)
: base(id, m, locks, secures)
{
}
public override Rectangle2D[] Area
{
get { return new Rectangle2D[5]; }
}
public override Point3D BaseBanLocation
{
get { return Point3D.Zero; }
}
public VersionHouse(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
}
}
}
Dian, Jan 27, 2015
Edit
History
Delete
IP
Report
#27
+ Quote
Reply
Like Like x 1 List
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
Fireball
Fireball
Distinguished Member
Hi guys,
I've just dropped this in my shard and I have a problem which only affects buildings in GreenAcres.
At first I thought it just didn't work as I tested it on a custom (brick-by-brick) building in GreenAcres. I set it up and then clicked the claim button and everything except the doors, a staircase and the sign vanished!
I then went to Britain and did the same with one of the normal static town buildings there and it worked perfectly, so next I built my custom house on a flat spot in the normal world and ran TownHouses on that and it worked perfectly there. Went back to GreenAcres and tried it again (incase I had messed something up) there with exactly the same failure I originally had. Is there something about GreenAcres which prevents this working?
The other thing that is a bit annoying is that the secures and lockdowns seem to be messed up. It appears to give the house the number of lockdowns and secures it fancies, but the secures are double the lockdowns, and the secures are a ludicrously large number. Once the house is claimed I can go back in and edit them to, say, make the secures 50 and then go back in again to make the lockdowns 3000 but whatever I do it will not let me do both on the fly.
Has anyone else seen this?
Thanks
FB
PS. Running RunUO 2.4
Fireball, Feb 18, 2015
Edit
History
Delete
IP
Warn
Report
#28
+ Quote
Reply
Like Dislike Agree Disagree Funny Winner Informative Friendly Useful Optimistic Creative Old Bad Spelling
zerodowned
Spaced
zerodowned
Administrator
Moderator
JustUO Developer
Gold Star Member
Et Cetera, Et Cetera
Fireball said: ↑
Hi guys,
I've just dropped this in my shard and I have a problem which only affects buildings in GreenAcres.
At first I thought it just didn't work as I tested it on a custom (brick-by-brick) building in GreenAcres. I set it up and then clicked the claim button and everything except the doors, a staircase and the sign vanished!
I then went to Britain and did the same with one of the normal static town buildings there and it worked perfectly, so next I built my custom house on a flat spot in the normal world and ran TownHouses on that and it worked perfectly there. Went back to GreenAcres and tried it again (incase I had messed something up) there with exactly the same failure I originally had. Is there something about GreenAcres which prevents this working?
The other thing that is a bit annoying is that the secures and lockdowns seem to be messed up. It appears to give the house the number of lockdowns and secures it fancies, but the secures are double the lockdowns, and the secures are a ludicrously large number. Once the house is claimed I can go back in and edit them to, say, make the secures 50 and then go back in again to make the lockdowns 3000 but whatever I do it will not let me do both on the fly.
Has anyone else seen this?
Thanks
FB
PS. Running RunUO 2.4
Click to expand...
getting around to trying this system out for an idea.
i wanted to create nonmovable tiles as a floor without freezing them. when i claim the property it deletes the nonmovable floor, if i demolish the house it puts them back.
seems to be something in the code that deletes non-static/non-frozen items even if you say you want the player to have them when they buy the house
//avatar art used with permission by julien148
C# tutorials - http://www.playuo.org/emu/index.php?threads/c-tutorials.236/
BB Codes for posts - http://www.playuo.org/emu/index.php?help/bb-codes
My Stuff on Github
zerodowned, Jul 5, 2015
Edit
Delete
IP
Report
#29
+ Quote
Reply
zerodowned
Spaced
zerodowned
Administrator
Moderator
JustUO Developer
Gold Star Member
Et Cetera, Et Cetera
tried it in both greenacres and brit
//avatar art used with permission by julien148
C# tutorials - http://www.playuo.org/emu/index.php?threads/c-tutorials.236/
BB Codes for posts - http://www.playuo.org/emu/index.php?help/bb-codes
My Stuff on Github
zerodowned, Jul 5, 2015
Edit
Delete
IP
Report
#30
+ Quote
Reply
zerodowned
Spaced
zerodowned
Administrator
Moderator
JustUO Developer
Gold Star Member
Et Cetera, Et Cetera
was able to confirm the line of code that's making it happen is line 831 in TownHouseSign.
I blocked it out for easy test. going to figure out what's actually wrong though.
update:
line 267 comment out c_LeaveItems = false;
line 565 change: ConvertItems(false); to ConvertItems(c_KeepItems);
then in the method protected virtual void ConvertItems(bool keep) change
else if (!c_LeaveItems) to else if (c_LeaveItems == false)
and
if (!c_KeepItems || !keep) to if ( c_KeepItems == false )
tested and working for both true and false now
Last edited: Jul 5, 2015
//avatar art used with permission by julien148
C# tutorials - http://www.playuo.org/emu/index.php?threads/c-tutorials.236/
BB Codes for posts - http://www.playuo.org/emu/index.php?help/bb-codes
My Stuff on Github
zerodowned, Jul 5, 2015
Edit
History
Delete
IP
Report
#31
+ Quote
Reply
zerodowned
Spaced
zerodowned
Administrator
Moderator
JustUO Developer
Gold Star Member
Et Cetera, Et Cetera
also, don't know if anyone's interested but i changed GetProps to be a little more "reader friendly"
add: using VitaNex.Network;
to the top of townhouse sign
end result:
ths.jpg
- price/lockdown/secures now have commas
- will indicate if forced public or private
- will indicate if banning is disabled (should be obvious for public buildings but it's there just in case)
- will indicate if a building can be traded or not
Code:
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
if (c_Free)
{
list.Add(1060658, "Price\tFree");
}
else if (c_RentByTime == TimeSpan.Zero)
{
list.Add(1060658, "Price\t{0}{1}", c_Price.ToString("#,0"), c_KeepItems ? " (+" + c_ItemsPrice.ToString("#,0") + " for the items)" : "");
}
else if (c_RecurRent)
{
list.Add(1060658, "{0}\t{1}\r{2}", PriceType + (c_RentToOwn ? " Rent-to-Own" : " Recurring"), c_Price.ToString("#,0"),
c_KeepItems ? " (+" + c_ItemsPrice.ToString("#,0") + " for the items)" : "");
}
else
{
list.Add(1060658, "One {0}\t{1}{2}", PriceTypeShort, c_Price.ToString("#,0"),
c_KeepItems ? " (+" + c_ItemsPrice.ToString("#,0") + " for the items)" : "");
}