Skip to content

Commit

Permalink
Merge pull request #127 from Brandon-T/master
Browse files Browse the repository at this point in the history
Updated Widgets, Actor, and Broken Hooks
  • Loading branch information
KyleHunter committed Aug 19, 2017
2 parents 434972e + 20747f6 commit 74b1a5f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
20 changes: 10 additions & 10 deletions lib/core/renderable/Actor.simba
Expand Up @@ -61,7 +61,7 @@ end;

function TReflectActor.GetHealthScale: Integer;
var
CombatInfoList, HeadNode, NextNode, CombatInfoDef: TReflectPointer;
CombatInfoList, HeadNode, NextNode, CombatInfo2: TReflectPointer;
begin
if Reflect.Smart.IsNull(Self.Reference) then
begin
Expand All @@ -70,19 +70,19 @@ begin
end;

Result := -1;
CombatInfoList.GetFieldObject(Self.Reference, Actor_CombatInfo);
CombatInfoList.GetFieldObject(Self.Reference, Actor_CombatInfoList);
HeadNode.GetFieldObject(CombatInfoList.Reference, CombatInfoList_Head);
NextNode.GetFieldObject(HeadNode.Reference, Node_Next);

if not Reflect.Smart.IsNull(NextNode.Reference) then
begin
CombatInfoDef.GetFieldObject(NextNode.Reference, HealthBar_Definition);
if not Reflect.Smart.IsNull(CombatInfoDef.Reference) then
CombatInfo2.GetFieldObject(NextNode.Reference, CombatInfoHolder_CombatInfo2);
if not Reflect.Smart.IsNull(CombatInfo2.Reference) then
begin
result := CombatInfoDef.GetFieldInt(CombatInfo2_HealthScale);
result := CombatInfo2.GetFieldInt(CombatInfo2_HealthScale);
end;

CombatInfoDef.Free;
CombatInfo2.Free;
end;

NextNode.Free;
Expand All @@ -101,13 +101,13 @@ begin
end;

Result := -1;
CombatInfoList.GetFieldObject(Self.Reference, Actor_CombatInfo);
CombatInfoList.GetFieldObject(Self.Reference, Actor_CombatInfoList);
HeadNode.GetFieldObject(CombatInfoList.Reference, CombatInfoList_Head);
NextNode.GetFieldObject(HeadNode.Reference, Node_Next);

if not Reflect.Smart.IsNull(NextNode.Reference) then
begin
List2.GetFieldObject(NextNode.Reference, HealthBar_CombatInfoList);
List2.GetFieldObject(NextNode.Reference, CombatInfoHolder_CombatInfoList);
HeadNode2.GetFieldObject(List2.Reference, CombatInfoList_Head);
NextNode2.GetFieldObject(HeadNode2.Reference, Node_Next);

Expand Down Expand Up @@ -137,13 +137,13 @@ begin
end;

Result := -1;
CombatInfoList.GetFieldObject(Self.Reference, Actor_CombatInfo);
CombatInfoList.GetFieldObject(Self.Reference, Actor_CombatInfoList);
HeadNode.GetFieldObject(CombatInfoList.Reference, CombatInfoList_Head);
NextNode.GetFieldObject(HeadNode.Reference, Node_Next);

if not Reflect.Smart.IsNull(NextNode.Reference) then
begin
List2.GetFieldObject(NextNode.Reference, HealthBar_CombatInfoList);
List2.GetFieldObject(NextNode.Reference, CombatInfoHolder_CombatInfoList);
HeadNode2.GetFieldObject(List2.Reference, CombatInfoList_Head);
NextNode2.GetFieldObject(HeadNode2.Reference, Node_Next);

Expand Down
18 changes: 9 additions & 9 deletions lib/internal/Hooks.simba
Expand Up @@ -197,9 +197,9 @@ CombatInfo2_HealthScale: THook = ['r', 1222116663];
CombatInfoList_Head: THook = ['j', 1];
CombatInfoList_Current: THook = ['h', 1];

{HealthBar: ci}
HealthBar_CombatInfoList: THook = ['p', 1];
HealthBar_Definition: THook = ['f', 1];
{CombatInfoHolder: ci}
CombatInfoHolder_CombatInfoList: THook = ['p', 1];
CombatInfoHolder_CombatInfo2: THook = ['f', 1];

{Actor: cr}
Actor_Animation: THook = ['bj', 1530881055];
Expand All @@ -218,7 +218,7 @@ Actor_IsAnimating: THook = ['ah', 1];
Actor_CombatCycle: THook = ['N/A', 1];
Actor_InteractingIndex: THook = ['ba', -1645647959];
Actor_Orientation: THook = ['cf', -471012125];
Actor_HealthBar: THook = ['bi', 1];
Actor_CombatInfoList: THook = ['bi', 1];
Actor_Height: THook = ['cr', -55392365];

{NPCDefinition: im}
Expand Down Expand Up @@ -261,8 +261,8 @@ Widget_Actions: THook = ['cz', 1];
Widget_ActionType: THook = ['z', -779336459];
Widget_Type: THook = ['y', -154837137];
Widget_isHidden: THook = ['af', 1];
Widget_AbsoluteX: THook = ['y', -154837137];
Widget_AbsoluteY: THook = ['u', -454438343];
Widget_AbsoluteX: THook = ['ag', -1996395385];
Widget_AbsoluteY: THook = ['av', 1673200527];
Widget_RelativeX: THook = ['au', -1844203021];
Widget_RelativeY: THook = ['az', 1310092175];
Widget_Width: THook = ['ab', 1306837865];
Expand Down Expand Up @@ -291,8 +291,8 @@ Client_PlayerIndices: THook = ['co.c', 1];
Client_LocalPlayer: THook = ['a.iu', 1];
Client_PlayerIndex: THook = ['client.in', 1306524455];
Client_LoopCycle: THook = ['client.be', 2108833509];
Client_LoginState: THook = ['cx.ae', -665522787];
Client_GameState: THook = ['client.bd', 1932771507];
Client_GameState: THook = ['cx.ae', -665522787];
Client_LoginState: THook = ['client.bd', 1932771507];
Client_CrossHairColor: THook = ['client.hp', 2020154263];
Client_GroundItems: THook = ['client.iq', 1];
Client_CollisionMap: THook = ['client.w', 1];
Expand Down Expand Up @@ -337,4 +337,4 @@ Client_RealLevels: THook = ['client.jc', 1];
Client_Experiences: THook = ['client.jh', 1];
Client_CurrentWorld: THook = ['client.bk', 312013413];
Client_Energy: THook = ['client.kj', -708892945];
Client_Weight: THook = ['client.kv', -2099085345];
Client_Weight: THook = ['client.kv', -2099085345];
2 changes: 1 addition & 1 deletion lib/internal/updating/Update.txt
@@ -1,3 +1,3 @@
includerev = '28'
includesubrev = '1'
includesubrev = '2'
hookrev = '153'
2 changes: 1 addition & 1 deletion lib/widgets/Widgets.simba
Expand Up @@ -208,7 +208,7 @@ begin
X += Current.GetBoundsX;
Y += Current.GetBoundsY;

if (Current.GetType) then
if (Current.GetType > 0) then
begin
X += Current.GetAbsoluteX;
Y += Current.GetAbsoluteY;
Expand Down

0 comments on commit 74b1a5f

Please sign in to comment.