1
Fork 0
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:
Maru 2018-07-09 01:19:42 -03:00
parent e9891a35c0
commit a52b6803fd
12 changed files with 116 additions and 23 deletions

View file

@ -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 {

View file

@ -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 {

View file

@ -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>

View file

@ -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>

View file

@ -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,

View file

@ -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;

View file

@ -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 )
{ {

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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"
} }
] ]
}, },