Sync with L2jServer HighFive Mar 25th 2015.

This commit is contained in:
MobiusDev
2015-03-25 06:48:51 +00:00
parent e0c66b1412
commit 82606870c0
194 changed files with 2619 additions and 2869 deletions

View File

@@ -47,7 +47,7 @@ public class Post
public String postTxt;
}
private final List<CPost> _post;
private final List<CPost> _post = new ArrayList<>();
/**
* @param _PostOwner
@@ -59,8 +59,7 @@ public class Post
*/
public Post(String _PostOwner, int _PostOwnerID, long date, int tid, int _PostForumID, String txt)
{
_post = new ArrayList<>();
CPost cp = new CPost();
final CPost cp = new CPost();
cp.postId = 0;
cp.postOwner = _PostOwner;
cp.postOwnerId = _PostOwnerID;
@@ -73,6 +72,11 @@ public class Post
}
public Post(Topic t)
{
load(t);
}
public void insertindb(CPost cp)
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
@@ -93,23 +97,9 @@ public class Post
}
}
public Post(Topic t)
{
_post = new ArrayList<>();
load(t);
}
public CPost getCPost(int id)
{
int i = 0;
for (CPost cp : _post)
{
if (i++ == id)
{
return cp;
}
}
return null;
return _post.get(id);
}
public void deleteme(Topic t)
@@ -142,7 +132,7 @@ public class Post
{
while (rs.next())
{
CPost cp = new CPost();
final CPost cp = new CPost();
cp.postId = rs.getInt("post_id");
cp.postOwner = rs.getString("post_owner_name");
cp.postOwnerId = rs.getInt("post_ownerid");