mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-02-04 09:15:08 +01:00
Merge remote-tracking branch 'origin/main' into feature/warehouse-v2
# Conflicts: # server/channelserver/handlers.go
This commit is contained in:
11
.github/workflows/go.yml
vendored
11
.github/workflows/go.yml
vendored
@@ -1,6 +1,15 @@
|
||||
name: Build
|
||||
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'common/**'
|
||||
- 'config/**'
|
||||
- 'network/**'
|
||||
- 'server/**'
|
||||
- 'go.mod'
|
||||
- 'go.sum'
|
||||
- 'main.go'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
125
README.md
125
README.md
@@ -6,10 +6,13 @@
|
||||
- PlayStation 3
|
||||
- PlayStation Vita
|
||||
- Wii U (Up to Z2)
|
||||
### Versions
|
||||
- ZZ
|
||||
- Z2
|
||||
- Z1
|
||||
### Versions (ClientMode)
|
||||
- All versions after HR compression (G10-ZZ) have been tested extensively and have great functionality.
|
||||
- All versions available on Wii U (G3-Z2) have been tested and should have good functionality.
|
||||
- The second oldest found version is Forward.4 (FW.4), this version has basic functionality.
|
||||
- The oldest found version is Season 6.0 (S6.0), however functionality is very limited.
|
||||
|
||||
If you have an **installed** copy of Monster Hunter Frontier on an old hard drive, **please** get in contact so we can archive it!
|
||||
|
||||
## Setup
|
||||
|
||||
@@ -32,116 +35,4 @@ If you want to modify or compile Erupe yourself, please read on.
|
||||
## Resources
|
||||
|
||||
- [Quest and Scenario Binary Files](https://files.catbox.moe/xf0l7w.7z)
|
||||
- [PewPewDojo Discord](https://discord.gg/CFnzbhQ)
|
||||
|
||||
## Configuration
|
||||
This portion of the documentation goes over the `config.json` file.
|
||||
|
||||
### General Configuration
|
||||
|
||||
| Variable | Description | Default | Options |
|
||||
|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|---------------------------------|
|
||||
| Host | The IP or host address the server is running from | 127.0.0.1 | |
|
||||
| BinPath | The bin path folder is where you place files needed for various parts of the game such as scenario and quest files | bin | |
|
||||
| Language | This is the language the server will run in. Only English `en` and Japanese `ja` are available, if you wish to contribute to tranlation, get in touch | en | en/jp |
|
||||
| DisableSoftCrash | | false | |
|
||||
| HideLoginNotice | This hides the notices that appear on login from `LoginNotices` | true | |
|
||||
| LoginNotices | This is where you place notices for users, you can have multiple notices | | |
|
||||
| PatchServerManifest | | | |
|
||||
| PatchServerFile | | | |
|
||||
| ScreenshotAPIURL | This is the URL you want user sreenshots to go to | | |
|
||||
| DeleteOnSaveCorruption | This option deletes a users save from the database if they corrupt it, can be used as punishment for cheaters | false | |
|
||||
| ClientMode | This tells the server what client version it should target | ZZ | Check compatible versions above |
|
||||
| DevMode | This enables DevModeOptions to be configured | true | |
|
||||
|
||||
### `DevModeOptions` Configuraiton
|
||||
|
||||
| Variable | Description | Default | Options |
|
||||
|----------------------|---------------------------------------------------------------------------------------------|----------|----------------------------------|
|
||||
| AutoCreateAccount | This allows users that don't exist to auto create there account from initial login | true | |
|
||||
| CleanDB | This cleans the database down | false | |
|
||||
| MaxLauncherHR | This sets the launcher value to HR7 to allow you to break World HR requirements | false | |
|
||||
| LogInboundMessages | This will allow inbound messages to be logged to stdout | false | |
|
||||
| LogOutboundMessages | This will allow outbound messages to be logged to stdout | false | |
|
||||
| MaxHexdumpLength | This is the maximum amount of hex bytes that will be dumped to stdout | 0 | |
|
||||
| DivaEvent | This overrides the Diva event stage in game | 2 | 0/1/2/3/-1 |
|
||||
| FestaEvent | This overrides the Hunter Festival event stage in game | 2 | 0/1/2/3/-1 |
|
||||
| TournamentEvent | This overrides the Hunter Tournament event stage in game | 2 | 0/1/2/3/-1 |
|
||||
| MezFesEvent | Enables whether the MezFes event & World are active | true | |
|
||||
| MezFesAlt | Switches the multiplayer MezFes event | false | |
|
||||
| DisableTokenCheck | This disables the random token that is generated at login from being checked, very insecure | false | |
|
||||
| QuestDebugTools | Enable various quest debug logs | false | |
|
||||
| EarthStatusOverride | Enables Pallone Fest, Tower and Conquest War events | 0 | 2=Conquest, 11=Pallone, 21=Tower |
|
||||
| EarthIDOverride | A random event ID | 0 | |
|
||||
| EarthMonsterOverride | Sets the ID of the monster targeted in the Conquest War | 0 | |
|
||||
| SaveDumps.Enables | Enables save dumps to a folder that is set at `SaveDumps.OutputDir` | true | |
|
||||
| SaveDumps.OutputDir | The folder that save dumps are saved to | savedata | |
|
||||
|
||||
### `GameplayOptions` Configuraiton
|
||||
|
||||
| Variable | Description | Default | Options |
|
||||
|----------------------|-----------------------------------------------------------------------------|---------|---------|
|
||||
| FeaturedWeapons | Number of Active Feature weapons to generate daily | 0 | |
|
||||
| MaximumNP | Maximum number of NP held by a player | 100000 | |
|
||||
| MaximumRP | Maximum number of RP held by a player | 100000 | |
|
||||
| DisableLoginBoost | Disables the Login Boost system | false | |
|
||||
| DisableBoostTime | Disables the daily NetCafe Boost Time | false | |
|
||||
| BoostTimeDuration | The number of minutes NetCafe Boost Time lasts for | 120 | |
|
||||
| GuildMealDuration | The number of minutes a Guild Meal can be activated for after cooking | 60 | |
|
||||
| BonusQuestAllowance | Number of Bonus Point Quests to allow daily | 3 | |
|
||||
| DailyQuestAllowance | Number of Daily Quests to allow daily | 1 | |
|
||||
| MezfesSoloTickets | Number of solo tickets given weekly | 10 | |
|
||||
| MezfesGroupTickets | Number of group tickets given weekly | 4 | |
|
||||
| GUrgentRate | Adjusts the rate of G Urgent quests spawning | 10 | |
|
||||
| GCPMultiplier | Adjusts the multiplier of GCP rewarded for quest completion | 1.00 | |
|
||||
| GRPMultiplier | Adjusts the multiplier of G Rank Points rewarded for quest completion | 1.00 | |
|
||||
| GSRPMultiplier | Adjusts the multiplier of G Skill Rank Points rewarded for quest completion | 1.00 | |
|
||||
| GZennyMultiplier | Adjusts the multiplier of G Zenny rewarded for quest completion | 1.00 | |
|
||||
| MaterialMultiplier | Adjusts the multiplier of Monster Materials rewarded for quest completion | 1.00 | |
|
||||
| ExtraCarves | Grant n extra chances to carve ALL carcasses | 0 | |
|
||||
| DisableHunterNavi | Disables the Hunter Navi | false | |
|
||||
| EnableHiganjimaEvent | Enables the Higanjima event in the Rasta Bar | false | |
|
||||
| EnableNierEvent | Enables the Nier event in the Rasta Bar | false | |
|
||||
| DisableRoad | Disables the Hunting Road | false | |
|
||||
|
||||
### Discord
|
||||
There is limited Discord capability in Erupe. The feature allows you to replay messages from your server into a channel.
|
||||
This may be either be removed or revamped in a future version.
|
||||
|
||||
### Commands
|
||||
There are several chat commands that can be turned on and off. Most of them are really for admins or debugging purposes.
|
||||
|
||||
| Name | command | Description | Options |
|
||||
|----------|----------------|--------------------------------------------|---------------------|
|
||||
| Rights | !rights VALUE | Sets the rights integer for your account | |
|
||||
| Teleport | !tele X,Y | Teleports user to specific x,y coordinate | |
|
||||
| Reload | !reload | Reloads all users and character objects | |
|
||||
| KeyQuest | !kqf FLAGS | Sets the Key Quest Flag for your character | |
|
||||
| Course | !course OPTION | Enables/Disables a course for your account | HL,EX,Premium,Boost |
|
||||
| PSN | !psn USERNAME | Links the specified PSN to your account | |
|
||||
|
||||
### Ravi Sub Commands
|
||||
| Name | command | Description |
|
||||
|----------|----------------------------------|-------------------------------|
|
||||
| Raviente | !ravi start | Starts Ravi Event |
|
||||
| Raviente | !ravi cm / !ravi checkmultiplier | Checks Ravi Damage Multiplier |
|
||||
| Raviente | !ravi ss | Send Sedation Support |
|
||||
| Raviente | !ravi sr | Send Resurrection Support |
|
||||
| Raviente | !ravi rs | Request Sedation Support |
|
||||
|
||||
|
||||
## World `Entries` config
|
||||
|
||||
| Config Item | Description | Options |
|
||||
|-------------|------------------|------------------------------------------------------------|
|
||||
| Type | Server type. | 1=Normal, 2=Cities, 3=Newbie, 4=Tavern, 5=Return, 6=MezFes |
|
||||
| Season | Server activity. | 0=Green/Breeding, 1=Orange/Warm, 2=Blue/Cold |
|
||||
|
||||
### `Recommend`
|
||||
This sets the types of quest that can be ordered from a world.
|
||||
* 0 = All quests
|
||||
* 1 = Up to 2 star quests
|
||||
* 2 = Up to 4 star quests
|
||||
* 4 = All Quests in HR (Enables G Experience Tab)
|
||||
* 5 = Only G rank quests
|
||||
* 6 = Mini games world there is no place to order quests
|
||||
- [Mezeporta Square Discord](https://discord.gg/DnwcpXM488)
|
||||
|
||||
11
bundled-schema/DistributionDemo.sql
Normal file
11
bundled-schema/DistributionDemo.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
BEGIN;
|
||||
|
||||
-- Adds a Distribution that can be accepted up to 20 times that gives one of Item Type 30 (Item Box extra page)
|
||||
INSERT INTO distribution (type, event_name, description, times_acceptable) VALUES (1, 'Extra Item Storage', '~C05Adds one new page to your Item Box.', 20);
|
||||
INSERT INTO distribution_items (distribution_id, item_type, quantity) VALUES ((SELECT id FROM distribution ORDER BY id DESC LIMIT 1), 30, 1);
|
||||
|
||||
-- Adds a Distribution that can be accepted up to 20 times that gives one of Item Type 31 (Equipment Box extra page)
|
||||
INSERT INTO distribution (type, event_name, description, times_acceptable) VALUES (1, 'Extra Equipment Storage', '~C05Adds one new page to your Equipment Box.', 20);
|
||||
INSERT INTO distribution_items (distribution_id, item_type, quantity) VALUES ((SELECT id FROM distribution ORDER BY id DESC LIMIT 1), 31, 1);
|
||||
|
||||
END;
|
||||
@@ -1,391 +1,391 @@
|
||||
BEGIN;
|
||||
|
||||
INSERT INTO fpoint_items (item_type, item_id, quantity, fpoints, trade_type) VALUES
|
||||
(7,8895,1,500,0),
|
||||
(7,8891,1,300,0),
|
||||
(7,8892,1,300,0),
|
||||
(7,8893,1,300,0),
|
||||
(7,8894,1,300,0),
|
||||
(7,8890,1,10,0),
|
||||
(7,10354,1,500,0),
|
||||
(7,11983,1,300,0),
|
||||
(7,11984,1,300,0),
|
||||
(7,11985,1,300,0),
|
||||
(7,11986,1,300,0),
|
||||
(7,12524,1,500,0),
|
||||
(7,12470,1,300,0),
|
||||
(7,12471,1,300,0),
|
||||
(7,12472,1,300,0),
|
||||
(7,12473,1,300,0),
|
||||
(7,2158,2,1,0),
|
||||
(7,14548,1,500,0),
|
||||
(7,9509,1,1,0),
|
||||
(7,9510,1,1,0),
|
||||
(7,9511,1,1,0),
|
||||
(7,9512,1,1,0),
|
||||
(7,9513,1,1,0),
|
||||
(7,9514,1,1,0),
|
||||
(7,9515,1,1,0),
|
||||
(7,10753,1,1,0),
|
||||
(7,10754,1,1,0),
|
||||
(7,10755,1,1,0),
|
||||
(7,10756,1,1,0),
|
||||
(7,10757,1,1,0),
|
||||
(7,10758,1,1,0),
|
||||
(7,10759,1,1,0),
|
||||
(7,11296,1,1,0),
|
||||
(7,11297,1,1,0),
|
||||
(7,11298,1,1,0),
|
||||
(7,11299,1,1,0),
|
||||
(7,11300,1,1,0),
|
||||
(7,12386,1,1,0),
|
||||
(7,12387,1,1,0),
|
||||
(7,12388,1,1,0),
|
||||
(7,12389,1,1,0),
|
||||
(7,12390,1,1,0),
|
||||
(7,13034,1,1,0),
|
||||
(7,13035,1,1,0),
|
||||
(7,13036,1,1,0),
|
||||
(7,13037,1,1,0),
|
||||
(7,13038,1,1,0),
|
||||
(7,14179,1,1,0),
|
||||
(7,14180,1,1,0),
|
||||
(7,14181,1,1,0),
|
||||
(7,14182,1,1,0),
|
||||
(7,14183,1,1,0),
|
||||
(7,13422,1,1,0),
|
||||
(7,13423,1,1,0),
|
||||
(7,13424,1,1,0),
|
||||
(7,13425,1,1,0),
|
||||
(7,13426,1,1,0),
|
||||
(7,13427,1,1,0),
|
||||
(7,9796,1,3,0),
|
||||
(7,9700,1,3,0),
|
||||
(7,10380,1,3,0),
|
||||
(7,10810,1,3,0),
|
||||
(7,10811,1,3,0),
|
||||
(7,11436,1,3,0),
|
||||
(7,9509,1,1,0),
|
||||
(7,9510,1,1,0),
|
||||
(7,9511,1,1,0),
|
||||
(7,9512,1,1,0),
|
||||
(7,9513,1,1,0),
|
||||
(7,9514,1,1,0),
|
||||
(7,9515,1,1,0),
|
||||
(7,10753,1,1,0),
|
||||
(7,10754,1,1,0),
|
||||
(7,10755,1,1,0),
|
||||
(7,10756,1,1,0),
|
||||
(7,10757,1,1,0),
|
||||
(7,10758,1,1,0),
|
||||
(7,10759,1,1,0),
|
||||
(7,11296,1,1,0),
|
||||
(7,11297,1,1,0),
|
||||
(7,11298,1,1,0),
|
||||
(7,11299,1,1,0),
|
||||
(7,11300,1,1,0),
|
||||
(7,12509,1,3,0),
|
||||
(7,12386,1,1,0),
|
||||
(7,12387,1,1,0),
|
||||
(7,12388,1,1,0),
|
||||
(7,12389,1,1,0),
|
||||
(7,12390,1,1,0),
|
||||
(7,12872,1,3,0),
|
||||
(7,12873,1,3,0),
|
||||
(7,12840,1,1,0),
|
||||
(7,12841,1,1,0),
|
||||
(7,12874,1,1,0),
|
||||
(7,12875,1,1,0),
|
||||
(7,13191,1,3,0),
|
||||
(7,13177,1,3,0),
|
||||
(7,13326,1,3,0),
|
||||
(7,13034,1,1,0),
|
||||
(7,13035,1,1,0),
|
||||
(7,13036,1,1,0),
|
||||
(7,13037,1,1,0),
|
||||
(7,13038,1,1,0),
|
||||
(7,13178,1,3,0),
|
||||
(7,13453,1,3,0),
|
||||
(7,13449,1,3,0),
|
||||
(7,13450,1,3,0),
|
||||
(7,13404,1,3,0),
|
||||
(7,13422,1,1,0),
|
||||
(7,13423,1,1,0),
|
||||
(7,13424,1,1,0),
|
||||
(7,13425,1,1,0),
|
||||
(7,13426,1,1,0),
|
||||
(7,13427,1,1,0),
|
||||
(7,13791,1,3,0),
|
||||
(7,14006,1,3,0),
|
||||
(7,14031,1,3,0),
|
||||
(7,14032,1,3,0),
|
||||
(7,13960,1,3,0),
|
||||
(7,14029,1,3,0),
|
||||
(7,13956,1,1,0),
|
||||
(7,13958,1,1,0),
|
||||
(7,13957,1,1,0),
|
||||
(7,13959,1,1,0),
|
||||
(7,13790,1,3,0),
|
||||
(7,14005,1,3,0),
|
||||
(7,14010,1,3,0),
|
||||
(7,14009,1,3,0),
|
||||
(7,14008,1,3,0),
|
||||
(7,13965,1,3,0),
|
||||
(7,14028,1,3,0),
|
||||
(7,13963,1,3,0),
|
||||
(7,14026,1,3,0),
|
||||
(7,13964,1,3,0),
|
||||
(7,14027,1,3,0),
|
||||
(7,14069,1,3,0),
|
||||
(7,14124,1,3,0),
|
||||
(7,14065,1,1,0),
|
||||
(7,14066,1,1,0),
|
||||
(7,14067,1,1,0),
|
||||
(7,14068,1,1,0),
|
||||
(7,13962,1,3,0),
|
||||
(7,14125,1,3,0),
|
||||
(7,14089,1,3,0),
|
||||
(7,14090,1,3,0),
|
||||
(7,14091,1,3,0),
|
||||
(7,14092,1,3,0),
|
||||
(7,14194,1,3,0),
|
||||
(7,14191,1,3,0),
|
||||
(7,14198,1,3,0),
|
||||
(7,14197,1,3,0),
|
||||
(7,14179,1,1,0),
|
||||
(7,14180,1,1,0),
|
||||
(7,14181,1,1,0),
|
||||
(7,14182,1,1,0),
|
||||
(7,14183,1,1,0),
|
||||
(7,14196,1,3,0),
|
||||
(7,14195,1,3,0),
|
||||
(7,14193,1,3,0),
|
||||
(7,14192,1,3,0),
|
||||
(7,14407,1,3,0),
|
||||
(7,14414,1,3,0),
|
||||
(7,14406,1,3,0),
|
||||
(7,14413,1,3,0),
|
||||
(7,14416,1,3,0),
|
||||
(7,14549,1,3,0),
|
||||
(7,14550,1,3,0),
|
||||
(7,14502,1,3,0),
|
||||
(7,14507,1,3,0),
|
||||
(7,14501,1,3,0),
|
||||
(7,14506,1,3,0),
|
||||
(7,14500,1,3,0),
|
||||
(7,14505,1,3,0),
|
||||
(7,14498,1,3,0),
|
||||
(7,14659,1,3,0),
|
||||
(7,14660,1,3,0),
|
||||
(7,14657,1,1,0),
|
||||
(7,14658,1,1,0),
|
||||
(7,11420,1,3,0),
|
||||
(7,14704,1,3,0),
|
||||
(7,11288,1,1,0),
|
||||
(7,11289,1,1,0),
|
||||
(7,11290,1,1,0),
|
||||
(7,11291,1,1,0),
|
||||
(7,10750,1,3,0),
|
||||
(7,14705,1,3,0),
|
||||
(7,10633,1,1,0),
|
||||
(7,10634,1,1,0),
|
||||
(7,10635,1,1,0),
|
||||
(7,10636,1,1,0),
|
||||
(7,14662,1,3,0),
|
||||
(7,14663,1,3,0),
|
||||
(7,14665,1,3,0),
|
||||
(7,14666,1,3,0),
|
||||
(7,14667,1,3,0),
|
||||
(7,14668,1,3,0),
|
||||
(7,14669,1,3,0),
|
||||
(7,14670,1,3,0),
|
||||
(7,14671,1,3,0),
|
||||
(7,14672,1,3,0),
|
||||
(7,14673,1,3,0),
|
||||
(7,14674,1,3,0),
|
||||
(7,14675,1,3,0),
|
||||
(7,14676,1,3,0),
|
||||
(7,14677,1,3,0),
|
||||
(7,14678,1,3,0),
|
||||
(7,14679,1,3,0),
|
||||
(7,14680,1,3,0),
|
||||
(7,14681,1,3,0),
|
||||
(7,14682,1,3,0),
|
||||
(7,14683,1,3,0),
|
||||
(7,14684,1,3,0),
|
||||
(7,14685,1,3,0),
|
||||
(7,14686,1,3,0),
|
||||
(7,14687,1,3,0),
|
||||
(7,14688,1,3,0),
|
||||
(7,14689,1,3,0),
|
||||
(7,14690,1,3,0),
|
||||
(7,14691,1,3,0),
|
||||
(7,14692,1,3,0),
|
||||
(7,14693,1,3,0),
|
||||
(7,14694,1,3,0),
|
||||
(7,14695,1,3,0),
|
||||
(7,14696,1,3,0),
|
||||
(7,14697,1,3,0),
|
||||
(7,14698,1,3,0),
|
||||
(7,14699,1,3,0),
|
||||
(7,14700,1,3,0),
|
||||
(7,14314,1,3,0),
|
||||
(7,14503,1,3,0),
|
||||
(7,14510,1,3,0),
|
||||
(7,14904,1,3,0),
|
||||
(7,14906,1,3,0),
|
||||
(7,14910,1,1,0),
|
||||
(7,14912,1,1,0),
|
||||
(7,14905,1,3,0),
|
||||
(7,14907,1,3,0),
|
||||
(7,14911,1,1,0),
|
||||
(7,14909,1,1,0),
|
||||
(7,14855,1,3,0),
|
||||
(7,14894,1,3,0),
|
||||
(7,14913,1,3,0),
|
||||
(7,14914,1,3,0),
|
||||
(7,14891,1,3,0),
|
||||
(7,14895,1,3,0),
|
||||
(7,15027,1,3,0),
|
||||
(7,15028,1,3,0),
|
||||
(7,15026,1,1,0),
|
||||
(7,15025,1,1,0),
|
||||
(7,15024,1,1,0),
|
||||
(7,15023,1,1,0),
|
||||
(7,15064,1,3,0),
|
||||
(7,15065,1,3,0),
|
||||
(7,15030,1,3,0),
|
||||
(7,15031,1,3,0),
|
||||
(7,15062,1,3,0),
|
||||
(7,15063,1,3,0),
|
||||
(7,15066,1,3,0),
|
||||
(7,15067,1,3,0),
|
||||
(7,15061,1,3,0),
|
||||
(7,15060,1,3,0),
|
||||
(7,1227,1,2,0),
|
||||
(7,13176,1,2,0),
|
||||
(7,4360,1,2,0),
|
||||
(7,4358,1,1,0),
|
||||
(7,15118,1,3,0),
|
||||
(7,15119,1,3,0),
|
||||
(7,15113,1,3,0),
|
||||
(7,15114,1,3,0),
|
||||
(7,15115,1,3,0),
|
||||
(7,15116,1,3,0),
|
||||
(7,15220,1,3,0),
|
||||
(7,15221,1,3,0),
|
||||
(7,14126,1,3,0),
|
||||
(7,15222,1,3,0),
|
||||
(7,15223,1,3,0),
|
||||
(7,15224,1,3,0),
|
||||
(7,15225,1,3,0),
|
||||
(7,15524,1,3,0),
|
||||
(7,15525,1,3,0),
|
||||
(7,15507,1,3,0),
|
||||
(7,15508,1,3,0),
|
||||
(7,15285,1,3,0),
|
||||
(7,15286,1,3,0),
|
||||
(7,15281,1,1,0),
|
||||
(7,15282,1,1,0),
|
||||
(7,15283,1,1,0),
|
||||
(7,15284,1,1,0),
|
||||
(7,15776,1,3,0),
|
||||
(7,15777,1,3,0),
|
||||
(7,15774,1,3,0),
|
||||
(7,15775,1,3,0),
|
||||
(7,15823,1,3,0),
|
||||
(7,15824,1,3,0),
|
||||
(7,15343,1,3,0),
|
||||
(7,15342,1,3,0),
|
||||
(7,15341,1,3,0),
|
||||
(7,15340,1,3,0),
|
||||
(7,15339,1,3,0),
|
||||
(7,15338,1,3,0),
|
||||
(7,15337,1,3,0),
|
||||
(7,15336,1,3,0),
|
||||
(7,15335,1,3,0),
|
||||
(7,15334,1,3,0),
|
||||
(7,15333,1,3,0),
|
||||
(7,15332,1,3,0),
|
||||
(7,15331,1,3,0),
|
||||
(7,15330,1,3,0),
|
||||
(7,15329,1,3,0),
|
||||
(7,15328,1,3,0),
|
||||
(7,15327,1,3,0),
|
||||
(7,15326,1,3,0),
|
||||
(7,15325,1,3,0),
|
||||
(7,15324,1,3,0),
|
||||
(7,15323,1,3,0),
|
||||
(7,15322,1,3,0),
|
||||
(7,15321,1,3,0),
|
||||
(7,15314,1,3,0),
|
||||
(7,15312,1,3,0),
|
||||
(7,15311,1,3,0),
|
||||
(7,15306,1,3,0),
|
||||
(7,15307,1,3,0),
|
||||
(7,15308,1,3,0),
|
||||
(7,15309,1,3,0),
|
||||
(7,15310,1,3,0),
|
||||
(7,15305,1,3,0),
|
||||
(7,15304,1,3,0),
|
||||
(7,15303,1,3,0),
|
||||
(7,15302,1,3,0),
|
||||
(7,15301,1,3,0),
|
||||
(7,15300,1,3,0),
|
||||
(7,15299,1,3,0),
|
||||
(7,15298,1,3,0),
|
||||
(7,15297,1,3,0),
|
||||
(7,15296,1,3,0),
|
||||
(7,15295,1,3,0),
|
||||
(7,15293,1,3,0),
|
||||
(7,15294,1,3,0),
|
||||
(7,15292,1,3,0),
|
||||
(7,15291,1,3,0),
|
||||
(7,15290,1,3,0),
|
||||
(7,15289,1,3,0),
|
||||
(7,15315,1,3,0),
|
||||
(7,15316,1,3,0),
|
||||
(7,15317,1,3,0),
|
||||
(7,15318,1,3,0),
|
||||
(7,15319,1,3,0),
|
||||
(7,15320,1,3,0),
|
||||
(7,15819,1,3,0),
|
||||
(7,15820,1,3,0),
|
||||
(7,15821,1,3,0),
|
||||
(7,15822,1,3,0),
|
||||
(7,16450,1,3,0),
|
||||
(7,16451,1,3,0),
|
||||
(7,16459,1,1,0),
|
||||
(7,16460,1,1,0),
|
||||
(7,16461,1,1,0),
|
||||
(7,16462,1,1,0),
|
||||
(7,16463,1,1,0),
|
||||
(7,16464,1,1,0),
|
||||
(7,16465,1,1,0),
|
||||
(7,16466,1,1,0),
|
||||
(7,16467,1,1,0),
|
||||
(7,16468,1,1,0),
|
||||
(7,16469,1,1,0),
|
||||
(7,16470,1,1,0),
|
||||
(7,16471,1,1,0),
|
||||
(7,16472,1,1,0),
|
||||
(7,16454,1,3,0),
|
||||
(7,16455,1,3,0),
|
||||
(7,16442,1,3,0),
|
||||
(7,16443,1,3,0),
|
||||
(7,16342,1,3,0),
|
||||
(7,16343,1,3,0),
|
||||
(7,16444,1,3,0),
|
||||
(7,16445,1,3,0),
|
||||
(7,16344,1,3,0),
|
||||
(7,16345,1,3,0),
|
||||
(7,16352,1,3,0),
|
||||
(7,16353,1,3,0),
|
||||
(7,16446,1,3,0),
|
||||
(7,16447,1,3,0),
|
||||
(7,16448,1,3,0),
|
||||
(7,16449,1,3,0),
|
||||
(7,16348,1,3,0),
|
||||
(7,16349,1,3,0);
|
||||
INSERT INTO fpoint_items (item_type, item_id, quantity, fpoints, buyable) VALUES
|
||||
(7,8895,1,500,true),
|
||||
(7,8891,1,300,true),
|
||||
(7,8892,1,300,true),
|
||||
(7,8893,1,300,true),
|
||||
(7,8894,1,300,true),
|
||||
(7,8890,1,10,true),
|
||||
(7,10354,1,500,true),
|
||||
(7,11983,1,300,true),
|
||||
(7,11984,1,300,true),
|
||||
(7,11985,1,300,true),
|
||||
(7,11986,1,300,true),
|
||||
(7,12524,1,500,true),
|
||||
(7,12470,1,300,true),
|
||||
(7,12471,1,300,true),
|
||||
(7,12472,1,300,true),
|
||||
(7,12473,1,300,true),
|
||||
(7,2158,2,1,true),
|
||||
(7,14548,1,500,true),
|
||||
(7,9509,1,1,true),
|
||||
(7,9510,1,1,true),
|
||||
(7,9511,1,1,true),
|
||||
(7,9512,1,1,true),
|
||||
(7,9513,1,1,true),
|
||||
(7,9514,1,1,true),
|
||||
(7,9515,1,1,true),
|
||||
(7,10753,1,1,true),
|
||||
(7,10754,1,1,true),
|
||||
(7,10755,1,1,true),
|
||||
(7,10756,1,1,true),
|
||||
(7,10757,1,1,true),
|
||||
(7,10758,1,1,true),
|
||||
(7,10759,1,1,true),
|
||||
(7,11296,1,1,true),
|
||||
(7,11297,1,1,true),
|
||||
(7,11298,1,1,true),
|
||||
(7,11299,1,1,true),
|
||||
(7,11300,1,1,true),
|
||||
(7,12386,1,1,true),
|
||||
(7,12387,1,1,true),
|
||||
(7,12388,1,1,true),
|
||||
(7,12389,1,1,true),
|
||||
(7,12390,1,1,true),
|
||||
(7,13034,1,1,true),
|
||||
(7,13035,1,1,true),
|
||||
(7,13036,1,1,true),
|
||||
(7,13037,1,1,true),
|
||||
(7,13038,1,1,true),
|
||||
(7,14179,1,1,true),
|
||||
(7,14180,1,1,true),
|
||||
(7,14181,1,1,true),
|
||||
(7,14182,1,1,true),
|
||||
(7,14183,1,1,true),
|
||||
(7,13422,1,1,true),
|
||||
(7,13423,1,1,true),
|
||||
(7,13424,1,1,true),
|
||||
(7,13425,1,1,true),
|
||||
(7,13426,1,1,true),
|
||||
(7,13427,1,1,true),
|
||||
(7,9796,1,3,false),
|
||||
(7,9700,1,3,false),
|
||||
(7,10380,1,3,false),
|
||||
(7,10810,1,3,false),
|
||||
(7,10811,1,3,false),
|
||||
(7,11436,1,3,false),
|
||||
(7,9509,1,1,false),
|
||||
(7,9510,1,1,false),
|
||||
(7,9511,1,1,false),
|
||||
(7,9512,1,1,false),
|
||||
(7,9513,1,1,false),
|
||||
(7,9514,1,1,false),
|
||||
(7,9515,1,1,false),
|
||||
(7,10753,1,1,false),
|
||||
(7,10754,1,1,false),
|
||||
(7,10755,1,1,false),
|
||||
(7,10756,1,1,false),
|
||||
(7,10757,1,1,false),
|
||||
(7,10758,1,1,false),
|
||||
(7,10759,1,1,false),
|
||||
(7,11296,1,1,false),
|
||||
(7,11297,1,1,false),
|
||||
(7,11298,1,1,false),
|
||||
(7,11299,1,1,false),
|
||||
(7,11300,1,1,false),
|
||||
(7,12509,1,3,false),
|
||||
(7,12386,1,1,false),
|
||||
(7,12387,1,1,false),
|
||||
(7,12388,1,1,false),
|
||||
(7,12389,1,1,false),
|
||||
(7,12390,1,1,false),
|
||||
(7,12872,1,3,false),
|
||||
(7,12873,1,3,false),
|
||||
(7,12840,1,1,false),
|
||||
(7,12841,1,1,false),
|
||||
(7,12874,1,1,false),
|
||||
(7,12875,1,1,false),
|
||||
(7,13191,1,3,false),
|
||||
(7,13177,1,3,false),
|
||||
(7,13326,1,3,false),
|
||||
(7,13034,1,1,false),
|
||||
(7,13035,1,1,false),
|
||||
(7,13036,1,1,false),
|
||||
(7,13037,1,1,false),
|
||||
(7,13038,1,1,false),
|
||||
(7,13178,1,3,false),
|
||||
(7,13453,1,3,false),
|
||||
(7,13449,1,3,false),
|
||||
(7,13450,1,3,false),
|
||||
(7,13404,1,3,false),
|
||||
(7,13422,1,1,false),
|
||||
(7,13423,1,1,false),
|
||||
(7,13424,1,1,false),
|
||||
(7,13425,1,1,false),
|
||||
(7,13426,1,1,false),
|
||||
(7,13427,1,1,false),
|
||||
(7,13791,1,3,false),
|
||||
(7,14006,1,3,false),
|
||||
(7,14031,1,3,false),
|
||||
(7,14032,1,3,false),
|
||||
(7,13960,1,3,false),
|
||||
(7,14029,1,3,false),
|
||||
(7,13956,1,1,false),
|
||||
(7,13958,1,1,false),
|
||||
(7,13957,1,1,false),
|
||||
(7,13959,1,1,false),
|
||||
(7,13790,1,3,false),
|
||||
(7,14005,1,3,false),
|
||||
(7,14010,1,3,false),
|
||||
(7,14009,1,3,false),
|
||||
(7,14008,1,3,false),
|
||||
(7,13965,1,3,false),
|
||||
(7,14028,1,3,false),
|
||||
(7,13963,1,3,false),
|
||||
(7,14026,1,3,false),
|
||||
(7,13964,1,3,false),
|
||||
(7,14027,1,3,false),
|
||||
(7,14069,1,3,false),
|
||||
(7,14124,1,3,false),
|
||||
(7,14065,1,1,false),
|
||||
(7,14066,1,1,false),
|
||||
(7,14067,1,1,false),
|
||||
(7,14068,1,1,false),
|
||||
(7,13962,1,3,false),
|
||||
(7,14125,1,3,false),
|
||||
(7,14089,1,3,false),
|
||||
(7,14090,1,3,false),
|
||||
(7,14091,1,3,false),
|
||||
(7,14092,1,3,false),
|
||||
(7,14194,1,3,false),
|
||||
(7,14191,1,3,false),
|
||||
(7,14198,1,3,false),
|
||||
(7,14197,1,3,false),
|
||||
(7,14179,1,1,false),
|
||||
(7,14180,1,1,false),
|
||||
(7,14181,1,1,false),
|
||||
(7,14182,1,1,false),
|
||||
(7,14183,1,1,false),
|
||||
(7,14196,1,3,false),
|
||||
(7,14195,1,3,false),
|
||||
(7,14193,1,3,false),
|
||||
(7,14192,1,3,false),
|
||||
(7,14407,1,3,false),
|
||||
(7,14414,1,3,false),
|
||||
(7,14406,1,3,false),
|
||||
(7,14413,1,3,false),
|
||||
(7,14416,1,3,false),
|
||||
(7,14549,1,3,false),
|
||||
(7,14550,1,3,false),
|
||||
(7,14502,1,3,false),
|
||||
(7,14507,1,3,false),
|
||||
(7,14501,1,3,false),
|
||||
(7,14506,1,3,false),
|
||||
(7,14500,1,3,false),
|
||||
(7,14505,1,3,false),
|
||||
(7,14498,1,3,false),
|
||||
(7,14659,1,3,false),
|
||||
(7,14660,1,3,false),
|
||||
(7,14657,1,1,false),
|
||||
(7,14658,1,1,false),
|
||||
(7,11420,1,3,false),
|
||||
(7,14704,1,3,false),
|
||||
(7,11288,1,1,false),
|
||||
(7,11289,1,1,false),
|
||||
(7,11290,1,1,false),
|
||||
(7,11291,1,1,false),
|
||||
(7,10750,1,3,false),
|
||||
(7,14705,1,3,false),
|
||||
(7,10633,1,1,false),
|
||||
(7,10634,1,1,false),
|
||||
(7,10635,1,1,false),
|
||||
(7,10636,1,1,false),
|
||||
(7,14662,1,3,false),
|
||||
(7,14663,1,3,false),
|
||||
(7,14665,1,3,false),
|
||||
(7,14666,1,3,false),
|
||||
(7,14667,1,3,false),
|
||||
(7,14668,1,3,false),
|
||||
(7,14669,1,3,false),
|
||||
(7,14670,1,3,false),
|
||||
(7,14671,1,3,false),
|
||||
(7,14672,1,3,false),
|
||||
(7,14673,1,3,false),
|
||||
(7,14674,1,3,false),
|
||||
(7,14675,1,3,false),
|
||||
(7,14676,1,3,false),
|
||||
(7,14677,1,3,false),
|
||||
(7,14678,1,3,false),
|
||||
(7,14679,1,3,false),
|
||||
(7,14680,1,3,false),
|
||||
(7,14681,1,3,false),
|
||||
(7,14682,1,3,false),
|
||||
(7,14683,1,3,false),
|
||||
(7,14684,1,3,false),
|
||||
(7,14685,1,3,false),
|
||||
(7,14686,1,3,false),
|
||||
(7,14687,1,3,false),
|
||||
(7,14688,1,3,false),
|
||||
(7,14689,1,3,false),
|
||||
(7,14690,1,3,false),
|
||||
(7,14691,1,3,false),
|
||||
(7,14692,1,3,false),
|
||||
(7,14693,1,3,false),
|
||||
(7,14694,1,3,false),
|
||||
(7,14695,1,3,false),
|
||||
(7,14696,1,3,false),
|
||||
(7,14697,1,3,false),
|
||||
(7,14698,1,3,false),
|
||||
(7,14699,1,3,false),
|
||||
(7,14700,1,3,false),
|
||||
(7,14314,1,3,false),
|
||||
(7,14503,1,3,false),
|
||||
(7,14510,1,3,false),
|
||||
(7,14904,1,3,false),
|
||||
(7,14906,1,3,false),
|
||||
(7,14910,1,1,false),
|
||||
(7,14912,1,1,false),
|
||||
(7,14905,1,3,false),
|
||||
(7,14907,1,3,false),
|
||||
(7,14911,1,1,false),
|
||||
(7,14909,1,1,false),
|
||||
(7,14855,1,3,false),
|
||||
(7,14894,1,3,false),
|
||||
(7,14913,1,3,false),
|
||||
(7,14914,1,3,false),
|
||||
(7,14891,1,3,false),
|
||||
(7,14895,1,3,false),
|
||||
(7,15027,1,3,false),
|
||||
(7,15028,1,3,false),
|
||||
(7,15026,1,1,false),
|
||||
(7,15025,1,1,false),
|
||||
(7,15024,1,1,false),
|
||||
(7,15023,1,1,false),
|
||||
(7,15064,1,3,false),
|
||||
(7,15065,1,3,false),
|
||||
(7,15030,1,3,false),
|
||||
(7,15031,1,3,false),
|
||||
(7,15062,1,3,false),
|
||||
(7,15063,1,3,false),
|
||||
(7,15066,1,3,false),
|
||||
(7,15067,1,3,false),
|
||||
(7,15061,1,3,false),
|
||||
(7,15060,1,3,false),
|
||||
(7,1227,1,2,false),
|
||||
(7,13176,1,2,false),
|
||||
(7,4360,1,2,false),
|
||||
(7,4358,1,1,false),
|
||||
(7,15118,1,3,false),
|
||||
(7,15119,1,3,false),
|
||||
(7,15113,1,3,false),
|
||||
(7,15114,1,3,false),
|
||||
(7,15115,1,3,false),
|
||||
(7,15116,1,3,false),
|
||||
(7,15220,1,3,false),
|
||||
(7,15221,1,3,false),
|
||||
(7,14126,1,3,false),
|
||||
(7,15222,1,3,false),
|
||||
(7,15223,1,3,false),
|
||||
(7,15224,1,3,false),
|
||||
(7,15225,1,3,false),
|
||||
(7,15524,1,3,false),
|
||||
(7,15525,1,3,false),
|
||||
(7,15507,1,3,false),
|
||||
(7,15508,1,3,false),
|
||||
(7,15285,1,3,false),
|
||||
(7,15286,1,3,false),
|
||||
(7,15281,1,1,false),
|
||||
(7,15282,1,1,false),
|
||||
(7,15283,1,1,false),
|
||||
(7,15284,1,1,false),
|
||||
(7,15776,1,3,false),
|
||||
(7,15777,1,3,false),
|
||||
(7,15774,1,3,false),
|
||||
(7,15775,1,3,false),
|
||||
(7,15823,1,3,false),
|
||||
(7,15824,1,3,false),
|
||||
(7,15343,1,3,false),
|
||||
(7,15342,1,3,false),
|
||||
(7,15341,1,3,false),
|
||||
(7,15340,1,3,false),
|
||||
(7,15339,1,3,false),
|
||||
(7,15338,1,3,false),
|
||||
(7,15337,1,3,false),
|
||||
(7,15336,1,3,false),
|
||||
(7,15335,1,3,false),
|
||||
(7,15334,1,3,false),
|
||||
(7,15333,1,3,false),
|
||||
(7,15332,1,3,false),
|
||||
(7,15331,1,3,false),
|
||||
(7,15330,1,3,false),
|
||||
(7,15329,1,3,false),
|
||||
(7,15328,1,3,false),
|
||||
(7,15327,1,3,false),
|
||||
(7,15326,1,3,false),
|
||||
(7,15325,1,3,false),
|
||||
(7,15324,1,3,false),
|
||||
(7,15323,1,3,false),
|
||||
(7,15322,1,3,false),
|
||||
(7,15321,1,3,false),
|
||||
(7,15314,1,3,false),
|
||||
(7,15312,1,3,false),
|
||||
(7,15311,1,3,false),
|
||||
(7,15306,1,3,false),
|
||||
(7,15307,1,3,false),
|
||||
(7,15308,1,3,false),
|
||||
(7,15309,1,3,false),
|
||||
(7,15310,1,3,false),
|
||||
(7,15305,1,3,false),
|
||||
(7,15304,1,3,false),
|
||||
(7,15303,1,3,false),
|
||||
(7,15302,1,3,false),
|
||||
(7,15301,1,3,false),
|
||||
(7,15300,1,3,false),
|
||||
(7,15299,1,3,false),
|
||||
(7,15298,1,3,false),
|
||||
(7,15297,1,3,false),
|
||||
(7,15296,1,3,false),
|
||||
(7,15295,1,3,false),
|
||||
(7,15293,1,3,false),
|
||||
(7,15294,1,3,false),
|
||||
(7,15292,1,3,false),
|
||||
(7,15291,1,3,false),
|
||||
(7,15290,1,3,false),
|
||||
(7,15289,1,3,false),
|
||||
(7,15315,1,3,false),
|
||||
(7,15316,1,3,false),
|
||||
(7,15317,1,3,false),
|
||||
(7,15318,1,3,false),
|
||||
(7,15319,1,3,false),
|
||||
(7,15320,1,3,false),
|
||||
(7,15819,1,3,false),
|
||||
(7,15820,1,3,false),
|
||||
(7,15821,1,3,false),
|
||||
(7,15822,1,3,false),
|
||||
(7,16450,1,3,false),
|
||||
(7,16451,1,3,false),
|
||||
(7,16459,1,1,false),
|
||||
(7,16460,1,1,false),
|
||||
(7,16461,1,1,false),
|
||||
(7,16462,1,1,false),
|
||||
(7,16463,1,1,false),
|
||||
(7,16464,1,1,false),
|
||||
(7,16465,1,1,false),
|
||||
(7,16466,1,1,false),
|
||||
(7,16467,1,1,false),
|
||||
(7,16468,1,1,false),
|
||||
(7,16469,1,1,false),
|
||||
(7,16470,1,1,false),
|
||||
(7,16471,1,1,false),
|
||||
(7,16472,1,1,false),
|
||||
(7,16454,1,3,false),
|
||||
(7,16455,1,3,false),
|
||||
(7,16442,1,3,false),
|
||||
(7,16443,1,3,false),
|
||||
(7,16342,1,3,false),
|
||||
(7,16343,1,3,false),
|
||||
(7,16444,1,3,false),
|
||||
(7,16445,1,3,false),
|
||||
(7,16344,1,3,false),
|
||||
(7,16345,1,3,false),
|
||||
(7,16352,1,3,false),
|
||||
(7,16353,1,3,false),
|
||||
(7,16446,1,3,false),
|
||||
(7,16447,1,3,false),
|
||||
(7,16448,1,3,false),
|
||||
(7,16449,1,3,false),
|
||||
(7,16348,1,3,false),
|
||||
(7,16349,1,3,false);
|
||||
|
||||
END;
|
||||
@@ -5,6 +5,42 @@ INSERT INTO public.shop_items
|
||||
VALUES
|
||||
(5,5,16516,100,1,0,0,1,0,0,0,0),
|
||||
(5,5,16517,100,1,0,0,1,0,0,0,0),
|
||||
(6,5,9958,3,3,1,0,0,0,0,0,0),
|
||||
(6,5,1897,3,1,1,0,0,0,0,0,0),
|
||||
(6,5,8889,3,1,0,0,1,0,0,0,0),
|
||||
(6,5,6176,3,6,1,0,0,0,0,0,0),
|
||||
(6,5,1472,3,10,1,0,0,0,0,0,0),
|
||||
(6,5,7280,3,3,0,0,1,0,0,0,0),
|
||||
(6,5,8027,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,8028,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,8029,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,8026,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,8030,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,4353,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,4354,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,4355,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,4356,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,4357,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,4745,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,4746,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,4747,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,4748,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,4749,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,5122,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,5123,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,5124,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,5125,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,5126,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,5795,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,5796,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,5797,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,5798,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,5799,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,6168,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,6169,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,6170,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,6171,3,30,1,0,0,0,0,0,0),
|
||||
(6,5,6172,3,30,1,0,0,0,0,0,0),
|
||||
(7,0,13190,10,1,0,0,0,0,0,0,0),
|
||||
(7,0,1662,10,1,0,0,0,0,0,0,0),
|
||||
(7,0,10179,100,1,0,0,0,0,0,0,0);
|
||||
|
||||
178
bundled-schema/ScenarioDefaults.sql
Normal file
178
bundled-schema/ScenarioDefaults.sql
Normal file
@@ -0,0 +1,178 @@
|
||||
BEGIN;
|
||||
|
||||
INSERT INTO public.scenario_counter
|
||||
(scenario_id, category_id)
|
||||
VALUES
|
||||
(17,0),
|
||||
(93,1),
|
||||
(92,1),
|
||||
(81,1),
|
||||
(91,1),
|
||||
(90,1),
|
||||
(89,1),
|
||||
(88,1),
|
||||
(87,1),
|
||||
(86,1),
|
||||
(85,1),
|
||||
(84,1),
|
||||
(83,1),
|
||||
(82,1),
|
||||
(87,3),
|
||||
(88,3),
|
||||
(89,3),
|
||||
(90,3),
|
||||
(91,3),
|
||||
(92,3),
|
||||
(83,3),
|
||||
(86,3),
|
||||
(60,3),
|
||||
(58,3),
|
||||
(59,3),
|
||||
(27,3),
|
||||
(25,3),
|
||||
(26,3),
|
||||
(23,3),
|
||||
(2,3),
|
||||
(3,3),
|
||||
(4,3),
|
||||
(31,3),
|
||||
(32,3),
|
||||
(33,3),
|
||||
(34,3),
|
||||
(35,3),
|
||||
(36,3),
|
||||
(37,3),
|
||||
(40,3),
|
||||
(38,3),
|
||||
(39,3),
|
||||
(48,3),
|
||||
(12,3),
|
||||
(13,3),
|
||||
(30,3),
|
||||
(29,3),
|
||||
(46,3),
|
||||
(0,4),
|
||||
(1,4),
|
||||
(2,4),
|
||||
(3,4),
|
||||
(4,4),
|
||||
(5,4),
|
||||
(6,4),
|
||||
(7,4),
|
||||
(8,4),
|
||||
(9,4),
|
||||
(10,4),
|
||||
(11,4),
|
||||
(12,4),
|
||||
(13,4),
|
||||
(14,4),
|
||||
(50,5),
|
||||
(51,5),
|
||||
(52,5),
|
||||
(53,5),
|
||||
(54,5),
|
||||
(55,5),
|
||||
(56,5),
|
||||
(58,5),
|
||||
(63,5),
|
||||
(64,5),
|
||||
(65,5),
|
||||
(67,5),
|
||||
(71,5),
|
||||
(75,5),
|
||||
(61,5),
|
||||
(68,5),
|
||||
(66,5),
|
||||
(76,5),
|
||||
(70,5),
|
||||
(77,5),
|
||||
(72,5),
|
||||
(74,5),
|
||||
(73,5),
|
||||
(78,5),
|
||||
(69,5),
|
||||
(62,5),
|
||||
(79,5),
|
||||
(0,6),
|
||||
(1,6),
|
||||
(2,6),
|
||||
(3,6),
|
||||
(4,6),
|
||||
(5,6),
|
||||
(6,6),
|
||||
(7,6),
|
||||
(8,6),
|
||||
(9,6),
|
||||
(17,6),
|
||||
(10,6),
|
||||
(11,6),
|
||||
(12,6),
|
||||
(13,6),
|
||||
(14,6),
|
||||
(15,6),
|
||||
(16,6),
|
||||
(50,7),
|
||||
(53,7),
|
||||
(62,7),
|
||||
(52,7),
|
||||
(56,7),
|
||||
(51,7),
|
||||
(49,7),
|
||||
(54,7),
|
||||
(57,7),
|
||||
(55,7),
|
||||
(61,7),
|
||||
(58,7),
|
||||
(60,7),
|
||||
(59,7),
|
||||
(42,7),
|
||||
(48,7),
|
||||
(40,7),
|
||||
(39,7),
|
||||
(43,7),
|
||||
(46,7),
|
||||
(41,7),
|
||||
(44,7),
|
||||
(45,7),
|
||||
(47,7),
|
||||
(37,7),
|
||||
(34,7),
|
||||
(33,7),
|
||||
(32,7),
|
||||
(28,7),
|
||||
(26,7),
|
||||
(36,7),
|
||||
(38,7),
|
||||
(35,7),
|
||||
(27,7),
|
||||
(30,7),
|
||||
(31,7),
|
||||
(29,7),
|
||||
(24,7),
|
||||
(23,7),
|
||||
(22,7),
|
||||
(21,7),
|
||||
(25,7),
|
||||
(20,7),
|
||||
(7,7),
|
||||
(9,7),
|
||||
(13,7),
|
||||
(16,7),
|
||||
(12,7),
|
||||
(14,7),
|
||||
(15,7),
|
||||
(19,7),
|
||||
(10,7),
|
||||
(8,7),
|
||||
(11,7),
|
||||
(18,7),
|
||||
(17,7),
|
||||
(6,7),
|
||||
(5,7),
|
||||
(4,7),
|
||||
(3,7),
|
||||
(2,7),
|
||||
(1,7),
|
||||
(0,7);
|
||||
|
||||
END;
|
||||
366
common/mhfmon/mhfmon.go
Normal file
366
common/mhfmon/mhfmon.go
Normal file
@@ -0,0 +1,366 @@
|
||||
package mhfmon
|
||||
|
||||
const (
|
||||
Mon0 = iota
|
||||
Rathian
|
||||
Fatalis
|
||||
Kelbi
|
||||
Mosswine
|
||||
Bullfango
|
||||
YianKutKu
|
||||
LaoShanLung
|
||||
Cephadrome
|
||||
Felyne
|
||||
VeggieElder
|
||||
Rathalos
|
||||
Aptonoth
|
||||
Genprey
|
||||
Diablos
|
||||
Khezu
|
||||
Velociprey
|
||||
Gravios
|
||||
Mon18
|
||||
Vespoid
|
||||
Gypceros
|
||||
Plesioth
|
||||
Basarios
|
||||
Melynx
|
||||
Hornetaur
|
||||
Apceros
|
||||
Monoblos
|
||||
Velocidrome
|
||||
Gendrome
|
||||
Mon29
|
||||
Ioprey
|
||||
Iodrome
|
||||
Mon32
|
||||
Kirin
|
||||
Cephalos
|
||||
Giaprey
|
||||
CrimsonFatalis
|
||||
PinkRathian
|
||||
BlueYianKutKu
|
||||
PurpleGypceros
|
||||
YianGaruga
|
||||
SilverRathalos
|
||||
GoldRathian
|
||||
BlackDiablos
|
||||
WhiteMonoblos
|
||||
RedKhezu
|
||||
GreenPlesioth
|
||||
BlackGravios
|
||||
DaimyoHermitaur
|
||||
AzureRathalos
|
||||
AshenLaoShanLung
|
||||
Blangonga
|
||||
Congalala
|
||||
Rajang
|
||||
KushalaDaora
|
||||
ShenGaoren
|
||||
GreatThunderbug
|
||||
Shakalaka
|
||||
YamaTsukami
|
||||
Chameleos
|
||||
RustedKushalaDaora
|
||||
Blango
|
||||
Conga
|
||||
Remobra
|
||||
Lunastra
|
||||
Teostra
|
||||
Hermitaur
|
||||
ShogunCeanataur
|
||||
Bulldrome
|
||||
Anteka
|
||||
Popo
|
||||
WhiteFatalis
|
||||
Mon72
|
||||
Ceanataur
|
||||
Hypnocatrice
|
||||
Lavasioth
|
||||
Tigrex
|
||||
Akantor
|
||||
BrightHypnoc
|
||||
RedLavasioth
|
||||
Espinas
|
||||
BurningEspinas
|
||||
WhiteHypnoc
|
||||
AqraVashimu
|
||||
AqraJebia
|
||||
Berukyurosu
|
||||
Mon86
|
||||
Mon87
|
||||
Mon88
|
||||
Pariapuria
|
||||
PearlEspinas
|
||||
KamuOrugaron
|
||||
NonoOrugaron
|
||||
Raviente
|
||||
Dyuragaua
|
||||
Doragyurosu
|
||||
Gurenzeburu
|
||||
Burukku
|
||||
Erupe
|
||||
Rukodiora
|
||||
Unknown
|
||||
Gogomoa
|
||||
Kokomoa
|
||||
TaikunZamuza
|
||||
Abiorugu
|
||||
Kuarusepusu
|
||||
Odibatorasu
|
||||
Disufiroa
|
||||
Rebidiora
|
||||
Anorupatisu
|
||||
Hyujikiki
|
||||
Midogaron
|
||||
Giaorugu
|
||||
MiRu
|
||||
Farunokku
|
||||
Pokaradon
|
||||
Shantien
|
||||
Pokara
|
||||
Mon118
|
||||
Goruganosu
|
||||
Aruganosu
|
||||
Baruragaru
|
||||
Zerureusu
|
||||
Gougarf
|
||||
Uruki
|
||||
Forokururu
|
||||
Meraginasu
|
||||
Diorex
|
||||
GarubaDaora
|
||||
Inagami
|
||||
Varusaburosu
|
||||
Poborubarumu
|
||||
Block1Duremudira
|
||||
Mon133
|
||||
Mon134
|
||||
Mon135
|
||||
Mon136
|
||||
Mon137
|
||||
Mon138
|
||||
Gureadomosu
|
||||
Harudomerugu
|
||||
Toridcless
|
||||
Gasurabazura
|
||||
Kusubami
|
||||
YamaKurai
|
||||
Block2Duremudira
|
||||
Zinogre
|
||||
Deviljho
|
||||
Brachydios
|
||||
BerserkRaviente
|
||||
ToaTesukatora
|
||||
Barioth
|
||||
Uragaan
|
||||
StygianZinogre
|
||||
Guanzorumu
|
||||
SavageDeviljho
|
||||
Mon156
|
||||
Egyurasu
|
||||
Voljang
|
||||
Nargacuga
|
||||
Keoaruboru
|
||||
Zenaserisu
|
||||
GoreMagala
|
||||
BlinkingNargacuga
|
||||
ShagaruMagala
|
||||
Amatsu
|
||||
Eruzerion
|
||||
MusouDuremudira
|
||||
Mon168
|
||||
Seregios
|
||||
Bogabadorumu
|
||||
Mon171
|
||||
MusouBogabadorumu
|
||||
CostumedUruki
|
||||
MusouZerureusu
|
||||
Rappy
|
||||
KingShakalaka
|
||||
)
|
||||
|
||||
type Monster struct {
|
||||
Name string
|
||||
Large bool
|
||||
}
|
||||
|
||||
var Monsters = []Monster{
|
||||
{"Mon0", false},
|
||||
{"Rathian", true},
|
||||
{"Fatalis", true},
|
||||
{"Kelbi", false},
|
||||
{"Mosswine", false},
|
||||
{"Bullfango", false},
|
||||
{"Yian Kut-Ku", true},
|
||||
{"Lao-Shan Lung", true},
|
||||
{"Cephadrome", true},
|
||||
{"Felyne", false},
|
||||
{"Veggie Elder", false},
|
||||
{"Rathalos", true},
|
||||
{"Aptonoth", false},
|
||||
{"Genprey", false},
|
||||
{"Diablos", true},
|
||||
{"Khezu", true},
|
||||
{"Velociprey", false},
|
||||
{"Gravios", true},
|
||||
{"Mon18", false},
|
||||
{"Vespoid", false},
|
||||
{"Gypceros", true},
|
||||
{"Plesioth", true},
|
||||
{"Basarios", true},
|
||||
{"Melynx", false},
|
||||
{"Hornetaur", false},
|
||||
{"Apceros", false},
|
||||
{"Monoblos", true},
|
||||
{"Velocidrome", true},
|
||||
{"Gendrome", true},
|
||||
{"Mon29", false},
|
||||
{"Ioprey", false},
|
||||
{"Iodrome", true},
|
||||
{"Mon32", false},
|
||||
{"Kirin", true},
|
||||
{"Cephalos", false},
|
||||
{"Giaprey", false},
|
||||
{"Crimson Fatalis", true},
|
||||
{"Pink Rathian", true},
|
||||
{"Blue Yian Kut-Ku", true},
|
||||
{"Purple Gypceros", true},
|
||||
{"Yian Garuga", true},
|
||||
{"Silver Rathalos", true},
|
||||
{"Gold Rathian", true},
|
||||
{"Black Diablos", true},
|
||||
{"White Monoblos", true},
|
||||
{"Red Khezu", true},
|
||||
{"Green Plesioth", true},
|
||||
{"Black Gravios", true},
|
||||
{"Daimyo Hermitaur", true},
|
||||
{"Azure Rathalos", true},
|
||||
{"Ashen Lao-Shan Lung", true},
|
||||
{"Blangonga", true},
|
||||
{"Congalala", true},
|
||||
{"Rajang", true},
|
||||
{"Kushala Daora", true},
|
||||
{"Shen Gaoren", true},
|
||||
{"Great Thunderbug", false},
|
||||
{"Shakalaka", false},
|
||||
{"Yama Tsukami", true},
|
||||
{"Chameleos", true},
|
||||
{"Rusted Kushala Daora", true},
|
||||
{"Blango", false},
|
||||
{"Conga", false},
|
||||
{"Remobra", false},
|
||||
{"Lunastra", true},
|
||||
{"Teostra", true},
|
||||
{"Hermitaur", false},
|
||||
{"Shogun Ceanataur", true},
|
||||
{"Bulldrome", true},
|
||||
{"Anteka", false},
|
||||
{"Popo", false},
|
||||
{"White Fatalis", true},
|
||||
{"Mon72", false},
|
||||
{"Ceanataur", false},
|
||||
{"Hypnocatrice", true},
|
||||
{"Lavasioth", true},
|
||||
{"Tigrex", true},
|
||||
{"Akantor", true},
|
||||
{"Bright Hypnocatrice", true},
|
||||
{"Red Lavasioth", true},
|
||||
{"Espinas", true},
|
||||
{"Burning Espinas", true},
|
||||
{"White Hypnocatrice", true},
|
||||
{"Aqra Vashimu", true},
|
||||
{"Aqra Jebia", true},
|
||||
{"Berukyurosu", true},
|
||||
{"Mon86", false},
|
||||
{"Mon87", false},
|
||||
{"Mon88", false},
|
||||
{"Pariapuria", true},
|
||||
{"Pearl Espinas", true},
|
||||
{"Kamu Orugaron", true},
|
||||
{"Nono Orugaron", true},
|
||||
{"Raviente", true}, // + Violent
|
||||
{"Dyuragaua", true},
|
||||
{"Doragyurosu", true},
|
||||
{"Gurenzeburu", true},
|
||||
{"Burukku", false},
|
||||
{"Erupe", false},
|
||||
{"Rukodiora", true},
|
||||
{"Unknown", true},
|
||||
{"Gogomoa", true},
|
||||
{"Kokomoa", false},
|
||||
{"Taikun Zamuza", true},
|
||||
{"Abiorugu", true},
|
||||
{"Kuarusepusu", true},
|
||||
{"Odibatorasu", true},
|
||||
{"Disufiroa", true},
|
||||
{"Rebidiora", true},
|
||||
{"Anorupatisu", true},
|
||||
{"Hyujikiki", true},
|
||||
{"Midogaron", true},
|
||||
{"Giaorugu", true},
|
||||
{"Mi-Ru", true}, // + Musou
|
||||
{"Farunokku", true},
|
||||
{"Pokaradon", true},
|
||||
{"Shantien", true},
|
||||
{"Pokara", false},
|
||||
{"Mon118", false},
|
||||
{"Goruganosu", true},
|
||||
{"Aruganosu", true},
|
||||
{"Baruragaru", true},
|
||||
{"Zerureusu", true},
|
||||
{"Gougarf", true}, // Both
|
||||
{"Uruki", false},
|
||||
{"Forokururu", true},
|
||||
{"Meraginasu", true},
|
||||
{"Diorex", true},
|
||||
{"Garuba Daora", true},
|
||||
{"Inagami", true},
|
||||
{"Varusablos", true},
|
||||
{"Poborubarumu", true},
|
||||
{"1st Block Duremudira", true},
|
||||
{"Mon133", false},
|
||||
{"Mon134", false},
|
||||
{"Mon135", false},
|
||||
{"Mon136", false},
|
||||
{"Mon137", false},
|
||||
{"Mon138", false},
|
||||
{"Gureadomosu", true},
|
||||
{"Harudomerugu", true},
|
||||
{"Toridcless", true},
|
||||
{"Gasurabazura", true},
|
||||
{"Kusubami", false},
|
||||
{"Yama Kurai", true},
|
||||
{"2nd Block Duremudira", true},
|
||||
{"Zinogre", true},
|
||||
{"Deviljho", true},
|
||||
{"Brachydios", true},
|
||||
{"Berserk Raviente", true},
|
||||
{"Toa Tesukatora", true},
|
||||
{"Barioth", true},
|
||||
{"Uragaan", true},
|
||||
{"Stygian Zinogre", true},
|
||||
{"Guanzorumu", true},
|
||||
{"Savage Deviljho", true}, // + Starving/Heavenly
|
||||
{"Mon156", false},
|
||||
{"Egyurasu", false},
|
||||
{"Voljang", true},
|
||||
{"Nargacuga", true},
|
||||
{"Keoaruboru", true},
|
||||
{"Zenaserisu", true},
|
||||
{"Gore Magala", true},
|
||||
{"Blinking Nargacuga", true},
|
||||
{"Shagaru Magala", true},
|
||||
{"Amatsu", true},
|
||||
{"Eruzerion", true}, // + Musou
|
||||
{"Musou Duremudira", true},
|
||||
{"Mon168", false},
|
||||
{"Seregios", true},
|
||||
{"Bogabadorumu", true},
|
||||
{"Mon171", false},
|
||||
{"Musou Bogabadorumu", true},
|
||||
{"Costumed Uruki", false},
|
||||
{"Musou Zerureusu", true},
|
||||
{"Rappy", false},
|
||||
{"King Shakalaka", false},
|
||||
}
|
||||
@@ -12,7 +12,7 @@ type StringStack struct {
|
||||
|
||||
// New creates a new instance of StringStack
|
||||
func New() *StringStack {
|
||||
return &StringStack{Locked: false}
|
||||
return &StringStack{}
|
||||
}
|
||||
|
||||
// Set sets up a new StringStack
|
||||
@@ -41,11 +41,12 @@ func (s *StringStack) Push(v string) {
|
||||
|
||||
// Pop pops a string from the stack.
|
||||
func (s *StringStack) Pop() (string, error) {
|
||||
var x string
|
||||
if len(s.stack) == 0 {
|
||||
return "", errors.New("no items on stack")
|
||||
return x, errors.New("no items on stack")
|
||||
}
|
||||
|
||||
x := s.stack[len(s.stack)-1]
|
||||
x = s.stack[len(s.stack)-1]
|
||||
s.stack = s.stack[:len(s.stack)-1]
|
||||
|
||||
return x, nil
|
||||
|
||||
@@ -69,7 +69,7 @@ func CSVRemove(csv string, v int) string {
|
||||
func CSVContains(csv string, v int) bool {
|
||||
s := strings.Split(csv, ",")
|
||||
for i := 0; i < len(s); i++ {
|
||||
j, _ := strconv.ParseInt(s[i], 10, 64)
|
||||
j, _ := strconv.ParseInt(s[i], 10, 32)
|
||||
if int(j) == v {
|
||||
return true
|
||||
}
|
||||
@@ -92,7 +92,7 @@ func CSVElems(csv string) []int {
|
||||
}
|
||||
s := strings.Split(csv, ",")
|
||||
for i := 0; i < len(s); i++ {
|
||||
j, _ := strconv.ParseInt(s[i], 10, 64)
|
||||
j, _ := strconv.ParseInt(s[i], 10, 32)
|
||||
r = append(r, int(j))
|
||||
}
|
||||
return r
|
||||
|
||||
41
config.json
41
config.json
@@ -12,26 +12,29 @@
|
||||
"ScreenshotAPIURL": "",
|
||||
"DeleteOnSaveCorruption": false,
|
||||
"ClientMode": "ZZ",
|
||||
"QuestCacheExpiry": 300,
|
||||
"ProxyPort": 0,
|
||||
"CommandPrefix": "!",
|
||||
"DevMode": true,
|
||||
"DevModeOptions": {
|
||||
"AutoCreateAccount": true,
|
||||
"CleanDB": false,
|
||||
"MaxLauncherHR": false,
|
||||
"LogInboundMessages": true,
|
||||
"LogOutboundMessages": true,
|
||||
"LogInboundMessages": false,
|
||||
"LogOutboundMessages": false,
|
||||
"LogMessageData": false,
|
||||
"MaxHexdumpLength": 256,
|
||||
"DivaEvent": 0,
|
||||
"FestaEvent": -1,
|
||||
"TournamentEvent": 0,
|
||||
"MezFesEvent": true,
|
||||
"MezFesAlt": false,
|
||||
"DisableTokenCheck": false,
|
||||
"QuestDebugTools": false,
|
||||
"EarthStatusOverride": 0,
|
||||
"EarthIDOverride": 0,
|
||||
"EarthMonsterOverride": 0,
|
||||
"EarthMonsterOverride": [0, 0, 0, 0],
|
||||
"SaveDumps": {
|
||||
"Enabled": true,
|
||||
"RawEnabled": false,
|
||||
"OutputDir": "save-backups"
|
||||
}
|
||||
},
|
||||
@@ -40,10 +43,12 @@
|
||||
"MaximumNP": 100000,
|
||||
"MaximumRP": 50000,
|
||||
"MaximumFP": 120000,
|
||||
"TreasureHuntExpiry": 604800,
|
||||
"DisableLoginBoost": false,
|
||||
"DisableBoostTime": false,
|
||||
"BoostTimeDuration": 120,
|
||||
"GuildMealDuration": 60,
|
||||
"BoostTimeDuration": 7200,
|
||||
"ClanMealDuration": 3600,
|
||||
"ClanMemberLimits": [[0, 30], [3, 40], [7, 50], [10, 60]],
|
||||
"BonusQuestAllowance": 3,
|
||||
"DailyQuestAllowance": 1,
|
||||
"MezfesSoloTickets": 10,
|
||||
@@ -54,7 +59,7 @@
|
||||
"BerserkRavienteMaxPlayers": 32,
|
||||
"ExtremeRavienteMaxPlayers": 32,
|
||||
"SmallBerserkRavienteMaxPlayers": 8,
|
||||
"GUrgentRate": 10,
|
||||
"GUrgentRate": 0.10,
|
||||
"GCPMultiplier": 1.00,
|
||||
"GRPMultiplier": 1.00,
|
||||
"GSRPMultiplier": 1.00,
|
||||
@@ -62,6 +67,8 @@
|
||||
"MaterialMultiplier": 1.00,
|
||||
"ExtraCarves": 0,
|
||||
"DisableHunterNavi": false,
|
||||
"MezFesDuration": 172800,
|
||||
"MezFesSwitchMinigame": false,
|
||||
"EnableKaijiEvent": false,
|
||||
"EnableHiganjimaEvent": false,
|
||||
"EnableNierEvent": false,
|
||||
@@ -75,32 +82,44 @@
|
||||
},
|
||||
"Commands": [
|
||||
{
|
||||
"Name": "Help",
|
||||
"Enabled": true,
|
||||
"Description": "Show enabled chat commands",
|
||||
"Prefix": "help"
|
||||
}, {
|
||||
"Name": "Rights",
|
||||
"Enabled": false,
|
||||
"Description": "Overwrite the Rights value on your account",
|
||||
"Prefix": "rights"
|
||||
}, {
|
||||
"Name": "Raviente",
|
||||
"Enabled": true,
|
||||
"Description": "Various Raviente siege commands",
|
||||
"Prefix": "ravi"
|
||||
}, {
|
||||
"Name": "Teleport",
|
||||
"Enabled": false,
|
||||
"Description": "Teleport to specified coordinates",
|
||||
"Prefix": "tele"
|
||||
}, {
|
||||
"Name": "Reload",
|
||||
"Enabled": true,
|
||||
"Description": "Reload all players in your Land",
|
||||
"Prefix": "reload"
|
||||
}, {
|
||||
"Name": "KeyQuest",
|
||||
"Enabled": false,
|
||||
"Description": "Overwrite your HR Key Quest progress",
|
||||
"Prefix": "kqf"
|
||||
}, {
|
||||
"Name": "Course",
|
||||
"Enabled": true,
|
||||
"Description": "Toggle Courses on your account",
|
||||
"Prefix": "course"
|
||||
}, {
|
||||
"Name": "PSN",
|
||||
"Enabled": true,
|
||||
"Description": "Link a PlayStation Network ID to your account",
|
||||
"Prefix": "psn"
|
||||
}
|
||||
],
|
||||
@@ -130,7 +149,11 @@
|
||||
},
|
||||
"SignV2": {
|
||||
"Enabled": false,
|
||||
"Port": 8080
|
||||
"Port": 8080,
|
||||
"PatchServer": "",
|
||||
"Banners": [],
|
||||
"Messages": [],
|
||||
"Links": []
|
||||
},
|
||||
"Channel": {
|
||||
"Enabled": true
|
||||
|
||||
@@ -58,7 +58,7 @@ const (
|
||||
)
|
||||
|
||||
var versionStrings = []string{"S1.0", "S1.5", "S2.0", "S2.5", "S3.0", "S3.5", "S4.0", "S5.0", "S5.5", "S6.0", "S7.0",
|
||||
"S8.0", "S8.5", "S9", "S10", "FW.1", "FW.2", "FW.3", "FW.4", "FW.5", "G1", "G2", "G3", "G3.1", "G3.2", "GG", "G5",
|
||||
"S8.0", "S8.5", "S9.0", "S10", "FW.1", "FW.2", "FW.3", "FW.4", "FW.5", "G1", "G2", "G3", "G3.1", "G3.2", "GG", "G5",
|
||||
"G5.1", "G5.2", "G6", "G6.1", "G7", "G8", "G8.1", "G9", "G9.1", "G10", "G10.1", "Z1", "Z2", "ZZ"}
|
||||
|
||||
func (m Mode) String() string {
|
||||
@@ -79,6 +79,9 @@ type Config struct {
|
||||
DeleteOnSaveCorruption bool // Attempts to save corrupted data will flag the save for deletion
|
||||
ClientMode string
|
||||
RealClientMode Mode
|
||||
QuestCacheExpiry int // Number of seconds to keep quest data cached
|
||||
ProxyPort uint16 // Forces the game to connect to a channel server proxy
|
||||
CommandPrefix string // The prefix for commands
|
||||
DevMode bool
|
||||
|
||||
DevModeOptions DevModeOptions
|
||||
@@ -100,46 +103,49 @@ type DevModeOptions struct {
|
||||
MaxLauncherHR bool // Sets the HR returned in the launcher to HR7 so that you can join non-beginner worlds.
|
||||
LogInboundMessages bool // Log all messages sent to the server
|
||||
LogOutboundMessages bool // Log all messages sent to the clients
|
||||
LogMessageData bool // Log all bytes transferred as a hexdump
|
||||
MaxHexdumpLength int // Maximum number of bytes printed when logs are enabled
|
||||
DivaEvent int // Diva Defense event status
|
||||
FestaEvent int // Hunter's Festa event status
|
||||
TournamentEvent int // VS Tournament event status
|
||||
MezFesEvent bool // MezFes status
|
||||
MezFesAlt bool // Swaps out Volpakkun for Tokotoko
|
||||
DisableTokenCheck bool // Disables checking login token exists in the DB (security risk!)
|
||||
QuestDebugTools bool // Enable various quest debug logs
|
||||
EarthStatusOverride int32
|
||||
EarthIDOverride int32
|
||||
EarthMonsterOverride int32
|
||||
EarthMonsterOverride []int32
|
||||
SaveDumps SaveDumpOptions
|
||||
}
|
||||
|
||||
type SaveDumpOptions struct {
|
||||
Enabled bool
|
||||
OutputDir string
|
||||
Enabled bool
|
||||
RawEnabled bool
|
||||
OutputDir string
|
||||
}
|
||||
|
||||
// GameplayOptions has various gameplay modifiers
|
||||
type GameplayOptions struct {
|
||||
FeaturedWeapons int // Number of Active Feature weapons to generate daily
|
||||
MaximumNP int // Maximum number of NP held by a player
|
||||
MaximumRP uint16 // Maximum number of RP held by a player
|
||||
MaximumFP uint32 // Maximum number of FP held by a player
|
||||
DisableLoginBoost bool // Disables the Login Boost system
|
||||
DisableBoostTime bool // Disables the daily NetCafe Boost Time
|
||||
BoostTimeDuration int // The number of minutes NetCafe Boost Time lasts for
|
||||
GuildMealDuration int // The number of minutes a Guild Meal can be activated for after cooking
|
||||
BonusQuestAllowance uint32 // Number of Bonus Point Quests to allow daily
|
||||
DailyQuestAllowance uint32 // Number of Daily Quests to allow daily
|
||||
MezfesSoloTickets uint32 // Number of solo tickets given weekly
|
||||
MezfesGroupTickets uint32 // Number of group tickets given weekly
|
||||
LowLatencyRaviente bool // Toggles low latency mode for Raviente, can be network intensive
|
||||
FeaturedWeapons int // Number of Active Feature weapons to generate daily
|
||||
MaximumNP int // Maximum number of NP held by a player
|
||||
MaximumRP uint16 // Maximum number of RP held by a player
|
||||
MaximumFP uint32 // Maximum number of FP held by a player
|
||||
TreasureHuntExpiry uint32 // Seconds until a Clan Treasure Hunt will expire
|
||||
TreasureHuntPartnyaCooldown uint32 // Seconds until a Partnya can be assigned to another Clan Treasure Hunt
|
||||
DisableLoginBoost bool // Disables the Login Boost system
|
||||
DisableBoostTime bool // Disables the daily NetCafe Boost Time
|
||||
BoostTimeDuration int // Second that the NetCafe Boost Time lasts
|
||||
ClanMealDuration int // Second that a Clan Meal can be activated for after cooking
|
||||
ClanMemberLimits [][]uint8 // Array of maximum Clan Members -> [Rank, Members]
|
||||
BonusQuestAllowance uint32 // Number of Bonus Point Quests to allow daily
|
||||
DailyQuestAllowance uint32 // Number of Daily Quests to allow daily
|
||||
MezfesSoloTickets uint32 // Number of solo tickets given weekly
|
||||
MezfesGroupTickets uint32 // Number of group tickets given weekly
|
||||
LowLatencyRaviente bool // Toggles low latency mode for Raviente, can be network intensive
|
||||
RegularRavienteMaxPlayers uint8
|
||||
ViolentRavienteMaxPlayers uint8
|
||||
BerserkRavienteMaxPlayers uint8
|
||||
ExtremeRavienteMaxPlayers uint8
|
||||
SmallBerserkRavienteMaxPlayers uint8
|
||||
GUrgentRate uint16 // Adjusts the rate of G Urgent quests spawning
|
||||
GUrgentRate float32 // Adjusts the rate of G Urgent quests spawning
|
||||
GCPMultiplier float32 // Adjusts the multiplier of GCP rewarded for quest completion
|
||||
GRPMultiplier float32 // Adjusts the multiplier of G Rank Points rewarded for quest completion
|
||||
GSRPMultiplier float32 // Adjusts the multiplier of G Skill Rank Points rewarded for quest completion
|
||||
@@ -147,6 +153,8 @@ type GameplayOptions struct {
|
||||
MaterialMultiplier float32 // Adjusts the multiplier of Monster Materials rewarded for quest completion
|
||||
ExtraCarves uint16 // Grant n extra chances to carve ALL carcasses
|
||||
DisableHunterNavi bool // Disables the Hunter Navi
|
||||
MezFesDuration int // Seconds that MezFes will last for weekly (from 12AM Mon backwards)
|
||||
MezFesSwitchMinigame bool // Swaps out Volpakkun Together for Tokotoko Partnya
|
||||
EnableKaijiEvent bool // Enables the Kaiji event in the Rasta Bar
|
||||
EnableHiganjimaEvent bool // Enables the Higanjima event in the Rasta Bar
|
||||
EnableNierEvent bool // Enables the Nier event in the Rasta Bar
|
||||
@@ -163,9 +171,10 @@ type Discord struct {
|
||||
|
||||
// Command is a channelserver chat command
|
||||
type Command struct {
|
||||
Name string
|
||||
Enabled bool
|
||||
Prefix string
|
||||
Name string
|
||||
Enabled bool
|
||||
Description string
|
||||
Prefix string
|
||||
}
|
||||
|
||||
// Course represents a course within MHF
|
||||
@@ -191,8 +200,30 @@ type Sign struct {
|
||||
|
||||
// SignV2 holds the new sign server config
|
||||
type SignV2 struct {
|
||||
Enabled bool
|
||||
Port int
|
||||
Enabled bool
|
||||
Port int
|
||||
PatchServer string
|
||||
Banners []SignV2Banner
|
||||
Messages []SignV2Message
|
||||
Links []SignV2Link
|
||||
}
|
||||
|
||||
type SignV2Banner struct {
|
||||
Src string `json:"src"` // Displayed image URL
|
||||
Link string `json:"link"` // Link accessed on click
|
||||
}
|
||||
|
||||
type SignV2Message struct {
|
||||
Message string `json:"message"` // Displayed message
|
||||
Date int64 `json:"date"` // Displayed date
|
||||
Kind int `json:"kind"` // 0 for 'Default', 1 for 'New'
|
||||
Link string `json:"link"` // Link accessed on click
|
||||
}
|
||||
|
||||
type SignV2Link struct {
|
||||
Name string `json:"name"` // Displayed name
|
||||
Icon string `json:"icon"` // Displayed icon. It will be cast as a monochrome color as long as it is transparent.
|
||||
Link string `json:"link"` // Link accessed on click
|
||||
}
|
||||
|
||||
type Channel struct {
|
||||
|
||||
31
go.mod
31
go.mod
@@ -4,32 +4,35 @@ go 1.21
|
||||
|
||||
require (
|
||||
github.com/bwmarrin/discordgo v0.27.1
|
||||
github.com/gorilla/handlers v1.5.1
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/gorilla/handlers v1.5.2
|
||||
github.com/gorilla/mux v1.8.1
|
||||
github.com/jmoiron/sqlx v1.3.5
|
||||
github.com/lib/pq v1.10.9
|
||||
github.com/spf13/viper v1.16.0
|
||||
go.uber.org/zap v1.25.0
|
||||
golang.org/x/crypto v0.12.0
|
||||
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63
|
||||
golang.org/x/text v0.12.0
|
||||
github.com/spf13/viper v1.17.0
|
||||
go.uber.org/zap v1.26.0
|
||||
golang.org/x/crypto v0.15.0
|
||||
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
|
||||
golang.org/x/text v0.14.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/felixge/httpsnoop v1.0.3 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||
github.com/gorilla/websocket v1.5.1 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/magiconair/properties v1.8.7 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.9 // indirect
|
||||
github.com/spf13/afero v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
||||
github.com/sagikazarmark/locafero v0.3.0 // indirect
|
||||
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
|
||||
github.com/sourcegraph/conc v0.3.0 // indirect
|
||||
github.com/spf13/afero v1.10.0 // indirect
|
||||
github.com/spf13/cast v1.5.1 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/subosito/gotenv v1.6.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
golang.org/x/sys v0.11.0 // indirect
|
||||
golang.org/x/net v0.18.0 // indirect
|
||||
golang.org/x/sys v0.14.0 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
76
go.sum
76
go.sum
@@ -38,8 +38,6 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
|
||||
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
||||
github.com/bwmarrin/discordgo v0.27.1 h1:ib9AIc/dom1E/fSIulrBwnez0CToJE113ZGt4HoliGY=
|
||||
github.com/bwmarrin/discordgo v0.27.1/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
@@ -51,21 +49,21 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
|
||||
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk=
|
||||
github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
|
||||
github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
||||
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
|
||||
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
@@ -127,13 +125,13 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
|
||||
github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
|
||||
github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q=
|
||||
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
|
||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
||||
github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE=
|
||||
github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w=
|
||||
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
||||
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
|
||||
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
@@ -162,30 +160,34 @@ github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRU
|
||||
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0=
|
||||
github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
|
||||
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
|
||||
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM=
|
||||
github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
|
||||
github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ=
|
||||
github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U=
|
||||
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
|
||||
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
|
||||
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
|
||||
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
|
||||
github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY=
|
||||
github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
|
||||
github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA=
|
||||
github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48=
|
||||
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
|
||||
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc=
|
||||
github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg=
|
||||
github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI=
|
||||
github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
@@ -209,8 +211,8 @@ go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk=
|
||||
go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo=
|
||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||
go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c=
|
||||
go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk=
|
||||
go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo=
|
||||
go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
@@ -218,8 +220,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
|
||||
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
|
||||
golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA=
|
||||
golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
@@ -230,8 +232,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
|
||||
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
|
||||
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
|
||||
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ=
|
||||
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8=
|
||||
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ=
|
||||
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
@@ -287,6 +289,8 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v
|
||||
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
|
||||
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
@@ -341,9 +345,8 @@ golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
|
||||
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
|
||||
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@@ -353,8 +356,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
|
||||
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@@ -498,8 +501,9 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
|
||||
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
||||
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
|
||||
13
main.go
13
main.go
@@ -22,11 +22,13 @@ import (
|
||||
)
|
||||
|
||||
// Temporary DB auto clean on startup for quick development & testing.
|
||||
func cleanDB(db *sqlx.DB) {
|
||||
func cleanDB(db *sqlx.DB, config *_config.Config) {
|
||||
_ = db.MustExec("DELETE FROM guild_characters")
|
||||
_ = db.MustExec("DELETE FROM guilds")
|
||||
_ = db.MustExec("DELETE FROM characters")
|
||||
_ = db.MustExec("DELETE FROM sign_sessions")
|
||||
if config.ProxyPort == 0 {
|
||||
_ = db.MustExec("DELETE FROM sign_sessions")
|
||||
}
|
||||
_ = db.MustExec("DELETE FROM users")
|
||||
}
|
||||
|
||||
@@ -124,13 +126,16 @@ func main() {
|
||||
logger.Info("Database: Started successfully")
|
||||
|
||||
// Clear stale data
|
||||
_ = db.MustExec("DELETE FROM sign_sessions")
|
||||
if config.ProxyPort == 0 {
|
||||
_ = db.MustExec("DELETE FROM sign_sessions")
|
||||
}
|
||||
_ = db.MustExec("DELETE FROM servers")
|
||||
_ = db.MustExec(`UPDATE guild_characters SET treasure_hunt=NULL`)
|
||||
|
||||
// Clean the DB if the option is on.
|
||||
if config.DevMode && config.DevModeOptions.CleanDB {
|
||||
logger.Info("Database: Started clearing...")
|
||||
cleanDB(db)
|
||||
cleanDB(db, config)
|
||||
logger.Info("Database: Finished clearing")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfAcquireFesta represents the MSG_MHF_ACQUIRE_FESTA
|
||||
type MsgMhfAcquireFesta struct {
|
||||
AckHandle uint32
|
||||
FestaID uint32
|
||||
GuildID uint32
|
||||
Unk uint16
|
||||
AckHandle uint32
|
||||
FestaID uint32
|
||||
GuildID uint32
|
||||
Unk uint8
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -23,11 +23,12 @@ func (m *MsgMhfAcquireFesta) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfAcquireFesta) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.FestaID = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
m.Unk = bf.ReadUint16()
|
||||
return nil
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.FestaID = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
m.Unk = bf.ReadUint8()
|
||||
bf.ReadUint8() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
type MsgMhfAcquireGuildTresure struct {
|
||||
AckHandle uint32
|
||||
HuntID uint32
|
||||
Unk uint8
|
||||
Unk bool
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,7 +24,7 @@ func (m *MsgMhfAcquireGuildTresure) Opcode() network.PacketID {
|
||||
func (m *MsgMhfAcquireGuildTresure) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.HuntID = bf.ReadUint32()
|
||||
m.Unk = bf.ReadUint8()
|
||||
m.Unk = bf.ReadBool()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@ import (
|
||||
// MsgMhfAcquireMonthlyItem represents the MSG_MHF_ACQUIRE_MONTHLY_ITEM
|
||||
type MsgMhfAcquireMonthlyItem struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16
|
||||
Unk1 uint16
|
||||
Unk2 uint32
|
||||
Unk0 uint8
|
||||
Unk1 uint8
|
||||
Unk2 uint16
|
||||
Unk3 uint32
|
||||
}
|
||||
|
||||
@@ -25,10 +25,11 @@ func (m *MsgMhfAcquireMonthlyItem) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfAcquireMonthlyItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
m.Unk2 = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadUint8()
|
||||
m.Unk2 = bf.ReadUint16()
|
||||
m.Unk3 = bf.ReadUint32()
|
||||
bf.ReadUint32() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,7 @@ import (
|
||||
// MsgMhfAcquireTitle represents the MSG_MHF_ACQUIRE_TITLE
|
||||
type MsgMhfAcquireTitle struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16
|
||||
Unk1 uint16
|
||||
TitleID uint16
|
||||
TitleIDs []uint16
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,9 +22,11 @@ func (m *MsgMhfAcquireTitle) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfAcquireTitle) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
m.TitleID = bf.ReadUint16()
|
||||
titles := int(bf.ReadUint16())
|
||||
bf.ReadUint16() // Zeroed
|
||||
for i := 0; i < titles; i++ {
|
||||
m.TitleIDs = append(m.TitleIDs, bf.ReadUint16())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ type MsgMhfAnnounce struct {
|
||||
IPAddress uint32
|
||||
Port uint16
|
||||
StageID []byte
|
||||
Type uint8
|
||||
Data *byteframe.ByteFrame
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -31,8 +31,7 @@ func (m *MsgMhfAnnounce) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientCon
|
||||
_ = bf.ReadUint8()
|
||||
_ = bf.ReadUint8()
|
||||
m.StageID = bf.ReadBytes(32)
|
||||
_ = bf.ReadUint32()
|
||||
m.Type = bf.ReadUint8()
|
||||
m.Data = byteframe.NewByteFrameFromBytes(bf.ReadBytes(uint(bf.ReadUint32())))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/byteframe"
|
||||
_config "erupe-ce/config"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/common/byteframe"
|
||||
)
|
||||
|
||||
// MsgMhfApplyDistItem represents the MSG_MHF_APPLY_DIST_ITEM
|
||||
type MsgMhfApplyDistItem struct {
|
||||
AckHandle uint32
|
||||
AckHandle uint32
|
||||
DistributionType uint8
|
||||
DistributionID uint32
|
||||
Unk2 uint32
|
||||
Unk3 uint32
|
||||
DistributionID uint32
|
||||
Unk2 uint32
|
||||
Unk3 uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -25,17 +27,16 @@ func (m *MsgMhfApplyDistItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Clie
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.DistributionType = bf.ReadUint8()
|
||||
m.DistributionID = bf.ReadUint32()
|
||||
m.Unk2 = bf.ReadUint32()
|
||||
m.Unk3 = bf.ReadUint32()
|
||||
if _config.ErupeConfig.RealClientMode >= _config.G8 {
|
||||
m.Unk2 = bf.ReadUint32()
|
||||
}
|
||||
if _config.ErupeConfig.RealClientMode >= _config.G10 {
|
||||
m.Unk3 = bf.ReadUint32()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfApplyDistItem) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
bf.WriteUint32(m.AckHandle)
|
||||
bf.WriteUint8(m.DistributionType)
|
||||
bf.WriteUint32(m.DistributionID)
|
||||
bf.WriteUint32(m.Unk2)
|
||||
bf.WriteUint32(m.Unk3)
|
||||
return nil
|
||||
return errors.New("NOT IMPLEMENTED")
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/common/byteframe"
|
||||
)
|
||||
|
||||
// MsgMhfArrangeGuildMember represents the MSG_MHF_ARRANGE_GUILD_MEMBER
|
||||
@@ -22,11 +23,11 @@ func (m *MsgMhfArrangeGuildMember) Opcode() network.PacketID {
|
||||
func (m *MsgMhfArrangeGuildMember) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
charCount := bf.ReadUint16()
|
||||
|
||||
bf.ReadUint8() // Zeroed
|
||||
charCount := int(bf.ReadUint8())
|
||||
m.CharIDs = make([]uint32, charCount)
|
||||
|
||||
for i := uint16(0); i < charCount; i++ {
|
||||
for i := 0; i < charCount; i++ {
|
||||
m.CharIDs[i] = bf.ReadUint32()
|
||||
}
|
||||
|
||||
@@ -35,13 +36,5 @@ func (m *MsgMhfArrangeGuildMember) Parse(bf *byteframe.ByteFrame, ctx *clientctx
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfArrangeGuildMember) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
bf.WriteUint32(m.AckHandle)
|
||||
bf.WriteUint32(m.GuildID)
|
||||
bf.WriteUint16(uint16(len(m.CharIDs)))
|
||||
|
||||
for _, charID := range m.CharIDs {
|
||||
bf.WriteUint32(charID)
|
||||
}
|
||||
|
||||
return nil
|
||||
return errors.New("NOT IMPLEMENTED")
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/common/byteframe"
|
||||
)
|
||||
|
||||
// MsgMhfCheckDailyCafepoint represents the MSG_MHF_CHECK_DAILY_CAFEPOINT
|
||||
@@ -25,7 +26,5 @@ func (m *MsgMhfCheckDailyCafepoint) Parse(bf *byteframe.ByteFrame, ctx *clientct
|
||||
}
|
||||
|
||||
func (m *MsgMhfCheckDailyCafepoint) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
bf.WriteUint32(m.AckHandle)
|
||||
bf.WriteUint32(m.Unk)
|
||||
return nil
|
||||
return errors.New("NOT IMPLEMENTED")
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import (
|
||||
type MsgMhfCheckMonthlyItem struct {
|
||||
AckHandle uint32
|
||||
Type uint8
|
||||
Unk []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,7 +23,9 @@ func (m *MsgMhfCheckMonthlyItem) Opcode() network.PacketID {
|
||||
func (m *MsgMhfCheckMonthlyItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Type = bf.ReadUint8()
|
||||
m.Unk = bf.ReadBytes(3)
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ type MsgMhfCheckWeeklyStamp struct {
|
||||
AckHandle uint32
|
||||
StampType string
|
||||
Unk1 bool
|
||||
Unk2 uint16 // Hardcoded 0 in the binary
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -31,7 +30,7 @@ func (m *MsgMhfCheckWeeklyStamp) Parse(bf *byteframe.ByteFrame, ctx *clientctx.C
|
||||
m.StampType = "ex"
|
||||
}
|
||||
m.Unk1 = bf.ReadBool()
|
||||
m.Unk2 = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@ import (
|
||||
// MsgMhfCreateGuild represents the MSG_MHF_CREATE_GUILD
|
||||
type MsgMhfCreateGuild struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint8
|
||||
Unk1 uint8
|
||||
Name string
|
||||
}
|
||||
|
||||
@@ -25,9 +23,8 @@ func (m *MsgMhfCreateGuild) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfCreateGuild) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadUint8()
|
||||
_ = bf.ReadUint16() // len
|
||||
bf.ReadUint16() // Zeroed
|
||||
bf.ReadUint16() // Name length
|
||||
m.Name = stringsupport.SJISToUTF8(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/common/stringsupport"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/common/stringsupport"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfCreateJoint represents the MSG_MHF_CREATE_JOINT
|
||||
type MsgMhfCreateJoint struct {
|
||||
AckHandle uint32
|
||||
GuildID uint32
|
||||
Name string
|
||||
AckHandle uint32
|
||||
GuildID uint32
|
||||
Name string
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -23,11 +23,12 @@ func (m *MsgMhfCreateJoint) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfCreateJoint) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
_ = bf.ReadUint32() // len
|
||||
m.Name = stringsupport.SJISToUTF8(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
bf.ReadUint16() // Zeroed
|
||||
bf.ReadUint16() // Name length
|
||||
m.Name = stringsupport.SJISToUTF8(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/common/byteframe"
|
||||
)
|
||||
|
||||
// MsgMhfDisplayedAchievement represents the MSG_MHF_DISPLAYED_ACHIEVEMENT
|
||||
type MsgMhfDisplayedAchievement struct {
|
||||
Unk0 uint8
|
||||
}
|
||||
type MsgMhfDisplayedAchievement struct{}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfDisplayedAchievement) Opcode() network.PacketID {
|
||||
@@ -18,12 +17,11 @@ func (m *MsgMhfDisplayedAchievement) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfDisplayedAchievement) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
bf.ReadUint8() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfDisplayedAchievement) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
bf.WriteUint8(m.Unk0)
|
||||
return nil
|
||||
return errors.New("NOT IMPLEMENTED")
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfEntryFesta represents the MSG_MHF_ENTRY_FESTA
|
||||
type MsgMhfEntryFesta struct {
|
||||
AckHandle uint32
|
||||
FestaID uint32
|
||||
GuildID uint32
|
||||
AckHandle uint32
|
||||
FestaID uint32
|
||||
GuildID uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,11 +22,11 @@ func (m *MsgMhfEntryFesta) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEntryFesta) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.FestaID = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
_ = bf.ReadUint16() // Always 0
|
||||
return nil
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.FestaID = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/byteframe"
|
||||
_config "erupe-ce/config"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/common/byteframe"
|
||||
)
|
||||
|
||||
// MsgMhfEnumerateDistItem represents the MSG_MHF_ENUMERATE_DIST_ITEM
|
||||
type MsgMhfEnumerateDistItem struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint8
|
||||
Unk1 uint16
|
||||
DistType uint8
|
||||
Unk1 uint8
|
||||
Unk2 uint16
|
||||
Unk3 []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,17 +25,16 @@ func (m *MsgMhfEnumerateDistItem) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumerateDistItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
m.Unk2 = bf.ReadUint16()
|
||||
m.DistType = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadUint8()
|
||||
m.Unk2 = bf.ReadUint16() // Maximum? Hardcoded to 256
|
||||
if _config.ErupeConfig.RealClientMode >= _config.Z1 {
|
||||
m.Unk3 = bf.ReadBytes(uint(bf.ReadUint8()))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfEnumerateDistItem) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
bf.WriteUint32(m.AckHandle)
|
||||
bf.WriteUint8(m.Unk0)
|
||||
bf.WriteUint16(m.Unk1)
|
||||
bf.WriteUint16(m.Unk2)
|
||||
return nil
|
||||
return errors.New("NOT IMPLEMENTED")
|
||||
}
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/common/byteframe"
|
||||
)
|
||||
|
||||
// MsgMhfEnumerateEvent represents the MSG_MHF_ENUMERATE_EVENT
|
||||
type MsgMhfEnumerateEvent struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16 // Hardcoded 0 in the binary
|
||||
Unk1 uint16 // Hardcoded 0 in the binary
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -21,15 +20,12 @@ func (m *MsgMhfEnumerateEvent) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumerateEvent) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfEnumerateEvent) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
bf.WriteUint32(m.AckHandle)
|
||||
bf.WriteUint16(m.Unk0)
|
||||
bf.WriteUint16(m.Unk1)
|
||||
return nil
|
||||
return errors.New("NOT IMPLEMENTED")
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfEnumerateFestaMember represents the MSG_MHF_ENUMERATE_FESTA_MEMBER
|
||||
type MsgMhfEnumerateFestaMember struct {
|
||||
AckHandle uint32
|
||||
FestaID uint32
|
||||
GuildID uint32
|
||||
AckHandle uint32
|
||||
FestaID uint32
|
||||
GuildID uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,11 +22,11 @@ func (m *MsgMhfEnumerateFestaMember) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumerateFestaMember) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.FestaID = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
_ = bf.ReadUint16() // Hardcoded 0 in the binary.
|
||||
return nil
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -10,8 +10,7 @@ import (
|
||||
// MsgMhfEnumerateGuacot represents the MSG_MHF_ENUMERATE_GUACOT
|
||||
type MsgMhfEnumerateGuacot struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32 // Hardcoded 0 in binary
|
||||
Unk1 uint16 // Hardcoded 0 in binary
|
||||
Unk0 uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -23,7 +22,7 @@ func (m *MsgMhfEnumerateGuacot) Opcode() network.PacketID {
|
||||
func (m *MsgMhfEnumerateGuacot) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@ package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/bfutil"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/common/stringsupport"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
@@ -34,8 +32,8 @@ type MsgMhfEnumerateGuild struct {
|
||||
Type EnumerateGuildType
|
||||
Page uint8
|
||||
Sorting bool
|
||||
Data1 []byte
|
||||
Data2 string
|
||||
Data1 *byteframe.ByteFrame
|
||||
Data2 *byteframe.ByteFrame
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -49,12 +47,12 @@ func (m *MsgMhfEnumerateGuild) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cli
|
||||
m.Type = EnumerateGuildType(bf.ReadUint8())
|
||||
m.Page = bf.ReadUint8()
|
||||
m.Sorting = bf.ReadBool()
|
||||
_ = bf.ReadBytes(1)
|
||||
m.Data1 = bf.ReadBytes(4)
|
||||
_ = bf.ReadBytes(2)
|
||||
lenData2 := uint(bf.ReadUint8())
|
||||
_ = bf.ReadBytes(1)
|
||||
m.Data2 = stringsupport.SJISToUTF8(bfutil.UpToNull(bf.ReadBytes(lenData2)))
|
||||
bf.ReadUint8() // Zeroed
|
||||
m.Data1 = byteframe.NewByteFrameFromBytes(bf.ReadBytes(4))
|
||||
bf.ReadUint16() // Zeroed
|
||||
dataLen := uint(bf.ReadUint8())
|
||||
bf.ReadUint8() // Zeroed
|
||||
m.Data2 = byteframe.NewByteFrameFromBytes(bf.ReadBytes(dataLen))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfEnumerateGuildItem represents the MSG_MHF_ENUMERATE_GUILD_ITEM
|
||||
type MsgMhfEnumerateGuildItem struct {
|
||||
AckHandle uint32
|
||||
GuildId uint32
|
||||
Unk0 uint16
|
||||
GuildID uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,9 +21,10 @@ func (m *MsgMhfEnumerateGuildItem) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumerateGuildItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.GuildId = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/common/byteframe"
|
||||
)
|
||||
|
||||
// MsgMhfEnumerateGuildMember represents the MSG_MHF_ENUMERATE_GUILD_MEMBER
|
||||
type MsgMhfEnumerateGuildMember struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16 // Hardcoded 00 01 in the binary
|
||||
Unk1 uint32 // Alliance related
|
||||
GuildID uint32
|
||||
AckHandle uint32
|
||||
AllianceID uint32
|
||||
GuildID uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,17 +22,14 @@ func (m *MsgMhfEnumerateGuildMember) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumerateGuildMember) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint32()
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Always 1
|
||||
m.AllianceID = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgMhfEnumerateGuildMember) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
bf.WriteUint32(m.AckHandle)
|
||||
bf.WriteUint16(m.Unk0)
|
||||
bf.WriteUint32(m.Unk1)
|
||||
bf.WriteUint32(m.GuildID)
|
||||
return nil
|
||||
return errors.New("NOT IMPLEMENTED")
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ import (
|
||||
type MsgMhfEnumerateGuildTresure struct {
|
||||
AckHandle uint32
|
||||
MaxHunts uint16
|
||||
Unk uint32
|
||||
Unk0 uint16
|
||||
Unk1 uint16
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,9 +25,8 @@ func (m *MsgMhfEnumerateGuildTresure) Opcode() network.PacketID {
|
||||
func (m *MsgMhfEnumerateGuildTresure) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.MaxHunts = bf.ReadUint16()
|
||||
// Changes with MaxHunts
|
||||
// 0 if MaxHunts = 1, 1 if MaxHunts = 30
|
||||
m.Unk = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ type MsgMhfEnumerateHouse struct {
|
||||
AckHandle uint32
|
||||
CharID uint32
|
||||
Method uint8
|
||||
Unk uint16
|
||||
Name string
|
||||
}
|
||||
|
||||
@@ -28,7 +27,7 @@ func (m *MsgMhfEnumerateHouse) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cli
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.CharID = bf.ReadUint32()
|
||||
m.Method = bf.ReadUint8()
|
||||
m.Unk = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
lenName := bf.ReadUint8()
|
||||
if lenName > 0 {
|
||||
m.Name = stringsupport.SJISToUTF8(bf.ReadNullTerminatedBytes())
|
||||
|
||||
@@ -10,8 +10,13 @@ import (
|
||||
|
||||
// MsgMhfEnumerateInvGuild represents the MSG_MHF_ENUMERATE_INV_GUILD
|
||||
type MsgMhfEnumerateInvGuild struct {
|
||||
AckHandle uint32
|
||||
Unk []byte
|
||||
AckHandle uint32
|
||||
Unk uint32
|
||||
Operation uint8
|
||||
ActiveHours uint8
|
||||
DaysActive uint8
|
||||
PlayStyle uint8
|
||||
GuildRequest uint8
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,7 +27,12 @@ func (m *MsgMhfEnumerateInvGuild) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumerateInvGuild) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk = bf.ReadBytes(9)
|
||||
m.Unk = bf.ReadUint32()
|
||||
m.Operation = bf.ReadUint8()
|
||||
m.ActiveHours = bf.ReadUint8()
|
||||
m.DaysActive = bf.ReadUint8()
|
||||
m.PlayStyle = bf.ReadUint8()
|
||||
m.GuildRequest = bf.ReadUint8()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfEnumeratePrice represents the MSG_MHF_ENUMERATE_PRICE
|
||||
type MsgMhfEnumeratePrice struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16 // Hardcoded 0 in the binary
|
||||
Unk1 uint16 // Hardcoded 0 in the binary
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -23,8 +21,8 @@ func (m *MsgMhfEnumeratePrice) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumeratePrice) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfEnumerateRanking represents the MSG_MHF_ENUMERATE_RANKING
|
||||
type MsgMhfEnumerateRanking struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16 // Hardcoded 0 in the binary
|
||||
Unk1 uint16 // Hardcoded 0 in the binary
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -23,8 +21,9 @@ func (m *MsgMhfEnumerateRanking) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumerateRanking) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ type MsgMhfEnumerateShop struct {
|
||||
AckHandle uint32
|
||||
ShopType uint8 // 1 running gachas, 10 normal shop extensions, 8 Diva Defense shop
|
||||
ShopID uint32
|
||||
Unk2 uint16 // 00 80 running gachas, 00 20 normal shop
|
||||
Limit uint16
|
||||
Unk3 uint8
|
||||
Unk4 uint8
|
||||
Unk5 uint32
|
||||
@@ -30,7 +30,7 @@ func (m *MsgMhfEnumerateShop) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Clie
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.ShopType = bf.ReadUint8()
|
||||
m.ShopID = bf.ReadUint32()
|
||||
m.Unk2 = bf.ReadUint16()
|
||||
m.Limit = bf.ReadUint16()
|
||||
m.Unk3 = bf.ReadUint8()
|
||||
if _config.ErupeConfig.RealClientMode >= _config.G2 {
|
||||
m.Unk4 = bf.ReadUint8()
|
||||
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
// MsgMhfEnumerateUnionItem represents the MSG_MHF_ENUMERATE_UNION_ITEM
|
||||
type MsgMhfEnumerateUnionItem struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,8 +21,8 @@ func (m *MsgMhfEnumerateUnionItem) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfEnumerateUnionItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ type MsgMhfExchangeWeeklyStamp struct {
|
||||
AckHandle uint32
|
||||
StampType string
|
||||
Unk1 uint8
|
||||
Unk2 uint16
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -32,7 +31,7 @@ func (m *MsgMhfExchangeWeeklyStamp) Parse(bf *byteframe.ByteFrame, ctx *clientct
|
||||
m.StampType = "ex"
|
||||
}
|
||||
m.Unk1 = bf.ReadUint8()
|
||||
m.Unk2 = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import (
|
||||
type MsgMhfGetAchievement struct {
|
||||
AckHandle uint32
|
||||
CharID uint32
|
||||
Unk1 uint32 // char?
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,7 +23,7 @@ func (m *MsgMhfGetAchievement) Opcode() network.PacketID {
|
||||
func (m *MsgMhfGetAchievement) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.CharID = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadUint32()
|
||||
bf.ReadUint32() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfGetRengokuBinary represents the MSG_MHF_GET_RENGOKU_BINARY
|
||||
type MsgMhfGetRengokuBinary struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint8 // Hardcoded 0 in binary
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,7 +21,7 @@ func (m *MsgMhfGetRengokuBinary) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetRengokuBinary) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
bf.ReadUint8() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfInfoFesta represents the MSG_MHF_INFO_FESTA
|
||||
type MsgMhfInfoFesta struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16 // Hardcoded 0 in the binary
|
||||
Unk1 uint16 // Hardcoded 0 in the binary
|
||||
Unk0 uint8
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -23,8 +22,10 @@ func (m *MsgMhfInfoFesta) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfInfoFesta) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import (
|
||||
type MsgMhfInfoJoint struct {
|
||||
AckHandle uint32
|
||||
AllianceID uint32
|
||||
Unk uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,7 +23,7 @@ func (m *MsgMhfInfoJoint) Opcode() network.PacketID {
|
||||
func (m *MsgMhfInfoJoint) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.AllianceID = bf.ReadUint32()
|
||||
m.Unk = bf.ReadUint32()
|
||||
bf.ReadUint32() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfListMail represents the MSG_MHF_LIST_MAIL
|
||||
type MsgMhfListMail struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,7 +21,8 @@ func (m *MsgMhfListMail) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfListMail) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
bf.ReadUint16() // Zeroed
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfListMember represents the MSG_MHF_LIST_MEMBER
|
||||
type MsgMhfListMember struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16 // Hardcoded 01 00 in the JP client.
|
||||
Unk0 uint8 // Hardcoded 01 in the JP client.
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,7 +22,8 @@ func (m *MsgMhfListMember) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfListMember) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
bf.ReadUint8() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfLoadGuildCooking represents the MSG_MHF_LOAD_GUILD_COOKING
|
||||
type MsgMhfLoadGuildCooking struct{
|
||||
AckHandle uint32
|
||||
MaxMeals uint8
|
||||
type MsgMhfLoadGuildCooking struct {
|
||||
AckHandle uint32
|
||||
MaxMeals uint8
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,7 +22,7 @@ func (m *MsgMhfLoadGuildCooking) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfLoadGuildCooking) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
_ = bf.ReadUint8()
|
||||
m.MaxMeals = bf.ReadUint8()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ type MsgMhfLoadHouse struct {
|
||||
Destination uint8
|
||||
// False if already in hosts My Series, in case host updates PW
|
||||
CheckPass bool
|
||||
Unk3 uint16 // Hardcoded 0 in binary
|
||||
Password string
|
||||
}
|
||||
|
||||
@@ -31,8 +30,8 @@ func (m *MsgMhfLoadHouse) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientCo
|
||||
m.CharID = bf.ReadUint32()
|
||||
m.Destination = bf.ReadUint8()
|
||||
m.CheckPass = bf.ReadBool()
|
||||
_ = bf.ReadUint16()
|
||||
_ = bf.ReadUint8() // Password length
|
||||
bf.ReadUint16() // Zeroed
|
||||
bf.ReadUint8() // Password length
|
||||
m.Password = stringsupport.SJISToUTF8(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ type MsgMhfOperateGuildMember struct {
|
||||
GuildID uint32
|
||||
CharID uint32
|
||||
Action uint8
|
||||
Unk []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -37,7 +36,8 @@ func (m *MsgMhfOperateGuildMember) Parse(bf *byteframe.ByteFrame, ctx *clientctx
|
||||
m.GuildID = bf.ReadUint32()
|
||||
m.CharID = bf.ReadUint32()
|
||||
m.Action = bf.ReadUint8()
|
||||
m.Unk = bf.ReadBytes(3)
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@ type MsgMhfOperateJoint struct {
|
||||
AllianceID uint32
|
||||
GuildID uint32
|
||||
Action OperateJointAction
|
||||
UnkData *byteframe.ByteFrame
|
||||
Data1 *byteframe.ByteFrame
|
||||
Data2 *byteframe.ByteFrame
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -36,8 +37,9 @@ func (m *MsgMhfOperateJoint) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Clien
|
||||
m.AllianceID = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
m.Action = OperateJointAction(bf.ReadUint8())
|
||||
m.UnkData = byteframe.NewByteFrameFromBytes(bf.DataFromCurrent())
|
||||
bf.Seek(int64(len(bf.Data())-2), 0)
|
||||
dataLen := uint(bf.ReadUint8())
|
||||
m.Data1 = byteframe.NewByteFrameFromBytes(bf.ReadBytes(4))
|
||||
m.Data2 = byteframe.NewByteFrameFromBytes(bf.ReadBytes(dataLen))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfOprMember represents the MSG_MHF_OPR_MEMBER
|
||||
type MsgMhfOprMember struct {
|
||||
AckHandle uint32
|
||||
Blacklist bool
|
||||
Operation bool
|
||||
Unk uint16
|
||||
CharID uint32
|
||||
AckHandle uint32
|
||||
Blacklist bool
|
||||
Operation bool
|
||||
CharIDs []uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,12 +23,15 @@ func (m *MsgMhfOprMember) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfOprMember) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Blacklist = bf.ReadBool()
|
||||
m.Operation = bf.ReadBool()
|
||||
m.Unk = bf.ReadUint16()
|
||||
m.CharID = bf.ReadUint32()
|
||||
return nil
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Blacklist = bf.ReadBool()
|
||||
m.Operation = bf.ReadBool()
|
||||
bf.ReadUint8()
|
||||
chars := int(bf.ReadUint8())
|
||||
for i := 0; i < chars; i++ {
|
||||
m.CharIDs = append(m.CharIDs, bf.ReadUint32())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -11,10 +11,11 @@ import (
|
||||
type OperateMailOperation uint8
|
||||
|
||||
const (
|
||||
OPERATE_MAIL_DELETE = 0x01
|
||||
OPERATE_MAIL_LOCK = 0x02
|
||||
OPERATE_MAIL_UNLOCK = 0x03
|
||||
OPERATE_MAIL_ACQUIRE_ITEM = 0x05
|
||||
OperateMailDelete = iota + 1
|
||||
OperateMailLock
|
||||
OperateMailUnlock
|
||||
OpreateMailNull
|
||||
OperateMailAcquireItem
|
||||
)
|
||||
|
||||
// MsgMhfOprtMail represents the MSG_MHF_OPRT_MAIL
|
||||
@@ -23,7 +24,6 @@ type MsgMhfOprtMail struct {
|
||||
AccIndex uint8
|
||||
Index uint8
|
||||
Operation OperateMailOperation
|
||||
Unk0 uint8
|
||||
Data []byte
|
||||
Amount uint16
|
||||
ItemID uint16
|
||||
@@ -40,8 +40,8 @@ func (m *MsgMhfOprtMail) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientCon
|
||||
m.AccIndex = bf.ReadUint8()
|
||||
m.Index = bf.ReadUint8()
|
||||
m.Operation = OperateMailOperation(bf.ReadUint8())
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
if m.Operation == OPERATE_MAIL_ACQUIRE_ITEM {
|
||||
bf.ReadUint8() // Zeroed
|
||||
if m.Operation == OperateMailAcquireItem {
|
||||
m.Amount = bf.ReadUint16()
|
||||
m.ItemID = bf.ReadUint16()
|
||||
}
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfPlayFreeGacha represents the MSG_MHF_PLAY_FREE_GACHA
|
||||
type MsgMhfPlayFreeGacha struct{}
|
||||
type MsgMhfPlayFreeGacha struct {
|
||||
AckHandle uint32
|
||||
GachaID uint32
|
||||
GachaType uint8
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfPlayFreeGacha) Opcode() network.PacketID {
|
||||
@@ -18,7 +22,10 @@ func (m *MsgMhfPlayFreeGacha) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfPlayFreeGacha) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
return errors.New("NOT IMPLEMENTED")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.GachaID = bf.ReadUint32()
|
||||
m.GachaType = bf.ReadUint8()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -1,15 +1,24 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfPostSeibattle represents the MSG_MHF_POST_SEIBATTLE
|
||||
type MsgMhfPostSeibattle struct{}
|
||||
type MsgMhfPostSeibattle struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint8
|
||||
Unk1 uint8
|
||||
Unk2 uint32
|
||||
Unk3 uint8
|
||||
Unk4 uint16
|
||||
Unk5 uint16
|
||||
Unk6 uint8
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfPostSeibattle) Opcode() network.PacketID {
|
||||
@@ -18,7 +27,15 @@ func (m *MsgMhfPostSeibattle) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfPostSeibattle) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
return errors.New("NOT IMPLEMENTED")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadUint8()
|
||||
m.Unk2 = bf.ReadUint32()
|
||||
m.Unk3 = bf.ReadUint8()
|
||||
m.Unk4 = bf.ReadUint16()
|
||||
m.Unk5 = bf.ReadUint16()
|
||||
m.Unk6 = bf.ReadUint8()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -19,7 +19,6 @@ type MsgMhfReadMail struct {
|
||||
|
||||
// This is the index within the current mail list
|
||||
Index uint8
|
||||
Unk0 uint16
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -32,7 +31,7 @@ func (m *MsgMhfReadMail) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientCon
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.AccIndex = bf.ReadUint8()
|
||||
m.Index = bf.ReadUint8()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ type MsgMhfReadMercenaryW struct {
|
||||
AckHandle uint32
|
||||
Op uint8
|
||||
Unk1 uint8
|
||||
Unk2 uint16 // Hardcoded 0 in the binary
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -25,8 +24,9 @@ func (m *MsgMhfReadMercenaryW) Opcode() network.PacketID {
|
||||
func (m *MsgMhfReadMercenaryW) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Op = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadUint8()
|
||||
m.Unk2 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint8() // Supposed to be 0 or 1, but always 1
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,7 @@ type MsgMhfRegisterEvent struct {
|
||||
Unk0 uint16
|
||||
WorldID uint16
|
||||
LandID uint16
|
||||
Unk3 uint8
|
||||
Unk4 uint8
|
||||
Unk1 bool
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -27,8 +26,8 @@ func (m *MsgMhfRegisterEvent) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Clie
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.WorldID = bf.ReadUint16()
|
||||
m.LandID = bf.ReadUint16()
|
||||
m.Unk3 = bf.ReadUint8()
|
||||
m.Unk4 = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadBool()
|
||||
bf.ReadUint8() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import (
|
||||
type MsgMhfReleaseEvent struct {
|
||||
AckHandle uint32
|
||||
RaviID uint32
|
||||
Unk1 uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,7 +23,7 @@ func (m *MsgMhfReleaseEvent) Opcode() network.PacketID {
|
||||
func (m *MsgMhfReleaseEvent) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.RaviID = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadUint32()
|
||||
bf.ReadUint32() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ type MsgMhfSendMail struct {
|
||||
RecipientID uint32
|
||||
SubjectLength uint16
|
||||
BodyLength uint16
|
||||
Quantity uint32
|
||||
Quantity uint16
|
||||
ItemID uint16
|
||||
Subject string
|
||||
Body string
|
||||
@@ -32,7 +32,8 @@ func (m *MsgMhfSendMail) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientCon
|
||||
m.RecipientID = bf.ReadUint32()
|
||||
m.SubjectLength = bf.ReadUint16()
|
||||
m.BodyLength = bf.ReadUint16()
|
||||
m.Quantity = bf.ReadUint32()
|
||||
bf.ReadUint16() // Zeroed
|
||||
m.Quantity = bf.ReadUint16()
|
||||
m.ItemID = bf.ReadUint16()
|
||||
m.Subject = stringsupport.SJISToUTF8(bf.ReadNullTerminatedBytes())
|
||||
m.Body = stringsupport.SJISToUTF8(bf.ReadNullTerminatedBytes())
|
||||
|
||||
@@ -13,7 +13,6 @@ type MsgMhfSetGuildManageRight struct {
|
||||
AckHandle uint32
|
||||
CharID uint32
|
||||
Allowed bool
|
||||
Unk []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -26,7 +25,7 @@ func (m *MsgMhfSetGuildManageRight) Parse(bf *byteframe.ByteFrame, ctx *clientct
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.CharID = bf.ReadUint32()
|
||||
m.Allowed = bf.ReadBool()
|
||||
m.Unk = bf.ReadBytes(3)
|
||||
bf.ReadBytes(3) // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ func (m *MsgMhfStampcardStamp) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cli
|
||||
m.HR = bf.ReadUint16()
|
||||
m.GR = bf.ReadUint16()
|
||||
m.Stamps = bf.ReadUint16()
|
||||
_ = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
if _config.ErupeConfig.RealClientMode > _config.Z1 {
|
||||
m.Reward1 = uint16(bf.ReadUint32())
|
||||
m.Reward2 = uint16(bf.ReadUint32())
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfStateFestaG represents the MSG_MHF_STATE_FESTA_G
|
||||
type MsgMhfStateFestaG struct {
|
||||
AckHandle uint32
|
||||
FestaID uint32
|
||||
GuildID uint32
|
||||
FestaID uint32
|
||||
GuildID uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -25,7 +25,7 @@ func (m *MsgMhfStateFestaG) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Client
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.FestaID = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
_ = bf.ReadUint16() // Hardcoded 0 in the binary.
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfStateFestaU represents the MSG_MHF_STATE_FESTA_U
|
||||
type MsgMhfStateFestaU struct {
|
||||
AckHandle uint32
|
||||
FestaID uint32
|
||||
GuildID uint32
|
||||
AckHandle uint32
|
||||
FestaID uint32
|
||||
GuildID uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,11 +22,11 @@ func (m *MsgMhfStateFestaU) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfStateFestaU) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.FestaID = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
_ = bf.ReadUint16() // Hardcoded 0 in the binary.
|
||||
return nil
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.FestaID = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfTransferItem represents the MSG_MHF_TRANSFER_ITEM
|
||||
@@ -15,8 +15,8 @@ type MsgMhfTransferItem struct {
|
||||
// correlate with any item IDs that would make sense to get after quests so
|
||||
// I have no idea what this actually does
|
||||
Unk0 uint32
|
||||
Unk1 uint16 // Hardcoded
|
||||
Unk2 uint16 // Hardcoded
|
||||
Unk1 uint8
|
||||
Unk2 uint16
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -28,7 +28,8 @@ func (m *MsgMhfTransferItem) Opcode() network.PacketID {
|
||||
func (m *MsgMhfTransferItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint8()
|
||||
bf.ReadUint8() // Zeroed
|
||||
m.Unk2 = bf.ReadUint16()
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import (
|
||||
type MsgMhfTransitMessage struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint8
|
||||
Unk1 uint8
|
||||
SearchType uint16
|
||||
MessageData []byte
|
||||
}
|
||||
@@ -26,7 +25,7 @@ func (m *MsgMhfTransitMessage) Opcode() network.PacketID {
|
||||
func (m *MsgMhfTransitMessage) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadUint8()
|
||||
bf.ReadUint8() // Zeroed
|
||||
m.SearchType = bf.ReadUint16()
|
||||
m.MessageData = bf.ReadBytes(uint(bf.ReadUint16()))
|
||||
return nil
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfUnreserveSrg represents the MSG_MHF_UNRESERVE_SRG
|
||||
type MsgMhfUnreserveSrg struct{}
|
||||
type MsgMhfUnreserveSrg struct {
|
||||
AckHandle uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfUnreserveSrg) Opcode() network.PacketID {
|
||||
@@ -18,7 +20,8 @@ func (m *MsgMhfUnreserveSrg) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfUnreserveSrg) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
return errors.New("NOT IMPLEMENTED")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfUpdateCafepoint represents the MSG_MHF_UPDATE_CAFEPOINT
|
||||
type MsgMhfUpdateCafepoint struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16 // Hardcoded 0 in binary
|
||||
Unk1 uint16 // Hardcoded 0 in binary
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -23,8 +21,8 @@ func (m *MsgMhfUpdateCafepoint) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfUpdateCafepoint) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
type Goocoo struct {
|
||||
Index uint32
|
||||
Data1 []uint16
|
||||
Data1 []int16
|
||||
Data2 []uint32
|
||||
Name []byte
|
||||
}
|
||||
@@ -30,12 +30,12 @@ func (m *MsgMhfUpdateGuacot) Opcode() network.PacketID {
|
||||
func (m *MsgMhfUpdateGuacot) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.EntryCount = bf.ReadUint16()
|
||||
_ = bf.ReadUint16() // Zero
|
||||
bf.ReadUint16() // Zeroed
|
||||
var temp Goocoo
|
||||
for i := 0; i < int(m.EntryCount); i++ {
|
||||
temp.Index = bf.ReadUint32()
|
||||
for j := 0; j < 22; j++ {
|
||||
temp.Data1 = append(temp.Data1, bf.ReadUint16())
|
||||
temp.Data1 = append(temp.Data1, bf.ReadInt16())
|
||||
}
|
||||
for j := 0; j < 2; j++ {
|
||||
temp.Data2 = append(temp.Data2, bf.ReadUint32())
|
||||
|
||||
@@ -25,8 +25,6 @@ type GuildIconMsgPart struct {
|
||||
type MsgMhfUpdateGuildIcon struct {
|
||||
AckHandle uint32
|
||||
GuildID uint32
|
||||
PartCount uint16
|
||||
Unk1 uint16
|
||||
IconParts []GuildIconMsgPart
|
||||
}
|
||||
|
||||
@@ -39,12 +37,12 @@ func (m *MsgMhfUpdateGuildIcon) Opcode() network.PacketID {
|
||||
func (m *MsgMhfUpdateGuildIcon) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
m.PartCount = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
partCount := int(bf.ReadUint16())
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
m.IconParts = make([]GuildIconMsgPart, partCount)
|
||||
|
||||
m.IconParts = make([]GuildIconMsgPart, m.PartCount)
|
||||
|
||||
for i := 0; i < int(m.PartCount); i++ {
|
||||
for i := 0; i < partCount; i++ {
|
||||
m.IconParts[i] = GuildIconMsgPart{
|
||||
Index: bf.ReadUint16(),
|
||||
ID: bf.ReadUint16(),
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
type Item struct {
|
||||
Unk0 uint32
|
||||
ItemId uint16
|
||||
ItemID uint16
|
||||
Amount uint16
|
||||
Unk1 uint32
|
||||
}
|
||||
@@ -18,10 +18,8 @@ type Item struct {
|
||||
// MsgMhfUpdateGuildItem represents the MSG_MHF_UPDATE_GUILD_ITEM
|
||||
type MsgMhfUpdateGuildItem struct {
|
||||
AckHandle uint32
|
||||
GuildId uint32
|
||||
Amount uint16
|
||||
Unk1 uint16 // 0x00 0x00
|
||||
Items []Item // Array of updated item IDs
|
||||
GuildID uint32
|
||||
Items []Item
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -32,14 +30,15 @@ func (m *MsgMhfUpdateGuildItem) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfUpdateGuildItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.GuildId = bf.ReadUint32()
|
||||
m.Amount = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
m.Items = make([]Item, int(m.Amount))
|
||||
m.GuildID = bf.ReadUint32()
|
||||
itemCount := int(bf.ReadUint16())
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
m.Items = make([]Item, itemCount)
|
||||
|
||||
for i := 0; i < int(m.Amount); i++ {
|
||||
for i := 0; i < itemCount; i++ {
|
||||
m.Items[i].Unk0 = bf.ReadUint32()
|
||||
m.Items[i].ItemId = bf.ReadUint16()
|
||||
m.Items[i].ItemID = bf.ReadUint16()
|
||||
m.Items[i].Amount = bf.ReadUint16()
|
||||
m.Items[i].Unk1 = bf.ReadUint32()
|
||||
}
|
||||
|
||||
@@ -13,8 +13,7 @@ import (
|
||||
type MsgMhfUpdateHouse struct {
|
||||
AckHandle uint32
|
||||
State uint8
|
||||
Unk1 uint8 // Always 0x01
|
||||
Unk2 uint16 // Always 0x0000
|
||||
Unk1 uint8 // Always 0x01
|
||||
Password string
|
||||
}
|
||||
|
||||
@@ -28,8 +27,9 @@ func (m *MsgMhfUpdateHouse) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Client
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.State = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadUint8()
|
||||
m.Unk2 = bf.ReadUint16()
|
||||
_ = bf.ReadUint8() // Password length
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Password length
|
||||
m.Password = stringsupport.SJISToUTF8(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
_config "erupe-ce/config"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfUpdateMyhouseInfo represents the MSG_MHF_UPDATE_MYHOUSE_INFO
|
||||
type MsgMhfUpdateMyhouseInfo struct {
|
||||
AckHandle uint32
|
||||
Unk0 []byte
|
||||
Data []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,7 +23,16 @@ func (m *MsgMhfUpdateMyhouseInfo) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfUpdateMyhouseInfo) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadBytes(0x16A)
|
||||
if _config.ErupeConfig.RealClientMode >= _config.G10 {
|
||||
m.Data = bf.ReadBytes(362)
|
||||
} else if _config.ErupeConfig.RealClientMode >= _config.GG {
|
||||
m.Data = bf.ReadBytes(338)
|
||||
} else if _config.ErupeConfig.RealClientMode >= _config.F5 {
|
||||
// G1 is a guess
|
||||
m.Data = bf.ReadBytes(314)
|
||||
} else {
|
||||
m.Data = bf.ReadBytes(290)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,7 @@ import (
|
||||
// MsgMhfUpdateUnionItem represents the MSG_MHF_UPDATE_UNION_ITEM
|
||||
type MsgMhfUpdateUnionItem struct {
|
||||
AckHandle uint32
|
||||
Amount uint16
|
||||
Unk1 uint16 // 0x00 0x00
|
||||
Items []Item // Array of updated item IDs
|
||||
Items []Item
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,13 +22,14 @@ func (m *MsgMhfUpdateUnionItem) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfUpdateUnionItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Amount = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
m.Items = make([]Item, int(m.Amount))
|
||||
itemCount := int(bf.ReadUint16())
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
m.Items = make([]Item, itemCount)
|
||||
|
||||
for i := 0; i < int(m.Amount); i++ {
|
||||
for i := 0; i < itemCount; i++ {
|
||||
m.Items[i].Unk0 = bf.ReadUint32()
|
||||
m.Items[i].ItemId = bf.ReadUint16()
|
||||
m.Items[i].ItemID = bf.ReadUint16()
|
||||
m.Items[i].Amount = bf.ReadUint16()
|
||||
m.Items[i].Unk1 = bf.ReadUint32()
|
||||
}
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfUseGachaPoint represents the MSG_MHF_USE_GACHA_POINT
|
||||
type MsgMhfUseGachaPoint struct{
|
||||
AckHandle uint32
|
||||
Unk0 uint16 // padding?
|
||||
TrialCoins uint32
|
||||
PremiumCoins uint32
|
||||
type MsgMhfUseGachaPoint struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint8
|
||||
Unk1 uint8
|
||||
TrialCoins uint32
|
||||
PremiumCoins uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,7 +25,8 @@ func (m *MsgMhfUseGachaPoint) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfUseGachaPoint) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadUint8()
|
||||
m.TrialCoins = bf.ReadUint32()
|
||||
m.PremiumCoins = bf.ReadUint32()
|
||||
return nil
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
// MsgMhfVoteFesta represents the MSG_MHF_VOTE_FESTA
|
||||
type MsgMhfVoteFesta struct {
|
||||
AckHandle uint32
|
||||
Unk uint32
|
||||
FestaID uint32
|
||||
GuildID uint32
|
||||
TrialID uint32
|
||||
}
|
||||
@@ -24,7 +24,7 @@ func (m *MsgMhfVoteFesta) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfVoteFesta) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk = bf.ReadUint32()
|
||||
m.FestaID = bf.ReadUint32()
|
||||
m.GuildID = bf.ReadUint32()
|
||||
m.TrialID = bf.ReadUint32()
|
||||
return nil
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgSysCastBinary represents the MSG_SYS_CAST_BINARY
|
||||
type MsgSysCastBinary struct {
|
||||
Unk0 uint16
|
||||
Unk1 uint16
|
||||
Unk uint32
|
||||
BroadcastType uint8
|
||||
MessageType uint8
|
||||
RawDataPayload []byte
|
||||
@@ -24,8 +23,7 @@ func (m *MsgSysCastBinary) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysCastBinary) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
m.Unk = bf.ReadUint32()
|
||||
m.BroadcastType = bf.ReadUint8()
|
||||
m.MessageType = bf.ReadUint8()
|
||||
dataSize := bf.ReadUint16()
|
||||
|
||||
@@ -2,7 +2,6 @@ package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/bfutil"
|
||||
"erupe-ce/common/byteframe"
|
||||
_config "erupe-ce/config"
|
||||
"erupe-ce/network"
|
||||
@@ -29,8 +28,8 @@ func (m *MsgSysCreateAcquireSemaphore) Parse(bf *byteframe.ByteFrame, ctx *clien
|
||||
if _config.ErupeConfig.RealClientMode >= _config.S7 { // Assuming this was added with Ravi?
|
||||
m.PlayerCount = bf.ReadUint8()
|
||||
}
|
||||
SemaphoreIDLength := bf.ReadUint8()
|
||||
m.SemaphoreID = string(bfutil.UpToNull(bf.ReadBytes(uint(SemaphoreIDLength))))
|
||||
bf.ReadUint8() // SemaphoreID length
|
||||
m.SemaphoreID = string(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
_config "erupe-ce/config"
|
||||
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
@@ -10,10 +11,10 @@ import (
|
||||
|
||||
// MsgSysCreateSemaphore represents the MSG_SYS_CREATE_SEMAPHORE
|
||||
type MsgSysCreateSemaphore struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16
|
||||
DataSize uint16
|
||||
RawDataPayload []byte
|
||||
AckHandle uint32
|
||||
Unk0 uint16
|
||||
PlayerCount uint8
|
||||
SemaphoreID string
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -25,8 +26,11 @@ func (m *MsgSysCreateSemaphore) Opcode() network.PacketID {
|
||||
func (m *MsgSysCreateSemaphore) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.DataSize = bf.ReadUint16()
|
||||
m.RawDataPayload = bf.ReadBytes(uint(m.DataSize))
|
||||
if _config.ErupeConfig.RealClientMode >= _config.S7 { // Assuming this was added with Ravi?
|
||||
m.PlayerCount = bf.ReadUint8()
|
||||
}
|
||||
bf.ReadUint8() // SemaphoreID length
|
||||
m.SemaphoreID = string(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package mhfpacket
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/common/bfutil"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
@@ -13,7 +12,7 @@ type MsgSysCreateStage struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint8 // Likely only has 1 and 2 as values.
|
||||
PlayerCount uint8
|
||||
StageID string // NULL terminated string.
|
||||
StageID string
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -26,8 +25,8 @@ func (m *MsgSysCreateStage) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Client
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.PlayerCount = bf.ReadUint8()
|
||||
stageIDLength := bf.ReadUint8()
|
||||
m.StageID = string(bfutil.UpToNull(bf.ReadBytes(uint(stageIDLength))))
|
||||
bf.ReadUint8() // Length StageID
|
||||
m.StageID = string(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"errors"
|
||||
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/common/bfutil"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
@@ -12,7 +11,7 @@ import (
|
||||
// MsgSysEnterStage represents the MSG_SYS_ENTER_STAGE
|
||||
type MsgSysEnterStage struct {
|
||||
AckHandle uint32
|
||||
UnkBool uint8
|
||||
Unk bool
|
||||
StageID string
|
||||
}
|
||||
|
||||
@@ -24,9 +23,9 @@ func (m *MsgSysEnterStage) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysEnterStage) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.UnkBool = bf.ReadUint8()
|
||||
stageIDLength := bf.ReadUint8()
|
||||
m.StageID = string(bfutil.UpToNull(bf.ReadBytes(uint(stageIDLength))))
|
||||
m.Unk = bf.ReadBool() // IsQuest?
|
||||
bf.ReadUint8() // Length StageID
|
||||
m.StageID = string(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package mhfpacket
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"erupe-ce/common/bfutil"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
@@ -27,8 +26,8 @@ func (m *MsgSysEnumerateClient) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cl
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.Get = bf.ReadUint8()
|
||||
stageIDLength := bf.ReadUint8()
|
||||
m.StageID = string(bfutil.UpToNull(bf.ReadBytes(uint(stageIDLength))))
|
||||
bf.ReadUint8() // StageID length
|
||||
m.StageID = string(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/stringsupport"
|
||||
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
@@ -12,8 +10,7 @@ import (
|
||||
// MsgSysEnumerateStage represents the MSG_SYS_ENUMERATE_STAGE
|
||||
type MsgSysEnumerateStage struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint8 // Hardcoded 1 in the binary
|
||||
StagePrefix string // NULL terminated string.
|
||||
StagePrefix string
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,9 +21,9 @@ func (m *MsgSysEnumerateStage) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysEnumerateStage) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
bf.ReadUint8()
|
||||
m.StagePrefix = stringsupport.SJISToUTF8(bf.ReadNullTerminatedBytes())
|
||||
bf.ReadUint8() // Always 1
|
||||
bf.ReadUint8() // Length StagePrefix
|
||||
m.StagePrefix = string(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"errors"
|
||||
|
||||
"erupe-ce/common/bfutil"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/common/byteframe"
|
||||
)
|
||||
|
||||
type scenarioFileIdentifer struct {
|
||||
|
||||
@@ -2,7 +2,6 @@ package mhfpacket
|
||||
|
||||
import (
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/common/bfutil"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
@@ -27,8 +26,8 @@ func (m *MsgSysGetStageBinary) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cli
|
||||
m.BinaryType0 = bf.ReadUint8()
|
||||
m.BinaryType1 = bf.ReadUint8()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
stageIDLength := bf.ReadUint8()
|
||||
m.StageID = string(bfutil.UpToNull(bf.ReadBytes(uint(stageIDLength))))
|
||||
bf.ReadUint8() // StageID length
|
||||
m.StageID = string(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgSysHideClient represents the MSG_SYS_HIDE_CLIENT
|
||||
type MsgSysHideClient struct {
|
||||
Hide bool
|
||||
Unk0 uint16 // Hardcoded 0 in binary
|
||||
Unk1 uint8 // Hardcoded 0 in binary
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -23,8 +21,9 @@ func (m *MsgSysHideClient) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysHideClient) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.Hide = bf.ReadBool()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint8()
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgSysIssueLogkey represents the MSG_SYS_ISSUE_LOGKEY
|
||||
type MsgSysIssueLogkey struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16 // Hardcoded 00 01 in binary
|
||||
Unk1 uint16 // Hardcoded 0 in binary.
|
||||
Unk0 uint16
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,7 +23,7 @@ func (m *MsgSysIssueLogkey) Opcode() network.PacketID {
|
||||
func (m *MsgSysIssueLogkey) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ func (m *MsgSysLoadRegister) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Clien
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.RegisterID = bf.ReadUint32()
|
||||
m.Values = bf.ReadUint8()
|
||||
_ = bf.ReadUint8()
|
||||
_ = bf.ReadUint16()
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgSysLockStage represents the MSG_SYS_LOCK_STAGE
|
||||
type MsgSysLockStage struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint8 // Hardcoded 1 in the binary
|
||||
Unk1 uint8 // Hardcoded 1 in the binary
|
||||
StageIDLength uint8
|
||||
StageID string
|
||||
AckHandle uint32
|
||||
StageID string
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -25,10 +22,10 @@ func (m *MsgSysLockStage) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysLockStage) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadUint8()
|
||||
m.StageIDLength = bf.ReadUint8()
|
||||
m.StageID = string(bf.ReadBytes(uint(m.StageIDLength)))
|
||||
bf.ReadUint8() // Always 1
|
||||
bf.ReadUint8() // Always 1
|
||||
bf.ReadUint8() // Length StageID
|
||||
m.StageID = string(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgSysLogin represents the MSG_SYS_LOGIN
|
||||
type MsgSysLogin struct {
|
||||
AckHandle uint32
|
||||
CharID0 uint32
|
||||
LoginTokenNumber uint32
|
||||
HardcodedZero0 uint16
|
||||
RequestVersion uint16
|
||||
CharID1 uint32
|
||||
HardcodedZero1 uint16
|
||||
LoginTokenStringLength uint16 // Hardcoded to 0x11
|
||||
LoginTokenString string
|
||||
AckHandle uint32
|
||||
CharID0 uint32
|
||||
LoginTokenNumber uint32
|
||||
HardcodedZero0 uint16
|
||||
RequestVersion uint16
|
||||
CharID1 uint32
|
||||
LoginTokenString string
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -34,8 +32,8 @@ func (m *MsgSysLogin) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContex
|
||||
m.HardcodedZero0 = bf.ReadUint16()
|
||||
m.RequestVersion = bf.ReadUint16()
|
||||
m.CharID1 = bf.ReadUint32()
|
||||
m.HardcodedZero1 = bf.ReadUint16()
|
||||
m.LoginTokenStringLength = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
bf.ReadUint16() // Always 11
|
||||
m.LoginTokenString = string(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ func (m *MsgSysOperateRegister) Opcode() network.PacketID {
|
||||
func (m *MsgSysOperateRegister) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.SemaphoreID = bf.ReadUint32()
|
||||
_ = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
dataSize := bf.ReadUint16()
|
||||
m.RawDataPayload = bf.ReadBytes(uint(dataSize))
|
||||
return nil
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgSysRecordLog represents the MSG_SYS_RECORD_LOG
|
||||
type MsgSysRecordLog struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Unk1 uint16 // Hardcoded 0
|
||||
HardcodedDataSize uint16 // Hardcoded 0x4AC
|
||||
Unk3 uint32 // Some shared ID with MSG_MHF_GET_SEIBATTLE. World ID??
|
||||
DataBuf []byte
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Unk1 uint32
|
||||
Data []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -27,10 +25,10 @@ func (m *MsgSysRecordLog) Opcode() network.PacketID {
|
||||
func (m *MsgSysRecordLog) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
m.HardcodedDataSize = bf.ReadUint16()
|
||||
m.Unk3 = bf.ReadUint32()
|
||||
m.DataBuf = bf.ReadBytes(uint(m.HardcodedDataSize))
|
||||
bf.ReadUint16() // Zeroed
|
||||
size := bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint32()
|
||||
m.Data = bf.ReadBytes(uint(size))
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package mhfpacket
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/common/bfutil"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
@@ -24,8 +23,8 @@ func (m *MsgSysReserveStage) Opcode() network.PacketID {
|
||||
func (m *MsgSysReserveStage) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Ready = bf.ReadUint8()
|
||||
stageIDLength := bf.ReadUint8()
|
||||
m.StageID = string(bfutil.UpToNull(bf.ReadBytes(uint(stageIDLength))))
|
||||
_ = bf.ReadUint8() // StageID length
|
||||
m.StageID = string(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgSysRightsReload represents the MSG_SYS_RIGHTS_RELOAD
|
||||
type MsgSysRightsReload struct{
|
||||
type MsgSysRightsReload struct {
|
||||
AckHandle uint32
|
||||
Unk0 byte
|
||||
Unk0 []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,7 +22,7 @@ func (m *MsgSysRightsReload) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysRightsReload) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.Unk0 = bf.ReadBytes(uint(bf.ReadUint8()))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package mhfpacket
|
||||
|
||||
import (
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/common/bfutil"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
@@ -24,9 +23,9 @@ func (m *MsgSysSetStageBinary) Opcode() network.PacketID {
|
||||
func (m *MsgSysSetStageBinary) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.BinaryType0 = bf.ReadUint8()
|
||||
m.BinaryType1 = bf.ReadUint8()
|
||||
stageIDLength := bf.ReadUint8() // <= 0x20
|
||||
dataSize := bf.ReadUint16() // <= 0x400
|
||||
m.StageID = string(bfutil.UpToNull(bf.ReadBytes(uint(stageIDLength))))
|
||||
bf.ReadUint8() // StageID length <= 0x20
|
||||
dataSize := bf.ReadUint16() // <= 0x400
|
||||
m.StageID = string(bf.ReadNullTerminatedBytes())
|
||||
m.RawDataPayload = bf.ReadBytes(uint(dataSize))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgSysSetStagePass represents the MSG_SYS_SET_STAGE_PASS
|
||||
type MsgSysSetStagePass struct {
|
||||
Unk0 uint8 // Hardcoded 0 in the binary
|
||||
Password string // NULL-terminated string
|
||||
Password string // NULL-terminated string
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -21,8 +20,8 @@ func (m *MsgSysSetStagePass) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysSetStagePass) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
_ = bf.ReadUint8() // Password length
|
||||
bf.ReadUint8() // Zeroed
|
||||
bf.ReadUint8() // Password length
|
||||
m.Password = string(bf.ReadNullTerminatedBytes())
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -23,11 +23,9 @@ type TerminalLogEntry struct {
|
||||
|
||||
// MsgSysTerminalLog represents the MSG_SYS_TERMINAL_LOG
|
||||
type MsgSysTerminalLog struct {
|
||||
AckHandle uint32
|
||||
LogID uint32 // 0 on the first packet, and the server sends back a value to use for subsequent requests.
|
||||
EntryCount uint16
|
||||
Unk0 uint16 // Hardcoded 0 in the binary
|
||||
Entries []*TerminalLogEntry
|
||||
AckHandle uint32
|
||||
LogID uint32 // 0 on the first packet, and the server sends back a value to use for subsequent requests.
|
||||
Entries []TerminalLogEntry
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -39,11 +37,11 @@ func (m *MsgSysTerminalLog) Opcode() network.PacketID {
|
||||
func (m *MsgSysTerminalLog) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.LogID = bf.ReadUint32()
|
||||
m.EntryCount = bf.ReadUint16()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
entryCount := int(bf.ReadUint16())
|
||||
bf.ReadUint16() // Zeroed
|
||||
|
||||
for i := 0; i < int(m.EntryCount); i++ {
|
||||
e := &TerminalLogEntry{}
|
||||
var e TerminalLogEntry
|
||||
for i := 0; i < entryCount; i++ {
|
||||
e.Index = bf.ReadUint32()
|
||||
e.Type1 = bf.ReadUint8()
|
||||
e.Type2 = bf.ReadUint8()
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/common/byteframe"
|
||||
)
|
||||
|
||||
// MsgSysUnlockStage represents the MSG_SYS_UNLOCK_STAGE
|
||||
type MsgSysUnlockStage struct {
|
||||
Unk0 uint16 // Hardcoded 0 in the binary.
|
||||
}
|
||||
type MsgSysUnlockStage struct{}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysUnlockStage) Opcode() network.PacketID {
|
||||
@@ -18,12 +17,11 @@ func (m *MsgSysUnlockStage) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysUnlockStage) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
func (m *MsgSysUnlockStage) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
bf.WriteUint16(m.Unk0)
|
||||
return nil
|
||||
return errors.New("NOT IMPLEMENTED")
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user