@@ -462,9 +462,10 @@ function _RepConvGRC() {
462
462
// statystyki gracza
463
463
if ( ( RCGP . getJQElement ( ) ) . find ( $ ( WndId + 'RepConvStatsPlayer' ) ) . length == 0 ) {
464
464
var
465
- __tmp = ( ( RCGP . getContext ( ) . sub == "player_get_profile_html" ) ? btoa ( JSON . stringify ( { id :RCGP . getOptions ( ) . player_id } ) ) : $ ( elem ) . nextAll ( '.gp_player_link' ) . attr ( 'href' ) ) . split ( / # / ) ,
466
- _player = ( RCGP . getType ( ) == Layout . wnd . TYPE_PLAYER_PROFILE_EDIT ) ? Game . player_id : ( RCGP . getContext ( ) . sub == "player_get_profile_html" ) ? JSON . parse ( unescape ( RepConv . requests . player . url ) . match ( / ( { .* } ) / ) [ 0 ] ) . player_id : JSON . parse ( atob ( __tmp [ 1 ] || __tmp [ 0 ] ) ) . id ,
465
+ // __tmp = ((RCGP.getContext().sub == "player_get_profile_html") ? btoa(JSON.stringify({id:RCGP.getOptions().player_id})) : $(elem).nextAll('.gp_player_link').attr('href')).split(/#/),
466
+ // _player = (RCGP.getType() == Layout.wnd.TYPE_PLAYER_PROFILE_EDIT) ? Game.player_id : (RCGP.getContext().sub == "player_get_profile_html") ? ((RepConv.requests.player && RepConv.requests.player.url) ? JSON.parse(unescape(RepConv.requests.player.url).match(/({.*})/)[0]).player_id : RCGP.getOptions().player_id) : JSON.parse(atob(__tmp[1] || __tmp[0])).id,
467
467
_player_name = RCGP . getJQElement ( ) . find ( $ ( '#write_message_form input[name="recipients"]' ) ) . val ( ) ,
468
+ _player = RepConvTool . getPlayerId4Name ( _player_name ) ,
468
469
_link = $ ( '<a/>' , {
469
470
'href' : "#n" ,
470
471
'id' : WndName + 'RepConvStatsPlayer' ,
@@ -491,9 +492,10 @@ function _RepConvGRC() {
491
492
// radar dla miast gracza
492
493
if ( ( RCGP . getJQElement ( ) ) . find ( $ ( WndId + 'RepConvRadarPlayer' ) ) . length == 0 ) {
493
494
var
494
- __tmp = ( ( RCGP . getContext ( ) . sub == "player_get_profile_html" ) ? btoa ( JSON . stringify ( { id :RCGP . getOptions ( ) . player_id } ) ) : $ ( elem ) . nextAll ( '.gp_player_link' ) . attr ( 'href' ) ) . split ( / # / ) ,
495
- _player = ( RCGP . getType ( ) == Layout . wnd . TYPE_PLAYER_PROFILE_EDIT ) ? Game . player_id : ( RCGP . getContext ( ) . sub == "player_get_profile_html" ) ? JSON . parse ( unescape ( RepConv . requests . player . url ) . match ( / ( { .* } ) / ) [ 0 ] ) . player_id : JSON . parse ( atob ( __tmp [ 1 ] || __tmp [ 0 ] ) ) . id ,
496
- _player_name = RCGP . getJQElement ( ) . find ( $ ( '#write_message_form input[name="recipients"]' ) ) . val ( ) ;
495
+ // __tmp = ((RCGP.getContext().sub == "player_get_profile_html") ? btoa(JSON.stringify({id:RCGP.getOptions().player_id})) : $(elem).nextAll('.gp_player_link').attr('href')).split(/#/),
496
+ // _player = (RCGP.getType() == Layout.wnd.TYPE_PLAYER_PROFILE_EDIT) ? Game.player_id : (RCGP.getContext().sub == "player_get_profile_html") ? ((RepConv.requests.player && RepConv.requests.player.url) ? JSON.parse(unescape(RepConv.requests.player.url).match(/({.*})/)[0]).player_id : RCGP.getOptions().player_id) : JSON.parse(atob(__tmp[1] || __tmp[0])).id,
497
+ _player_name = RCGP . getJQElement ( ) . find ( $ ( '#write_message_form input[name="recipients"]' ) ) . val ( ) ,
498
+ _player = RepConvTool . getPlayerId4Name ( _player_name ) ;
497
499
RCGP . getJQElement ( )
498
500
. find ( $ ( '#player_info>h3' ) )
499
501
. before (
@@ -1745,6 +1747,17 @@ function _RepConvGRC() {
1745
1747
$ ( _parent ) . find ( $ ( '.curr4' ) ) . html ( '' ) ;
1746
1748
}
1747
1749
} ) ;
1750
+ if ( RCGP . getJQElement ( ) . find ( $ ( '.content div#unit_order_booty' ) ) . length == 0 ) {
1751
+ RCGP . getJQElement ( ) . find ( $ ( '.content div#duration_container' ) )
1752
+ . before (
1753
+ $ ( '<div/>' , { 'id' :'unit_order_booty' , 'style' :'position: relative;top: -28px;cursor: pointer;' } )
1754
+ . click ( function ( ) {
1755
+ $ ( '#trade_type_wood input' ) . select ( ) . val ( Math . floor ( ITowns . getTown ( Game . townId ) . getAvailableTradeCapacity ( ) / 3 ) ) . blur ( )
1756
+ $ ( '#trade_type_stone input' ) . select ( ) . val ( Math . floor ( ITowns . getTown ( Game . townId ) . getAvailableTradeCapacity ( ) / 3 ) ) . blur ( )
1757
+ $ ( '#trade_type_iron input' ) . select ( ) . val ( Math . floor ( ITowns . getTown ( Game . townId ) . getAvailableTradeCapacity ( ) / 3 ) ) . blur ( )
1758
+ } )
1759
+ )
1760
+ }
1748
1761
}
1749
1762
$ . each ( RCGP . getJQElement ( ) . find ( $ ( '.amounts .curr4' ) ) , function ( ind , elem ) {
1750
1763
var _parent = $ ( elem ) . parent ( ) ;
@@ -2183,7 +2196,7 @@ function _RepConvGRC() {
2183
2196
}
2184
2197
2185
2198
function emotsTabs ( wndType , action ) { //insertArea){
2186
- var content = $ ( '<div/>' , { 'class' : 'gpwindow_content' , 'style' : 'overflow-y:auto !important; max-height: 185px; min-height: 120px;' } ) ,
2199
+ var content = $ ( '<div/>' , { 'class' : 'gpwindow_content' , 'style' : 'overflow-y:auto !important; max-height: 185px; min-height: 120px; top: 44px !important; ' } ) ,
2187
2200
contentLinks = $ ( '<ul/>' , { 'class' :'menu_inner grcrt_menu_inner' , 'style' :'padding: 0px;left:0px;' } ) ,
2188
2201
tabs =
2189
2202
$ ( '<div/>' , { 'id' : 'emots_popup_' + wndType , 'style' : 'display:none; z-index: 5000; min-height: 180px;max-height: 265px;' , 'class' :'grcrtbb' } )
@@ -2537,8 +2550,19 @@ function _RepConvGRC() {
2537
2550
function addIdleDays ( RCGP ) {
2538
2551
$ . each ( RCGP . getJQElement ( ) . find ( $ ( '.grcrt_idle' ) ) , function ( ind , elem ) {
2539
2552
var
2540
- __tmp = ( ( RCGP . getContext ( ) . sub == "player_get_profile_html" ) ? btoa ( JSON . stringify ( { id :RCGP . getOptions ( ) . player_id } ) ) : $ ( elem ) . nextAll ( '.gp_player_link' ) . attr ( 'href' ) ) . split ( / # / ) ,
2541
- _player = ( RCGP . getType ( ) == Layout . wnd . TYPE_PLAYER_PROFILE_EDIT ) ? Game . player_id : ( RCGP . getContext ( ) . sub == "player_get_profile_html" ) ? JSON . parse ( unescape ( RepConv . requests . player . url ) . match ( / ( { .* } ) / ) [ 0 ] ) . player_id : JSON . parse ( atob ( __tmp [ 1 ] || __tmp [ 0 ] ) ) . id ,
2553
+ __tmp = ( ( RCGP . getContext ( ) . sub == "player_get_profile_html" )
2554
+ ?
2555
+ btoa ( JSON . stringify ( { id :RCGP . getOptions ( ) . player_id } ) )
2556
+ :
2557
+ $ ( elem ) . nextAll ( '.gp_player_link' ) . attr ( 'href' ) ) . split ( / # / ) ,
2558
+ _player = ( RCGP . getType ( ) == Layout . wnd . TYPE_PLAYER_PROFILE_EDIT )
2559
+ ? Game . player_id
2560
+ :
2561
+ ( RCGP . getContext ( ) . sub == "player_get_profile_html" )
2562
+ ?
2563
+ /*((RepConv.requests.player && RepConv.requests.player.url) ? JSON.parse(unescape(RepConv.requests.player.url).match(/({.*})/)[0]).player_id : RCGP.getOptions().player_id)*/
2564
+ RepConvTool . getPlayerId4Name ( RCGP . getJQElement ( ) . find ( $ ( '#write_message_form input[name="recipients"]' ) ) . val ( ) )
2565
+ : JSON . parse ( atob ( __tmp [ 1 ] || __tmp [ 0 ] ) ) . id , AQQ
2542
2566
_days = parseFloat ( RepConvGRC . idle . JSON [ _player ] || '-1' ) ;
2543
2567
$ ( elem ) . addClass ( 'grcrt_idle_days' ) ,
2544
2568
$ ( elem ) . addClass ( 'grcrt_idle_dg' ) ,
@@ -3456,6 +3480,9 @@ function _RepConvGRC() {
3456
3480
'.grcrt_brackets:before { content: "("}\n' +
3457
3481
'.grcrt_brackets:after { content: ")"}'
3458
3482
)
3483
+ )
3484
+ . append (
3485
+ $ ( '<style/>' , { 'id' :'grcrt_ft' } )
3459
3486
) ;
3460
3487
// obsługa YT
3461
3488
$ ( '#ui_box' )
0 commit comments