mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-15 00:15:08 +01:00
make guild hall available on creation
This commit is contained in:
@@ -135,7 +135,7 @@ func (guild *Guild) Save(s *Session) error {
|
|||||||
func (guild *Guild) CreateApplication(s *Session, charID uint32, applicationType GuildApplicationType, transaction *sql.Tx) error {
|
func (guild *Guild) CreateApplication(s *Session, charID uint32, applicationType GuildApplicationType, transaction *sql.Tx) error {
|
||||||
|
|
||||||
sql := `
|
sql := `
|
||||||
INSERT INTO guild_applications (guild_id, character_id, actor_id, application_type)
|
INSERT INTO guild_applications (guild_id, character_id, actor_id, application_type)
|
||||||
VALUES ($1, $2, $3, $4)
|
VALUES ($1, $2, $3, $4)
|
||||||
`
|
`
|
||||||
|
|
||||||
@@ -415,8 +415,8 @@ func CreateGuild(s *Session, guildName string) (int32, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
guildResult, err := transaction.Query(
|
guildResult, err := transaction.Query(
|
||||||
"INSERT INTO guilds (name, leader_id) VALUES ($1, $2) RETURNING id",
|
"INSERT INTO guilds (name, leader_id, rp, guild_hall) VALUES ($1, $2, $3, $4) RETURNING id",
|
||||||
guildName, s.charID,
|
guildName, s.charID, 48, 17
|
||||||
)
|
)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -507,7 +507,7 @@ func FindGuildsByName(s *Session, name string) ([]*Guild, error) {
|
|||||||
func GetGuildInfoByID(s *Session, guildID uint32) (*Guild, error) {
|
func GetGuildInfoByID(s *Session, guildID uint32) (*Guild, error) {
|
||||||
rows, err := s.server.db.Queryx(fmt.Sprintf(`
|
rows, err := s.server.db.Queryx(fmt.Sprintf(`
|
||||||
%s
|
%s
|
||||||
WHERE g.id = $1
|
WHERE g.id = $1
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
`, guildInfoSelectQuery), guildID)
|
`, guildInfoSelectQuery), guildID)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user