@@ -470,6 +470,7 @@ function _RepConvGRC() {
470
470
. mousePopup ( new MousePopup ( RepConvTool . GetLabel ( 'STATS.PLAYER' ) ) ) ;
471
471
if ( "https:" == window . location . protocol && ( RepConv . active . statsGRCL != 'potusek' ) ) {
472
472
$ ( _link ) . attr ( {
473
+ //'href' : getStatsLink('player', $(this).attr('player_id'), $(this).attr('player_name')),
473
474
'href' : getStatsLink ( 'player' , _player , _player_name ) ,
474
475
'target' : '_blank'
475
476
} )
@@ -1696,18 +1697,41 @@ function _RepConvGRC() {
1696
1697
function showStats ( what , who_id , who_name ) {
1697
1698
var
1698
1699
RepConvNode = $ ( '<div/>' , { 'id' : 'RepConvNode' } ) ;
1699
- if ( RepConv . active . statsGRCL == 'potusek' ) {
1700
+ // if (RepConv.active.statsGRCL == 'grepostats') {
1701
+ // var website = getStatsLink(what, who_id, who_name);
1702
+ // RepConvNode.append($('<iframe/>', {'src': website, 'style': 'width: 975px; height: 480px;'}));
1703
+ // Layout.dialogWindow.open(RepConvNode.html().toString(), RepConvTool.GetLabel('STATS.'+what.toUpperCase()), 975, 480, null, false).setPosition("center", "center");
1704
+ // } else
1705
+ if ( RepConv . active . statsGRCL == 'grepointel' ) {
1706
+ if ( what == 'player' ) {
1707
+ what = 'pn' ;
1708
+ } else if ( what == 'alliance' ) {
1709
+ what = 'an'
1710
+ }
1711
+ var website = getStatsLink ( what , who_id , who_name ) ;
1712
+ RepConvNode . append ( $ ( '<iframe/>' , { 'src' : website , 'style' : 'width: 1020px; height: 580px;' } ) ) ;
1713
+ Layout . dialogWindow . open ( RepConvNode . html ( ) . toString ( ) , RepConvTool . GetLabel ( 'STATS.' + what . toUpperCase ( ) ) , 1020 , 580 , null , false ) . setPosition ( "center" , "center" ) ;
1714
+ } else {
1715
+ //try {
1716
+ // (WM.getWindowByType("grcrt_stats")[0]).close()
1717
+ //} catch (e){}
1700
1718
WF . open ( "grcrt_stats" , {
1701
1719
args : {
1702
1720
'what' : what ,
1703
1721
'id' : who_id ,
1704
1722
'name' : who_name
1705
1723
}
1706
1724
} )
1725
+ //var website = RepConv.grcrt_domain+'light/'+what+'/' + Game.world_id + '/' + who_id + '/' + Game.locale_lang;
1726
+ //RepConvNode.append($('<iframe/>', {'src': website, 'style': 'width: 825px; height: 625px; border: 0px'}));
1727
+ //Layout.dialogWindow.open(RepConvNode.html().toString(), RepConvTool.GetLabel('STATS.'+what.toUpperCase()), 825, 690, function(){},false).setPosition("center", "center");
1707
1728
}
1708
1729
}
1709
1730
function getStatsLink ( what , who_id , who_name ) {
1710
1731
var website ;
1732
+ // if (RepConv.active.statsGRCL == 'grepostats') {
1733
+ // website = 'http://' + Game.market_id + '.grepostats.com/world/' + Game.world_id + '/'+what+'/' + who_id;
1734
+ // } else
1711
1735
if ( RepConv . active . statsGRCL == 'grepointel' ) {
1712
1736
if ( what == 'player' ) {
1713
1737
what = 'pn' ;
@@ -1768,6 +1792,72 @@ function _RepConvGRC() {
1768
1792
} catch ( e ) { }
1769
1793
}
1770
1794
1795
+ //function wonderLinks(RCGP) {
1796
+ // if (RCGP.getJQElement().find($('.grcrt_linkbox')).length == 0) {
1797
+ // RCGP.setHeight(540)
1798
+ // var _div = $('<div/>',{'class':'grcrt_linkbox'})
1799
+ // .css({'margin': '0px 5px 10px 0px','padding': '0 30px'});
1800
+ // _div
1801
+ // .append(
1802
+ // $('<a/>',{
1803
+ // 'href':'http://devpotusek.potusek.eu/'+Game.locale_lang+'/wonder/'+Game.world_id+'/'+Game.alliance_id+'/'+RepConv.hash+'#'+WorldWonders.all_wonders[WorldWonders.wonder_nr].wonder_type,'target':'_blank'})
1804
+ // .css({'float': 'left'})
1805
+ // .html('Pokaż mój udział w budowie')
1806
+ // )
1807
+ // if (MM.checkAndPublishRawModel('Player', {id : Game.player_id}).getAllianceRights().founder || MM.checkAndPublishRawModel('Player', {id : Game.player_id}).getAllianceRights().leader) {
1808
+ // _div
1809
+ // .append(
1810
+ // $('<a/>',{
1811
+ // 'href':'http://devpotusek.potusek.eu/'+Game.locale_lang+'/wonder/'+Game.world_id+'/'+Game.alliance_id+'/'+($.md5(Game.alliance_id + "_" + Game.world_id))+'#'+WorldWonders.all_wonders[WorldWonders.wonder_nr].wonder_type,'target':'_blank'})
1812
+ // .css({'float': 'right'})
1813
+ // .html('Pokaż udział członków sojuszu w budowie')
1814
+ // )
1815
+ // }
1816
+ // _div
1817
+ // .append(
1818
+ // $('<br/>').css('clear','both')
1819
+ // )
1820
+ // _div
1821
+ // .insertAfter(RCGP.getJQElement().find($('.gpwindow_content>.wonder_state>.game_border')).eq(0))
1822
+ // }
1823
+ //}
1824
+
1825
+ function logWonderSend ( data ) {
1826
+ // var
1827
+ // _wonder = wonders[data.island_x+'_'+data.island_y],
1828
+ // _json = {
1829
+ // lang:Game.world_id.substr(0,2),
1830
+ // world:Game.world_id,
1831
+ // wonder_id:WorldWonders.all_wonders[_wonder].id,
1832
+ // wonder_lvl:WorldWonders.all_wonders[_wonder].expansion_stage,
1833
+ // alliance_id:MM.checkAndPublishRawModel("Player", {
1834
+ // id: Game.player_id
1835
+ // }).getAllianceId(),
1836
+ // player_id:Game.player_id,
1837
+ // wood:data.wood,
1838
+ // stone:data.stone,
1839
+ // iron:data.iron,
1840
+ // power:data.power,
1841
+ // wonder_type: WorldWonders.all_wonders[_wonder].wonder_type,
1842
+ // wonder_name: JSON.parse(
1843
+ // RepConvTool.Atob(
1844
+ // $('a.gp_goto_wonder_link').attr('href')
1845
+ // )
1846
+ // ).name,
1847
+ // player_hash : RepConv.hash,
1848
+ // alliance_hash : $.md5(MM.checkAndPublishRawModel("Player", {
1849
+ // id: Game.player_id
1850
+ // }).getAllianceId() + "_" + Game.world_id)
1851
+ // },
1852
+ // _send = $.ajax({
1853
+ // 'url' : RepConv.grcrt_domain+'wonder.php',
1854
+ // 'method' : 'post',
1855
+ // 'data' : {json:(JSON.stringify(_json))},
1856
+ // 'cache':false,
1857
+ // 'async':true
1858
+ // });
1859
+ }
1860
+
1771
1861
function posibleSpell ( RCGP ) {
1772
1862
if ( RepConv . active . power ) {
1773
1863
switch ( RCGP . getContext ( ) . sub ) {
@@ -1778,6 +1868,9 @@ function _RepConvGRC() {
1778
1868
. css ( 'opacity' , '0.4' )
1779
1869
. attr ( 'href' , null )
1780
1870
. attr ( 'onclick' , null ) ;
1871
+ //$.each(RCGP.getJQElement().find($('.js-power-icon').filter(function(){return !$(this).hasClass('disabled')})), function(ind, elem){
1872
+ // $(elem).find($('div[name=counter]')).remove()
1873
+ //})
1781
1874
1782
1875
RepConv . Debug && console . log ( 'loadPower' ) ;
1783
1876
$ . each ( RCGP . getJQElement ( ) . find ( $ ( '.js-power-icon div[name=counter]' ) ) , function ( ind , elem ) {
@@ -1893,10 +1986,10 @@ function _RepConvGRC() {
1893
1986
) ,
1894
1987
resEmo = $ ( '<fieldset/>' , { 'style' : 'float:right; width:370px; min-height: 250px;' } )
1895
1988
1896
- var chbx = { }
1897
- $ . each ( RepConv . sChbxs , function ( opt , optData ) {
1898
- chbx [ opt ] = genCheckBox ( opt , RepConv . settings [ opt ] , optData . label )
1899
- } )
1989
+ var chbx = { }
1990
+ $ . each ( RepConv . sChbxs , function ( opt , optData ) {
1991
+ chbx [ opt ] = genCheckBox ( opt , RepConv . settings [ opt ] , optData . label )
1992
+ } )
1900
1993
1901
1994
// cPower = genCheckBox(RepConv.CookiePower, RepConv.active.power, 'CHKPOWERNAME'),
1902
1995
// cFTabs = genCheckBox(RepConv.CookieForumTabs, RepConv.active.ftabs, 'CHKFORUMTABS'),
@@ -1911,15 +2004,16 @@ function _RepConvGRC() {
1911
2004
1912
2005
// cbBuPo = genCheckBox(RepConv.Cookie+'_bupo', RepConv.settings[RepConv.Cookie+'_bupo'], 'CHKBUPO'),
1913
2006
1914
- var
1915
2007
cSLoop = genCheckBox ( 'GRCRTsoundLoop' , RepConv . active . sounds . loop , 'CHKSOUNDLOOP' ) ,
1916
2008
cSMute = genCheckBox ( 'GRCRTsoundMute' , RepConv . active . sounds . mute , 'POPSOUNDMUTE' ) ,
1917
2009
sStats = $ ( '<div/>' , { 'id' :'statsGRC2Sel' , 'class' :'dropdown default' , 'style' :'margin-left:5px;width: 150px;' } )
1918
2010
. dropdown ( {
1919
2011
list_pos : 'left' ,
1920
2012
value : RepConv . active . statsGRCL ,
1921
2013
options : [
2014
+ //{value: 'potusek', name: 'grepolis.potusek.eu'},
1922
2015
{ value : 'potusek' , name : 'www.grcrt.net' } ,
2016
+ //{value: 'grepostats', name: "grepostats.com"},
1923
2017
{ value : 'grepointel' , name : "grepointel.com" }
1924
2018
]
1925
2019
} )
@@ -2185,6 +2279,17 @@ function _RepConvGRC() {
2185
2279
}
2186
2280
}
2187
2281
2282
+ var acc = { } , alliance_name = MM . checkAndPublishRawModel ( 'Player' , { id :Game . player_id } ) . getAllianceName ( )
2283
+ $ . each ( ITowns . towns , function ( ind , town ) {
2284
+ var cc = town ;
2285
+ cc . points = cc . getPoints ( ) ;
2286
+ cc . player_name = Game . player_name
2287
+ cc . alliance_name = alliance_name
2288
+ acc [ ind ] = cc
2289
+ } )
2290
+
2291
+
2292
+
2188
2293
function emotsTabs ( wndType , action ) { //insertArea){
2189
2294
var content = $ ( '<div/>' , { 'class' : 'gpwindow_content' , 'style' : 'overflow-y:auto !important; max-height: 185px; min-height: 120px;' } ) ,
2190
2295
contentLinks = $ ( '<ul/>' , { 'class' :'menu_inner grcrt_menu_inner' , 'style' :'padding: 0px;left:0px;' } ) ,
@@ -3290,6 +3395,7 @@ function _RepConvGRC() {
3290
3395
json . iron = ( settings . url . indexOf ( 'decrease_build_time_with_favor' ) > - 1 ) ? 0 : json . iron ,
3291
3396
json . power = ( settings . url . indexOf ( 'decrease_build_time_with_favor' ) > - 1 ) ? 400 : 0 ,
3292
3397
RepConv . Debug && console . log ( json ) ;
3398
+ // logWonderSend(json);
3293
3399
}
3294
3400
//} catch (e){}
3295
3401
$ . each ( Layout . wnd . getAllOpen ( ) , function ( ind , elem ) {
0 commit comments