refactor: use AgentId enums
This commit is contained in:
parent
4fe0b0475a
commit
083165e9cb
|
@ -114,8 +114,7 @@ namespace Glamaholic {
|
|||
var list = new List<GlamourItem>();
|
||||
|
||||
var agents = Framework.Instance()->GetUiModule()->GetAgentModule();
|
||||
// TODO: replace with AgentId.MiragePrismPrismBox when ClientStructs is updated
|
||||
var dresserAgent = agents->GetAgentByInternalId((AgentId) 292);
|
||||
var dresserAgent = agents->GetAgentByInternalId(AgentId.MiragePrismPrismBox);
|
||||
|
||||
var itemsStart = *(IntPtr*) ((IntPtr) dresserAgent + 0x28);
|
||||
if (itemsStart == IntPtr.Zero) {
|
||||
|
@ -171,7 +170,7 @@ namespace Glamaholic {
|
|||
}
|
||||
}
|
||||
|
||||
private static unsafe AgentInterface* EditorAgent => Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId((AgentId) 294);
|
||||
private static unsafe AgentInterface* EditorAgent => Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.MiragePrismMiragePlate);
|
||||
|
||||
internal unsafe void SetGlamourPlateSlot(MirageSource source, int glamId, uint itemId, byte stainId) {
|
||||
this._setGlamourPlateSlot((IntPtr) EditorAgent, source, glamId, itemId, stainId);
|
||||
|
|
|
@ -94,8 +94,7 @@ namespace Glamaholic {
|
|||
|
||||
internal unsafe void TryOn(IEnumerable<SavedGlamourItem> items) {
|
||||
void SetTryOnSave(bool save) {
|
||||
// TODO: replace with AgentId.Tryon once ClientStructs is updated for new agents
|
||||
var tryOnAgent = (IntPtr) Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId((AgentId) 147);
|
||||
var tryOnAgent = (IntPtr) Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.Tryon);
|
||||
if (tryOnAgent != IntPtr.Zero) {
|
||||
*(byte*) (tryOnAgent + 0x2E2) = (byte) (save ? 1 : 0);
|
||||
}
|
||||
|
|
|
@ -47,8 +47,7 @@ namespace Glamaholic.Ui.Helpers {
|
|||
}
|
||||
|
||||
private static unsafe Dictionary<PlateSlot, SavedGlamourItem> GetTryOnItems() {
|
||||
// TODO: replace with AgentId.Tryon once ClientStructs is updated for new agents
|
||||
var agent = (IntPtr) Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId((AgentId) 147);
|
||||
var agent = (IntPtr) Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.Tryon);
|
||||
var firstItem = agent + 0x2E8;
|
||||
|
||||
var items = new Dictionary<PlateSlot, SavedGlamourItem>();
|
||||
|
|
Loading…
Reference in New Issue
Block a user