mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-28 23:27:45 +00:00
Merge https://github.com/SapphireMordred/Sapphire into develop
This commit is contained in:
commit
2694e7df51
2 changed files with 24 additions and 24 deletions
|
@ -3,7 +3,7 @@ root = true
|
||||||
# find plugin for your editor here: http://editorconfig.org/#download
|
# find plugin for your editor here: http://editorconfig.org/#download
|
||||||
[*.{cpp,h,chai,inc}]
|
[*.{cpp,h,chai,inc}]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 3
|
indent_size = 2
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
indent_brace_style = Allman
|
indent_brace_style = Allman
|
||||||
|
|
|
@ -22,7 +22,7 @@ When making a PR, please make sure that it follows our style guidelines and good
|
||||||
|
|
||||||
### Coding style
|
### Coding style
|
||||||
|
|
||||||
Indentations are Allman-style based, 3-space, no tabs.
|
Indentations are Allman-style based, 2-space, no tabs.
|
||||||
Space between arguments in function calls, as well as for types.
|
Space between arguments in function calls, as well as for types.
|
||||||
|
|
||||||
Example (shortened from ActionHandler.cpp):
|
Example (shortened from ActionHandler.cpp):
|
||||||
|
@ -30,30 +30,30 @@ Example (shortened from ActionHandler.cpp):
|
||||||
```cpp
|
```cpp
|
||||||
switch( commandId )
|
switch( commandId )
|
||||||
{
|
{
|
||||||
case 0x01: // Toggle sheathe
|
case 0x01: // Toggle sheathe
|
||||||
{
|
{
|
||||||
if ( param11 == 1 )
|
if ( param11 == 1 )
|
||||||
pPlayer->setStance( Entity::Chara::Stance::Active );
|
pPlayer->setStance( Entity::Chara::Stance::Active );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pPlayer->setStance( Entity::Chara::Stance::Passive );
|
pPlayer->setStance( Entity::Chara::Stance::Passive );
|
||||||
pPlayer->setAutoattack( false );
|
pPlayer->setAutoattack( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
pPlayer->sendToInRangeSet( ActorControlPacket142( pPlayer->getId(), 0, param11, 1 ) );
|
pPlayer->sendToInRangeSet( ActorControlPacket142( pPlayer->getId(), 0, param11, 1 ) );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 0x03: // Change target
|
case 0x03: // Change target
|
||||||
{
|
{
|
||||||
uint64_t targetId = inPacket.getValAt< uint64_t >( 0x24 );
|
uint64_t targetId = inPacket.getValAt< uint64_t >( 0x24 );
|
||||||
pPlayer->changeTarget( targetId );
|
pPlayer->changeTarget( targetId );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue