• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rusocode / ao-server / 17193670034

24 Aug 2025 08:55PM UTC coverage: 57.057% (-2.4%) from 59.47%
17193670034

push

github

rusocode
refactor: migrated from ini4j to apache.commons due to vulnerabilities

- New IniUtils class to read values from ini
- Converted the City.java class to record and now handles map limits
- obj.dat
 # Almost all keys were renamed in English for better consistency.
 # The “magical_weapon” flag was added to differentiate it from the ‘magical_power’ key (formerly called “StaffPower”), so now we have three types
   of weapons: RANGED_WEAPON, MAGICAL_WEAPON, and MELEE_WEAPON
 # Now the blacksmithing skill covers both the manufacture of items that require ingots and the smelting of ore to obtain them. This means
   that the “MinSkill” key, which was used to represent the skill required to smelt ore and also served to represent
   the skill required to use ships (boat, galley, and galleon), has been removed. Now, in order to use ships, the “navigation_skill” skill has been created, and the skill for smelting ore (formerly ‘MinSkill’) is integrated into “smithing_skill.”

580 of 1187 branches covered (48.86%)

Branch coverage included in aggregate %.

2545 of 4290 relevant lines covered (59.32%)

2.98 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
server/src/main/java/com/ao/service/worldobject/WorldObjectServiceImpl.java
1
package com.ao.service.worldobject;
2

3
import com.ao.data.dao.WorldObjectPropertiesDAO;
4
import com.ao.data.dao.exception.DAOException;
5
import com.ao.model.worldobject.WorldObject;
6
import com.ao.model.worldobject.factory.WorldObjectFactory;
7
import com.ao.model.worldobject.factory.WorldObjectFactoryException;
8
import com.ao.service.WorldObjectService;
9

10
import com.google.inject.Inject;
11

12
/**
13
 * Default implementation of WorldObjectService.
14
 */
15

16
public class WorldObjectServiceImpl implements WorldObjectService {
17

18
    protected WorldObjectPropertiesDAO woPropertiesDao;
19

20
    protected WorldObjectFactory woFactory;
21

22
    /**
23
     * Creates a new WorldObjectServiceImpl instance.
24
     *
25
     * @param woPropertiesDao world object properties dao to use
26
     */
27
    @Inject
28
    public WorldObjectServiceImpl(WorldObjectPropertiesDAO woPropertiesDao,
29
                                  WorldObjectFactory woFactory) {
30
        super();
×
31
        this.woPropertiesDao = woPropertiesDao;
×
32
        this.woFactory = woFactory;
×
33
    }
×
34

35
    /*
36
     * (non-Javadoc)
37
     * @see com.ao.service.WorldObjectService#loadObjects()
38
     */
39
    @Override
40
    public void loadObjects() throws DAOException {
41
        woPropertiesDao.loadAll();
×
42
    }
×
43

44
    /*
45
     * (non-Javadoc)
46
     * @see com.ao.service.WorldObjectService#createWorldObject(int, int)
47
     */
48
    @Override
49
    public WorldObject createWorldObject(int id, int amount) throws WorldObjectFactoryException {
50
        return woFactory.getWorldObject(woPropertiesDao.getWorldObjectProperties(id), amount);
×
51
    }
52

53
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc