mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 06:27:45 +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 {
|
||||
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;
|
||||
padding: 5px 20px;
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
line-height: 12px;
|
||||
}
|
||||
|
||||
.commit-history li a:hover {
|
||||
|
|
|
@ -95,7 +95,6 @@
|
|||
.s-login-btn {
|
||||
width: 150px;
|
||||
background: #0e6bc9;
|
||||
right: -7px; /* ugh. refer to padding-left on input above - more bounding box issues... */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
@ -153,7 +152,7 @@ h2.text-center{
|
|||
|
||||
.s-link-badge-wrapper {
|
||||
clear: both;
|
||||
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.s-link-badge {
|
||||
|
@ -166,12 +165,10 @@ h2.text-center{
|
|||
margin-top: 25px;
|
||||
color: white;
|
||||
border-bottom: 3px solid #43348D;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.s-link-badge-discord {
|
||||
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 {
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == 4) {
|
||||
try{
|
||||
try {
|
||||
var response = readBody(xhr);
|
||||
var parsed = JSON.parse(response);
|
||||
window.external.Boot(parsed.sId, parsed.lobbyHost, parsed.frontierHost);
|
||||
}catch(err){
|
||||
} catch(err) {
|
||||
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">
|
||||
Join us on Discord!
|
||||
</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
|
||||
</a>
|
||||
</div>
|
||||
<h2>Github stuff here soon!</h2>
|
||||
<h2>Recent Activity</h2>
|
||||
<ul id="commit-log" class="commit-history">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="s-full-split s-right-half col-xs-5">
|
||||
<div class="s-logo">
|
||||
|
@ -94,6 +97,26 @@
|
|||
$(function() {
|
||||
$('[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>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == 4) {
|
||||
try{
|
||||
try {
|
||||
var response = readBody(xhr);
|
||||
var parsed = JSON.parse(response);
|
||||
window.external.Boot(parsed.sId, parsed.lobbyHost, parsed.frontierHost);
|
||||
}catch(err){
|
||||
} catch(err) {
|
||||
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">
|
||||
Join us on Discord!
|
||||
</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
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -252,7 +252,7 @@ namespace Core {
|
|||
|
||||
EmoteReq = 0x1F4,
|
||||
EmoteCancel = 0x1F6,
|
||||
PersistantEmoteCancel = 0x1F7,
|
||||
PersistentEmoteCancel = 0x1F7,
|
||||
PoseChange = 0x1F9,
|
||||
PoseReapply = 0x1FA,
|
||||
PoseCancel = 0x1FB,
|
||||
|
|
|
@ -381,7 +381,7 @@ struct FFXIVIpcPlayerSpawn : FFXIVIpcBasePacket<PlayerSpawn>
|
|||
uint16_t activeMinion;
|
||||
uint8_t spawnIndex;
|
||||
uint8_t state;
|
||||
uint8_t persistantEmote;
|
||||
uint8_t persistentEmote;
|
||||
uint8_t modelType; // modelType -> eventSystemDefine
|
||||
uint8_t subtype;
|
||||
uint8_t voice;
|
||||
|
|
|
@ -489,7 +489,7 @@ void Core::Network::GameConnection::handlePackets( const Core::Network::Packets:
|
|||
m_bEncryptionInitialized = true;
|
||||
|
||||
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.initialize( m_encKey, 0x10 );
|
||||
|
|
|
@ -67,6 +67,7 @@ Core::Entity::Player::Player() :
|
|||
m_bAutoattack( false ),
|
||||
m_markedForRemoval( false ),
|
||||
m_mount( 0 ),
|
||||
m_emote( 0 ),
|
||||
m_directorInitialized( false ),
|
||||
m_onEnterEventDone( false )
|
||||
{
|
||||
|
@ -1381,6 +1382,16 @@ uint8_t Core::Entity::Player::getCurrentMount() const
|
|||
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 )
|
||||
{
|
||||
|
||||
|
|
|
@ -387,6 +387,10 @@ public:
|
|||
void dismount();
|
||||
/*! get the current mount */
|
||||
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 sendStats();
|
||||
|
@ -714,6 +718,7 @@ private:
|
|||
uint32_t m_cfPenaltyUntil; // unix time
|
||||
|
||||
uint8_t m_mount;
|
||||
uint32_t m_emote;
|
||||
|
||||
Util::SpawnIndexAllocator< uint8_t > m_objSpawnIndexAllocator;
|
||||
Util::SpawnIndexAllocator< uint8_t > m_actorSpawnIndexAllocator;
|
||||
|
|
|
@ -144,6 +144,23 @@ void Core::Network::GameConnection::clientTriggerHandler( const Packets::FFXIVAR
|
|||
uint32_t emoteId = param11;
|
||||
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 );
|
||||
break;
|
||||
}
|
||||
|
@ -152,13 +169,14 @@ void Core::Network::GameConnection::clientTriggerHandler( const Packets::FFXIVAR
|
|||
player.emoteInterrupt();
|
||||
break;
|
||||
}
|
||||
case ClientTriggerType::PersistantEmoteCancel: // cancel persistant emote
|
||||
case ClientTriggerType::PersistentEmoteCancel: // cancel persistent emote
|
||||
{
|
||||
player.setPersistentEmote( 0 );
|
||||
player.emoteInterrupt();
|
||||
auto SetStatusPacket = boost::make_shared< ActorControlPacket142 >( player.getId(),
|
||||
auto pSetStatusPacket = boost::make_shared< ActorControlPacket142 >( player.getId(),
|
||||
SetStatus,
|
||||
static_cast< uint8_t >( Entity::Chara::ActorStatus::Idle ) );
|
||||
player.sendToInRangeSet( SetStatusPacket );
|
||||
player.sendToInRangeSet( pSetStatusPacket );
|
||||
break;
|
||||
}
|
||||
case ClientTriggerType::PoseChange: // change pose
|
||||
|
|
|
@ -118,6 +118,7 @@ namespace Server {
|
|||
}
|
||||
|
||||
m_data.currentMount = player.getCurrentMount();
|
||||
m_data.persistentEmote = player.getPersistentEmote();
|
||||
|
||||
m_data.targetId = player.getTargetId();
|
||||
//m_data.type = 1;
|
||||
|
|
|
@ -3551,6 +3551,18 @@
|
|||
{
|
||||
"name": "Name"
|
||||
},
|
||||
{
|
||||
"index": 1,
|
||||
"type": "repeat",
|
||||
"count": 7,
|
||||
"definition": {
|
||||
"name": "ActionTimeline",
|
||||
"converter": {
|
||||
"type": "link",
|
||||
"target": "ActionTimeline"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"index": 11,
|
||||
"name": "EmoteCategory",
|
||||
|
@ -3559,6 +3571,14 @@
|
|||
"target": "EmoteCategory"
|
||||
}
|
||||
},
|
||||
{
|
||||
"index": 12,
|
||||
"name": "EmoteMode",
|
||||
"converter": {
|
||||
"type": "link",
|
||||
"target": "EmoteMode"
|
||||
}
|
||||
},
|
||||
{
|
||||
"index": 18,
|
||||
"name": "TextCommand",
|
||||
|
@ -3589,6 +3609,10 @@
|
|||
"type": "link",
|
||||
"target": "LogMessage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"index": 22,
|
||||
"name": "UnlockLink"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue