Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MonoClass method usage #41

Open
chucklu opened this issue Oct 12, 2019 · 6 comments
Open

MonoClass method usage #41

chucklu opened this issue Oct 12, 2019 · 6 comments

Comments

@chucklu
Copy link
Collaborator

chucklu commented Oct 12, 2019

调用有返回值,但是无参数的方法,用method_11
public bool IsValidForCurrentMode()
{
return base.method_11("IsValidForCurrentMode", Array.Empty());
}
调用没有返回值,有参数的方法
public void SetIsValid(bool isValid)
{
base.method_8("SetIsValid", new object[]
{
isValid
});
}
属性的处理
public bool Available
{
get
{
return base.method_11("get_Available", Array.Empty());
}
}
集合的处理
public List Currencies
{
get
{
Class271 @Class = base.method_14<Class271>("get_Currencies", Array.Empty());
if (@Class != null)
{
return @class.method_25();
}
return null;
}
}

@chucklu
Copy link
Collaborator Author

chucklu commented Oct 12, 2019

没有返回值也没有参数的方法

public void EnableButtonAnimation()
		{
			base.method_8("EnableButtonAnimation", Array.Empty<object>());
		}

@chucklu
Copy link
Collaborator Author

chucklu commented Oct 12, 2019

属性的处理,结构体类型

public bool m_isWild
{
	get
	{
		return base.method_2<bool>("m_isWild");
	}
}

class类型

public Material m_xButtonMaterial
{
	get
	{
		return base.method_3<Material>("m_xButtonMaterial");
	}
}

字符串属性

public string m_standardDeckSelectSound
{
	get
	{
		return base.method_4("m_standardDeckSelectSound");
	}
}

@chucklu
Copy link
Collaborator Author

chucklu commented Mar 20, 2020

System.IntPtr method_0 (System.String string_4, ns27.Class276+Enum20[] enum20_0)
System.IntPtr method_1 (System.String string_4)
T method_2 (System.String string_4)
T method_3 (System.String string_4)
System.String method_4 (System.String string_4)
System.IntPtr method_5 (System.String string_4)
System.IntPtr method_6 (System.String string_4, System.Object[] object_0)
System.IntPtr method_7 (System.String string_4, ns27.Class276+Enum20[] enum20_0, System.Object[] object_0)
System.Void method_8 (System.String string_4, System.Object[] object_0)
System.Void method_9 (System.String string_4, ns27.Class276+Enum20[] enum20_0, System.Object[] object_0)
T method_10 (System.String string_4, ns27.Class276+Enum20[] enum20_0, System.Object[] object_0)
T method_11 (System.String string_4, System.Object[] object_0)
System.String method_12 (System.String string_4, ns27.Class276+Enum20[] enum20_0, System.Object[] object_0)
System.String method_13 (System.String string_4, System.Object[] object_0)
T method_14 (System.String string_4, System.Object[] object_0)
T method_15 (System.String string_4, ns27.Class276+Enum20[] enum20_0, System.Object[] object_0)
System.Int32 method_16 ()
System.Int32 method_17 ()
System.IntPtr method_18 (System.Int32 int_1)
T method_19 (System.IntPtr intptr_1)
T method_20 (System.IntPtr intptr_1)
T method_21 (System.Int32 int_1)
T method_22 (System.Int32 int_1)
System.String method_23 (System.Int32 int_1)

@chucklu
Copy link
Collaborator Author

chucklu commented Mar 20, 2020

System.Void smethod_0 ()
System.Void smethod_1 ()
System.IntPtr smethod_2 (System.String string_4)
System.IntPtr smethod_3 (System.String string_4, System.String string_5, System.String string_6)
System.IntPtr smethod_4 (System.IntPtr intptr_1, System.String string_4, ns27.Class276+Enum20[] enum20_0)
System.IntPtr smethod_5 (System.String string_4, System.String string_5, System.String string_6, System.String string_7)
T smethod_6 (System.String string_4, System.String string_5, System.String string_6, System.String string_7)
T smethod_7 (System.String string_4, System.String string_5, System.String string_6, System.String string_7)
System.String smethod_8 (System.String string_4, System.String string_5, System.String string_6, System.String string_7)
System.IntPtr smethod_9 (System.String string_4, System.String string_5, System.String string_6, System.String string_7)
System.IntPtr smethod_10 (System.String string_4, System.String string_5, System.String string_6, System.String string_7, ns27.Class276+Enum20[] enum20_0, System.Object[] object_0)
T smethod_11 (System.String string_4, System.String string_5, System.String string_6, System.String string_7, ns27.Class276+Enum20[] enum20_0, System.Object[] object_0)
System.String smethod_12 (System.String string_4, System.String string_5, System.String string_6, System.String string_7, System.Object[] object_0)
System.String smethod_13 (System.String string_4, System.String string_5, System.String string_6, System.String string_7, ns27.Class276+Enum20[] enum20_0, System.Object[] object_0)
T smethod_14 (System.String string_4, System.String string_5, System.String string_6, System.String string_7, System.Object[] object_0)
T smethod_15 (System.String string_4, System.String string_5, System.String string_6, System.String string_7, System.Object[] object_0)
T smethod_16 (System.String string_4, System.String string_5, System.String string_6, System.String string_7, ns27.Class276+Enum20[] enum20_0, System.Object[] object_0)
System.Void smethod_17 (System.String string_4, System.String string_5, System.String string_6, System.String string_7)
System.Void smethod_18 (System.String string_4, System.String string_5, System.String string_6, System.String string_7, System.Object[] object_0)
System.Void smethod_19 (System.String string_4, System.String string_5, System.String string_6, System.String string_7, ns27.Class276+Enum20[] enum20_0, System.Object[] object_0)

@chucklu
Copy link
Collaborator Author

chucklu commented Apr 17, 2021

获取枚举

// Triton.Game.Mapping.CollectionDeckBoxVisual
// Token: 0x06003D73 RID: 15731 RVA: 0x00026FD0 File Offset: 0x000251D0
public TAG_CLASS GetClass()
{
	return base.method_11<TAG_CLASS>("GetClass", Array.Empty<object>());
}

@chucklu
Copy link
Collaborator Author

chucklu commented Apr 17, 2021

获取枚举

// CollectionDeckSlot
// Token: 0x170000D3 RID: 211
// (get) Token: 0x06000FA2 RID: 4002 RVA: 0x000572E8 File Offset: 0x000554E8
public TAG_PREMIUM UnPreferredPremium
{
	get
	{
		TAG_PREMIUM preferredPremium = CollectionManager.Get().GetPreferredPremium();
		for (int i = 0; i < this.m_count.Count; i++)
		{
			if (this.m_count[i] > 0 && i != (int)preferredPremium)
			{
				return (TAG_PREMIUM)i;
			}
		}
		return preferredPremium;
	}
}

封装之后

// Triton.Game.Mapping.CollectionDeckSlot
// Token: 0x06003DDD RID: 15837 RVA: 0x00033FFF File Offset: 0x000321FF
public TAG_PREMIUM get_UnPreferredPremium()
{
	return base.method_11<TAG_PREMIUM>("get_UnPreferredPremium", Array.Empty<object>());
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant