mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 14:37:44 +00:00
Emote stuff, launcher;
Please don't look Emote stuff;
This commit is contained in:
parent
e9891a35c0
commit
a52b6803fd
12 changed files with 116 additions and 23 deletions
|
@ -139,11 +139,25 @@ p.pageSubTitle{
|
||||||
}
|
}
|
||||||
|
|
||||||
.commit-history {
|
.commit-history {
|
||||||
padding-left: 20px;
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
margin: 0 -15px 0 -15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commit-history li a {
|
.commit-history > li {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.commit-history > li:nth-child(odd) {
|
||||||
|
background: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.commit-history> li > a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
padding: 5px 20px;
|
||||||
|
display: block;
|
||||||
|
font-size: 11px;
|
||||||
|
line-height: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commit-history li a:hover {
|
.commit-history li a:hover {
|
||||||
|
|
|
@ -95,7 +95,6 @@
|
||||||
.s-login-btn {
|
.s-login-btn {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
background: #0e6bc9;
|
background: #0e6bc9;
|
||||||
right: -7px; /* ugh. refer to padding-left on input above - more bounding box issues... */
|
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +152,7 @@ h2.text-center{
|
||||||
|
|
||||||
.s-link-badge-wrapper {
|
.s-link-badge-wrapper {
|
||||||
clear: both;
|
clear: both;
|
||||||
|
padding: 0 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.s-link-badge {
|
.s-link-badge {
|
||||||
|
@ -166,12 +165,10 @@ h2.text-center{
|
||||||
margin-top: 25px;
|
margin-top: 25px;
|
||||||
color: white;
|
color: white;
|
||||||
border-bottom: 3px solid #43348D;
|
border-bottom: 3px solid #43348D;
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.s-link-badge-discord {
|
.s-link-badge-discord {
|
||||||
background: #7082E1 url("../img/fa-discord-icon.png") 10px 7px no-repeat;
|
background: #7082E1 url("../img/fa-discord-icon.png") 10px 7px no-repeat;
|
||||||
margin-right: 60px; /* Ideally we'd just use pull-right with the last col-xs-5 but IE7 bounding box render??? */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.s-link-badge-github {
|
.s-link-badge-github {
|
||||||
|
|
|
@ -18,11 +18,11 @@
|
||||||
|
|
||||||
xhr.onreadystatechange = function() {
|
xhr.onreadystatechange = function() {
|
||||||
if (xhr.readyState == 4) {
|
if (xhr.readyState == 4) {
|
||||||
try{
|
try {
|
||||||
var response = readBody(xhr);
|
var response = readBody(xhr);
|
||||||
var parsed = JSON.parse(response);
|
var parsed = JSON.parse(response);
|
||||||
window.external.Boot(parsed.sId, parsed.lobbyHost, parsed.frontierHost);
|
window.external.Boot(parsed.sId, parsed.lobbyHost, parsed.frontierHost);
|
||||||
}catch(err){
|
} catch(err) {
|
||||||
document.getElementById("Error").innerHTML = "User creation failed.";
|
document.getElementById("Error").innerHTML = "User creation failed.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,11 +51,14 @@
|
||||||
<a href="https://discord.gg/KfrZCkx" class="s-link-badge s-link-badge-discord col-xs-5">
|
<a href="https://discord.gg/KfrZCkx" class="s-link-badge s-link-badge-discord col-xs-5">
|
||||||
Join us on Discord!
|
Join us on Discord!
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/SapphireMordred/Sapphire" class="s-link-badge s-link-badge-github col-xs-5 pull-left">
|
<a href="https://github.com/SapphireMordred/Sapphire" class="s-link-badge s-link-badge-github col-xs-5 pull-right">
|
||||||
Our Github repository
|
Our Github repository
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<h2>Github stuff here soon!</h2>
|
<h2>Recent Activity</h2>
|
||||||
|
<ul id="commit-log" class="commit-history">
|
||||||
|
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="s-full-split s-right-half col-xs-5">
|
<div class="s-full-split s-right-half col-xs-5">
|
||||||
<div class="s-logo">
|
<div class="s-logo">
|
||||||
|
@ -94,6 +97,26 @@
|
||||||
$(function() {
|
$(function() {
|
||||||
$('[autofocus]:not(:focus)').eq(0).focus();
|
$('[autofocus]:not(:focus)').eq(0).focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
fetch( "https://api.github.com/repos/SapphireMordred/Sapphire/events" ).then( function( resp ) {
|
||||||
|
return resp.json();
|
||||||
|
}).then( function( data ) {
|
||||||
|
data = data.filter( function( e ) {
|
||||||
|
return e.type == "PushEvent";
|
||||||
|
});
|
||||||
|
|
||||||
|
let commitContainer = document.getElementById( 'commit-log' );
|
||||||
|
for ( var evnt of data ) {
|
||||||
|
for ( var commit of evnt.payload.commits ) {
|
||||||
|
let e = document.createElement( 'li' );
|
||||||
|
e.innerHTML = '<a href="https://github.com/SapphireMordred/Sapphire/commit/' + commit.sha + '">' + commit.message + '</a>';
|
||||||
|
|
||||||
|
commitContainer.appendChild( e );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
@ -18,11 +18,11 @@
|
||||||
|
|
||||||
xhr.onreadystatechange = function() {
|
xhr.onreadystatechange = function() {
|
||||||
if (xhr.readyState == 4) {
|
if (xhr.readyState == 4) {
|
||||||
try{
|
try {
|
||||||
var response = readBody(xhr);
|
var response = readBody(xhr);
|
||||||
var parsed = JSON.parse(response);
|
var parsed = JSON.parse(response);
|
||||||
window.external.Boot(parsed.sId, parsed.lobbyHost, parsed.frontierHost);
|
window.external.Boot(parsed.sId, parsed.lobbyHost, parsed.frontierHost);
|
||||||
}catch(err){
|
} catch(err) {
|
||||||
document.getElementById("Error").innerHTML = "Login failed.";
|
document.getElementById("Error").innerHTML = "Login failed.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
<a href="https://discord.gg/KfrZCkx" class="s-link-badge s-link-badge-discord col-xs-5">
|
<a href="https://discord.gg/KfrZCkx" class="s-link-badge s-link-badge-discord col-xs-5">
|
||||||
Join us on Discord!
|
Join us on Discord!
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/SapphireMordred/Sapphire" class="s-link-badge s-link-badge-github col-xs-5 pull-left">
|
<a href="https://github.com/SapphireMordred/Sapphire" class="s-link-badge s-link-badge-github col-xs-5 pull-right">
|
||||||
Our Github repository
|
Our Github repository
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -252,7 +252,7 @@ namespace Core {
|
||||||
|
|
||||||
EmoteReq = 0x1F4,
|
EmoteReq = 0x1F4,
|
||||||
EmoteCancel = 0x1F6,
|
EmoteCancel = 0x1F6,
|
||||||
PersistantEmoteCancel = 0x1F7,
|
PersistentEmoteCancel = 0x1F7,
|
||||||
PoseChange = 0x1F9,
|
PoseChange = 0x1F9,
|
||||||
PoseReapply = 0x1FA,
|
PoseReapply = 0x1FA,
|
||||||
PoseCancel = 0x1FB,
|
PoseCancel = 0x1FB,
|
||||||
|
|
|
@ -381,7 +381,7 @@ struct FFXIVIpcPlayerSpawn : FFXIVIpcBasePacket<PlayerSpawn>
|
||||||
uint16_t activeMinion;
|
uint16_t activeMinion;
|
||||||
uint8_t spawnIndex;
|
uint8_t spawnIndex;
|
||||||
uint8_t state;
|
uint8_t state;
|
||||||
uint8_t persistantEmote;
|
uint8_t persistentEmote;
|
||||||
uint8_t modelType; // modelType -> eventSystemDefine
|
uint8_t modelType; // modelType -> eventSystemDefine
|
||||||
uint8_t subtype;
|
uint8_t subtype;
|
||||||
uint8_t voice;
|
uint8_t voice;
|
||||||
|
|
|
@ -132,7 +132,7 @@ void Core::Network::GameConnection::getCharList( FFXIVARR_PACKET_RAW& packet, ui
|
||||||
serverListPacket->data().server[0].index = 0;
|
serverListPacket->data().server[0].index = 0;
|
||||||
serverListPacket->data().final = 1;
|
serverListPacket->data().final = 1;
|
||||||
strcpy( serverListPacket->data().server[0].name,
|
strcpy( serverListPacket->data().server[0].name,
|
||||||
g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() );
|
g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() );
|
||||||
pRP.addPacket( serverListPacket );
|
pRP.addPacket( serverListPacket );
|
||||||
|
|
||||||
auto retainerListPacket = makeLobbyPacket< FFXIVIpcRetainerList >( tmpId );
|
auto retainerListPacket = makeLobbyPacket< FFXIVIpcRetainerList >( tmpId );
|
||||||
|
@ -233,7 +233,7 @@ void Core::Network::GameConnection::enterWorld( FFXIVARR_PACKET_RAW& packet, uin
|
||||||
enterWorldPacket->data().contentId = lookupId;
|
enterWorldPacket->data().contentId = lookupId;
|
||||||
enterWorldPacket->data().seq = sequence;
|
enterWorldPacket->data().seq = sequence;
|
||||||
strcpy( enterWorldPacket->data().host,
|
strcpy( enterWorldPacket->data().host,
|
||||||
g_serverLobby.getConfig()->getValue< std::string >( "GlobalNetwork.ZoneHost" ).c_str() );
|
g_serverLobby.getConfig()->getValue< std::string >( "GlobalNetwork.ZoneHost" ).c_str() );
|
||||||
enterWorldPacket->data().port = g_serverLobby.getConfig()->getValue< uint16_t >( "GlobalNetwork.ZonePort" );
|
enterWorldPacket->data().port = g_serverLobby.getConfig()->getValue< uint16_t >( "GlobalNetwork.ZonePort" );
|
||||||
enterWorldPacket->data().charId = logInCharId;
|
enterWorldPacket->data().charId = logInCharId;
|
||||||
memcpy( enterWorldPacket->data().sid, m_pSession->getSessionId(), 66 );
|
memcpy( enterWorldPacket->data().sid, m_pSession->getSessionId(), 66 );
|
||||||
|
@ -313,7 +313,7 @@ bool Core::Network::GameConnection::createOrModifyChar( FFXIVARR_PACKET_RAW& pac
|
||||||
charCreatePacket->data().content_id = newContentId;
|
charCreatePacket->data().content_id = newContentId;
|
||||||
strcpy( charCreatePacket->data().name, name.c_str() );
|
strcpy( charCreatePacket->data().name, name.c_str() );
|
||||||
strcpy( charCreatePacket->data().world,
|
strcpy( charCreatePacket->data().world,
|
||||||
g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() );
|
g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() );
|
||||||
charCreatePacket->data().type = 1;
|
charCreatePacket->data().type = 1;
|
||||||
charCreatePacket->data().seq = sequence;
|
charCreatePacket->data().seq = sequence;
|
||||||
charCreatePacket->data().unknown = 1;
|
charCreatePacket->data().unknown = 1;
|
||||||
|
@ -336,7 +336,7 @@ bool Core::Network::GameConnection::createOrModifyChar( FFXIVARR_PACKET_RAW& pac
|
||||||
charCreatePacket->data().content_id = newContentId;
|
charCreatePacket->data().content_id = newContentId;
|
||||||
strcpy( charCreatePacket->data().name, name.c_str() );
|
strcpy( charCreatePacket->data().name, name.c_str() );
|
||||||
strcpy( charCreatePacket->data().world,
|
strcpy( charCreatePacket->data().world,
|
||||||
g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() );
|
g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() );
|
||||||
charCreatePacket->data().type = 2;
|
charCreatePacket->data().type = 2;
|
||||||
charCreatePacket->data().seq = sequence;
|
charCreatePacket->data().seq = sequence;
|
||||||
charCreatePacket->data().unknown = 1;
|
charCreatePacket->data().unknown = 1;
|
||||||
|
@ -489,7 +489,7 @@ void Core::Network::GameConnection::handlePackets( const Core::Network::Packets:
|
||||||
m_bEncryptionInitialized = true;
|
m_bEncryptionInitialized = true;
|
||||||
|
|
||||||
auto pe1 = boost::make_shared< FFXIVRawPacket >( 0x0A, 0x290, 0, 0 );
|
auto pe1 = boost::make_shared< FFXIVRawPacket >( 0x0A, 0x290, 0, 0 );
|
||||||
*reinterpret_cast< uint32_t* >(&pe1->data()[0]) = 0xE0003C2A;
|
*reinterpret_cast< uint32_t* >( &pe1->data()[0] ) = 0xE0003C2A;
|
||||||
|
|
||||||
BlowFish blowfish;
|
BlowFish blowfish;
|
||||||
blowfish.initialize( m_encKey, 0x10 );
|
blowfish.initialize( m_encKey, 0x10 );
|
||||||
|
|
|
@ -67,6 +67,7 @@ Core::Entity::Player::Player() :
|
||||||
m_bAutoattack( false ),
|
m_bAutoattack( false ),
|
||||||
m_markedForRemoval( false ),
|
m_markedForRemoval( false ),
|
||||||
m_mount( 0 ),
|
m_mount( 0 ),
|
||||||
|
m_emote( 0 ),
|
||||||
m_directorInitialized( false ),
|
m_directorInitialized( false ),
|
||||||
m_onEnterEventDone( false )
|
m_onEnterEventDone( false )
|
||||||
{
|
{
|
||||||
|
@ -1381,6 +1382,16 @@ uint8_t Core::Entity::Player::getCurrentMount() const
|
||||||
return m_mount;
|
return m_mount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Core::Entity::Player::setPersistentEmote( uint32_t emoteId )
|
||||||
|
{
|
||||||
|
m_emote = emoteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t Core::Entity::Player::getPersistentEmote() const
|
||||||
|
{
|
||||||
|
return m_emote;
|
||||||
|
}
|
||||||
|
|
||||||
void Core::Entity::Player::autoAttack( CharaPtr pTarget )
|
void Core::Entity::Player::autoAttack( CharaPtr pTarget )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -387,6 +387,10 @@ public:
|
||||||
void dismount();
|
void dismount();
|
||||||
/*! get the current mount */
|
/*! get the current mount */
|
||||||
uint8_t getCurrentMount() const;
|
uint8_t getCurrentMount() const;
|
||||||
|
/*! set current persistent emote */
|
||||||
|
void setPersistentEmote( uint32_t emoteId );
|
||||||
|
/*! get current persistent emote */
|
||||||
|
uint32_t getPersistentEmote() const;
|
||||||
|
|
||||||
void calculateStats() override;
|
void calculateStats() override;
|
||||||
void sendStats();
|
void sendStats();
|
||||||
|
@ -714,6 +718,7 @@ private:
|
||||||
uint32_t m_cfPenaltyUntil; // unix time
|
uint32_t m_cfPenaltyUntil; // unix time
|
||||||
|
|
||||||
uint8_t m_mount;
|
uint8_t m_mount;
|
||||||
|
uint32_t m_emote;
|
||||||
|
|
||||||
Util::SpawnIndexAllocator< uint8_t > m_objSpawnIndexAllocator;
|
Util::SpawnIndexAllocator< uint8_t > m_objSpawnIndexAllocator;
|
||||||
Util::SpawnIndexAllocator< uint8_t > m_actorSpawnIndexAllocator;
|
Util::SpawnIndexAllocator< uint8_t > m_actorSpawnIndexAllocator;
|
||||||
|
|
|
@ -144,6 +144,23 @@ void Core::Network::GameConnection::clientTriggerHandler( const Packets::FFXIVAR
|
||||||
uint32_t emoteId = param11;
|
uint32_t emoteId = param11;
|
||||||
bool isSilent = param2 == 1;
|
bool isSilent = param2 == 1;
|
||||||
|
|
||||||
|
auto pExdData = g_fw.get< Data::ExdDataGenerated >();
|
||||||
|
auto emoteData = pExdData->get< Data::Emote >( emoteId );
|
||||||
|
|
||||||
|
if( !emoteData )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// TODO: This is wrong!! EmoteCategory does not define whether an emote is persistent or not.
|
||||||
|
// What defines an emote as persistent is EmoteData != 0
|
||||||
|
bool isPersistent = emoteData->emoteCategory == static_cast< uint8_t >( EmoteCategory::Persistent );
|
||||||
|
|
||||||
|
if( isPersistent )
|
||||||
|
{
|
||||||
|
player.setStance( Entity::Chara::Stance::Passive );
|
||||||
|
player.setAutoattack( false );
|
||||||
|
player.setPersistentEmote( emoteId );
|
||||||
|
}
|
||||||
|
|
||||||
player.emote( emoteId, targetId, isSilent );
|
player.emote( emoteId, targetId, isSilent );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -152,13 +169,14 @@ void Core::Network::GameConnection::clientTriggerHandler( const Packets::FFXIVAR
|
||||||
player.emoteInterrupt();
|
player.emoteInterrupt();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ClientTriggerType::PersistantEmoteCancel: // cancel persistant emote
|
case ClientTriggerType::PersistentEmoteCancel: // cancel persistent emote
|
||||||
{
|
{
|
||||||
|
player.setPersistentEmote( 0 );
|
||||||
player.emoteInterrupt();
|
player.emoteInterrupt();
|
||||||
auto SetStatusPacket = boost::make_shared< ActorControlPacket142 >( player.getId(),
|
auto pSetStatusPacket = boost::make_shared< ActorControlPacket142 >( player.getId(),
|
||||||
SetStatus,
|
SetStatus,
|
||||||
static_cast< uint8_t >( Entity::Chara::ActorStatus::Idle ) );
|
static_cast< uint8_t >( Entity::Chara::ActorStatus::Idle ) );
|
||||||
player.sendToInRangeSet( SetStatusPacket );
|
player.sendToInRangeSet( pSetStatusPacket );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ClientTriggerType::PoseChange: // change pose
|
case ClientTriggerType::PoseChange: // change pose
|
||||||
|
|
|
@ -118,6 +118,7 @@ namespace Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
m_data.currentMount = player.getCurrentMount();
|
m_data.currentMount = player.getCurrentMount();
|
||||||
|
m_data.persistentEmote = player.getPersistentEmote();
|
||||||
|
|
||||||
m_data.targetId = player.getTargetId();
|
m_data.targetId = player.getTargetId();
|
||||||
//m_data.type = 1;
|
//m_data.type = 1;
|
||||||
|
|
|
@ -3551,6 +3551,18 @@
|
||||||
{
|
{
|
||||||
"name": "Name"
|
"name": "Name"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"index": 1,
|
||||||
|
"type": "repeat",
|
||||||
|
"count": 7,
|
||||||
|
"definition": {
|
||||||
|
"name": "ActionTimeline",
|
||||||
|
"converter": {
|
||||||
|
"type": "link",
|
||||||
|
"target": "ActionTimeline"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"index": 11,
|
"index": 11,
|
||||||
"name": "EmoteCategory",
|
"name": "EmoteCategory",
|
||||||
|
@ -3559,6 +3571,14 @@
|
||||||
"target": "EmoteCategory"
|
"target": "EmoteCategory"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"index": 12,
|
||||||
|
"name": "EmoteMode",
|
||||||
|
"converter": {
|
||||||
|
"type": "link",
|
||||||
|
"target": "EmoteMode"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"index": 18,
|
"index": 18,
|
||||||
"name": "TextCommand",
|
"name": "TextCommand",
|
||||||
|
@ -3589,6 +3609,10 @@
|
||||||
"type": "link",
|
"type": "link",
|
||||||
"target": "LogMessage"
|
"target": "LogMessage"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"index": 22,
|
||||||
|
"name": "UnlockLink"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue