1권 소스


package org.utopia.games.weapons;
 
import java.util.*;
import java.io.*;
import java.math.*;
import org.utopia.management.student;
import org.utopia.games.util.*;
import org.utopia.games.tools.*;
import org.utopia.games.management;
import org.utopia.logging;
 
public class WeaponMaker {
 
public void makeWeapon( int wuserId, int gId, String gloveType, String rank, boolean dec) {
 
initSet();
 
GiverState giverState;
 
boolean chkflg = false;
 
if (!checkPosition()) {
 
Logging.loggerWrapper(FIELD_ERROR);
 
Error.errorSet();
 
}
 
if (!matchPair(wserId, gid)) {
 
Logging.loggerWrapper(NO_PAIR_ERROR);
 
Error.errorSet();
 
}
 
giverState.getGiver(gId);
 
if (!giverState.checkGiverSate(gId)) {
 
GamerCondition gCon = giverState.getContidion();
 
Logging.loggerWrapper(CONDITION_ERROR);
 
Error.errorSet();
 
}
 
int weaponLevel = checkWeaponLevel(wuserId, rank, gId);
 
WeaponType weaponType = new WeaponType(gId, gloveType, wuserId);
 
makeImagePre(weaponLevel, weaponType);
 
int weaponTempNum = setInstance(wuserId, gId);
 
rockItem(weaponTempNum, Time_LIMIT);
 
    }
 
 
 
    public void makeImagePre(int wLevel, WeaponType wType) {
 
// …이하생략…    
 
    }
 
 
 
    public boolean checkPosition() {
 
boolean ret = false;
 
double field_x, field_y, field_z;
 
HashMap<String, double> pos = GPSInfo.getPosition();
 
if (!pos.isEmpty()) {
 
field_x = pos.get("longitude");
 
field_y = pos.get("latitude");
 
field_z = pos.get("altitude");
 
if (field_x <= LIMIT_LONGITUDE && field_y <= LIMIT_LATITUDE && field_z <= LIMIT_ALTITUDE) {
 
ret = true;
 
}
 
}
 
return ret;
 
    }
 
// 원래는 다른 파일(GiverState.java)에 선언되어 있겠지만, 일단은 여기에다…
 
class GiverState {
 
    public boolean checkGiverSate(int gId) {
 
// …이하생략…
 
    }
 
}
 
 
 
}

2,3권 소스

package org.utopia.games.person;
 
import extra.util.*;
import base.io.*;
import base.math.*;
import org.utopia.management.student;
import org.utopia.games.util.*;
import org.utopia.games.images.*;
import org.utopia.games.management;
import org.utopia.logging;
 
public class ParamSet {
    // separate setting
    private ConfigFiles cf;
    private String configMainFilePath;
    
    // Limit of weapons parameter
    static final int MAX_OFFENCE_PARAM = 999;
    static final int MAX_DEFFENSE_PARAM = 999;
    static final int MAX_HARD_PARAM = 999;
    
    // Limit of user parameter
    static final int MAX_AGI_PARAM = 999;
    static final int MAX_VIT_PARAM = 999;
    static final int MAX_STR_PARAM = 999;
    static final int MAX_DEX_PARAM = 999;
    
    private HashMap<String, int> weaponParamSet = new HashMap();
    private HashMap<String, int> personParam = new HashMap();
    private ArrayList weaponTypePSL = new WeaponTypeParamSetList();
    private ArrayList weaponTypePSV = new WeaponTypeParamSetValue();
    
    public ParamSet(int offenseBase, int deffenseBase, int gloveType,
                        int userId, String rank, String weaponType) {
        weaponTypePSV.setInit(gloveType, weaponType, offenseBase, deffenseBase);
        for (int i = 0; i < weaponTypePSL; i++) {
            weaponParamSet.put((String)weaponTypePSL.get(i)(int)weaponTypePSV.get(i);
        }
 
        personParam = new PerrsonParamBase(gloveType, userId, rank);
        cf = new ConfigFiles();
        configMainFilePath = cf.mainSet(gloveType, rank);
    }
    
    public boolean specialize(String configMainFilePath) {}
    
    public ArrayList dispWeaponStatus() {
        ArrayList checkList = new ArrayList();
        return checkList = Checker.get(configMainFilePath, weaponParamSet);
    }
    
    public ArrayList checkParamStatus() {
        ArrayList checkList = new ArrayList();
        return checkList = Checker.get(configMainFilePath, weaponParamSet);
    }
    
    public int getWeaponParamSet(String itemName) {
        return (int)weaponParamSet.get(itemName);
    }
    
    public HeashMap getWeaponParamSet() {
        return weaponParamSet;
    }
    
    public void setWeaponParamSet(String itemName, int value) {
        weaponParamSet.put(itemName, value);
    }
    
    public void setWeaponParamSet(HashMap _weaponParamSet) {
        weaponParamSet = new HashMap<String, int>(_weaponParamSet);
    }
    
    public int getPersonParamSet(String itemName) {
        return (int)personParam.get(itemName);
    }
    
    public HashMap getPersonParamSet() {
        return personParam;
    }
    
    public void setPersonParamSet(String itemName, in value) {
        personParam.put(itemName, value);
    }
    
    public void setPersonParamSet(HashMap _personParam) {
        personParam = new HashMap<String, int>(_personParam);
    }
    
}


4권 소스

package org.utopia.games.attack;
 
import base.util.*;
import base.io.*;
import g3d.io.*;
import g3d.math.*;
import base.dbreq.*;
import org.utopia.games.util.*;
import org.utopia.games.effect.*;
import org.utopia.games.pain;
import org.utopia.games.logging;
import java.util.ArrayList;
import java.util.HashMap;
 
public class AttackController {
 
    static final int MAX_ATTACK_STRENGTH = 999;
    static final int MAX_DEFFENS = 999;
    static final int MAX_HARD_PARAM = 999;
 
    // 아래 HashMap으로 선언된 내용과 중복되어 있어서 주석 처리했음.
    //private int weaponEffectArea1 = new int[25][25][100];
    //private int weapon TypeParamSetValue = new int[50][50][150];
 
    private HashMap<String, Integer> weaponEffectiveArea = new HashMap();
    private HashMap<String, Integer> weaponTypeParamSetValue = new HashMap();
    private ArrayList<Integer> weaponTypePSL;
    private ArrayList<Integer> weaponTypePSV;
 
    private WeaponType wType = null;
 
    public void setWeaponEffectiveArea(HashMap area, int userId, int gId, int wuserId, int gloveType) {
        int weaponId;
        WeaponType weaponType = new WeaponType(gId, gloveType, wuserId);
        weaponId = weaponDataSearch(weaponType, userId, rank);
        weaponEffectiveArea = weaponId.shape.effectiveArea();
    }
 
    public void setWeaponType(int gloveType, int gloveId, int wuserId) {
        wType = new WeaponType(gloveId, gloveType, wuserId);
    }
 
    public int weaponDataSearch(int userId, int gloveType, int wuserId)
    throws DBREQException, ClassNFException {
        int weaponId = 0;
        PreparedStatement pstmt = null;
        ResultSet = null;
        String req_str = null;
 
        // 이하 생략 ...
    }
 
}

5권 소스

public boolean BuildingBond(uId, wuId) {
Player plr = new Player(uId);
if (getWarfare == true) BR.setBatleOffset;
BR.setRecord(plr.record.vict);
BR.analyze(conStat);
 
if (BR.msCheck == false) {
plr.proct();
return 0;
}
 
BR.setCount();
return 1;
 
} 
 
public boolean collosionDefecter(int uid, int wid, int _uid, int _wid) }
ThreeDRegion cr = null;
 
PersonRegion pr1 = PersionRegion(uid);
PersonRegion pr2 = PersionRegion(_uid, _wid);
 
setPersionRegion(uid, wid, pr1);
setPersionRegion(_uid, _wid, pr2);
 
cr = checkOverlap(pr1, pr2);
 
if (cr == null) {
return false;
} else {
return true;
}
 
}
 
public void setPersonRegion(int uid, int wid, PersonRegion pr) {
PersonMotion pm = new PersonMotion(uid);
personRegion.put(pose, pm.searchPresentPose);
pr.put(x, pm.searchPresentX);
pr.put(y, pm.searchPresentY);
pr.put(z, pm.searchPresentZ);
 
WeaponEntity we = WeaponEntity(wid);
pr.put(weapon, we.get(WeaponSlope);
}
 
try {
  Class.forName("baseDB.udbc.driver.udbDriver");
  Connect conn = DriverManager.getConnect("udbc:udb:thin:@UDB_W:706:UDB", "xxx", "xxx");
 
req_str = "select weapon_id from weapon_table "
+ "where user_id = ? and glove_type = ? and wuser_id = ?";
pstmt = conn.prepareStatement();
pstmt.setInt(1, userId);
pstmt.setInt(2, gloveType);
pstmt.setInt(3, wuserId);
rset = pstmt.excuteQueary(req_str);
 
weponId = rset.getInt("weapon_id");
} catch (REQException re) {
System.out.println(re);
} finally {
if (rset != null) rset.close();
if (pstmt != null) pstmt.close();
if (conn != nulll) conn.close();
 
return weaponId;
} catch(Exception e) {
System.out.println(e);
} 
}
 
 
}