<!--#include file="Class_PetStatus.asp"-->
<% 
Class PetSkillsClass

Private SkillGetMoney

Public Sub SkillInReTopic

Set ShowPetStatus=New PetStatus
with ShowPetStatus
.LetUserName=CookieUserName
.CheckPetExist
if .OwnerPetExist=1 then

.FormatPetData

response.write "<table align=center class=a2 cellPadding=1 cellspacing=1 width='100%'>"
response.write "<tr class=a1><td align=left height=20>宠物信息:</td></tr>" 
response.write "<tr class=a3><td align=left height=20>" 
if .OwnerPetDead=1 then
response.write "<li>您的宠物已经死亡!"
else
response.write "<li>宠物得到经验:"&DEF_PET_ReplyTopicExp
ConnPet.ExeCute("UPDATE [PetData] set PetExp= PetExp+"&DEF_PET_ReplyTopicExp&" WHERE username ='"&CookieUserName&"' and PetDead <1")
end if

if .OwnerSkill1<>0 then
SkillGetMoney=int(.OwnerPetLevel/10)+1
response.write "<li><font color='blue'>点贴成金</font>技能得到金钱:<font color='red'>"&SkillGetMoney&"</font>"
Conn.ExeCute("UPDATE [BBSXP_Users] set UserMoney=UserMoney+"&SkillGetMoney&" WHERE username ='"&CookieUserName&"'")
end if

response.write "</td></tr></table>"

End if

End with
Set ShowPetStatus=Nothing
End Sub


Public Sub SkillInNewTopic


Set ShowPetStatus=New PetStatus
with ShowPetStatus
.LetUserName=CookieUserName
.CheckPetExist

if .OwnerPetExist=1 then

.FormatPetData

response.write "<table align=center class=a2 cellPadding=1 cellspacing=1 width='100%'>"
response.write "<tr class=a1><td align=left>宠物信息:</td></tr>" 
response.write "<tr class=a3><td align=left>" 
if .OwnerPetDead=1 then
response.write "<li>您的宠物已经死亡!"
else
response.write "<li>宠物得到经验:"&DEF_PET_NewTopicExp
ConnPet.ExeCute("UPDATE [PetData] set PetExp= PetExp+"&DEF_PET_NewTopicExp&" WHERE username ='"&CookieUserName&"' and PetDead <1")
end if

if .OwnerSkill1<>0 then
SkillGetMoney=int(.OwnerPetLevel/10)+1
response.write "<li><font color='blue'>点贴成金</font>技能得到金钱:<font color='red'>"&SkillGetMoney&"</font>"
Conn.ExeCute("UPDATE [BBSXP_Users] set UserMoney=UserMoney+"&SkillGetMoney&" WHERE username ='"&CookieUserName&"'")
end if

response.write "</td></tr></table>"

End if
End with
Set ShowPetStatus=Nothing


End Sub

End class 
%>