Changeset 0f248750e736e98d7cf586004bcfc79058092763
- Timestamp:
- 01/20/07 23:24:22
(2 years ago)
- Author:
- Christopher Jung <bktheg@web.de>
- git-committer:
- Christopher Jung <bktheg@web.de> 1169331862 +0100
- git-parent:
[be5d6adc26d6738f6d86e3bf510beb1a116e221e]
- git-author:
- Christopher Jung <bktheg@web.de> 1169331862 +0100
- Message:
Anzeige der benoetigten Forschungen in den Schiffinfos gefixt
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rdee43a8 |
r0f24875 |
|
| 24 | 24 | import org.apache.commons.lang.StringUtils; |
|---|
| 25 | 25 | |
|---|
| | 26 | import net.driftingsouls.ds2.server.Forschung; |
|---|
| 26 | 27 | import net.driftingsouls.ds2.server.cargo.Cargo; |
|---|
| 27 | 28 | import net.driftingsouls.ds2.server.cargo.ResourceEntry; |
|---|
| … | … | |
| 143 | 144 | for( int i=1; i <= 3; i++ ) { |
|---|
| 144 | 145 | if( shipBuildData.getInt("tr"+i) != 0 ) { |
|---|
| 145 | | SQLResultRow dat = db.first("SELECT t1.name, t2.r",shipBuildData.getInt("tr"+i)," AS research FROM forschungen AS t1,user_f AS t2 WHERE t1.id=",shipBuildData.get("tr"+i)," AND t2.id=",getUser().getID()); |
|---|
| | 146 | SQLResultRow dat = db.first("SELECT f.name, uf.r",shipBuildData.getInt("tr"+i)," AS research " + |
|---|
| | 147 | "FROM forschungen f JOIN user_f uf " + |
|---|
| | 148 | "WHERE f.id=",shipBuildData.get("tr"+i)," AND uf.id=",getUser().getID()); |
|---|
| 146 | 149 | String cssClass = "error"; |
|---|
| 147 | | if( !dat.isEmpty() ) { |
|---|
| | 150 | if( !dat.isEmpty() && dat.getBoolean("research") ) { |
|---|
| 148 | 151 | cssClass = "ok"; |
|---|
| 149 | 152 | } |
|---|
| … | … | |
| 158 | 161 | for( int i=1; i <= 3; i++ ) { |
|---|
| 159 | 162 | if( shipBuildData.getInt("tr"+i) != 0 ) { |
|---|
| 160 | | SQLResultRow dat = db.first("SELECT name FROM forschungen WHERE id=",shipBuildData.getInt("tr"+i)); |
|---|
| 161 | | |
|---|
| | 163 | Forschung f = Forschung.getInstance(shipBuildData.getInt("tr"+1)); |
|---|
| | 164 | |
|---|
| 162 | 165 | t.set_var( "shiptype.tr"+i, shipBuildData.getInt("tr"+i), |
|---|
| 163 | | "shiptype.tr"+i+".name", Common._title(dat.getString("name")) ); |
|---|
| | 166 | "shiptype.tr"+i+".name", Common._title(f.getName()) ); |
|---|
| 164 | 167 | } |
|---|
| 165 | 168 | } |
|---|