コード例 #1
0
ファイル: MockCore.cs プロジェクト: Delphi79/UO98-SVN
        public unsafe int setObjVarLocation(int serial, byte* name, Location* value)
        {
            if (!Exists(serial)) return 0;

            string varname = StringPointerUtils.GetAsciiString(name);
            Location varvalue = *value;
            MockObjVarAttachments.AddAttachment(serial, VariableType.Location, varname, varvalue);
            return 1;
        }
コード例 #2
0
 static void Main(string[] args)
 {
     unsafe
     {
         Location location;
         location.X = 10;
         location.Y = 5;
         Location *lptr = &location;
         Console.WriteLine(string.Format("location 地址{0},lptr地址{1},lptr值{2}", (int)&location, (int)lptr, *lptr));
         Console.WriteLine(string.Format("location.x的地址{0},location.x的值{1}", (int)&(lptr->X), lptr->X));
         Console.WriteLine(string.Format("location.y的地址{0},location.y的值{1}", (int)&(lptr->Y), lptr->Y));
     }
     Console.Read();
 }
コード例 #3
0
ファイル: MockCore.cs プロジェクト: Delphi79/UO98-SVN
 public bool getObjVarLocation(int serial, byte* varName, Location* locationResult)
 {
     string varname = StringPointerUtils.GetAsciiString(varName);
     Location value;
     if (MockObjVarAttachments.GetLocation(serial, varname, out value))
     {
         *locationResult = value;
         return true;
     }
     else
     {
         *locationResult = new Location();
         return false;
     }
 }
コード例 #4
0
ファイル: MockCore.cs プロジェクト: Delphi79/UO98-SVN
 public unsafe int getNextObjectOfType(Location* location, int itemId, int lastItemSerial)
 {
     return World.getNextObjectOfType(*location, itemId, lastItemSerial);
 }
コード例 #5
0
ファイル: MockCore.cs プロジェクト: Delphi79/UO98-SVN
 public unsafe int createGlobalObjectAt(int ItemID, Location* Location)
 {
     ItemAndLocation itemandlocation = new Sharpkick.ItemAndLocation((ushort)ItemID, *Location);
     return (int)World.CreateItem(itemandlocation);
 }
コード例 #6
0
 public int getNextObjectOfType(Location *location, int itemId, int lastItemSerial)
 {
     return(UnsafeNativeMethods.getNextObjectOfType(location, itemId, lastItemSerial));
 }
コード例 #7
0
ファイル: MockCore.cs プロジェクト: Delphi79/UO98-SVN
 public unsafe int getFirstObjectOfType(Location* location, int itemId)
 {
     return World.getFirstObjectOfType(*location, itemId);
 }
コード例 #8
0
 public bool getObjVarLocation(int serial, byte *varName, Location *locationResult)
 {
     return(UnsafeNativeMethods.getObjVarLocation(serial, varName, locationResult));
 }
コード例 #9
0
 public int getFirstObjectOfType(Location *location, int itemId)
 {
     return(UnsafeNativeMethods.getFirstObjectOfType(location, itemId));
 }
コード例 #10
0
 public int createGlobalObjectAt(int ItemID, Location *Location)
 {
     return(UnsafeNativeMethods.createGlobalObjectAt(ItemID, Location));
 }
コード例 #11
0
 public int setObjVarLocation(int serial, byte *name, Location *value)
 {
     return(UnsafeNativeMethods.setObjVarLocation(serial, name, value));
 }
コード例 #12
0
 public static extern int getNextObjectOfType(Location *location, int itemId, int lastItemSerial);
コード例 #13
0
 public static extern int getFirstObjectOfType(Location *location, int itemId);
コード例 #14
0
 public static extern bool getObjVarLocation(int serial, byte *varName, Location *locationResult);
コード例 #15
0
 public static extern int setObjVarLocation(int serial, byte *name, Location *value);
コード例 #16
0
 public static extern int createGlobalObjectAt(int ItemID, Location *Location);