Skip to content

Commit 9d92b21

Browse files
authored
Merge pull request #27 from alrun3/get-widget-coords
feat: add widget.get_X and widget.get_Y
2 parents 9eda150 + dc7a2c5 commit 9d92b21

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

WCSharp.Api/destructable.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ internal destructable()
2626
/// @CSharpLua.Template = "BlzCreateDeadDestructableZWithSkin({0}, {1}, {2}, {3}, {5}, {6}, {7}, {4})"
2727
public static extern destructable CreateDeadZWithSkin(int typeId, float x, float y, float z, int skin, float facing = Blizzard.bj_UNIT_FACING, float scale = 1.0f, int variation = 0);
2828

29-
/// @CSharpLua.Get = "GetWidgetX({this})"
30-
public extern float X { get; }
31-
32-
/// @CSharpLua.Get = "GetWidgetY({this})"
33-
public extern float Y { get; }
34-
3529
/// @CSharpLua.Get = "GetDestructableMaxLife({this})"
3630
/// @CSharpLua.Set = "SetDestructableMaxLife({this}, {0})"
3731
public extern float MaxLife { get; set; }

WCSharp.Api/item.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ internal item()
2929
/// @CSharpLua.Get = "GetItemType({this})"
3030
public extern itemtype Type { get; }
3131

32-
/// @CSharpLua.Get = "GetWidgetX({this})"
33-
/// @CSharpLua.Set = "SetItemPosition({this}, {0}, GetWidgetY({this}))"
34-
public extern float X { get; set; }
32+
/// @CSharpLua.Get = "GetItemX({this})"
33+
/// @CSharpLua.Set = "SetItemPosition({this}, {0}, GetItemY({this}))"
34+
public extern new float X { get; set; }
3535

36-
/// @CSharpLua.Get = "GetWidgetY({this})"
37-
/// @CSharpLua.Set = "SetItemPosition({this}, GetWidgetX({this}), {0})"
38-
public extern float Y { get; set; }
36+
/// @CSharpLua.Get = "GetItemY({this})"
37+
/// @CSharpLua.Set = "SetItemPosition({this}, GetItemX({this}), {0})"
38+
public extern new float Y { get; set; }
3939

4040
/// @CSharpLua.Get = "GetItemPlayer({this})"
4141
/// @CSharpLua.Set = "SetItemPlayer({this}, {0}, true)"

WCSharp.Api/unit.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ internal unit()
4545

4646
/// @CSharpLua.Get = "GetUnitX({this})"
4747
/// @CSharpLua.Set = "SetUnitX({this}, {0})"
48-
public extern float X { get; set; }
48+
public extern new float X { get; set; }
4949
/// @CSharpLua.Get = "GetUnitY({this})"
5050
/// @CSharpLua.Set = "SetUnitY({this}, {0})"
51-
public extern float Y { get; set; }
51+
public extern new float Y { get; set; }
5252
/// @CSharpLua.Get = "GetUnitState({this}, UNIT_STATE_MANA)"
5353
/// @CSharpLua.Set = "SetUnitState({this}, UNIT_STATE_MANA, {0})"
5454
public extern float Mana { get; set; }

WCSharp.Api/widget.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ internal widget()
77
{
88
}
99

10+
/// @CSharpLua.Get = "GetWidgetX({this})"
11+
public extern float X { get; }
12+
13+
/// @CSharpLua.Get = "GetWidgetY({this})"
14+
public extern float Y { get; }
15+
1016
/// @CSharpLua.Get = "GetWidgetLife({this})"
1117
/// @CSharpLua.Set = "SetWidgetLife({this}, {0})"
1218
public extern float Life { get; set; }

0 commit comments

Comments
 (0)